-
Notifications
You must be signed in to change notification settings - Fork 5k
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: Update lavamoat to a version with more diff-friendly policy ordering #29311
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
@metamaskbot update-policies |
Policies updated. 🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff |
@@ -2693,7 +2693,7 @@ | |||
"@zxing/library>ts-custom-error": true | |||
} | |||
}, | |||
"extension-port-stream>readable-stream>abort-controller": { | |||
"@lavamoat/lavapack>readable-stream>abort-controller": { |
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.
None of these browserify policies should have changed, so let's explore why these changes are trivial:
- the path to abort-controller changed because packages got rearranged in the tree and this is now the shortest path to it.
- readable-stream got deduplicated into a newer version that uses AbortSignal directly etc.
lavamoat/build-system/policy.json
Outdated
@@ -1225,14 +1171,21 @@ | |||
"assert": true, | |||
"path": true | |||
}, | |||
"globals": { | |||
"afterAll": true, | |||
"process.cwd": true |
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.
This seems like we're detecting new globals we didn't detect before
lavamoat/build-system/policy.json
Outdated
"globals": { | ||
"Event": true, | ||
"EventTarget": true, | ||
"console": true |
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.
We could restrict these in overrides later as I don't think this shim has any work left to do.
lavamoat/build-system/policy.json
Outdated
"globals": { | ||
"process": true | ||
} | ||
}, |
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.
this is silly, but it comes with the ecosystem of streams reimplementations
Policy review: Changes to the build policy indicate the lavamoat update (the readable-stream is a new copy of readable-stream (lavamoat updated to v4 and it's the newest version in the dependencies here according to yarn why) cc @MetaMask/policy-reviewers |
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.
Looks good!
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.
Lg
Builds ready [5a46b93]
Page Load Metrics (1808 ± 130 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
same exact commits on main 3d ago said decreased 🤷 |
Builds ready [e510fde]
Page Load Metrics (1606 ± 86 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
@metamaskbot update-policies |
Policies updated. 🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff |
Builds ready [215cc04]
Page Load Metrics (1534 ± 36 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
This lavamoat update brings a different sorting comparator for policy.json files that will produce more readable diffs.
This PR has 2 commits - one that reorders the policy without making any changes and another that updates lavamoat packages on top of that.
For better clarity on the policy.json files, inspect each commit separately.
This is going to be hard to review and merge because conflict resolution requires a redo. Gonna have to schedule it carefully.
Related issues
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist