-
Notifications
You must be signed in to change notification settings - Fork 637
Replace superstruct with ESM-compatible fork @metamask/superstruct
#2445
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
Merged
Changes from 1 commit
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
037210e
Replace 'superstruct' imports with '@metamask/superstruct'
MajorLift c8602a4
Remove 'superstruct' and add '@metamask/superstruct' v3.0.0 as depend…
MajorLift 7d12972
Bump dependency `@metamask/utils` to `^8.5.0` in all packages
MajorLift 04da747
Fix more `superstruct` imports to `@metamask/superstruct`
MajorLift 0ef9a63
Linter fixes
MajorLift ac8e786
Add lavamoat policy allowlisting `@metamask/superstruct` for `@metama…
MajorLift b522f18
Bump dependency `@metamask/utils` to `^8.5.0` in example packages to …
MajorLift c7d2a6c
Fix `superstruct` imports introduced from main branch
MajorLift ce6b2d4
Bump dependency `@metamask/utils` to `^8.5.0` in new example package
MajorLift 03517e3
Fix incorrect typing of `JsonRpcEngine.handle` return value, and impr…
MajorLift 4a0c7a1
Fix `snaps-sdk` tests by applying `@ts-expect-error` annotations to d…
MajorLift 91a1898
Fix subpath import
MajorLift 3aff737
Update lavamoat policies
MajorLift 5a56e9b
[snaps-utils] test: fix mock for `@metamask/superstruct` module
MajorLift a1901c5
Update coverage
MajorLift 3eb9330
Use `isJsonRpcFailure` type guard
MajorLift b34657d
Merge branch 'main' into replace-superstruct-with-fork
MajorLift b7d8daa
Bump dependency `@metamask/snaps-registry` from `^3.1.0` to `^3.2.0` …
MajorLift 664711b
Update coverage
MajorLift 9fdc999
Merge branch 'main' into replace-superstruct-with-fork
MajorLift 734d29c
Fix import from `superstruct`
MajorLift ca11f48
Bump `@metamask/superstruct` from `^3.0.0` to `^3.1.0` in all packages
MajorLift d5f4c10
Update lavamoat policies
MajorLift 9e29439
Force yarn resolution to use `@metamask/superstruct` `3.1.0`
MajorLift c835e8b
Update snap manifests
MajorLift 1928ce2
Bump `@metamask/utils` from `^8.5.0` to `^9.0.0` in all packages
MajorLift b54a891
Force yarn resolution for `@metamask/utils` to `9.0.0`
MajorLift 2c85ca8
Restore eslint-disable directive previously added in 03517e365245b1f4…
MajorLift 461bd36
Merge branch 'main' into replace-superstruct-with-fork
MajorLift 68fe419
Update manifest files
MajorLift bbbd161
Remove unused devDep
MajorLift 2dcab89
[snaps-simulator] Replace `superstruct` `^1.0.3` with `@metamask/supe…
MajorLift 3ec97bf
Bump `@metamask/providers` from `^17.0.0` to `^17.1.0`
MajorLift 9f33e7a
Fix import from `@metamask/providers`
MajorLift ec629f9
Bump `@metamask/rpc-errors` from `^6.2.1` to `^6.3.1`
MajorLift 1169288
Merge branch 'main' into replace-superstruct-with-fork
MajorLift 634a4f4
Update lavamoat policy
MajorLift 6c47c6e
Merge branch 'main' into replace-superstruct-with-fork
MajorLift cb3a1cb
Revert "Bump `@metamask/providers` from `^17.0.0` to `^17.1.0`"
MajorLift ce8a4d3
fix(lint): Remove unused import
MajorLift 91e83cd
Update lavamoat policy and manifest
MajorLift d97c6f1
Fix lockfile
MajorLift fa0c2fd
Update lavamoat policy
MajorLift 6a8919f
Revert "Fix import from `@metamask/providers`"
MajorLift bc78712
Update lavamoat policy
MajorLift 2deef99
Merge branch 'main' into replace-superstruct-with-fork
MajorLift c3a258b
Bump `@metamask/key-tree` from `^9.1.1` to `^9.1.2`
MajorLift 42e4c1e
Bump `@metamask/snaps-registry` from `^3.2.0` to `^3.2.1`
MajorLift 97b9048
Merge branch 'main' into replace-superstruct-with-fork
MajorLift 9f67c3a
Bump `@metamask/base-controller` from `^6.0.0` to `^6.0.1`
MajorLift 610a894
Bump `@metamask/permission-controller` from `^10.0.0` to `^10.0.1`
MajorLift 2248718
Fix `@metamask/providers` to `17.0.0`
MajorLift e9b91cd
Merge branch 'main' into replace-superstruct-with-fork
MajorLift 9d979c8
Bump `@metamask/providers` from `17.0.0` to `^17.1.1`
MajorLift 68cae24
fix(lavamoat): append extensions to `@metamask/providers` subpath imp…
MajorLift 52a3e57
Dedupe lockfile
MajorLift e92543e
Revert "fix(lavamoat): append extensions to `@metamask/providers` sub…
MajorLift 7e752f4
Revert "Bump `@metamask/providers` from `17.0.0` to `^17.1.1`"
MajorLift efe17f3
Bump `@metamask/utils` from `^9.0.0` to `^9.1.0`
MajorLift File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix import from
@metamask/providers
- Loading branch information
commit 9f33e7a0c7b47bd7a70c23a7b1c8be18d5645378
There are no files selected for viewing
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
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.
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.
For bundle size reasons we need to import
StreamProviderfrom./dist/StreamProviderdirectly. The execution environment is built with LavaMoat and it currently doesn't support tree shaking.Uh oh!
There was an error while loading. Please reload this page.
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.
Reverted in latest commit: e92543e
I get the following error from
yarn build:lavamoat, which was previously resolved by removing the subpath import.Uh oh!
There was an error while loading. Please reload this page.
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.
Ah appending
.cjsseems to work. I'll push that now.Edit: 69abbc0
Uh oh!
There was an error while loading. Please reload this page.
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.
Appending file extensions for subpath imports resolves the lavamoat error, but causes browser test fails in
snaps-execution-environment.Uh oh!
There was an error while loading. Please reload this page.
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.
Reverted the file extensions, but still getting
test:browsererrors that don't appear to be directly related to@metamask/providers:(no CI run link for this because lavamoat prepare step fails)
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.
@Mrtenz How would you feel about extracting this issue to its own ticket and merging this PR with
@metamask/providerset to17.0.0? It doesn't look like this will cause issues in core.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.
Makes sense to unblock this!
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! I'll create a new ticket for the 17.1.1 version bump.
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.
Created: #2579. Included information in this thread.
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.
RE top comment: The
dist/subpath imports from@metamask/providersare restored here: e92543e