-
Notifications
You must be signed in to change notification settings - Fork 13
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
Fix jest config top level await #3874
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
busma13
commented
Dec 12, 2024
sotojn
approved these changes
Dec 12, 2024
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.
LGTM
busma13
force-pushed
the
fix-jest-config-top-level-await
branch
from
December 12, 2024 22:05
2f854ee
to
6a07c87
Compare
godber
pushed a commit
that referenced
this pull request
Dec 16, 2024
This PR makes the following changes: - In `jest.config.base.js` explicitly set `transformIgnorePatterns` to the default (`['/node_modules/', '\\.pnp\\.[^\\/]+$']`), which will skip running transforms on node-modules or pnp files. We were overriding the default with an empty array. Standard practice is to only transform specific dependencies if there is a need. - Remove patch for `unicorn-magic` dependency, as it is no longer being broken by the jest transform. - Add README to `./patches` explaining how to make a patch using `patch-package`. This also prevents the `patches` directory from being removed if there are no patches, breaking the docker build. Ref: #3871, #3874
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR makes the following changes:
await
s in alljest.config.ts
files with regular imports, as these will throw errors in node 22.12.0.patch-package
andpostinstall-postinstall
as root level dev dependencies.patch-package
allows for packages within node_modules to be patched.postinstall-postinstall
allows for a postinstall hooks to be run afteryarn remove
, not justyarn
oryarn add
.patch-package
as a postinstall hook so any patches will be applied properly.patch-package
to patch the[email protected]
package.json to have a default export compatible with our jest config.patch
directory into dockerfile.doc
fromyarnclean.ci
. This line deletes thedoc
directory in a dependency ofpatch-package
during docker build.ref: #3871