skuba 5.0.0 → 5.0.1

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 CHANGED
@@ -16,13 +16,35 @@ const maybeTsConfig = tryParseTsConfig();
16
16
 
17
17
  // Rewrite `ts-jest` transformations using our resolved `TS_JEST_PATH`.
18
18
  module.exports.transform = Object.fromEntries(
19
- Object.entries(defaults.transform).map(([key, value]) => [
20
- key,
21
- value === TS_JEST_NAME
22
- ? [
23
- TS_JEST_PATH,
24
- { isolatedModules: maybeTsConfig?.options.isolatedModules ?? true },
25
- ]
26
- : value,
27
- ]),
19
+ Object.entries(defaults.transform).map(([key, value]) => {
20
+ if (typeof value === 'string') {
21
+ return [
22
+ key,
23
+ value === TS_JEST_NAME
24
+ ? [
25
+ TS_JEST_PATH,
26
+ {
27
+ isolatedModules: maybeTsConfig?.options.isolatedModules ?? true,
28
+ },
29
+ ]
30
+ : value,
31
+ ];
32
+ }
33
+
34
+ return [
35
+ key,
36
+ value[0] === TS_JEST_NAME
37
+ ? [
38
+ TS_JEST_PATH,
39
+ {
40
+ ...value[1],
41
+ isolatedModules:
42
+ value[1]?.isolatedModules ??
43
+ maybeTsConfig?.isolatedModules ??
44
+ true,
45
+ },
46
+ ]
47
+ : value,
48
+ ];
49
+ }),
28
50
  );
@@ -0,0 +1,11 @@
1
+ import { transform } from './transform';
2
+
3
+ test('transform', () =>
4
+ expect(transform).toStrictEqual({
5
+ '^.+\\.tsx?$': [
6
+ expect.stringMatching(/\/skuba\/node_modules\/ts-jest\/dist\/index\.js$/),
7
+ {
8
+ isolatedModules: true,
9
+ },
10
+ ],
11
+ }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skuba",
3
- "version": "5.0.0",
3
+ "version": "5.0.1",
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",
@@ -83,7 +83,7 @@
83
83
  "enquirer": "^2.3.6",
84
84
  "esbuild": "~0.15.7",
85
85
  "eslint": "^8.11.0",
86
- "eslint-config-skuba": "1.1.4",
86
+ "eslint-config-skuba": "1.2.0",
87
87
  "execa": "^5.0.0",
88
88
  "fdir": "^5.0.0",
89
89
  "fs-extra": "^10.0.0",