Skip to content

Commit

Permalink
chore: Update lavamoat to a version with more diff-friendly policy or…
Browse files Browse the repository at this point in the history
…dering (#29311)

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **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.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29311?quickstart=1)

## **Related issues**


## **Manual testing steps**

1. run a local policy update and verify the diff is not ridiculously
large (that would mean the update failed to apply properly after policy
got reordered here)

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

---------

Co-authored-by: MetaMask Bot <[email protected]>
  • Loading branch information
naugtur and metamaskbot authored Dec 18, 2024
1 parent c4429bc commit 5aa2962
Show file tree
Hide file tree
Showing 8 changed files with 18,450 additions and 18,427 deletions.
6,285 changes: 3,144 additions & 3,141 deletions lavamoat/browserify/beta/policy.json

Large diffs are not rendered by default.

6,285 changes: 3,144 additions & 3,141 deletions lavamoat/browserify/flask/policy.json

Large diffs are not rendered by default.

6,285 changes: 3,144 additions & 3,141 deletions lavamoat/browserify/main/policy.json

Large diffs are not rendered by default.

6,473 changes: 3,238 additions & 3,235 deletions lavamoat/browserify/mmi/policy.json

Large diffs are not rendered by default.

11,183 changes: 5,592 additions & 5,591 deletions lavamoat/build-system/policy.json

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -452,9 +452,9 @@
"@babel/preset-typescript": "^7.25.9",
"@babel/register": "^7.25.9",
"@jest/globals": "^29.7.0",
"@lavamoat/allow-scripts": "^3.0.4",
"@lavamoat/allow-scripts": "^3.3.1",
"@lavamoat/lavadome-core": "0.0.10",
"@lavamoat/lavapack": "^6.1.0",
"@lavamoat/lavapack": "^7.0.5",
"@lgbot/madge": "^6.2.0",
"@lydell/node-pty": "^1.0.1",
"@metamask/api-specs": "^0.9.3",
Expand Down Expand Up @@ -611,8 +611,8 @@
"jsdom": "^16.7.0",
"json-schema-to-ts": "^3.0.1",
"koa": "^2.7.0",
"lavamoat": "^8.0.2",
"lavamoat-browserify": "^17.0.4",
"lavamoat": "^9.0.5",
"lavamoat-browserify": "^18.1.2",
"lavamoat-viz": "^7.0.5",
"level": "^8.0.1",
"lockfile-lint": "^4.10.6",
Expand Down Expand Up @@ -762,7 +762,8 @@
"resolve-url-loader>es6-iterator>d>es5-ext>esniff>es5-ext": false,
"level>classic-level": false,
"jest-preview": false,
"@metamask/solana-wallet-snap>@solana/web3.js>bigint-buffer": false
"@metamask/solana-wallet-snap>@solana/web3.js>bigint-buffer": false,
"@lavamoat/allow-scripts>@lavamoat/preinstall-always-fail": false
}
},
"packageManager": "[email protected]"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { test, expect } from '@playwright/test';
// @ts-expect-error lint fails otherwise
import 'ses';
import '../../../../../app/scripts/lockdown-run';
import '../../../../../app/scripts/lockdown-more';
Expand Down
Loading

0 comments on commit 5aa2962

Please sign in to comment.