sku 12.8.1 → 13.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.
Files changed (44) hide show
  1. package/CHANGELOG.md +406 -0
  2. package/README.md +6 -7
  3. package/bin/sku.js +0 -6
  4. package/config/babel/babelConfig.js +2 -0
  5. package/config/eslint/eslintConfig.js +2 -4
  6. package/config/eslint/importOrderConfig.js +1 -1
  7. package/config/jest/index.d.ts +1 -0
  8. package/config/jest/index.js +8 -0
  9. package/config/jest/jest-preset.js +0 -1
  10. package/config/jest/jsBabelTransform.js +2 -1
  11. package/config/jest/tsBabelTransform.js +2 -1
  12. package/config/lintStaged/lintStagedConfig.js +1 -1
  13. package/config/storybook/index.d.ts +4 -0
  14. package/config/storybook/index.js +23 -66
  15. package/config/typescript/tsconfig.js +5 -1
  16. package/config/webpack/cache.js +5 -11
  17. package/config/webpack/plugins/metrics-plugin/index.js +0 -21
  18. package/config/webpack/plugins/sku-webpack-plugin/index.js +3 -38
  19. package/config/webpack/targets.json +3 -0
  20. package/config/webpack/utils/index.js +0 -1
  21. package/config/webpack/utils/loaders.js +0 -93
  22. package/config/webpack/webpack.config.js +9 -23
  23. package/config/webpack/webpack.config.ssr.js +4 -16
  24. package/context/configSchema.js +0 -20
  25. package/context/defaultSkuConfig.js +1 -8
  26. package/context/index.js +0 -16
  27. package/lib/configure.js +7 -14
  28. package/lib/packageManager.js +24 -59
  29. package/lib/parseArgs.js +2 -32
  30. package/lib/parseArgs.test.js +8 -8
  31. package/lib/runPrettier.js +1 -5
  32. package/package.json +37 -23
  33. package/scripts/start.js +0 -1
  34. package/scripts/test.js +3 -6
  35. package/sku-types.d.ts +5 -52
  36. package/template/sku.config.ts +0 -1
  37. package/@storybook/react/index.ts +0 -4
  38. package/config/jest/cssModulesTransform.js +0 -16
  39. package/lib/env.js +0 -32
  40. package/lib/storybook.js +0 -36
  41. package/lib/validateLessFiles.js +0 -44
  42. package/scripts/build-storybook.js +0 -29
  43. package/scripts/storybook.js +0 -24
  44. package/webpack-plugin.js +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,411 @@
1
1
  # sku
2
2
 
