sku 11.2.3 → 11.2.7
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 +26 -0
- package/config/jest/jestConfig.js +3 -1
- package/config/webpack/resolveModules.js +19 -0
- package/config/webpack/webpack.config.js +6 -0
- package/config/webpack/webpack.config.ssr.js +5 -0
- package/context/configSchema.js +5 -1
- package/lib/language-utils.js +1 -1
- package/package.json +1 -1
- package/sku-types.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# sku
|
|
2
2
|
|
|
3
|
+
## 11.2.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Support static rendering for routes using ':language' ([#670](https://github.com/seek-oss/sku/pull/670))
|
|
8
|
+
|
|
9
|
+
## 11.2.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Add "extends" to languages type definition ([#668](https://github.com/seek-oss/sku/pull/668))
|
|
14
|
+
|
|
15
|
+
## 11.2.5
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Fix missing import for resolve modules ([#666](https://github.com/seek-oss/sku/pull/666))
|
|
20
|
+
|
|
21
|
+
## 11.2.4
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- Ensure compile packages within nested node_modules are transformed in jest ([#664](https://github.com/seek-oss/sku/pull/664))
|
|
26
|
+
|
|
27
|
+
- Include `@babel/runtime` in render builds to ensure it is importable ([#664](https://github.com/seek-oss/sku/pull/664))
|
|
28
|
+
|
|
3
29
|
## 11.2.3
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
const escapeRegex = require('escape-string-regexp');
|
|
2
2
|
const { paths } = require('../../context');
|
|
3
3
|
const slash = '[/\\\\]'; // Cross-platform path delimiter regex
|
|
4
|
-
const compilePackagesRegex = paths.compilePackages
|
|
4
|
+
const compilePackagesRegex = paths.compilePackages
|
|
5
|
+
.map((pkg) => `.*${escapeRegex(pkg)}`)
|
|
6
|
+
.join('|');
|
|
5
7
|
|
|
6
8
|
module.exports = {
|
|
7
9
|
testEnvironment: 'jsdom',
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
|
|
3
|
+
const modules = ['node_modules'];
|
|
4
|
+
|
|
5
|
+
try {
|
|
6
|
+
const skuPath = require.resolve('sku/package.json');
|
|
7
|
+
|
|
8
|
+
// If the project is using pnpm then we add the sku node_modules directory
|
|
9
|
+
// to the modules array. This allows dependecies of sku to be importable
|
|
10
|
+
// as part of the build process. This is specifically useful for
|
|
11
|
+
// @babel/plugin-transform-runtime as it inject imports to @babel/runtime.
|
|
12
|
+
if (skuPath.includes('.pnpm')) {
|
|
13
|
+
modules.push(path.join(skuPath, '../..'));
|
|
14
|
+
}
|
|
15
|
+
} catch (e) {
|
|
16
|
+
// Ignore errors as if sku isn't resolvable then we don't need to apply the pnpm fix
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
module.exports = modules;
|
|
@@ -24,6 +24,7 @@ const { getVocabConfig } = require('../vocab/vocab');
|
|
|
24
24
|
const statsConfig = require('./statsConfig');
|
|
25
25
|
const getSourceMapSetting = require('./sourceMaps');
|
|
26
26
|
const getCacheSettings = require('./cache');
|
|
27
|
+
const modules = require('./resolveModules');
|
|
27
28
|
|
|
28
29
|
const {
|
|
29
30
|
paths,
|
|
@@ -161,6 +162,7 @@ const makeWebpackConfig = ({
|
|
|
161
162
|
},
|
|
162
163
|
resolve: {
|
|
163
164
|
alias: { __sku_alias__clientEntry: paths.clientEntry },
|
|
165
|
+
modules,
|
|
164
166
|
},
|
|
165
167
|
module: {
|
|
166
168
|
rules: [
|
|
@@ -274,6 +276,9 @@ const makeWebpackConfig = ({
|
|
|
274
276
|
allowlist: [
|
|
275
277
|
'classnames', // Workaround for https://github.com/JedWatson/classnames/issues/240
|
|
276
278
|
|
|
279
|
+
// Include '@babel/runtime' in render builds to workaround ESM imports in html-render-webpack-plugin
|
|
280
|
+
/@babel\/runtime/,
|
|
281
|
+
|
|
277
282
|
// webpack-node-externals compares the `import` or `require` expression to this list,
|
|
278
283
|
// not the package name, so we map each packageName to a pattern. This ensures it
|
|
279
284
|
// matches when importing a file within a package e.g. import { Text } from 'seek-style-guide/react'.
|
|
@@ -298,6 +303,7 @@ const makeWebpackConfig = ({
|
|
|
298
303
|
},
|
|
299
304
|
resolve: {
|
|
300
305
|
alias: { __sku_alias__renderEntry: paths.renderEntry },
|
|
306
|
+
modules,
|
|
301
307
|
},
|
|
302
308
|
module: {
|
|
303
309
|
rules: [
|
|
@@ -35,6 +35,7 @@ const { getVocabConfig } = require('../vocab/vocab');
|
|
|
35
35
|
const statsConfig = require('./statsConfig');
|
|
36
36
|
const getSourceMapSetting = require('./sourceMaps');
|
|
37
37
|
const getCacheSettings = require('./cache');
|
|
38
|
+
const modules = require('./resolveModules');
|
|
38
39
|
|
|
39
40
|
const makeWebpackConfig = ({
|
|
40
41
|
clientPort,
|
|
@@ -123,6 +124,9 @@ const makeWebpackConfig = ({
|
|
|
123
124
|
},
|
|
124
125
|
emitOnErrors: isProductionBuild,
|
|
125
126
|
},
|
|
127
|
+
resolve: {
|
|
128
|
+
modules,
|
|
129
|
+
},
|
|
126
130
|
module: {
|
|
127
131
|
rules: [
|
|
128
132
|
...(isDevServer
|
|
@@ -244,6 +248,7 @@ const makeWebpackConfig = ({
|
|
|
244
248
|
alias: {
|
|
245
249
|
__sku_alias__serverEntry: paths.serverEntry,
|
|
246
250
|
},
|
|
251
|
+
modules,
|
|
247
252
|
},
|
|
248
253
|
target: 'node',
|
|
249
254
|
node: {
|
package/context/configSchema.js
CHANGED
|
@@ -9,7 +9,11 @@ const languagesToCompile = {
|
|
|
9
9
|
{ type: 'string' },
|
|
10
10
|
{
|
|
11
11
|
type: 'object',
|
|
12
|
-
|
|
12
|
+
strict: true,
|
|
13
|
+
props: {
|
|
14
|
+
name: { type: 'string' },
|
|
15
|
+
extends: { type: 'string', optional: true },
|
|
16
|
+
},
|
|
13
17
|
},
|
|
14
18
|
],
|
|
15
19
|
};
|
package/lib/language-utils.js
CHANGED
package/package.json
CHANGED
package/sku-types.d.ts
CHANGED
|
@@ -192,7 +192,7 @@ export interface SkuConfig {
|
|
|
192
192
|
*
|
|
193
193
|
* @link https://seek-oss.github.io/sku/#/./docs/configuration?id=languages
|
|
194
194
|
*/
|
|
195
|
-
languages?: Array<string | { name: string }>;
|
|
195
|
+
languages?: Array<string | { name: string; extends?: string }>;
|
|
196
196
|
|
|
197
197
|
/**
|
|
198
198
|
* **Only for libraries**
|