-
Notifications
You must be signed in to change notification settings - Fork 152
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
chore(deps-dev): bump jest from 27.5.1 to 28.0.0 #5421
Conversation
a3c809e
to
9d0920a
Compare
Bumps [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest) from 27.5.1 to 28.0.0. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/commits/v28.0.0/packages/jest) --- updated-dependencies: - dependency-name: jest dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
9d0920a
to
94ee879
Compare
This required some manual updates. The easy ones were:
The other three were more interesting; I've given them separate comments for ease of linking them. |
Jest 28 tries to use an ESM version of
|
|
Jest 28 forbids
|
A newer version of jest exists, but since this PR has been edited by someone other than Dependabot I haven't updated it. You'll get a PR for the updated version as normal once this PR is merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the detailed comments! I agree with your proposed approach for NamedFC
components.
Hi, I think I hit issues similar to those mentioned for uuid with Apollo Client: apollographql/apollo-feature-requests#287 I already had some trouble with Next + ESM packages that rely on @apollo/client. Other framework like SvelteKit or Nuxt have the same issue. This works ok, though I had to extend it slightly to expose all relevant packages for my test to work again. I also had to import I just wanted to mention that because we will probably have waves of developers hitting this issue as they update their applications and start using ESM everywhere. This might make the test way slower though. (Edit: I've just noticed that this is not a Jest related project but this issue is linked in the migration doc so many people might end up here looking for Jest 28 ESM issues) |
|
This PR upgrades Jest from v27 to v28. Most of the breaking changes don't affect us, except for two: - To use the JSDOM test environment, `jest-environment-jsdom` now has to be installed separately - Jest now has full support for package exports, which can cause problems where file imports are not resolved correctly. Specifically, this is a problem for `uuid`. There is a discussion and proposed solution in this [GitHub issue](microsoft/accessibility-insights-web#5421 (comment)), which I used in this PR. To summarize, the fix is to add a custom resolver that forces Jest to use the CommonJS+node version of `uuid`, but leaves all other resolutions the same J=SLAP-2123 TEST=auto See that Jest tests pass.
The current version of the package `uuid` doesn't work out of the box with the new version of Jest, as described in microsoft/accessibility-insights-web#5421 (comment). I applied the fix using a `resolver`, as mentioned at the end of the above link, from microsoft/accessibility-insights-web@9ad4e61
Issue is described well here: microsoft/accessibility-insights-web#5421 (comment) They originally fixed the issue with a custom resolver (microsoft/accessibility-insights-web@9ad4e61#diff-10ce3d2c4d812be4f9bbaceb999b48c91538e4ccfc23dc585c59deb316d0d689), but then replaced that workaround with an upgrade to uuid v9.0.0 when it became available (microsoft/accessibility-insights-web@6d1c3a3). uuid v9.0.0 https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md#900-2022-09-05
Issue is described well here: microsoft/accessibility-insights-web#5421 (comment) They originally fixed the issue with a custom resolver (microsoft/accessibility-insights-web@9ad4e61#diff-10ce3d2c4d812be4f9bbaceb999b48c91538e4ccfc23dc585c59deb316d0d689), but then replaced that workaround with an upgrade to uuid v9.0.0 when it became available (microsoft/accessibility-insights-web@6d1c3a3). uuid v9.0.0 https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md#900-2022-09-05
Bumps jest from 27.5.1 to 28.0.0.
Release notes
Sourced from jest's releases.
... (truncated)
Changelog
Sourced from jest's changelog.
... (truncated)
Commits
8f9b812
v28.0.08b4b787
v28.0.0-alpha.11d5eda7f
v28.0.0-alpha.107c63f59
v28.0.0-alpha.9ccecdae
Enforce same version of a dependency (#12668)09fa164
feat(jest-core, jest-watcher)!: moveTestWatcher
class tojest-watcher
(#...d915e7d
v28.0.0-alpha.806f58f8
v28.0.0-alpha.76284ada
v28.0.0-alpha.646fb19b
v28.0.0-alpha.5Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)