sku 12.4.0 → 12.4.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 +17 -0
- package/bin/sku.js +1 -1
- package/config/babel/babelConfig.js +1 -1
- package/config/eslint/importOrderConfig.js +1 -1
- package/config/jest/cssModulesTransform.js +1 -1
- package/config/storybook/index.js +2 -2
- package/config/webpack/plugins/metrics-plugin/index.js +1 -1
- package/config/webpack/resolveModules.js +1 -1
- package/config/webpack/utils/resolvePackage.js +2 -2
- package/config/webpack/utils/resolvePackage.test.js +3 -1
- package/config/webpack/webpack.config.js +1 -1
- package/config/webpack/webpack.config.ssr.js +1 -1
- package/context/defaultCompilePackages.js +1 -3
- package/context/defaultSkuConfig.js +1 -1
- package/context/index.js +2 -2
- package/entry/csp.js +2 -2
- package/entry/server/index.js +3 -3
- package/entry/server/server.js +1 -1
- package/lib/buildFileUtils.js +2 -2
- package/lib/certificate.js +8 -2
- package/lib/configure.js +2 -2
- package/lib/copyDirContents.js +2 -2
- package/lib/createServer.js +2 -2
- package/lib/cwd.js +1 -1
- package/lib/exists.js +1 -1
- package/lib/gracefulSpawn.js +1 -1
- package/lib/hosts.js +1 -1
- package/lib/openBrowser/index.js +1 -1
- package/lib/runBin.js +1 -1
- package/lib/runESLint.js +4 -1
- package/lib/runPrettier.js +1 -1
- package/lib/serverManager.js +1 -1
- package/lib/storybook.js +2 -2
- package/lib/toPosixPath.js +1 -1
- package/lib/validateLessFiles.js +2 -2
- package/lib/validatePeerDeps.js +1 -1
- package/package.json +4 -3
- package/scripts/build-ssr.js +1 -1
- package/scripts/build.js +1 -1
- package/scripts/init.js +2 -2
- package/scripts/postinstall.js +1 -1
- package/scripts/serve.js +1 -1
- package/scripts/start-ssr.js +1 -1
- package/scripts/test.js +1 -1
- package/sku-types.d.ts +8 -8
- package/telemetry/index.js +1 -1
- package/tsconfig.json +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# sku
|
|
2
2
|
|
|
3
|
+
## 12.4.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Better support for setting `displayName` on React components when [`displayNamesProd`](https://seek-oss.github.io/sku/#/./docs/configuration?id=displaynamesprod) is true. ([#894](https://github.com/seek-oss/sku/pull/894))
|
|
8
|
+
|
|
9
|
+
## 12.4.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Update eslint-config-seek to version 12, which includes the major bump to ESLint 7 and typescript-eslint 6. ([#892](https://github.com/seek-oss/sku/pull/892))
|
|
14
|
+
You can view the specific changes over in [eslint-config-seek].
|
|
15
|
+
|
|
16
|
+
The majority of changes should automatically fix when running `sku format`.
|
|
17
|
+
|
|
18
|
+
[eslint-config-seek]: https://github.com/seek-oss/eslint-config-seek/blob/master/CHANGELOG.md#1200
|
|
19
|
+
|
|
3
20
|
## 12.4.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
package/bin/sku.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const path = require('path');
|
|
1
|
+
const path = require('node:path');
|
|
2
2
|
const memoize = require('memoizee');
|
|
3
3
|
const debug = require('debug')('sku:resolvePackage');
|
|
4
4
|
const { cwd } = require('../../../lib/cwd');
|
|
@@ -75,6 +75,6 @@ const createPackageResolver = (fs, resolve) => {
|
|
|
75
75
|
};
|
|
76
76
|
|
|
77
77
|
module.exports = {
|
|
78
|
-
resolvePackage: createPackageResolver(require('fs'), require.resolve),
|
|
78
|
+
resolvePackage: createPackageResolver(require('node:fs'), require.resolve),
|
|
79
79
|
createPackageResolver,
|
|
80
80
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const webpack = require('webpack');
|
|
2
2
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
3
3
|
const nodeExternals = require('webpack-node-externals');
|
|
4
|
-
const path = require('path');
|
|
4
|
+
const path = require('node:path');
|
|
5
5
|
const LoadablePlugin = require('@loadable/webpack-plugin');
|
|
6
6
|
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
|
|
7
7
|
const TerserPlugin = require('terser-webpack-plugin');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const { posix: path } = require('path');
|
|
1
|
+
const { posix: path } = require('node:path');
|
|
2
2
|
const chalk = require('chalk');
|
|
3
3
|
const glob = require('fast-glob');
|
|
4
4
|
|
|
@@ -14,8 +14,6 @@ try {
|
|
|
14
14
|
const globs = ['node_modules/@seek/*/package.json'];
|
|
15
15
|
const cwd = skuCwd();
|
|
16
16
|
|
|
17
|
-
// `rootDir` is nullable, but while we have `strict: false` in our TSConfig it won't appear nullable
|
|
18
|
-
// It will be null during sku init, but we don't really care about detecting compile packages at that point anyway
|
|
19
17
|
if (isPnpm && rootDir) {
|
|
20
18
|
const pnpmVirtualStorePath = path.join(
|
|
21
19
|
toPosixPath(rootDir),
|
package/context/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const path = require('path');
|
|
1
|
+
const fs = require('node:fs');
|
|
2
|
+
const path = require('node:path');
|
|
3
3
|
const chalk = require('chalk');
|
|
4
4
|
const { register } = require('esbuild-register/dist/node');
|
|
5
5
|
const { getPathFromCwd } = require('../lib/cwd');
|
package/entry/csp.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createHash } from 'crypto';
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
2
|
import { parse, valid } from 'node-html-parser';
|
|
3
|
-
import { URL } from 'url';
|
|
3
|
+
import { URL } from 'node:url';
|
|
4
4
|
|
|
5
5
|
const scriptTypeIgnoreList = ['application/json', 'application/ld+json'];
|
|
6
6
|
|
package/entry/server/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import http from 'http';
|
|
3
|
-
import https from 'https';
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import http from 'node:http';
|
|
3
|
+
import https from 'node:https';
|
|
4
4
|
import commandLineArgs from 'command-line-args';
|
|
5
5
|
import { app, onStart } from './server';
|
|
6
6
|
|
package/entry/server/server.js
CHANGED
package/lib/buildFileUtils.js
CHANGED
package/lib/certificate.js
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
const selfsigned = require('selfsigned');
|
|
2
2
|
const { blue } = require('chalk');
|
|
3
3
|
const exists = require('./exists');
|
|
4
|
-
const {
|
|
4
|
+
const {
|
|
5
|
+
mkdir,
|
|
6
|
+
unlink,
|
|
7
|
+
writeFile,
|
|
8
|
+
stat,
|
|
9
|
+
readFile,
|
|
10
|
+
} = require('node:fs/promises');
|
|
5
11
|
|
|
6
12
|
const { getPathFromCwd } = require('../lib/cwd');
|
|
7
13
|
const { hosts } = require('../context');
|
|
8
|
-
const { performance } = require('perf_hooks');
|
|
14
|
+
const { performance } = require('node:perf_hooks');
|
|
9
15
|
const track = require('../telemetry');
|
|
10
16
|
|
|
11
17
|
const certificateTtl = 1000 * 60 * 60 * 24;
|
package/lib/configure.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
const { writeFile, rm } = require('fs/promises');
|
|
4
|
-
const path = require('path');
|
|
3
|
+
const { writeFile, rm } = require('node:fs/promises');
|
|
4
|
+
const path = require('node:path');
|
|
5
5
|
|
|
6
6
|
const ensureGitignore = require('ensure-gitignore');
|
|
7
7
|
const { cwd, getPathFromCwd } = require('./cwd');
|
package/lib/copyDirContents.js
CHANGED
package/lib/createServer.js
CHANGED
package/lib/cwd.js
CHANGED
package/lib/exists.js
CHANGED
package/lib/gracefulSpawn.js
CHANGED
package/lib/hosts.js
CHANGED
package/lib/openBrowser/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Inspired by create-react-app
|
|
2
2
|
// https://github.com/facebook/create-react-app/blob/master/packages/react-dev-utils/openBrowser.js
|
|
3
3
|
|
|
4
|
-
const execSync = require('child_process').execSync;
|
|
4
|
+
const execSync = require('node:child_process').execSync;
|
|
5
5
|
const defaultBrowser = require('x-default-browser');
|
|
6
6
|
const open = require('open');
|
|
7
7
|
|
package/lib/runBin.js
CHANGED
package/lib/runESLint.js
CHANGED
|
@@ -3,6 +3,7 @@ const { yellow, cyan, gray } = require('chalk');
|
|
|
3
3
|
const { ESLint } = require('eslint');
|
|
4
4
|
const eslintConfig = require('../config/eslint/eslintConfig');
|
|
5
5
|
const { lintExtensions } = require('./lint');
|
|
6
|
+
const assert = require('node:assert');
|
|
6
7
|
|
|
7
8
|
const extensions = lintExtensions.map((ext) => `.${ext}`);
|
|
8
9
|
|
|
@@ -57,7 +58,9 @@ const runESLint = async ({ fix = false, paths }) => {
|
|
|
57
58
|
}
|
|
58
59
|
}
|
|
59
60
|
} catch (e) {
|
|
60
|
-
|
|
61
|
+
assert(e instanceof Error);
|
|
62
|
+
|
|
63
|
+
if (e.message.includes('No files matching')) {
|
|
61
64
|
console.warn(yellow(`Warning: ${e.message}`));
|
|
62
65
|
} else {
|
|
63
66
|
console.warn(yellow('ESLint encountered an error:'));
|
package/lib/runPrettier.js
CHANGED
package/lib/serverManager.js
CHANGED
package/lib/storybook.js
CHANGED
package/lib/toPosixPath.js
CHANGED
package/lib/validateLessFiles.js
CHANGED
package/lib/validatePeerDeps.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sku",
|
|
3
|
-
"version": "12.4.
|
|
3
|
+
"version": "12.4.2",
|
|
4
4
|
"description": "Front-end development toolkit, powered by Webpack, Babel, CSS Modules, Less and Jest",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
"@vocab/phrase": "^1.2.4",
|
|
53
53
|
"@vocab/pseudo-localize": "^1.0.1",
|
|
54
54
|
"@vocab/webpack": "^1.2.1",
|
|
55
|
+
"@zendesk/babel-plugin-react-displayname": "zendesk/babel-plugin-react-displayname#7a837f2",
|
|
55
56
|
"autoprefixer": "^10.3.1",
|
|
56
57
|
"babel-jest": "^29.0.0",
|
|
57
58
|
"babel-loader": "^9.1.2",
|
|
58
|
-
"babel-plugin-add-react-displayname": "^0.0.5",
|
|
59
59
|
"babel-plugin-macros": "^3.1.0",
|
|
60
60
|
"babel-plugin-module-resolver": "^5.0.0",
|
|
61
61
|
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"esbuild-register": "^3.3.3",
|
|
82
82
|
"escape-string-regexp": "^4.0.0",
|
|
83
83
|
"eslint": "^8.41.0",
|
|
84
|
-
"eslint-config-seek": "^
|
|
84
|
+
"eslint-config-seek": "^12.0.1",
|
|
85
85
|
"exception-formatter": "^2.1.2",
|
|
86
86
|
"express": "^4.16.3",
|
|
87
87
|
"fast-glob": "^3.2.5",
|
|
@@ -128,6 +128,7 @@
|
|
|
128
128
|
"x-default-browser": "^0.5.0"
|
|
129
129
|
},
|
|
130
130
|
"devDependencies": {
|
|
131
|
+
"@types/cross-spawn": "^6.0.3",
|
|
131
132
|
"@types/dedent": "^0.7.0",
|
|
132
133
|
"@types/express": "^4.17.11",
|
|
133
134
|
"@types/react": "^18.2.3",
|
package/scripts/build-ssr.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// First, ensure the build is running in production mode
|
|
2
2
|
process.env.NODE_ENV = 'production';
|
|
3
3
|
|
|
4
|
-
const { performance } = require('perf_hooks');
|
|
4
|
+
const { performance } = require('node:perf_hooks');
|
|
5
5
|
const prettyMilliseconds = require('pretty-ms');
|
|
6
6
|
const webpack = require('webpack');
|
|
7
7
|
const { green, red } = require('chalk');
|
package/scripts/build.js
CHANGED
|
@@ -4,7 +4,7 @@ process.env.NODE_ENV = 'production';
|
|
|
4
4
|
const prettyMilliseconds = require('pretty-ms');
|
|
5
5
|
const { green, red } = require('chalk');
|
|
6
6
|
const webpack = require('webpack');
|
|
7
|
-
const { performance } = require('perf_hooks');
|
|
7
|
+
const { performance } = require('node:perf_hooks');
|
|
8
8
|
|
|
9
9
|
const {
|
|
10
10
|
copyPublicFiles,
|
package/scripts/init.js
CHANGED
|
@@ -8,8 +8,8 @@ const {
|
|
|
8
8
|
} = require('../lib/packageManager');
|
|
9
9
|
|
|
10
10
|
const chalk = require('chalk');
|
|
11
|
-
const fs = require('fs/promises');
|
|
12
|
-
const { posix: path } = require('path');
|
|
11
|
+
const fs = require('node:fs/promises');
|
|
12
|
+
const { posix: path } = require('node:path');
|
|
13
13
|
const emptyDir = require('empty-dir');
|
|
14
14
|
const validatePackageName = require('validate-npm-package-name');
|
|
15
15
|
const dedent = require('dedent');
|
package/scripts/postinstall.js
CHANGED
package/scripts/serve.js
CHANGED
package/scripts/start-ssr.js
CHANGED
package/scripts/test.js
CHANGED
package/sku-types.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ interface SkuRouteObject {
|
|
|
39
39
|
route: string;
|
|
40
40
|
name?: string;
|
|
41
41
|
entry?: string;
|
|
42
|
-
languages?:
|
|
42
|
+
languages?: readonly string[];
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
type SkuRoute = string | SkuRouteObject;
|
|
@@ -47,8 +47,8 @@ type SkuRoute = string | SkuRouteObject;
|
|
|
47
47
|
interface SkuSiteObject {
|
|
48
48
|
name: string;
|
|
49
49
|
host?: string;
|
|
50
|
-
routes?:
|
|
51
|
-
languages?:
|
|
50
|
+
routes?: readonly SkuRoute[];
|
|
51
|
+
languages?: readonly string[];
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
type SkuSite = string | SkuSiteObject;
|
|
@@ -159,7 +159,7 @@ export interface SkuConfig {
|
|
|
159
159
|
* @default []
|
|
160
160
|
* @link https://seek-oss.github.io/sku/#/./docs/configuration?id=environments
|
|
161
161
|
*/
|
|
162
|
-
environments?:
|
|
162
|
+
environments?: readonly string[];
|
|
163
163
|
|
|
164
164
|
/**
|
|
165
165
|
* By default, sku compiles all node_modules in builds that target node.
|
|
@@ -177,7 +177,7 @@ export interface SkuConfig {
|
|
|
177
177
|
* @default ['localhost']
|
|
178
178
|
* @link https://seek-oss.github.io/sku/#/./docs/configuration?id=hosts
|
|
179
179
|
*/
|
|
180
|
-
hosts?:
|
|
180
|
+
hosts?: readonly string[];
|
|
181
181
|
|
|
182
182
|
/**
|
|
183
183
|
* Whether or not to use https for the local development server with a self-signed certificate.
|
|
@@ -202,7 +202,7 @@ export interface SkuConfig {
|
|
|
202
202
|
*
|
|
203
203
|
* @link https://seek-oss.github.io/sku/#/./docs/configuration?id=languages
|
|
204
204
|
*/
|
|
205
|
-
languages?:
|
|
205
|
+
languages?: readonly SkuLanguage[];
|
|
206
206
|
|
|
207
207
|
/**
|
|
208
208
|
* **Only for libraries**
|
|
@@ -317,7 +317,7 @@ export interface SkuConfig {
|
|
|
317
317
|
* @default ['/']
|
|
318
318
|
* @link https://seek-oss.github.io/sku/#/./docs/configuration?id=routes
|
|
319
319
|
*/
|
|
320
|
-
routes?:
|
|
320
|
+
routes?: readonly SkuRoute[];
|
|
321
321
|
|
|
322
322
|
/**
|
|
323
323
|
* **Only for SSR apps**
|
|
@@ -354,7 +354,7 @@ export interface SkuConfig {
|
|
|
354
354
|
* @default []
|
|
355
355
|
* @link https://seek-oss.github.io/sku/#/./docs/configuration?id=sites
|
|
356
356
|
*/
|
|
357
|
-
sites?:
|
|
357
|
+
sites?: readonly SkuSite[];
|
|
358
358
|
|
|
359
359
|
/**
|
|
360
360
|
* When running `sku build`, sku will compile all your external packages (`node_modules`) through `@babel/preset-env`.
|
package/telemetry/index.js
CHANGED
package/tsconfig.json
ADDED