skuba 7.5.2-jest-node-next-20240319065558 → 8.0.0-8.0.0-update-eslint-config-skuba-20240323065311
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/transform.js +3 -3
- package/package.json +6 -6
- package/jest/moduleNameMapper.test.ts +0 -64
- package/jest/transform.test.ts +0 -13
package/jest/transform.js
CHANGED
|
@@ -35,7 +35,7 @@ const BROKEN_MODULE_RESOLUTIONS = new Set([
|
|
|
35
35
|
const tsconfig = BROKEN_MODULE_RESOLUTIONS.has(
|
|
36
36
|
maybeTsConfig?.options.moduleResolution,
|
|
37
37
|
)
|
|
38
|
-
? { moduleResolution: 'Node' }
|
|
38
|
+
? { tsconfig: { moduleResolution: 'Node' } }
|
|
39
39
|
: undefined;
|
|
40
40
|
|
|
41
41
|
// Rewrite `ts-jest` transformations using our resolved `TS_JEST_PATH`.
|
|
@@ -48,8 +48,8 @@ module.exports.transform = Object.fromEntries(
|
|
|
48
48
|
? [
|
|
49
49
|
TS_JEST_PATH,
|
|
50
50
|
{
|
|
51
|
+
...tsconfig,
|
|
51
52
|
isolatedModules,
|
|
52
|
-
tsconfig,
|
|
53
53
|
},
|
|
54
54
|
]
|
|
55
55
|
: value,
|
|
@@ -63,8 +63,8 @@ module.exports.transform = Object.fromEntries(
|
|
|
63
63
|
TS_JEST_PATH,
|
|
64
64
|
{
|
|
65
65
|
...value[1],
|
|
66
|
+
...tsconfig,
|
|
66
67
|
isolatedModules,
|
|
67
|
-
tsconfig,
|
|
68
68
|
},
|
|
69
69
|
]
|
|
70
70
|
: value,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skuba",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.08.0.0-update-eslint-config-skuba-20240323065311",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "SEEK development toolkit for backend applications and packages",
|
|
6
6
|
"homepage": "https://github.com/seek-oss/skuba#readme",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"files": [
|
|
22
22
|
"config/**/*",
|
|
23
|
-
"jest
|
|
23
|
+
"jest/**/*.js",
|
|
24
24
|
"lib*/**/*.d.ts",
|
|
25
25
|
"lib*/**/*.js",
|
|
26
26
|
"lib*/**/*.js.map",
|
|
@@ -66,7 +66,6 @@
|
|
|
66
66
|
"enquirer": "^2.3.6",
|
|
67
67
|
"esbuild": "~0.20.0",
|
|
68
68
|
"eslint": "^8.11.0",
|
|
69
|
-
"eslint-config-skuba": "3.1.0",
|
|
70
69
|
"execa": "^5.0.0",
|
|
71
70
|
"fast-glob": "^3.3.2",
|
|
72
71
|
"fs-extra": "^11.0.0",
|
|
@@ -100,7 +99,8 @@
|
|
|
100
99
|
"tsconfig-seek": "2.0.0",
|
|
101
100
|
"typescript": "~5.3.0",
|
|
102
101
|
"validate-npm-package-name": "^5.0.0",
|
|
103
|
-
"zod": "^3.22.4"
|
|
102
|
+
"zod": "^3.22.4",
|
|
103
|
+
"eslint-config-skuba": "4.0.0-update-eslint-config-skuba-20240323065311"
|
|
104
104
|
},
|
|
105
105
|
"devDependencies": {
|
|
106
106
|
"@changesets/cli": "2.27.1",
|
|
@@ -139,9 +139,9 @@
|
|
|
139
139
|
"optional": true
|
|
140
140
|
}
|
|
141
141
|
},
|
|
142
|
-
"packageManager": "pnpm@8.15.
|
|
142
|
+
"packageManager": "pnpm@8.15.5",
|
|
143
143
|
"engines": {
|
|
144
|
-
"node": ">=18.
|
|
144
|
+
"node": ">=18.18.0"
|
|
145
145
|
},
|
|
146
146
|
"publishConfig": {
|
|
147
147
|
"provenance": true
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { createModuleNameMapper } from './moduleNameMapper';
|
|
2
|
-
|
|
3
|
-
describe('moduleNameMapper', () => {
|
|
4
|
-
const act = (paths?: unknown, baseUrl?: string) =>
|
|
5
|
-
createModuleNameMapper(() => ({
|
|
6
|
-
compilerOptions: {
|
|
7
|
-
baseUrl,
|
|
8
|
-
paths,
|
|
9
|
-
},
|
|
10
|
-
}));
|
|
11
|
-
|
|
12
|
-
it('expands wildcard paths', () =>
|
|
13
|
-
expect(act({ 'src/*': ['src/*'], 'lib/wip/*': ['lib/wip/*'] }))
|
|
14
|
-
.toMatchInlineSnapshot(`
|
|
15
|
-
{
|
|
16
|
-
"^lib/wip$": "<rootDir>/lib/wip",
|
|
17
|
-
"^lib/wip/(.*)$": "<rootDir>/lib/wip/$1",
|
|
18
|
-
"^src$": "<rootDir>/src",
|
|
19
|
-
"^src/(.*)$": "<rootDir>/src/$1",
|
|
20
|
-
}
|
|
21
|
-
`));
|
|
22
|
-
|
|
23
|
-
it('expands non-wildcard paths', () =>
|
|
24
|
-
expect(act({ cli: ['cli'], 'src/': ['src/'] })).toMatchInlineSnapshot(`
|
|
25
|
-
{
|
|
26
|
-
"^cli$": "<rootDir>/cli",
|
|
27
|
-
"^cli/(.*)$": "<rootDir>/cli/$1",
|
|
28
|
-
"^src$": "<rootDir>/src",
|
|
29
|
-
"^src/(.*)$": "<rootDir>/src/$1",
|
|
30
|
-
}
|
|
31
|
-
`));
|
|
32
|
-
|
|
33
|
-
it('expands duplicate asymmetric paths', () =>
|
|
34
|
-
expect(
|
|
35
|
-
act({
|
|
36
|
-
jquery: ['node_modules/jquery/dist/jquery'],
|
|
37
|
-
'jquery/*': ['node_modules/jquery/dist/jquery/*'],
|
|
38
|
-
}),
|
|
39
|
-
).toMatchInlineSnapshot(`
|
|
40
|
-
{
|
|
41
|
-
"^jquery$": "<rootDir>/node_modules/jquery/dist/jquery",
|
|
42
|
-
"^jquery/(.*)$": "<rootDir>/node_modules/jquery/dist/jquery/$1",
|
|
43
|
-
}
|
|
44
|
-
`));
|
|
45
|
-
|
|
46
|
-
it('respects a base URL', () =>
|
|
47
|
-
expect(act({ cli: ['../cli'], 'app/*': ['app/*'] }, 'src'))
|
|
48
|
-
.toMatchInlineSnapshot(`
|
|
49
|
-
{
|
|
50
|
-
"^app$": "<rootDir>/src/app",
|
|
51
|
-
"^app/(.*)$": "<rootDir>/src/app/$1",
|
|
52
|
-
"^cli$": "<rootDir>/cli",
|
|
53
|
-
"^cli/(.*)$": "<rootDir>/cli/$1",
|
|
54
|
-
}
|
|
55
|
-
`));
|
|
56
|
-
|
|
57
|
-
it('respects no paths', () => expect(act({})).toMatchInlineSnapshot(`{}`));
|
|
58
|
-
|
|
59
|
-
it('defaults to no paths on undefined', () =>
|
|
60
|
-
expect(act(undefined)).toMatchInlineSnapshot(`{}`));
|
|
61
|
-
|
|
62
|
-
it('defaults to no paths on invalid config', () =>
|
|
63
|
-
expect(act('INVALID')).toMatchInlineSnapshot(`{}`));
|
|
64
|
-
});
|
package/jest/transform.test.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { transform } from './transform';
|
|
2
|
-
|
|
3
|
-
test('transform', () =>
|
|
4
|
-
expect(transform).toStrictEqual({
|
|
5
|
-
'^.+\\.tsx?$': [
|
|
6
|
-
expect.stringMatching(
|
|
7
|
-
/\/skuba\/node_modules\/.*\/?ts-jest\/dist\/index\.js$/,
|
|
8
|
-
),
|
|
9
|
-
{
|
|
10
|
-
isolatedModules: true,
|
|
11
|
-
},
|
|
12
|
-
],
|
|
13
|
-
}));
|