sku 12.4.3 → 12.4.5
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,17 @@
|
|
|
1
1
|
# sku
|
|
2
2
|
|
|
3
|
+
## 12.4.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Bump some dependencies ([#904](https://github.com/seek-oss/sku/pull/904))
|
|
8
|
+
|
|
9
|
+
## 12.4.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Remove `node-emoji` dependency ([#902](https://github.com/seek-oss/sku/pull/902))
|
|
14
|
+
|
|
3
15
|
## 12.4.3
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -6,11 +6,9 @@ const didYouMean = require('didyoumean2').default;
|
|
|
6
6
|
const validator = new Validator();
|
|
7
7
|
|
|
8
8
|
const exitWithErrors = async (errors) => {
|
|
9
|
-
const { emojify } = await import('node-emoji');
|
|
10
|
-
|
|
11
9
|
console.log(bold(underline(red('SkuWebpackPlugin: Invalid options'))));
|
|
12
10
|
errors.forEach((error) => {
|
|
13
|
-
console.log(yellow(
|
|
11
|
+
console.log(yellow(error));
|
|
14
12
|
});
|
|
15
13
|
process.exit(1);
|
|
16
14
|
};
|
|
@@ -85,7 +83,7 @@ module.exports = (options) => {
|
|
|
85
83
|
const suggestedMessage = suggestedKey
|
|
86
84
|
? ` Did you mean '${bold(suggestedKey)}'?`
|
|
87
85
|
: '';
|
|
88
|
-
errors.push(
|
|
86
|
+
errors.push(`❓ ${unknownMessage}${suggestedMessage}`);
|
|
89
87
|
});
|
|
90
88
|
|
|
91
89
|
// Validate schema types
|
|
@@ -93,8 +91,8 @@ module.exports = (options) => {
|
|
|
93
91
|
if (schemaCheckResult !== true) {
|
|
94
92
|
schemaCheckResult.forEach(({ message, field }) => {
|
|
95
93
|
const errorMessage = message
|
|
96
|
-
?
|
|
97
|
-
:
|
|
94
|
+
? `🚫 ${message.replace(field, `${bold(field)}`)}`
|
|
95
|
+
: `🚫 '${bold(field)}' is invalid`;
|
|
98
96
|
|
|
99
97
|
errors.push(errorMessage);
|
|
100
98
|
});
|
|
@@ -106,7 +104,7 @@ module.exports = (options) => {
|
|
|
106
104
|
browserslist(options.browserslist);
|
|
107
105
|
} catch (e) {
|
|
108
106
|
errors.push(
|
|
109
|
-
|
|
107
|
+
`🚫 '${bold(
|
|
110
108
|
'browserslist',
|
|
111
109
|
)}' must be a valid browserslist query. ${white(e.message)}`,
|
|
112
110
|
);
|
|
@@ -9,11 +9,9 @@ const defaultClientEntry = require('./defaultClientEntry');
|
|
|
9
9
|
const availableConfigKeys = Object.keys(defaultSkuConfig);
|
|
10
10
|
|
|
11
11
|
const exitWithErrors = async (errors) => {
|
|
12
|
-
const { emojify } = await import('node-emoji');
|
|
13
|
-
|
|
14
12
|
console.log(bold(underline(red('Errors in sku config:'))));
|
|
15
13
|
errors.forEach((error) => {
|
|
16
|
-
console.log(yellow(
|
|
14
|
+
console.log(yellow(error));
|
|
17
15
|
});
|
|
18
16
|
process.exit(1);
|
|
19
17
|
};
|
|
@@ -30,7 +28,7 @@ module.exports = (skuConfig) => {
|
|
|
30
28
|
const suggestedMessage = suggestedKey
|
|
31
29
|
? ` Did you mean '${bold(suggestedKey)}'?`
|
|
32
30
|
: '';
|
|
33
|
-
errors.push(
|
|
31
|
+
errors.push(`❓ ${unknownMessage}${suggestedMessage}`);
|
|
34
32
|
});
|
|
35
33
|
|
|
36
34
|
// Validate schema types
|
|
@@ -38,8 +36,8 @@ module.exports = (skuConfig) => {
|
|
|
38
36
|
if (schemaCheckResult !== true) {
|
|
39
37
|
schemaCheckResult.forEach(({ message, field }) => {
|
|
40
38
|
const errorMessage = message
|
|
41
|
-
?
|
|
42
|
-
:
|
|
39
|
+
? `🚫 ${message.replace(field, `${bold(field)}`)}`
|
|
40
|
+
: `🚫 '${bold(field)}' is invalid`;
|
|
43
41
|
|
|
44
42
|
errors.push(errorMessage);
|
|
45
43
|
});
|
|
@@ -48,9 +46,7 @@ module.exports = (skuConfig) => {
|
|
|
48
46
|
// Validate library entry has corresponding libraryName
|
|
49
47
|
if (skuConfig.libraryEntry && !skuConfig.libraryName) {
|
|
50
48
|
errors.push(
|
|
51
|
-
|
|
52
|
-
'libraryEntry',
|
|
53
|
-
)}' must have a corresponding '${bold(
|
|
49
|
+
`🚫 '${bold('libraryEntry')}' must have a corresponding '${bold(
|
|
54
50
|
'libraryName',
|
|
55
51
|
)}' option. More details: ${underline(
|
|
56
52
|
'https://github.com/seek-oss/sku#building-a-library',
|
|
@@ -62,7 +58,7 @@ module.exports = (skuConfig) => {
|
|
|
62
58
|
skuConfig.routes.forEach(({ name }) => {
|
|
63
59
|
if (name === defaultClientEntry) {
|
|
64
60
|
errors.push(
|
|
65
|
-
|
|
61
|
+
`🚫 Invalid route name: '${bold(
|
|
66
62
|
defaultClientEntry,
|
|
67
63
|
)}', please use a different route name`,
|
|
68
64
|
);
|
|
@@ -74,7 +70,7 @@ module.exports = (skuConfig) => {
|
|
|
74
70
|
browserslist(skuConfig.supportedBrowsers);
|
|
75
71
|
} catch (e) {
|
|
76
72
|
errors.push(
|
|
77
|
-
|
|
73
|
+
`🚫 '${bold(
|
|
78
74
|
'supportedBrowsers',
|
|
79
75
|
)}' must be a valid browserslist query. ${white(e.message)}`,
|
|
80
76
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sku",
|
|
3
|
-
"version": "12.4.
|
|
3
|
+
"version": "12.4.5",
|
|
4
4
|
"description": "Front-end development toolkit, powered by Webpack, Babel, CSS Modules, Less and Jest",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -71,13 +71,13 @@
|
|
|
71
71
|
"cssnano": "^6.0.0",
|
|
72
72
|
"death": "^1.1.0",
|
|
73
73
|
"debug": "^4.3.1",
|
|
74
|
-
"dedent": "^
|
|
75
|
-
"didyoumean2": "^
|
|
74
|
+
"dedent": "^1.5.1",
|
|
75
|
+
"didyoumean2": "^6.0.1",
|
|
76
76
|
"ejs": "^3.1.8",
|
|
77
77
|
"empty-dir": "^3.0.0",
|
|
78
78
|
"ensure-gitignore": "^1.1.2",
|
|
79
79
|
"env-ci": "^7.0.0",
|
|
80
|
-
"esbuild": "^0.
|
|
80
|
+
"esbuild": "^0.19.7",
|
|
81
81
|
"esbuild-register": "^3.3.3",
|
|
82
82
|
"escape-string-regexp": "^4.0.0",
|
|
83
83
|
"eslint": "^8.41.0",
|
|
@@ -99,7 +99,6 @@
|
|
|
99
99
|
"lint-staged": "^11.1.1",
|
|
100
100
|
"memoizee": "^0.4.15",
|
|
101
101
|
"mini-css-extract-plugin": "^2.6.1",
|
|
102
|
-
"node-emoji": "^2.1.0",
|
|
103
102
|
"node-html-parser": "^6.1.1",
|
|
104
103
|
"open": "^7.3.1",
|
|
105
104
|
"path-to-regexp": "^6.2.0",
|
|
@@ -129,7 +128,6 @@
|
|
|
129
128
|
},
|
|
130
129
|
"devDependencies": {
|
|
131
130
|
"@types/cross-spawn": "^6.0.3",
|
|
132
|
-
"@types/dedent": "^0.7.0",
|
|
133
131
|
"@types/express": "^4.17.11",
|
|
134
132
|
"@types/react": "^18.2.3",
|
|
135
133
|
"@types/react-dom": "^18.2.3",
|