Skip to content

Commit

Permalink
Dependency updates, bump jest maxWorkers to 3 (#835)
Browse files Browse the repository at this point in the history
  • Loading branch information
askoufis authored Jun 19, 2023
1 parent 4e8bb1b commit 87a59c9
Show file tree
Hide file tree
Showing 12 changed files with 83 additions and 62 deletions.
8 changes: 8 additions & 0 deletions .changeset/funny-geese-drive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'sku': minor
---

Remove `babel-plugin-dynamic-import-node` dependency

This plugin was used to transform dynamic imports into deferred requires within jest tests.
However, dynamic imports are well supported in Node, so this plugin is no longer required.
5 changes: 5 additions & 0 deletions .changeset/hip-avocados-protect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'sku': patch
---

Update `less-loader` and `node-emoji` dependencies
2 changes: 1 addition & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ jobs:
key: jest-${{ runner.os }}-${{ hashFiles('./pnpm-lock.yaml') }}

- name: Test
run: pnpm run test --maxWorkers=2
run: pnpm run test --maxWorkers=3
5 changes: 0 additions & 5 deletions packages/sku/config/babel/babelConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ module.exports = ({
rootResolution = false,
}) => {
const isBrowser = target === 'browser';
const isJest = target === 'jest';
const isProductionBuild = process.env.NODE_ENV === 'production';

const plugins = [
Expand All @@ -33,10 +32,6 @@ module.exports = ({
]);
}

if (isJest) {
plugins.push(require.resolve('babel-plugin-dynamic-import-node'));
}

if (isProductionBuild) {
plugins.push(
require.resolve('@babel/plugin-transform-react-inline-elements'),
Expand Down
5 changes: 2 additions & 3 deletions packages/sku/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
"babel-jest": "^29.0.0",
"babel-loader": "^9.1.2",
"babel-plugin-add-react-displayname": "^0.0.5",
"babel-plugin-dynamic-import-node": "^2.3.3",
"babel-plugin-macros": "^3.1.0",
"babel-plugin-module-resolver": "^5.0.0",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
Expand Down Expand Up @@ -96,12 +95,12 @@
"jest-environment-jsdom": "^29.0.0",
"jest-watch-typeahead": "^2.2.0",
"less": "^4.1.0",
"less-loader": "^11.0.0",
"less-loader": "^11.1.3",
"lint-staged": "^11.1.1",
"lodash": "^4.17.21",
"memoizee": "^0.4.15",
"mini-css-extract-plugin": "^2.6.1",
"node-emoji": "^1.10.0",
"node-emoji": "^2.1.0",
"node-html-parser": "^6.1.1",
"open": "^7.3.1",
"path-to-regexp": "^6.2.0",
Expand Down
52 changes: 33 additions & 19 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 22 additions & 22 deletions tests/__snapshots__/multiple-routes.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ exports[`multiple-routes build and serve should generate the expected files 1`]
color: blue;
}
,
"handlers-Details-9c1864199b6a7016df98.js": "CONTENTS IGNORED IN SNAPSHOT TEST",
"handlers-Details-d676f1666d3d25986768.js": "CONTENTS IGNORED IN SNAPSHOT TEST",
"handlers-Home-0076e4d4a98910c8f902.css": .dyLY_sb {
color: red;
}
,
"handlers-Home-3e7d301f15c04b169344.js": "CONTENTS IGNORED IN SNAPSHOT TEST",
"main-d8f14e095ad2c003e052.js": "CONTENTS IGNORED IN SNAPSHOT TEST",
"handlers-Home-2d43a31c58bff9977984.js": "CONTENTS IGNORED IN SNAPSHOT TEST",
"main-8fb25263b562b5184cda.js": "CONTENTS IGNORED IN SNAPSHOT TEST",
"production/au/details/$id/index.html": SCRIPTS: [
"https://code.jquery.com/jquery-3.5.0.slim.min.js",
"/static/place/runtime-0ed7145f525217f5c0de.js",
"/static/place/runtime-d5e227ab707d471ba14c.js",
"/static/place/283-b65dde74011b05bfcfb2.js",
"/static/place/main-d8f14e095ad2c003e052.js",
"/static/place/handlers-Details-9c1864199b6a7016df98.js",
"/static/place/main-8fb25263b562b5184cda.js",
"/static/place/handlers-Details-d676f1666d3d25986768.js",
"/static/place/AsyncComponent-f564c97a79efa014bb45.js",
]
CSS: [
Expand Down Expand Up @@ -148,10 +148,10 @@ SOURCE HTML: <!DOCTYPE html>
</html>,
"production/au/index.html": SCRIPTS: [
"https://code.jquery.com/jquery-3.5.0.slim.min.js",
"/static/place/runtime-0ed7145f525217f5c0de.js",
"/static/place/runtime-d5e227ab707d471ba14c.js",
"/static/place/283-b65dde74011b05bfcfb2.js",
"/static/place/main-d8f14e095ad2c003e052.js",
"/static/place/handlers-Home-3e7d301f15c04b169344.js",
"/static/place/main-8fb25263b562b5184cda.js",
"/static/place/handlers-Home-2d43a31c58bff9977984.js",
]
CSS: [
"/static/place/handlers-Home-0076e4d4a98910c8f902.css",
Expand Down Expand Up @@ -263,10 +263,10 @@ SOURCE HTML: <!DOCTYPE html>
</html>,
"production/nz/nz/details/:id/index.html": SCRIPTS: [
"https://code.jquery.com/jquery-3.5.0.slim.min.js",
"/static/place/runtime-0ed7145f525217f5c0de.js",
"/static/place/runtime-d5e227ab707d471ba14c.js",
"/static/place/283-b65dde74011b05bfcfb2.js",
"/static/place/main-d8f14e095ad2c003e052.js",
"/static/place/handlers-Details-9c1864199b6a7016df98.js",
"/static/place/main-8fb25263b562b5184cda.js",
"/static/place/handlers-Details-d676f1666d3d25986768.js",
"/static/place/AsyncComponent-f564c97a79efa014bb45.js",
]
CSS: [
Expand Down Expand Up @@ -394,10 +394,10 @@ SOURCE HTML: <!DOCTYPE html>
</html>,
"production/nz/nz/index.html": SCRIPTS: [
"https://code.jquery.com/jquery-3.5.0.slim.min.js",
"/static/place/runtime-0ed7145f525217f5c0de.js",
"/static/place/runtime-d5e227ab707d471ba14c.js",
"/static/place/283-b65dde74011b05bfcfb2.js",
"/static/place/main-d8f14e095ad2c003e052.js",
"/static/place/handlers-Home-3e7d301f15c04b169344.js",
"/static/place/main-8fb25263b562b5184cda.js",
"/static/place/handlers-Home-2d43a31c58bff9977984.js",
]
CSS: [
"/static/place/handlers-Home-0076e4d4a98910c8f902.css",
Expand Down Expand Up @@ -507,17 +507,17 @@ SOURCE HTML: <!DOCTYPE html>
</script>
</body>
</html>,
"runtime-0ed7145f525217f5c0de.js": "CONTENTS IGNORED IN SNAPSHOT TEST",
"runtime-d5e227ab707d471ba14c.js": "CONTENTS IGNORED IN SNAPSHOT TEST",
}
`;
exports[`multiple-routes build and serve should return details page 1`] = `
SCRIPTS: [
"https://code.jquery.com/jquery-3.5.0.slim.min.js",
"/static/place/runtime-0ed7145f525217f5c0de.js",
"/static/place/runtime-d5e227ab707d471ba14c.js",
"/static/place/283-b65dde74011b05bfcfb2.js",
"/static/place/main-d8f14e095ad2c003e052.js",
"/static/place/handlers-Details-9c1864199b6a7016df98.js",
"/static/place/main-8fb25263b562b5184cda.js",
"/static/place/handlers-Details-d676f1666d3d25986768.js",
"/static/place/AsyncComponent-f564c97a79efa014bb45.js",
]
CSS: [
Expand Down Expand Up @@ -658,10 +658,10 @@ POST HYDRATE DIFFS:
exports[`multiple-routes build and serve should return home page 1`] = `
SCRIPTS: [
"https://code.jquery.com/jquery-3.5.0.slim.min.js",
"/static/place/runtime-0ed7145f525217f5c0de.js",
"/static/place/runtime-d5e227ab707d471ba14c.js",
"/static/place/283-b65dde74011b05bfcfb2.js",
"/static/place/main-d8f14e095ad2c003e052.js",
"/static/place/handlers-Home-3e7d301f15c04b169344.js",
"/static/place/main-8fb25263b562b5184cda.js",
"/static/place/handlers-Home-2d43a31c58bff9977984.js",
]
CSS: [
"/static/place/handlers-Home-0076e4d4a98910c8f902.css",
Expand Down
2 changes: 1 addition & 1 deletion tests/__snapshots__/public-path.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`public path build and serve should create valid app with no unresolved
SCRIPTS: [
"/static/runtime-df7fc58286eea709736e.js",
"/static/258-86dcf2d36390f340021b.js",
"/static/main-5c63c7388de2c8ab022d.js",
"/static/main-f99a1e88665d307c7ee3.js",
]
CSS: [
"/static/main-c06e2768c0d8ec21c207.css",
Expand Down
6 changes: 3 additions & 3 deletions tests/__snapshots__/react-css-modules.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`react-css-modules should create valid app 1`] = `
SCRIPTS: [
"/runtime-df7fc58286eea709736e.js",
"/235-fed19355ef816e81a74f.js",
"/main-22a6e81fd73c910949be.js",
"/main-e6f24933c4e3607d786b.js",
]
CSS: [
"/main-cb8848ae92e1e9d08128.css",
Expand Down Expand Up @@ -105,7 +105,7 @@ exports[`react-css-modules should generate the expected files 1`] = `
"index.html": SCRIPTS: [
"/runtime-df7fc58286eea709736e.js",
"/235-fed19355ef816e81a74f.js",
"/main-22a6e81fd73c910949be.js",
"/main-e6f24933c4e3607d786b.js",
]
CSS: [
"/main-cb8848ae92e1e9d08128.css",
Expand Down Expand Up @@ -188,14 +188,14 @@ SOURCE HTML: <!DOCTYPE html>
</script>
</body>
</html>,
"main-22a6e81fd73c910949be.js": "CONTENTS IGNORED IN SNAPSHOT TEST",
"main-cb8848ae92e1e9d08128.css": .eRNyDeb {
display: flex;
}
.eRNyDeb .MYunKdE {
font-size: 32px;
}
,
"main-e6f24933c4e3607d786b.js": "CONTENTS IGNORED IN SNAPSHOT TEST",
"runtime-df7fc58286eea709736e.js": "CONTENTS IGNORED IN SNAPSHOT TEST",
}
`;
2 changes: 1 addition & 1 deletion tests/__snapshots__/sku-with-https.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`sku-with-https serve should start a development server 1`] = `
SCRIPTS: [
"/runtime-a5c914bdf89f464ecb2e.js",
"/235-fed19355ef816e81a74f.js",
"/main-123654aaf62c8a804659.js",
"/main-2f9282bd8317bb7e7d36.js",
]
CSS: [
"/main-cb8848ae92e1e9d08128.css",
Expand Down
4 changes: 2 additions & 2 deletions tests/__snapshots__/ssr-hello-world.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`ssr-hello-world build custom port should generate a production server r
SCRIPTS: [
"http://localhost:4000/runtime-21ba7ee762f9d6616967.js",
"http://localhost:4000/258-86dcf2d36390f340021b.js",
"http://localhost:4000/main-596c863a4e653c9fb05e.js",
"http://localhost:4000/main-4f2a51fe99ba70920a7f.js",
"https://code.jquery.com/jquery-3.5.0.slim.min.js",
]
CSS: [
Expand Down Expand Up @@ -110,7 +110,7 @@ exports[`ssr-hello-world build default port should generate a production server
SCRIPTS: [
"http://localhost:4000/runtime-21ba7ee762f9d6616967.js",
"http://localhost:4000/258-86dcf2d36390f340021b.js",
"http://localhost:4000/main-596c863a4e653c9fb05e.js",
"http://localhost:4000/main-4f2a51fe99ba70920a7f.js",
"https://code.jquery.com/jquery-3.5.0.slim.min.js",
]
CSS: [
Expand Down
Loading

0 comments on commit 87a59c9

Please sign in to comment.