3
+ ## 13.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Add `pnpm-lock.yaml` to `.prettierignore` and `.eslintignore` ([#1021](https://github.com/seek-oss/sku/pull/1021))
8
+
9
+ ## 13.0.0
10
+
11
+ ### Major Changes
12
+
13
+ - Export jest preset path ([#984](https://github.com/seek-oss/sku/pull/984))
14
+
15
+ **BREAKING CHANGE**:
16
+
17
+ The jest preset is now accessible via a relative path rather than pointing to a module. This may affect users that require a jest config for debugging tests in their IDE. See the [testing documentation] for more information.
18
+
19
+ **MIGRATION GUIDE**:
20
+
21
+ ```diff
22
+ // jest.config.js
23
+ + const { preset } = require('sku/config/jest');
24
+
25
+ /** @type {import('jest').Config} */
26
+ module.exports = {
27
+ - preset: 'sku/config/jest',
28
+ + preset,
29
+ };
30
+ ```
31
+
32
+ [testing documentation]: https://seek-oss.github.io/sku/#/./docs/testing
33
+
34
+ - Update default supported browsers ([#1000](https://github.com/seek-oss/sku/pull/1000))
35
+
36
+ `sku` applications and libraries now default to supporting more recent browser versions:
37
+
38
+ | Browser | Oldest supported version |
39
+ | ---------------- | ------------------------ |
40
+ | Chrome | 84 |
41
+ | Edge | 84 |
42
+ | Safari | 14.1 |
43
+ | Firefox | 63 |
44
+ | Samsung Internet | 14.0 |
45
+
46
+ **BREAKING CHANGE**:
47
+
48
+ Production builds will now contain code that may not be compatible with older browser versions. If your application still needs to support older browsers, you can configure a custom [browserslist] query via the [`supportedBrowsers`] configuration option in your sku config.
49
+
50
+ [browserslist]: https://browsersl.ist/
51
+ [`supportedBrowser`]: https://seek-oss.github.io/sku/#/./docs/configuration?id=supportedbrowsers
52
+
53
+ - Remove Storybook-related features from `sku` ([#996](https://github.com/seek-oss/sku/pull/996))
54
+
55
+ **BREAKING CHANGE**
56
+
57
+ All Storybook-related features have been removed from `sku`. Sku no longer installs Storybook dependencies, configures Storybook, provides Storybook CLI commands, or re-exports Storybook APIs. If you are using Storybook, you will need to install Storybook dependencies yourself. See [`sku`'s Storybook documentation][storybook docs] for more information.
58
+
59
+ [storybook docs]: https://seek-oss.github.io/sku/#/./docs/storybook
60
+
61
+ **MIGRATION GUIDE**:
62
+
63
+ #### Update your `sku` config
64
+
65
+ The following `sku` configuration options have been removed:
66
+
67
+ - `storybookAddons`
68
+ - `storybookPort`
69
+ - `storybookStoryStore`
70
+ - `storybookTarget`
71
+
72
+ Please remove these properties from your sku configuration file, but keep the values around for use later in the migration.
73
+
74
+ #### Update your ignore files
75
+
76
+ Sku no longer manages certain Storybook-related ignore file entries.
77
+ Run `sku configure` to update your ignore files:
78
+
79
+ ```sh
80
+ pnpm exec sku configure
81
+ ```
82
+
83
+ You will need to re-add your `storybookTarget` value (from the previous step) to your `.prettierignore`, `.eslintignore`, and `.gitignore` files.
84
+
85
+ #### Install Storybook dependencies
86
+
87
+ `sku` was previously installing Storybook v7 dependencies for you. The first command below will install the latest (v8) Storybook dependencies.
88
+
89
+ If you wish to stay on Storybook v7 for the time being, use the second command below.
90
+
91
+ **NOTE**: Consumers that still depend on the deprecated `storiesOf` API will need to stay on Storybook v7 until they migrate away from this API.
92
+
93
+ ```sh
94
+ # Storybook v8
95
+ pnpm install -D storybook @storybook/react @storybook/react-webpack5 @storybook/addon-webpack5-compiler-babel
96
+ ```
97
+
98
+ ```sh
99
+ # Storybook v7
100
+ pnpm install -D storybook@^7.6.17 @storybook/react@^7.6.17 @storybook/react-webpack5@^7.6.17
101
+ ```
102
+
103
+ #### Configure Storybook
104
+
105
+ Sku no longer configures your [Storybook main configuration file][sb main] for you. To migrate to a minimal, `sku`-compatible Storybook configuration, first locate your `.storybook/main.js` file.
106
+
107
+ ```js
108
+ // .storybook/main.js - Old configuration
109
+
110
+ /** THIS FILE IS GENERATED BY SKU, MANUAL CHANGES WILL BE DISCARDED **/
111
+ import storybookConfig from 'sku/config/storybook';
112
+
113
+ export default { ...storybookConfig };
114
+ ```
115
+
116
+ Rename this file to `.storybook/main.ts` and replace its contents with the following, making adjustments as necessary for your project:
117
+
118
+ ```ts
119
+ // .storybook/main.ts - New configuration
120
+
121
+ import { babel, webpackFinal } from 'sku/config/storybook';
122
+ import type { StorybookConfig } from '@storybook/react-webpack5';
123
+
124
+ export default {
125
+ stories: ['../src/**/*.stories.tsx'],
126
+ features: {
127
+ // Required for Storybook v7 if using the `storiesOf` API.
128
+ // If you set `storybookStoryStore: false` in your sku config, you will want this.
129
+ storyStoreV7: false,
130
+ },
131
+ framework: {
132
+ name: '@storybook/react-webpack5',
133
+ options: {
134
+ builder: {
135
+ fsCache: true, // For faster startup times after the first `storybook dev`
136
+ },
137
+ },
138
+ },
139
+ addons: [
140
+ // Copy addons from your `storybookAddons` sku config here
141
+ '@storybook/addon-webpack5-compiler-babel', // Required for Storybook >=8.0.0
142
+ ],
143
+ babel,
144
+ webpackFinal,
145
+ } satisfies StorybookConfig;
146
+ ```
147
+
148
+ See [`sku`'s Storybook documentation][storybook docs] for more information on configuring Storybook.
149
+
150
+ [sb main]: https://storybook.js.org/docs/api/main-config/main-config
151
+ [storybook docs]: https://seek-oss.github.io/sku/#/./docs/storybook
152
+
153
+ #### Update `package.json` scripts
154
+
155
+ The `sku` CLI no longer provides the `sku storybook` and `sku build-storybook` commands. Please migrate to [the official Storybook CLI][storybook cli]:
156
+
157
+ ```diff
158
+ // package.json
159
+ {
160
+ "scripts": {
161
+ - "storybook": "sku storybook",
162
+ // Replace 8081 with your previously configured `storybookPort`,
163
+ // if you configured one and wish to keep it
164
+ + "storybook": "storybook dev --port 8081",
165
+ - "build:storybook": "sku build-storybook"
166
+ // Replace `dist-storybook` with your previously configured `storybookTarget`,
167
+ // if you configured one and wish to keep it
168
+ + "build:storybook": "storybook build --output-dir dist-storybook"
169
+ }
170
+ }
171
+ ```
172
+
173
+ [storybook cli]: https://storybook.js.org/docs/cli/
174
+
175
+ #### Update Storybook imports
176
+
177
+ `sku` no longer re-exports Storybook APIs under the `sku/@storybook/react` entrypoint. Please update your imports to use the official Storybook package:
178
+
179
+ ```diff
180
+ // MyComponent.stories.tsx
181
+
182
+ -import type { Meta } from 'sku/@storybook/react';
183
+ +import type { Meta } from '@storybook/react';
184
+ ```
185
+
186
+ - Remove LESS style support ([#1005](https://github.com/seek-oss/sku/pull/1005))
187
+
188
+ **BREAKING CHANGE**:
189
+
190
+ [LESS] style support has been removed.
191
+
192
+ **MIGRATION GUIDE**:
193
+
194
+ Please migrate all styles defined in `.less` files to [Vanilla Extract] styles. `*.less.d.ts` files are no longer git-ignored and should be deleted. Reach out in [`#sku-support`] if you need help with this migration.
195
+
196
+ [Vanilla Extract]: https://seek-oss.github.io/sku/#/./docs/styling?id=vanilla-extract
197
+ [LESS]: http://lesscss.org/
198
+ [`#sku-support`]: https://seek.enterprise.slack.com/archives/CDL5VP5NU
199
+
200
+ - Target `sku`'s minimum supported node version when building the server entry ([#1006](https://github.com/seek-oss/sku/pull/1006))
201
+
202
+ **BREAKING CHANGE**
203
+
204
+ When building the server entry, the output code was previously transpiled to be compatible with a relatively old version of Node.js. This change updates the version to mirror sku's minimum supported Node.js version (18.20.0 at time of writing). SSR users should ensure their server's Node.js runtime is up-to-date with the minimum supported version.
205
+
206
+ - Drop support for Node.js versions below 18.20.0 ([#986](https://github.com/seek-oss/sku/pull/986))
207
+
208
+ **BREAKING CHANGE**:
209
+
210
+ The minimum supported Node.js version is now 18.20.0. Consumers must upgrade to Node.js v18.20.0 or later.
211
+
212
+ - Remove support for `orderImports` config option ([#1014](https://github.com/seek-oss/sku/pull/1014))
213
+
214
+ **BREAKING CHANGE:**
215
+
216
+ `orderImports` is now always enabled and has been removed from the configuration options.
217
+
218
+ **MIGRATION GUIDE**
219
+
220
+ > To reduce the number of changes when migrating to `sku` v13 you may choose to enable `orderImports` and run `sku format` before upgrading.
221
+
222
+ Remove `orderImports` from `sku.config.ts`:
223
+
224
+ ```diff
225
+ // sku.config.ts
226
+
227
+ import { type SkuConfig } from 'sku';
228
+
229
+ export default {
230
+ - orderImports: false,
231
+ - orderImports: true,
232
+ } satisfies SkuConfig;
233
+ ```
234
+
235
+ Then run `sku format`.
236
+
237
+ **Note:** Changing import order can affect the behaviour of your application. After running `sku format`, please ensure your app still works and looks as expected. Additionally, `@ts-ignore` comments above imports will **not** be moved as part of the autofix. These comments will need be moved manually.
238
+
239
+ - Remove support for the `env` config property ([#980](https://github.com/seek-oss/sku/pull/980))
240
+
241
+ **BREAKING CHANGE**:
242
+
243
+ Support for the `env` config property has been removed. This config property was deprecated in sku v7.0.0 in favour of the `environments` property. Please see the [sku v7 migration guide] for more information.
244
+
245
+ [sku v7 migration guide]: https://github.com/seek-oss/sku/blob/f37ea1dcbe2d6403bba6897c7a9e0cb9b231c74c/docs/migration-guides/v7.0.0.md#env
246
+
247
+ - `sourceMapsProd` is now `true` by default ([#979](https://github.com/seek-oss/sku/pull/979))
248
+
249
+ **BREAKING CHANGE**:
250
+
251
+ `sourceMapsProd` is now `true` by default. To enable the previous behaviour, set `sourceMapsProd: false` in your sku config:
252
+
253
+ ```ts
254
+ // sku.config.ts
255
+ import type { SkuConfig } from 'sku';
256
+
257
+ export default {
258
+ sourceMapsProd: false,
259
+ } satisfies SkuConfig;
260
+ ```
261
+
262
+ **NOTE**: Production source maps can increase memory usage during builds to the point where the Node process exhausts its heap memory. If this occurs, you can increase the memory limit for the Node process by setting the `NODE_OPTIONS` environment variable to `--max-old-space-size=4096` (or a higher value) before running the build command.
263
+
264
+ For example:
265
+
266
+ ```sh
267
+ NODE_OPTIONS=--max-old-space-size=4096 sku build
268
+ ```
269
+
270
+ - Add peer dependency on `@types/react@^17.0.0 || ^18.0.0` ([#1016](https://github.com/seek-oss/sku/pull/1016))
271
+
272
+ **BREAKING CHANGE**
273
+
274
+ `sku` now has a peer dependency on `@types/react@^17.0.0 || ^18.0.0`. Most, if not all consumers of `sku` should already have `@types/react` installed, but if not, you will need to install it.
275
+
276
+ - Add explicit package exports ([#984](https://github.com/seek-oss/sku/pull/984))
277
+
278
+ **BREAKING CHANGE**:
279
+
280
+ Importing from arbitrary subpaths within `sku` is no longer possible. See the [API documentation] for a comprehensive list of `sku`'s API entrypoints.
281
+
282
+ [API documentation]: https://seek-oss.github.io/sku/#/./docs/api
283
+
284
+ - Remove support for the `--env` CLI argument ([#980](https://github.com/seek-oss/sku/pull/980))
285
+
286
+ **BREAKING CHANGE**:
287
+
288
+ Support for the `--env` CLI argument has been removed. This argument was replaced long ago by the `--envrironment` argument. There is currently no consumer usage of this argument, so there should be no changes required.
289
+
290
+ - Remove type-only imports during transpilation and enforce correct type-only import syntax with `verbatimModuleSyntax: true` ([#983](https://github.com/seek-oss/sku/pull/983))
291
+
292
+ This change enables babel to mimic the behaviour of TypeScript's [`verbatimModuleSyntax`] compiler option. The following code demonstrates the result of this change when transpiling TypeScript to JavaScript:
293
+
294
+ ```ts
295
+ // Erased entirely
296
+ import type { A } from 'a';
297
+
298
+ // Rewritten to `import { b } from "bcd";`
299
+ import { b, type c, type d } from 'bcd';
300
+
301
+ // Rewritten to `import {} from "xyz";`
302
+ import { type xyz } from 'xyz';
303
+ ```
304
+
305
+ This change is not expected to have an effect on bundled application code or library code. However, it may surface some TypeScript errors in `compilePackage` dependencies that do not adhere to the correct type-only import syntax. These errors should be fixed in the dependency's codebase.
306
+
307
+ [`verbatimModuleSyntax`]: https://www.typescriptlang.org/tsconfig#verbatimModuleSyntax
308
+
309
+ - `sku init`: Install dependencies with the package manager that was used to run the command ([#982](https://github.com/seek-oss/sku/pull/982))
310
+
311
+ **BREAKING CHANGE**:
312
+
313
+ The `sku init` command will now install dependencies with the package manager that was used to run the command. This can be overridden via the `--packageManager` flag:
314
+
315
+ ```sh
316
+ npx sku init my-app # Will install dependencies using npm
317
+ pnpm dlx sku init my-app # Will install dependencies using pnpm
318
+ npx sku init --packageManager yarn my-app # Will install dependencies using yarn
319
+ ```
320
+
321
+ - Drop support for `react` versions below `17.0.0` ([#1016](https://github.com/seek-oss/sku/pull/1016))
322
+
323
+ **BREAKING CHANGE**
324
+
325
+ `sku` no longer supports react versions below `17.0.0`. Please upgrade your react version to `17.0.0` or higher.
326
+
327
+ - Remove support for `persistentCache` configuration option ([#1013](https://github.com/seek-oss/sku/pull/1013))
328
+
329
+ **BREAKING CHANGE:**
330
+
331
+ Disabling `persistentCache` was previously necessary when using [treat], which is no longer supported in `sku`. `persistentCache` is now always enabled and has been removed from the configuration options.
332
+
333
+ [treat]: https://seek-oss.github.io/treat/
334
+
335
+ **MIGRATION GUIDE:**
336
+
337
+ Remove the `persistentCache` option from your sku config.
338
+
339
+ ```diff
340
+ // sku.config.ts
341
+
342
+ import { type SkuConfig } from 'sku';
343
+
344
+ export default {
345
+ - persistentCache: false,
346
+ - persistentCache: true,
347
+ } satisfies SkuConfig;
348
+ ```
349
+
350
+ - Drop explicit file extensions when calling `prettier` ([#985](https://github.com/seek-oss/sku/pull/985))
351
+
352
+ **BREAKING CHANGE**:
353
+
354
+ `sku` no longer passes explicit extensions to `prettier` during `sku lint`/`sku format`. Instead, your application's root directory will be the target, and `prettier` will format all files it supports. This may result in some files being formatted that were not previously formatted by `prettier`.
355
+
356
+ - Remove support for the `--tenant` CLI argument ([#980](https://github.com/seek-oss/sku/pull/980))
357
+
358
+ **BREAKING CHANGE**:
359
+
360
+ Support for the `--tenant` CLI argument has been removed. This is an old argument that has been unused within `sku` for a long time. There is currently no consumer usage of this argument, so there should be no changes required.
361
+
362
+ - Remove support for the `--build` CLI argument ([#980](https://github.com/seek-oss/sku/pull/980))
363
+
364
+ **BREAKING CHANGE**:
365
+
366
+ SUpport for the `--build` CLI argument has been removed. This is an old argument that has been unused within `sku` for a long time. There is currently no consumer usage of this argument, so there should be no changes required.
367
+
368
+ ### Minor Changes
369
+
370
+ - Upgrade `eslint` to `^8.56.0` and `eslint-config-seek` to `^13.0.0` ([#986](https://github.com/seek-oss/sku/pull/986))
371
+
372
+ Due to changes in `eslint-config-seek@13.x`, consumers may see new linting errors or warnings. Some of these may be auto-fixable via `sku format`, but others may require manual intervention. Please see [the `eslint-config-seek` changelog][changelog] for more information.
373
+
374
+ [changelog]: https://github.com/seek-oss/eslint-config-seek/blob/master/CHANGELOG.md
375
+
376
+ - Add `dom.iterable` to the tsconfig `lib` compiler option ([#983](https://github.com/seek-oss/sku/pull/983))
377
+
378
+ This change provides type definitions for iterable APIs on some DOM APIs. For example, this enables using [`for...of` syntax] or the [`keys()`] method on `URLSearchParams`:
379
+
380
+ ```ts
381
+ const params = new URLSearchParams('a=1&b=2');
382
+
383
+ for (const [key, value] of params) {
384
+ // Prints:
385
+ // a 1
386
+ // b 2
387
+ console.log(key, value);
388
+ }
389
+
390
+ for (const key of params.keys()) {
391
+ // Prints:
392
+ // a
393
+ // b
394
+ console.log(key);
395
+ }
396
+ ```
397
+
398
+ [`for...of` syntax]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of
399
+ [`keys()`]: https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/keys
400
+
401
+ ### Patch Changes
402
+
403
+ - Loosen `esbuild` dependency version to help prevent multiple versions of it ending up in `node_modules` ([#1018](https://github.com/seek-oss/sku/pull/1018))
404
+
405
+ - Update `@vocab/phrase` dependency to `^2.0.1` ([#1018](https://github.com/seek-oss/sku/pull/1018))
406
+
407
+ - Update `@swc/core` dependency to `^1.6.13` ([#1018](https://github.com/seek-oss/sku/pull/1018))
408
+
3
409
  ## 12.8.1
4
410
 
5
411
  ### Patch Changes
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  <img src="https://github.com/seek-oss/sku/raw/master/docs/logo/logo.png?raw=true" alt="sku" title="sku" width="147" height="79" />
5
5
  <br />
6
6
 
7
- Front-end development toolkit, powered by [Webpack](https://webpack.js.org/), [Babel](https://babeljs.io/), [Vanilla Extract](https://vanilla-extract.style/), [CSS Modules](https://github.com/css-modules/css-modules), [Less](http://lesscss.org/), [ESLint](http://eslint.org/), [Prettier](https://prettier.io/), [Jest](https://facebook.github.io/jest/) and [Storybook](https://storybook.js.org/).
7
+ Front-end development toolkit, powered by [Webpack](https://webpack.js.org/), [Babel](https://babeljs.io/), [Vanilla Extract](https://vanilla-extract.style/), [ESLint](http://eslint.org/), [Prettier](https://prettier.io/) and [Jest](https://facebook.github.io/jest/).
8
8
 
9
9
  Quickly get up and running with a zero-config development environment, or optionally add minimal config when needed.
10
10
  Designed for usage with [braid-design-system](https://github.com/seek-oss/braid-design-system), although this isn't a requirement.
@@ -28,19 +28,18 @@ This tool is heavily inspired by other work, most notably:
28
28
  Create a new project and start a local development environment:
29
29
 
30
30
  ```sh
31
- $ npx sku init my-app
31
+ $ pnpm dlx sku init my-app
32
32
  $ cd my-app
33
- $ yarn start
33
+ $ pnpm start
34
34
  ```
35
35
 
36
- By default, a new project's dependencies will be installed with the first supported package manager detected on your system.
37
- Package managers are detected in the following order: `yarn` -> `pnpm` -> `npm`.
36
+ By default, a new project's dependencies will be installed with the same package manager used to run `sku init`.
38
37
  This can be overridden via the `--packageManager` flag:
39
38
 
40
39
  ```sh
41
- $ pnpm dlx sku init --packageManager pnpm my-app
40
+ $ pnpm dlx sku init --packageManager yarn my-app
42
41
  $ cd my-app
43
- $ pnpm start
42
+ $ yarn start
44
43
  ```
45
44
 
46
45
  ## [Documentation](https://seek-oss.github.io/sku)
package/bin/sku.js CHANGED
@@ -3,7 +3,6 @@ const fs = require('node:fs');
3
3
  const debug = require('debug');
4
4
  const args = require('../config/args');
5
5
  const _validatePeerDeps = require('../lib/validatePeerDeps');
6
- const validateLessFiles = require('../lib/validateLessFiles');
7
6
  const { getPathFromCwd } = require('../lib/cwd');
8
7
  const log = debug('sku:bin');
9
8
 
@@ -63,9 +62,6 @@ log(`Starting script: ${script}`);
63
62
  case 'setup-hosts':
64
63
  case 'init':
65
64
  case 'configure': {
66
- if (script !== 'init') {
67
- validateLessFiles();
68
- }
69
65
  return runScript(script);
70
66
  }
71
67
 
@@ -75,7 +71,6 @@ log(`Starting script: ${script}`);
75
71
  case 'pre-commit':
76
72
  case 'translations': {
77
73
  await configureProject();
78
- validateLessFiles();
79
74
  return runScript(script);
80
75
  }
81
76
 
@@ -87,7 +82,6 @@ log(`Starting script: ${script}`);
87
82
  case 'build-ssr':
88
83
  case 'serve': {
89
84
  await configureProject();
90
- validateLessFiles();
91
85
  validatePeerDeps();
92
86
  return runScript(script);
93
87
  }
@@ -79,6 +79,8 @@ module.exports = ({
79
79
  {
80
80
  isTSX: true,
81
81
  allExtensions: true,
82
+ // babel equivalent of tsconfig `verbatimModuleSyntax: true`
83
+ onlyRemoveTypeImports: true,
82
84
  },
83
85
  ]
84
86
  : null,
@@ -1,11 +1,9 @@
1
- const { eslintDecorator, orderImports } = require('../../context');
1
+ const { eslintDecorator } = require('../../context');
2
2
 
3
3
  const coreConfig = require.resolve('eslint-config-seek');
4
4
 
5
5
  const baseConfig = {
6
- extends: orderImports
7
- ? [coreConfig, require.resolve('./importOrderConfig')]
8
- : coreConfig,
6
+ extends: [coreConfig, require.resolve('./importOrderConfig')],
9
7
  };
10
8
 
11
9
  module.exports = eslintDecorator(baseConfig);
@@ -29,7 +29,7 @@ module.exports = {
29
29
  ],
30
30
  pathGroups: [
31
31
  {
32
- pattern: '*.@(less|css)',
32
+ pattern: '*.css',
33
33
  group: 'index',
34
34
  position: 'after',
35
35
  patternOptions: { matchBase: true },
@@ -0,0 +1 @@
1
+ export const preset: string;
@@ -0,0 +1,8 @@
1
+ // @ts-check
2
+
3
+ // Relative preset paths must start with `./` or jest complains
4
+ const preset = './node_modules/sku/config/jest/jest-preset.js';
5
+
6
+ module.exports = {
7
+ preset,
8
+ };
@@ -28,7 +28,6 @@ module.exports = jestDecorator({
28
28
  require.resolve('./fileMock'),
29
29
  },
30
30
  transform: {
31
- '\\.less$': require.resolve('./cssModulesTransform.js'),
32
31
  '\\.css\\.ts$': require.resolve('@vanilla-extract/jest-transform'),
33
32
  '\\.tsx?$': require.resolve('./tsBabelTransform.js'),
34
33
  '\\.[cm]?js$': require.resolve('./jsBabelTransform.js'),
@@ -2,11 +2,12 @@ const { default: babelJest } = require('babel-jest');
2
2
 
3
3
  const { rootResolution } = require('../../context');
4
4
  const babelConfig = require('../babel/babelConfig');
5
+ const targets = require('../webpack/targets.json');
5
6
 
6
7
  module.exports = babelJest.createTransformer(
7
8
  babelConfig({
8
9
  target: 'jest',
9
10
  rootResolution,
10
- browserslist: 'current node',
11
+ browserslist: targets.currentNode,
11
12
  }),
12
13
  );
@@ -2,12 +2,13 @@ const { default: babelJest } = require('babel-jest');
2
2
 
3
3
  const { rootResolution } = require('../../context');
4
4
  const babelConfig = require('../babel/babelConfig');
5
+ const targets = require('../webpack/targets.json');
5
6
 
6
7
  module.exports = babelJest.createTransformer(
7
8
  babelConfig({
8
9
  target: 'jest',
9
10
  lang: 'ts',
10
11
  rootResolution,
11
- browserslist: 'current node',
12
+ browserslist: targets.currentNode,
12
13
  }),
13
14
  );
@@ -6,7 +6,7 @@ const { getCommand } = require('@antfu/ni');
6
6
  * @type {import('lint-staged').Config}
7
7
  */
8
8
  const config = {
9
- [`**/*.{${lintExtensions},md,less}`]: ['sku format', 'sku lint'],
9
+ [`**/*.{${lintExtensions},md}`]: ['sku format', 'sku lint'],
10
10
  };
11
11
 
12
12
  // Yarn lock integrity check
@@ -0,0 +1,4 @@
1
+ import type { StorybookConfig } from '@storybook/react-webpack5';
2
+
3
+ export const webpackFinal: NonNullable<StorybookConfig['webpackFinal']>;
4
+ export const babel: NonNullable<StorybookConfig['babel']>;