sku 13.0.0 → 13.0.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/CHANGELOG.md +59 -5
- package/lib/configure.js +1 -1
- package/package.json +4 -8
- package/scripts/test.js +3 -3
- package/config/jest/index.d.ts +0 -1
- package/config/jest/index.js +0 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,25 +1,59 @@
|
|
|
1
1
|
# sku
|
|
2
2
|
|
|
3
|
+
## 13.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Replace `sku/config/jest` entrypoint with `sku/jest-preset` ([#1024](https://github.com/seek-oss/sku/pull/1024))
|
|
8
|
+
|
|
9
|
+
**BREAKING CHANGE FOR CUSTOM JEST CONFIG**:
|
|
10
|
+
|
|
11
|
+
This breaking change will only affect a very small number of projects that have a custom Jest configuration/wish to debug tests in their IDE, and it is intended to be a quick fix/improvement for a feature released in `sku@13.0.0`. Therefore, it's not being released as a major version.
|
|
12
|
+
|
|
13
|
+
The `sku/config/jest` entrypoint has been removed in favor of a new `sku/jest-preset` entrypoint. The `sku/jest-preset` module is a better way to expose a [jest preset], rather than a relative path (the previous implementation), as it works even if `sku` is hoisted to a parent `node_modules` directory.
|
|
14
|
+
|
|
15
|
+
**MIGRATION GUIDE**:
|
|
16
|
+
|
|
17
|
+
```diff
|
|
18
|
+
// jest.config.js
|
|
19
|
+
- const { preset } = require('sku/config/jest');
|
|
20
|
+
|
|
21
|
+
/** @type {import('jest').Config} */
|
|
22
|
+
module.exports = {
|
|
23
|
+
// If you've already migrated to sku v13
|
|
24
|
+
- preset,
|
|
25
|
+
// If you're still on sku v12.x
|
|
26
|
+
- preset: 'sku/config/jest',
|
|
27
|
+
+ preset: 'sku',
|
|
28
|
+
};
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
[jest preset]: https://jestjs.io/docs/configuration#preset-string
|
|
32
|
+
|
|
33
|
+
## 13.0.1
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- Add `pnpm-lock.yaml` to `.prettierignore` and `.eslintignore` ([#1021](https://github.com/seek-oss/sku/pull/1021))
|
|
38
|
+
|
|
3
39
|
## 13.0.0
|
|
4
40
|
|
|
5
41
|
### Major Changes
|
|
6
42
|
|
|
7
|
-
- Export jest preset
|
|
43
|
+
- Export jest preset ([#984](https://github.com/seek-oss/sku/pull/984))
|
|
8
44
|
|
|
9
45
|
**BREAKING CHANGE**:
|
|
10
46
|
|
|
11
|
-
The jest preset is now accessible via
|
|
47
|
+
The jest preset is now accessible via the `sku` preset. This may affect users that require a jest config for debugging tests in their IDE. See the [testing documentation] for more information.
|
|
12
48
|
|
|
13
49
|
**MIGRATION GUIDE**:
|
|
14
50
|
|
|
15
51
|
```diff
|
|
16
52
|
// jest.config.js
|
|
17
|
-
+ const { preset } = require('sku/config/jest');
|
|
18
|
-
|
|
19
53
|
/** @type {import('jest').Config} */
|
|
20
54
|
module.exports = {
|
|
21
55
|
- preset: 'sku/config/jest',
|
|
22
|
-
+ preset,
|
|
56
|
+
+ preset: 'sku',
|
|
23
57
|
};
|
|
24
58
|
```
|
|
25
59
|
|
|
@@ -164,6 +198,26 @@
|
|
|
164
198
|
}
|
|
165
199
|
```
|
|
166
200
|
|
|
201
|
+
If you have a [multi-language] application, you will want to compile your translations before running the Storybook CLI:
|
|
202
|
+
|
|
203
|
+
```jsonc
|
|
204
|
+
// package.json
|
|
205
|
+
{
|
|
206
|
+
"scripts": {
|
|
207
|
+
"storybook": "sku translations compile && storybook dev" // or storybook build
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
If you want to run a development Storybook and see Vocab translations update in real time, you can run the [`sku translations compile --watch`][translations compile watch] command at the same time as `storybook dev`.
|
|
213
|
+
This can be achieved via a package such as [`concurrently`], or if you are using `pnpm` you can use `pnpm`'s built-in support for [running multiple scripts] in parallel.
|
|
214
|
+
|
|
215
|
+
Please read the [Storybook CLI documentation] for more information.
|
|
216
|
+
|
|
217
|
+
[multi-language]: ./docs/multi-language
|
|
218
|
+
[translations compile watch]: ./docs/cli?id=translations-compile
|
|
219
|
+
[`concurrently`]: https://www.npmjs.com/package/concurrently
|
|
220
|
+
[running multiple scripts]: https://pnpm.io/8.x/cli/run#running-multiple-scripts
|
|
167
221
|
[storybook cli]: https://storybook.js.org/docs/cli/
|
|
168
222
|
|
|
169
223
|
#### Update Storybook imports
|
package/lib/configure.js
CHANGED
|
@@ -65,7 +65,7 @@ module.exports = async () => {
|
|
|
65
65
|
await writeFileToCWD(tsConfigFileName, createTSConfig());
|
|
66
66
|
gitIgnorePatterns.push(tsConfigFileName);
|
|
67
67
|
|
|
68
|
-
const lintIgnorePatterns = [...gitIgnorePatterns];
|
|
68
|
+
const lintIgnorePatterns = [...gitIgnorePatterns, 'pnpm-lock.yaml'];
|
|
69
69
|
|
|
70
70
|
if (languages) {
|
|
71
71
|
const generatedVocabFileGlob = '**/*.vocab/index.ts';
|
package/package.json
CHANGED
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sku",
|
|
3
|
-
"version": "13.0.
|
|
3
|
+
"version": "13.0.2",
|
|
4
4
|
"description": "Front-end development toolkit, powered by Webpack, Babel, Vanilla Extract and Jest",
|
|
5
5
|
"types": "./sku-types.d.ts",
|
|
6
6
|
"bin": {
|
|
7
7
|
"sku": "./bin/sku.js"
|
|
8
8
|
},
|
|
9
9
|
"exports": {
|
|
10
|
-
".":
|
|
11
|
-
|
|
12
|
-
},
|
|
13
|
-
"./config/jest": {
|
|
14
|
-
"default": "./config/jest/index.js",
|
|
15
|
-
"types": "./config/jest/index.d.ts"
|
|
16
|
-
},
|
|
10
|
+
".": "./sku-types.d.ts",
|
|
11
|
+
"./jest-preset": "./config/jest/jest-preset.js",
|
|
17
12
|
"./config/storybook": {
|
|
18
13
|
"default": "./config/storybook/index.js",
|
|
19
14
|
"types": "./config/storybook/index.d.ts"
|
|
@@ -145,6 +140,7 @@
|
|
|
145
140
|
"devDependencies": {
|
|
146
141
|
"@types/cross-spawn": "^6.0.3",
|
|
147
142
|
"@types/debug": "^4.1.12",
|
|
143
|
+
"@types/eslint": "^8.56.10",
|
|
148
144
|
"@types/minimist": "^1.2.5",
|
|
149
145
|
"@types/picomatch": "^2.3.3",
|
|
150
146
|
"@types/react": "^18.2.3",
|
package/scripts/test.js
CHANGED
|
@@ -11,12 +11,12 @@ const log = debug('sku:jest');
|
|
|
11
11
|
await runVocabCompile();
|
|
12
12
|
|
|
13
13
|
// https://jestjs.io/docs/configuration#preset-string
|
|
14
|
-
const
|
|
15
|
-
log(`Using Jest preset
|
|
14
|
+
const jestPreset = 'sku';
|
|
15
|
+
log(`Using '${jestPreset}' Jest preset`);
|
|
16
16
|
|
|
17
17
|
const jestArgv = [...argv];
|
|
18
18
|
|
|
19
|
-
jestArgv.push('--preset',
|
|
19
|
+
jestArgv.push('--preset', jestPreset);
|
|
20
20
|
|
|
21
21
|
if (isCI) {
|
|
22
22
|
jestArgv.push('--ci');
|
package/config/jest/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const preset: string;
|