Skip to content

Commit 81555e9

Browse files
authored
Merge pull request #84 from Relewise/feat/update-3rd-party
feat: update all 3rd party packages
2 parents 0633a6c + 6e256f9 commit 81555e9

File tree

9 files changed

+7953
-14087
lines changed

9 files changed

+7953
-14087
lines changed

packages/client/fix-exports.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
const fs = require('fs');
2+
const path = require('path');
3+
4+
// Path to the autogenerated file
5+
const filePath = path.join(__dirname, './src/models/data-contracts.ts');
6+
7+
// Read the file content
8+
fs.readFile(filePath, 'utf8', (err, data) => {
9+
if (err) {
10+
console.error('Error reading the file:', err);
11+
return;
12+
}
13+
14+
// Find the line with the type definition and add "export"
15+
const updatedContent = data.replace(/type UtilRequiredKeys/g, 'export type UtilRequiredKeys');
16+
17+
// Write the updated content back to the file
18+
fs.writeFile(filePath, updatedContent, 'utf8', (err) => {
19+
if (err) {
20+
console.error('Error writing the file:', err);
21+
return;
22+
}
23+
console.log('File updated successfully with export');
24+
});
25+
});

packages/client/jest.config.cjs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@ module.exports = {
55
extensionsToTreatAsEsm: ['.ts'],
66
moduleDirectories: ['node_modules'],
77
transform: {
8-
'^.+\\.[tj]s$': 'ts-jest',
8+
'^.+\\.[tj]s$': ['ts-jest', {
9+
'ts-jest': {
10+
tsconfig: {
11+
allowJs: true,
12+
},
13+
},
14+
}]
915
},
1016
transformIgnorePatterns: [
1117
'node_modules/(?!(@relewise)/)',
1218
'../lib/dist/cjs/relewise-client.js',
1319
],
14-
globals: {
15-
'ts-jest': {
16-
tsconfig: {
17-
allowJs: true,
18-
},
19-
},
20-
},
2120
};

0 commit comments

Comments
 (0)