Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency updates, bump jest maxWorkers to 3 #835

Merged
merged 8 commits into from
Jun 19, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
---

Remove unused dependency, update `less-loader`
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
3 changes: 1 addition & 2 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,7 +95,7 @@
"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",
Expand Down
18 changes: 4 additions & 14 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
10 changes: 5 additions & 5 deletions tests/__snapshots__/typescript-css-modules.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`typescript-css-modules build should create valid app 1`] = `
SCRIPTS: [
"/static/typescript/runtime-df7fc58286eea709736e.js",
"/static/typescript/235-fed19355ef816e81a74f.js",
"/static/typescript/main-6d1257200649b9f86c56.js",
"/static/typescript/main-de1d4e09150e0bc9c99c.js",
]
CSS: [
"/static/typescript/main-cb8848ae92e1e9d08128.css",
Expand Down Expand Up @@ -119,7 +119,7 @@ export const root: string;
"index.html": SCRIPTS: [
"/static/typescript/runtime-df7fc58286eea709736e.js",
"/static/typescript/235-fed19355ef816e81a74f.js",
"/static/typescript/main-6d1257200649b9f86c56.js",
"/static/typescript/main-de1d4e09150e0bc9c99c.js",
]
CSS: [
"/static/typescript/main-cb8848ae92e1e9d08128.css",
Expand Down Expand Up @@ -215,14 +215,14 @@ interface CssExports {
export const cssExports: CssExports;
export default cssExports;
",
"main-6d1257200649b9f86c56.js": "CONTENTS IGNORED IN SNAPSHOT TEST",
"main-cb8848ae92e1e9d08128.css": .eRNyDeb {
display: flex;
}
.eRNyDeb .MYunKdE {
font-size: 32px;
}
,
"main-de1d4e09150e0bc9c99c.js": "CONTENTS IGNORED IN SNAPSHOT TEST",
"runtime-df7fc58286eea709736e.js": "CONTENTS IGNORED IN SNAPSHOT TEST",
}
`;
Expand All @@ -231,7 +231,7 @@ exports[`typescript-css-modules build-ssr should create valid app 1`] = `
SCRIPTS: [
"http://localhost:4003/runtime-424bd133a78585db66ac.js",
"http://localhost:4003/16-930bbb195bedab324553.js",
"http://localhost:4003/main-4f61eaece6b2c126eb62.js",
"http://localhost:4003/main-c8ea5e9cdab04ac07aa7.js",
]
CSS: [
"http://localhost:4003/main-cb8848ae92e1e9d08128.css",
Expand Down Expand Up @@ -360,7 +360,7 @@ interface CssExports {
export const cssExports: CssExports;
export default cssExports;
",
"main-4f61eaece6b2c126eb62.js": "CONTENTS IGNORED IN SNAPSHOT TEST",
"main-c8ea5e9cdab04ac07aa7.js": "CONTENTS IGNORED IN SNAPSHOT TEST",
"main-cb8848ae92e1e9d08128.css": .eRNyDeb {
display: flex;
}
Expand Down