sku 12.3.0 → 12.3.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 +12 -0
- package/config/babel/babelConfig.js +11 -0
- package/config/jest/jest-preset.js +1 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# sku
|
|
2
2
|
|
|
3
|
+
## 12.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fixes a bug where `.cjs` and `.mjs` files where not being transformed by babel in jest tests ([#868](https://github.com/seek-oss/sku/pull/868))
|
|
8
|
+
|
|
9
|
+
## 12.3.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Remove external CSS imports when running Jest ([#865](https://github.com/seek-oss/sku/pull/865))
|
|
14
|
+
|
|
3
15
|
## 12.3.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -10,6 +10,7 @@ module.exports = ({
|
|
|
10
10
|
rootResolution = false,
|
|
11
11
|
}) => {
|
|
12
12
|
const isBrowser = target === 'browser';
|
|
13
|
+
const isJest = target === 'jest';
|
|
13
14
|
const isProductionBuild = process.env.NODE_ENV === 'production';
|
|
14
15
|
|
|
15
16
|
const plugins = [
|
|
@@ -32,6 +33,16 @@ module.exports = ({
|
|
|
32
33
|
]);
|
|
33
34
|
}
|
|
34
35
|
|
|
36
|
+
if (isJest) {
|
|
37
|
+
plugins.push([
|
|
38
|
+
require.resolve('babel-plugin-transform-remove-imports'),
|
|
39
|
+
{
|
|
40
|
+
test: /\.css$/,
|
|
41
|
+
remove: 'effects',
|
|
42
|
+
},
|
|
43
|
+
]);
|
|
44
|
+
}
|
|
45
|
+
|
|
35
46
|
if (isProductionBuild) {
|
|
36
47
|
plugins.push(
|
|
37
48
|
require.resolve('@babel/plugin-transform-react-inline-elements'),
|
|
@@ -31,7 +31,7 @@ module.exports = jestDecorator({
|
|
|
31
31
|
'\\.less$': require.resolve('./cssModulesTransform.js'),
|
|
32
32
|
'\\.css\\.ts$': require.resolve('@vanilla-extract/jest-transform'),
|
|
33
33
|
'\\.tsx?$': require.resolve('./tsBabelTransform.js'),
|
|
34
|
-
'\\.js$': require.resolve('./jsBabelTransform.js'),
|
|
34
|
+
'\\.[cm]?js$': require.resolve('./jsBabelTransform.js'),
|
|
35
35
|
},
|
|
36
36
|
transformIgnorePatterns: [
|
|
37
37
|
// Allow 'compilePackages' code to be transformed in tests by overriding
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sku",
|
|
3
|
-
"version": "12.3.
|
|
3
|
+
"version": "12.3.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": {
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
"babel-plugin-macros": "^3.1.0",
|
|
59
59
|
"babel-plugin-module-resolver": "^5.0.0",
|
|
60
60
|
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
|
|
61
|
+
"babel-plugin-transform-remove-imports": "^1.7.0",
|
|
61
62
|
"babel-plugin-unassert": "^3.1.0",
|
|
62
63
|
"browserslist": "^4.16.1",
|
|
63
64
|
"browserslist-config-seek": "^2.1.0",
|