@xylabs/sdk-js 3.6.1 → 3.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/jest.config.ts +8 -3
- package/jestSetup/globalSetup.ts +18 -0
- package/jestSetup/globalTeardown.ts +12 -0
- package/jestSetup/setupFiles.ts +10 -0
- package/package.json +34 -34
package/jest.config.ts
CHANGED
|
@@ -2,12 +2,16 @@ const generateJestConfig = ({ esModules }: { esModules: string[] }) => {
|
|
|
2
2
|
const esModulesList = Array.isArray(esModules) ? esModules.join('|') : esModules
|
|
3
3
|
return {
|
|
4
4
|
coveragePathIgnorePatterns: ['<rootDir>/(.*)/dist'],
|
|
5
|
+
extensionsToTreatAsEsm: ['.ts'],
|
|
6
|
+
globalSetup: './jestSetup/globalSetup.ts',
|
|
7
|
+
globalTeardown: './jestSetup/globalTeardown.ts',
|
|
5
8
|
moduleNameMapper: {
|
|
6
9
|
'^(\\.{1,2}/.*)\\.js$': '$1',
|
|
7
10
|
},
|
|
8
|
-
preset: 'ts-jest
|
|
11
|
+
preset: 'ts-jest',
|
|
9
12
|
setupFiles: ['dotenv/config'],
|
|
10
|
-
setupFilesAfterEnv: ['jest-sorted', 'jest-extended/all'],
|
|
13
|
+
setupFilesAfterEnv: ['jest-sorted', 'jest-extended/all', './jestSetup/setupFiles.ts'],
|
|
14
|
+
testEnvironment: 'node',
|
|
11
15
|
testRegex: String.raw`(/__tests__/.*|(\.|/)((!perf\.)test|spec))\.tsx?$`,
|
|
12
16
|
testTimeout: 200_000,
|
|
13
17
|
transform: {
|
|
@@ -16,6 +20,7 @@ const generateJestConfig = ({ esModules }: { esModules: string[] }) => {
|
|
|
16
20
|
'ts-jest',
|
|
17
21
|
{
|
|
18
22
|
tsconfig: 'tsconfig.test.json',
|
|
23
|
+
useESM: true,
|
|
19
24
|
},
|
|
20
25
|
],
|
|
21
26
|
},
|
|
@@ -23,7 +28,7 @@ const generateJestConfig = ({ esModules }: { esModules: string[] }) => {
|
|
|
23
28
|
}
|
|
24
29
|
}
|
|
25
30
|
|
|
26
|
-
const config = generateJestConfig({ esModules: ['is-ip', 'ip-regex', 'lodash-es', 'uuid', 'lodash-es'] })
|
|
31
|
+
const config = generateJestConfig({ esModules: ['is-ip', 'ip-regex', 'lodash-es', 'uuid', 'lodash-es', 'quick-lru'] })
|
|
27
32
|
|
|
28
33
|
// eslint-disable-next-line import/no-default-export
|
|
29
34
|
export default config
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { config } from 'dotenv'
|
|
2
|
+
config()
|
|
3
|
+
import { Config } from 'jest'
|
|
4
|
+
import { SuperTest, Test } from 'supertest'
|
|
5
|
+
|
|
6
|
+
// Augment global scope with shared variables (must be var)
|
|
7
|
+
declare global {
|
|
8
|
+
// eslint-disable-next-line no-var
|
|
9
|
+
var req: SuperTest<Test>
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Jest global setup method runs before any tests are run
|
|
14
|
+
* https://jestjs.io/docs/configuration#globalsetup-string
|
|
15
|
+
*/
|
|
16
|
+
const setup = async (_globalConfig: Config, _projectConfig: Config) => {}
|
|
17
|
+
// eslint-disable-next-line id-denylist
|
|
18
|
+
module.exports = setup
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { config } from 'dotenv'
|
|
2
|
+
config()
|
|
3
|
+
import { Config } from 'jest'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Jest global teardown method runs after all tests are run
|
|
7
|
+
* https://jestjs.io/docs/configuration#globalteardown-string
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
const teardown = async (_globalConfig: Config, _projectConfig: Config) => {}
|
|
11
|
+
// eslint-disable-next-line id-denylist
|
|
12
|
+
module.exports = teardown
|
package/package.json
CHANGED
|
@@ -38,49 +38,49 @@
|
|
|
38
38
|
"esm"
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@xylabs/api": "^3.6.
|
|
42
|
-
"@xylabs/array": "^3.6.
|
|
43
|
-
"@xylabs/assert": "^3.6.
|
|
44
|
-
"@xylabs/axios": "^3.6.
|
|
45
|
-
"@xylabs/crypto": "^3.6.
|
|
46
|
-
"@xylabs/decimal-precision": "^3.6.
|
|
47
|
-
"@xylabs/delay": "^3.6.
|
|
48
|
-
"@xylabs/error": "^3.6.
|
|
49
|
-
"@xylabs/eth-address": "^3.6.
|
|
50
|
-
"@xylabs/exists": "^3.6.
|
|
51
|
-
"@xylabs/forget": "^3.6.
|
|
52
|
-
"@xylabs/function-name": "^3.6.
|
|
53
|
-
"@xylabs/hex": "^3.6.
|
|
54
|
-
"@xylabs/log": "^3.6.
|
|
55
|
-
"@xylabs/logger": "^3.6.
|
|
56
|
-
"@xylabs/object": "^3.6.
|
|
57
|
-
"@xylabs/platform": "^3.6.
|
|
58
|
-
"@xylabs/profile": "^3.6.
|
|
59
|
-
"@xylabs/promise": "^3.6.
|
|
60
|
-
"@xylabs/retry": "^3.6.
|
|
61
|
-
"@xylabs/set": "^3.6.
|
|
62
|
-
"@xylabs/static-implements": "^3.6.
|
|
63
|
-
"@xylabs/timer": "^3.6.
|
|
64
|
-
"@xylabs/url": "^3.6.
|
|
41
|
+
"@xylabs/api": "^3.6.2",
|
|
42
|
+
"@xylabs/array": "^3.6.2",
|
|
43
|
+
"@xylabs/assert": "^3.6.2",
|
|
44
|
+
"@xylabs/axios": "^3.6.2",
|
|
45
|
+
"@xylabs/crypto": "^3.6.2",
|
|
46
|
+
"@xylabs/decimal-precision": "^3.6.2",
|
|
47
|
+
"@xylabs/delay": "^3.6.2",
|
|
48
|
+
"@xylabs/error": "^3.6.2",
|
|
49
|
+
"@xylabs/eth-address": "^3.6.2",
|
|
50
|
+
"@xylabs/exists": "^3.6.2",
|
|
51
|
+
"@xylabs/forget": "^3.6.2",
|
|
52
|
+
"@xylabs/function-name": "^3.6.2",
|
|
53
|
+
"@xylabs/hex": "^3.6.2",
|
|
54
|
+
"@xylabs/log": "^3.6.2",
|
|
55
|
+
"@xylabs/logger": "^3.6.2",
|
|
56
|
+
"@xylabs/object": "^3.6.2",
|
|
57
|
+
"@xylabs/platform": "^3.6.2",
|
|
58
|
+
"@xylabs/profile": "^3.6.2",
|
|
59
|
+
"@xylabs/promise": "^3.6.2",
|
|
60
|
+
"@xylabs/retry": "^3.6.2",
|
|
61
|
+
"@xylabs/set": "^3.6.2",
|
|
62
|
+
"@xylabs/static-implements": "^3.6.2",
|
|
63
|
+
"@xylabs/timer": "^3.6.2",
|
|
64
|
+
"@xylabs/url": "^3.6.2"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@types/jest": "^29.5.12",
|
|
68
68
|
"@types/supertest": "^6.0.2",
|
|
69
|
-
"@typescript-eslint/parser": "^7.16.
|
|
70
|
-
"@xylabs/config": "^3.
|
|
71
|
-
"@xylabs/eslint-config": "^3.
|
|
72
|
-
"@xylabs/eslint-config-flat": "^3.
|
|
73
|
-
"@xylabs/ts-scripts-yarn3": "^3.
|
|
74
|
-
"@xylabs/tsconfig": "^3.
|
|
75
|
-
"@xylabs/tsconfig-jest": "^3.
|
|
69
|
+
"@typescript-eslint/parser": "^7.16.1",
|
|
70
|
+
"@xylabs/config": "^3.12.2",
|
|
71
|
+
"@xylabs/eslint-config": "^3.12.2",
|
|
72
|
+
"@xylabs/eslint-config-flat": "^3.12.2",
|
|
73
|
+
"@xylabs/ts-scripts-yarn3": "^3.12.2",
|
|
74
|
+
"@xylabs/tsconfig": "^3.12.2",
|
|
75
|
+
"@xylabs/tsconfig-jest": "^3.12.2",
|
|
76
76
|
"dotenv": "^16.4.5",
|
|
77
|
-
"eslint": "^9.
|
|
77
|
+
"eslint": "^9.7.0",
|
|
78
78
|
"jest": "^29.7.0",
|
|
79
79
|
"jest-environment-jsdom": "^29.7.0",
|
|
80
80
|
"jest-extended": "^4.0.2",
|
|
81
81
|
"jest-sorted": "^1.0.15",
|
|
82
82
|
"reflect-metadata": "^0.2.2",
|
|
83
|
-
"ts-jest": "^29.2.
|
|
83
|
+
"ts-jest": "^29.2.2",
|
|
84
84
|
"typescript": "^5.5.3"
|
|
85
85
|
},
|
|
86
86
|
"resolutions": {
|
|
@@ -106,6 +106,6 @@
|
|
|
106
106
|
"node": "18.17.1",
|
|
107
107
|
"yarn": "1.22.19"
|
|
108
108
|
},
|
|
109
|
-
"version": "3.6.
|
|
109
|
+
"version": "3.6.2",
|
|
110
110
|
"type": "module"
|
|
111
111
|
}
|