generated from MetaMask/metamask-module-template
-
Notifications
You must be signed in to change notification settings - Fork 7
refactor(extension): Optimize building and testing #41
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
Merged
SMotaal
merged 9 commits into
main
from
smotaal/test-endoify-vitest-split-shims-extension
Sep 3, 2024
Merged
refactor(extension): Optimize building and testing #41
SMotaal
merged 9 commits into
main
from
smotaal/test-endoify-vitest-split-shims-extension
Sep 3, 2024
Conversation
This file contains hidden or 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
This was referenced Aug 28, 2024
grypez
reviewed
Aug 29, 2024
grypez
requested changes
Aug 31, 2024
SMotaal
commented
Aug 31, 2024
SMotaal
commented
Aug 31, 2024
Co-authored-by: grypez <143971198+grypez@users.noreply.github.com>
Base automatically changed from
smotaal/test-endoify-vitest-split-shims
to
main
September 3, 2024 13:55
SMotaal
added a commit
that referenced
this pull request
Sep 3, 2024
This is the second PR to land instead of #37 after #39 and before #41: - Renames `endoify.mjs` to `endoify.js` in `packages/{shims,extension}` - For consistency — now all `.mjs` files are renamed to `.js` - Delegates bundling of `endoify.js` to `bundleSource` - For reliability and predictability — avoids making assumptions and resolving paths inside third-party packages - Optionally subs `ZWJ`-prefixed identifiers introduced by `bundleSource` with conforming `CGJ` alternatives - For conformance — makes it possible to [experiment with `rollup`](https://www.smotaal.io/experimental/#/experimental/modules/shim/README.md) until [endojs/endo#2436](endojs/endo#2436) rolls out. - Explicitly imports `./endoify.js` in `packages/shims/src/*.test.ts` - For clarity and flexibility — test files need to be explicit - Configures `vitest` to use `jsdom` with `vmThreads` for `packages/shims` - For consistency and reduced configuration overhead — thanks to @grypez's exploration putting us on this path of least resistance with `vitest`
grypez
approved these changes
Sep 3, 2024
Contributor
grypez
left a comment
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.
Very clean. Approved!
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 is the third PR to land instead of #37 and after #39 and #40:
endoify.tsandendoify.test.tstopackages/extension/src./endoified.js./endoify.jsinpackages/extension/src/*.test.tsvitestto usejsdomwithvmThreadsforpackages/extensionscript[src="endoify.ts"]andscript[src="endoify.js"]inpackages/extension/src/*.html