sku 14.0.2 → 14.0.3
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# sku
|
|
2
2
|
|
|
3
|
+
## 14.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- `sku test`: Fixes a bug where `jest` would fail to run tests on Node versions that enable require(esm) by default (>=[22.12.0][node 22.12]) ([#1173](https://github.com/seek-oss/sku/pull/1173))
|
|
8
|
+
|
|
9
|
+
[node 22.12]: https://nodejs.org/en/blog/release/v22.12.0
|
|
10
|
+
|
|
3
11
|
## 14.0.2
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -166,6 +174,12 @@
|
|
|
166
174
|
|
|
167
175
|
In addition to `sku.config.ts` and `sku.config.js`, sku will now also look for a `sku.config.mjs` file when attempting to resolve your application's configuration file.
|
|
168
176
|
|
|
177
|
+
- Update `prettier` from `^2.8.8` to `^3.4.1`
|
|
178
|
+
|
|
179
|
+
[Prettier V3] brings various code formatting changes than can be automatically fixed by running `sku format`.
|
|
180
|
+
|
|
181
|
+
[Prettier V3]: https://prettier.io/blog/2023/07/05/3.0.0.html
|
|
182
|
+
|
|
169
183
|
### Patch Changes
|
|
170
184
|
|
|
171
185
|
- `sku init`: Ensure latest React 18 version is installed in new projects as React 19 is not yet supported ([#1156](https://github.com/seek-oss/sku/pull/1156))
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const config:
|
|
1
|
+
import type { Configuration } from 'lint-staged';
|
|
2
|
+
declare const config: Configuration;
|
|
3
3
|
export default config;
|
package/dist/context/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import chalk from 'chalk';
|
|
4
|
-
import { createJiti } from 'jiti';
|
|
5
4
|
import { getPathFromCwd } from '../lib/cwd.js';
|
|
6
5
|
import defaultSkuConfig from './defaultSkuConfig.js';
|
|
7
6
|
import validateConfig from './validateConfig.js';
|
|
@@ -9,9 +8,14 @@ import defaultCompilePackages from './defaultCompilePackages.js';
|
|
|
9
8
|
import isCompilePackage from '../lib/isCompilePackage.js';
|
|
10
9
|
import { resolveAppSkuConfigPath } from './configPath.js';
|
|
11
10
|
import _debug from 'debug';
|
|
11
|
+
import { createRequire } from 'node:module';
|
|
12
|
+
import { fileURLToPath } from 'node:url';
|
|
13
|
+
const require = createRequire(import.meta.url);
|
|
14
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
15
|
+
const createJiti = require('jiti');
|
|
16
|
+
const jiti = createJiti(__filename);
|
|
12
17
|
const debug = _debug('sku:config');
|
|
13
|
-
const
|
|
14
|
-
const getSkuConfig = async () => {
|
|
18
|
+
const getSkuConfig = () => {
|
|
15
19
|
const appSkuConfigPath = resolveAppSkuConfigPath();
|
|
16
20
|
if (!appSkuConfigPath) {
|
|
17
21
|
debug('No sku config file found. Using default configuration.');
|
|
@@ -20,16 +24,15 @@ const getSkuConfig = async () => {
|
|
|
20
24
|
appSkuConfigPath: null,
|
|
21
25
|
};
|
|
22
26
|
}
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
});
|
|
27
|
+
const mod = jiti(appSkuConfigPath);
|
|
28
|
+
// Jiti require doesn't support the `default` config so we have to check for `default` ourselves
|
|
29
|
+
const appSkuConfig = mod?.default ?? mod;
|
|
27
30
|
return {
|
|
28
31
|
appSkuConfig,
|
|
29
32
|
appSkuConfigPath,
|
|
30
33
|
};
|
|
31
34
|
};
|
|
32
|
-
const { appSkuConfig, appSkuConfigPath } =
|
|
35
|
+
const { appSkuConfig, appSkuConfigPath } = getSkuConfig();
|
|
33
36
|
const skuConfig = {
|
|
34
37
|
...defaultSkuConfig,
|
|
35
38
|
...appSkuConfig,
|
package/dist/lib/preCommit.js
CHANGED
|
@@ -6,7 +6,6 @@ const preCommit = async () => {
|
|
|
6
6
|
// existing JSDoc type definitions.
|
|
7
7
|
// https://github.com/lint-staged/lint-staged/issues/1359
|
|
8
8
|
const { default: lintStaged } = await import('lint-staged');
|
|
9
|
-
// @ts-expect-error `@types/lint-staged` is wrong, and for some reason `tsc` doesn't pick up the
|
|
10
9
|
success = await lintStaged({ config });
|
|
11
10
|
}
|
|
12
11
|
catch (e) {
|