@nlabs/lex 1.53.13 → 1.53.15
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.mjs +15 -1
- package/jest.config.template.cjs +30 -16
- package/package.json +2 -2
package/jest.config.mjs
CHANGED
|
@@ -43,7 +43,21 @@ const baseConfig = {
|
|
|
43
43
|
testEnvironment: 'node',
|
|
44
44
|
testRegex: '(/__tests__/.*|\\.(test|spec|integration))\\.(ts|tsx)?$',
|
|
45
45
|
transform: {
|
|
46
|
-
'^.+\\.(t|j)sx?$': '@swc/jest'
|
|
46
|
+
'^.+\\.(t|j)sx?$': ['@swc/jest', {
|
|
47
|
+
jsc: {
|
|
48
|
+
parser: {
|
|
49
|
+
decorators: true,
|
|
50
|
+
dynamicImport: true,
|
|
51
|
+
syntax: 'typescript',
|
|
52
|
+
tsx: true
|
|
53
|
+
},
|
|
54
|
+
transform: {
|
|
55
|
+
react: {
|
|
56
|
+
runtime: 'automatic'
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}]
|
|
47
61
|
},
|
|
48
62
|
verbose: true
|
|
49
63
|
};
|
package/jest.config.template.cjs
CHANGED
|
@@ -14,22 +14,6 @@ if(process.env.LEX_CONFIG) {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
const baseConfig = {
|
|
17
|
-
testEnvironment: 'jsdom',
|
|
18
|
-
moduleFileExtensions: ['ts', 'tsx', 'js', 'json', 'node'],
|
|
19
|
-
moduleNameMapper: {
|
|
20
|
-
'^(\\.{1,2}/.*)\\.js$': '$1',
|
|
21
|
-
'\\.(css|less|scss|sass)$': 'identity-obj-proxy',
|
|
22
|
-
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/__mocks__/fileMock.js'
|
|
23
|
-
},
|
|
24
|
-
transformIgnorePatterns: [
|
|
25
|
-
'node_modules/(?!(strip-indent|chalk|@testing-library/jest-dom|zod|@nlabs|@nlabs/arkhamjs|@nlabs/utils|@nlabs/lex)/.*)'
|
|
26
|
-
],
|
|
27
|
-
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
|
|
28
|
-
transform: {
|
|
29
|
-
'^.+\\.(t|j)sx?$': '@swc/jest'
|
|
30
|
-
},
|
|
31
|
-
moduleDirectories: ['node_modules', '<rootDir>'],
|
|
32
|
-
testRegex: '(/__tests__/.*|\\.(test|spec|integration))\\.(ts|tsx|js|jsx)?$',
|
|
33
17
|
collectCoverage: true,
|
|
34
18
|
coverageDirectory: '<rootDir>/coverage',
|
|
35
19
|
coveragePathIgnorePatterns: [
|
|
@@ -40,6 +24,36 @@ const baseConfig = {
|
|
|
40
24
|
'.d.ts'
|
|
41
25
|
],
|
|
42
26
|
coverageReporters: ['html', 'text'],
|
|
27
|
+
moduleDirectories: ['node_modules', '<rootDir>'],
|
|
28
|
+
moduleFileExtensions: ['ts', 'tsx', 'js', 'json', 'node'],
|
|
29
|
+
moduleNameMapper: {
|
|
30
|
+
'\\.(css|less|scss|sass)$': 'identity-obj-proxy',
|
|
31
|
+
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/__mocks__/fileMock.js',
|
|
32
|
+
'^(\\.{1,2}/.*)\\.js$': '$1'
|
|
33
|
+
},
|
|
34
|
+
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
|
|
35
|
+
testEnvironment: 'jsdom',
|
|
36
|
+
testRegex: '(/__tests__/.*|\\.(test|spec|integration))\\.(ts|tsx|js|jsx)?$',
|
|
37
|
+
transform: {
|
|
38
|
+
'^.+\\.(t|j)sx?$': ['@swc/jest', {
|
|
39
|
+
jsc: {
|
|
40
|
+
parser: {
|
|
41
|
+
decorators: true,
|
|
42
|
+
dynamicImport: true,
|
|
43
|
+
syntax: 'typescript',
|
|
44
|
+
tsx: true
|
|
45
|
+
},
|
|
46
|
+
transform: {
|
|
47
|
+
react: {
|
|
48
|
+
runtime: 'automatic'
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}]
|
|
53
|
+
},
|
|
54
|
+
transformIgnorePatterns: [
|
|
55
|
+
'node_modules/(?!(strip-indent|chalk|@testing-library/jest-dom|zod|@nlabs|@nlabs/arkhamjs|@nlabs/utils|@nlabs/lex)/.*)'
|
|
56
|
+
],
|
|
43
57
|
verbose: true
|
|
44
58
|
};
|
|
45
59
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nlabs/lex",
|
|
3
|
-
"version": "1.53.
|
|
3
|
+
"version": "1.53.15",
|
|
4
4
|
"description": "Lex",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
"dotenv-webpack": "^8.1.1",
|
|
117
117
|
"download-npm-package": "^3.1.12",
|
|
118
118
|
"eslint": "^9.39.2",
|
|
119
|
-
"eslint-config-styleguidejs": "^4.3.
|
|
119
|
+
"eslint-config-styleguidejs": "^4.3.1",
|
|
120
120
|
"execa": "9.6.1",
|
|
121
121
|
"expect": "^30.2.0",
|
|
122
122
|
"express": "^5.2.1",
|