Skip to content

Commit

Permalink
Update jest, typescript, babel, eslint-config-seek and minimu…
Browse files Browse the repository at this point in the history
…m node version requirement (#709)
  • Loading branch information
askoufis authored Oct 11, 2022
1 parent b366fa8 commit 7a5d2a8
Show file tree
Hide file tree
Showing 25 changed files with 2,649 additions and 2,662 deletions.
12 changes: 12 additions & 0 deletions .changeset/few-bees-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
'sku': minor
---

Update to eslint-config-seek v10

This update involves a few major version jumps, so be sure to read the following release notes for all the breaking changes:
- [v8.0.0](https://github.com/seek-oss/eslint-config-seek/releases/tag/v8.0.0)
- [v9.0.0](https://github.com/seek-oss/eslint-config-seek/releases/tag/v9.0.0)
- [v10.0.0](https://github.com/seek-oss/eslint-config-seek/releases/tag/v10.0.0)

You should be able to automatically fix most lint warnings/errors by running `yarn sku format`.
25 changes: 25 additions & 0 deletions .changeset/funny-lemons-brush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
'sku': minor
---

Upgrade from jest v27 to v29

Please take a look at the following upgrade guides as there may be breaking changes that affect your tests:
- [v27 to v28 upgrade guide](https://jestjs.io/docs/28.x/upgrading-to-jest28)
- [v28 to v29 upgrade guide](https://jestjs.io/docs/upgrading-to-jest29)

Likely the most significant change is the new default snapshot format:

```diff
- Expected: \\"a\\"
+ Expected: "a"

- Object {
- Array []
- }
+ {
+ []
+ }
```

This may require you to update your snapshots.
8 changes: 8 additions & 0 deletions .changeset/swift-sloths-relax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'sku': minor
---

Drop support for Node v12

Sku now only supports Node v14.15 and above.
Although sku itself does not depend on any Node v14 APIs, Node v12 is [no longer officially supported](https://github.com/nodejs/Release#end-of-life-releases), and many of sku's dependencies no longer support it either.
9 changes: 9 additions & 0 deletions .changeset/yellow-rats-act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'sku': minor
---

Update typescript dependency

Sku now has a `typescript` dependency of `^4.5.0`.
Previously the version was restricted due to a type issue with `braid-design-system` and `[email protected]`.
Please take a look at the release notes for recent typescript versions as there may be breaking changes that need to be addressed.
2 changes: 1 addition & 1 deletion config/jest/cssModulesTransform.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ module.exports = {
cssModule[className] = `${fileName}__${className}`;
});

return `module.exports = ${JSON.stringify(cssModule)}`;
return { code: `module.exports = ${JSON.stringify(cssModule)}` };
},
};
1 change: 0 additions & 1 deletion config/jest/jestConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ module.exports = {
// the default, which normally excludes everything in node_modules.
`node_modules${slash}(?!(${compilePackagesRegex}))`,
],
testURL: 'http://localhost', // @see https://github.com/facebook/jest/issues/6766
watchPlugins: [
require.resolve('jest-watch-typeahead/filename'),
require.resolve('jest-watch-typeahead/testname'),
Expand Down
1 change: 0 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const path = require('path');
module.exports = {
setupFilesAfterEnv: [path.resolve(__dirname, 'test/utils/jestSetup.js')],
testURL: 'http://localhost',
testMatch: ['**/*.test.js'],
testPathIgnorePatterns: ['test/.*/src'],
preset: 'jest-puppeteer',
Expand Down
31 changes: 16 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"sku": "./bin/sku.js"
},
"engines": {
"node": ">=12.13.0"
"node": ">=14.15"
},
"scripts": {
"lint": "npm run format-check && eslint .",
Expand Down Expand Up @@ -56,14 +56,14 @@
"react": "^16.14.0 || ^17.0.0 || ^18.0.0"
},
"dependencies": {
"@babel/core": "^7.12.10",
"@babel/plugin-transform-react-constant-elements": "^7.12.1",
"@babel/plugin-transform-react-inline-elements": "^7.12.1",
"@babel/plugin-transform-runtime": "^7.12.10",
"@babel/preset-env": "^7.12.11",
"@babel/preset-react": "^7.12.10",
"@babel/preset-typescript": "^7.12.7",
"@babel/runtime": "^7.12.5",
"@babel/core": "^7.18.0",
"@babel/plugin-transform-react-constant-elements": "^7.18.0",
"@babel/plugin-transform-react-inline-elements": "^7.18.0",
"@babel/plugin-transform-runtime": "^7.18.0",
"@babel/preset-env": "^7.18.0",
"@babel/preset-react": "^7.18.0",
"@babel/preset-typescript": "^7.18.0",
"@babel/runtime": "^7.18.0",
"@loadable/babel-plugin": "^5.13.2",
"@loadable/component": "^5.14.1",
"@loadable/server": "^5.14.0",
Expand All @@ -72,7 +72,7 @@
"@storybook/builder-webpack5": "^6.3.6",
"@storybook/manager-webpack5": "^6.3.6",
"@storybook/react": "^6.3.4",
"@types/jest": "^27.0.0",
"@types/jest": "^29.0.0",
"@types/loadable__component": "^5.13.1",
"@vanilla-extract/babel-plugin": "^1.0.0",
"@vanilla-extract/webpack-plugin": "^2.0.0",
Expand All @@ -81,7 +81,7 @@
"@vocab/pseudo-localize": "^1.0.0",
"@vocab/webpack": "^1.1.0",
"autoprefixer": "^10.3.1",
"babel-jest": "^27.0.6",
"babel-jest": "^29.0.0",
"babel-loader": "^8.2.2",
"babel-plugin-add-react-displayname": "^0.0.5",
"babel-plugin-dynamic-import-node": "^2.3.3",
Expand Down Expand Up @@ -111,7 +111,7 @@
"esbuild-register": "^3.2.0",
"escape-string-regexp": "^4.0.0",
"eslint": "^7.18.0",
"eslint-config-seek": "^7.0.8",
"eslint-config-seek": "^10.0.0",
"exception-formatter": "^2.1.2",
"express": "^4.16.3",
"fast-glob": "^3.2.5",
Expand All @@ -124,8 +124,9 @@
"identity-obj-proxy": "^3.0.0",
"indent-string": "^4.0.0",
"inquirer": "^8.2.3",
"jest": "^27.0.6",
"jest-watch-typeahead": "^0.6.1",
"jest": "^29.0.0",
"jest-environment-jsdom": "^29.0.0",
"jest-watch-typeahead": "^2.2.0",
"less": "^4.1.0",
"less-loader": "^5.0.0",
"lint-staged": "^11.1.1",
Expand All @@ -152,7 +153,7 @@
"traverse": "^0.6.6",
"treat": "^2.0.4",
"tree-kill": "^1.2.1",
"typescript": ">=4.1.3 <4.5.0",
"typescript": "^4.5.0",
"validate-npm-package-name": "^4.0.0",
"webpack": "^5.47.1",
"webpack-bundle-analyzer": "^4.4.2",
Expand Down
1 change: 0 additions & 1 deletion scripts/test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable-next-line jest/no-jest-import */
const jest = require('jest');

const isCI = require('../lib/isCI');
Expand Down
Loading

0 comments on commit 7a5d2a8

Please sign in to comment.