Skip to content

Commit 662ce77

Browse files
committed
Merge branch 'main' into add-justification-field-to-revocation-details
2 parents dc4099b + f37b36c commit 662ce77

File tree

464 files changed

+16142
-4374
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

464 files changed

+16142
-4374
lines changed

.eslintrc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ module.exports = {
114114
'shared/**/*.js',
115115
'shared/**/*.ts',
116116
'ui/**/*.js',
117-
'offscreen/**/*.ts',
118117
'**/*.test.js',
119118
'test/lib/**/*.js',
120119
'test/mocks/**/*.js',

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ lavamoat/ @MetaMask/extension-devs @MetaMask/policy-r
1919
# file is responsible, at present, for loading the snaps execution environment
2020
# for MV3. Any changes to this file should require at least one member of the
2121
# snaps development team to review and approve the changes.
22-
offscreen/scripts/offscreen.ts @MetaMask/core-platform
22+
app/offscreen/offscreen.ts @MetaMask/core-platform
2323

2424

2525
# The privacy-snapshot.json file includes a list of all hosts that the

.github/scripts/bundle.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export QUICKNODE_LINEA_MAINNET_URL=""
3232
export QUICKNODE_MAINNET_URL=""
3333
export QUICKNODE_OPTIMISM_URL=""
3434
export QUICKNODE_POLYGON_URL=""
35+
export QUICKNODE_SEI_URL=""
3536
export SEGMENT_BETA_WRITE_KEY=""
3637
export SEGMENT_EXPERIMENTAL_WRITE_KEY=""
3738
export SEGMENT_FLASK_WRITE_KEY=""

.github/workflows/e2e-chrome.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,14 @@ jobs:
8787
matrix-index: ${{ matrix.index }}
8888
matrix-total: ${{ strategy.job-total }}
8989

90-
test-e2e-chrome-vault-decryption:
90+
test-e2e-chrome-dist:
9191
# This if statement is equivalent to IS_FORK
9292
if: ${{ !(github.event.pull_request.head.repo.fork || github.event.repository.fork) }}
9393
uses: ./.github/workflows/run-e2e.yml
9494
with:
95-
test-suite-name: test-e2e-chrome-vault-decryption
95+
test-suite-name: test-e2e-chrome-dist
9696
build-artifact: build-dist-browserify
97-
test-command: yarn test:e2e:single test/e2e/vault-decryption-chrome.spec.ts --browser chrome
97+
test-command: yarn test:e2e:chrome:dist
9898
builds-from-run: ${{ inputs.builds-from-run }}
9999

100100
test-e2e-chrome-api-specs:
@@ -188,7 +188,7 @@ jobs:
188188
- test-e2e-chrome-multiple-providers
189189
- test-e2e-chrome-rpc
190190
- test-e2e-chrome-flask
191-
- test-e2e-chrome-vault-decryption
191+
- test-e2e-chrome-dist
192192
- test-e2e-chrome-api-specs
193193
- test-e2e-chrome-api-specs-multichain
194194
runs-on: ubuntu-latest

.github/workflows/e2e-firefox.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ jobs:
4545
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
4646
with:
4747
test-suite-name: test-e2e-firefox-webpack
48-
build-artifact: build-test-webpack
49-
build-command: yarn build:test:webpack
48+
build-artifact: build-test-mv2-webpack
49+
build-command: yarn build:test:webpack:mv2
5050
test-command: yarn test:e2e:firefox
5151
builds-from-run: ${{ inputs.builds-from-run }}
5252
matrix-index: ${{ matrix.index }}

.github/workflows/main.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,17 @@ jobs:
242242
builds-from-run: ${{ needs.identify-builds.outputs.builds-from-run }}
243243
secrets: inherit
244244

245+
build-test-mv2-webpack:
246+
needs:
247+
- identify-builds
248+
uses: ./.github/workflows/run-build.yml
249+
with:
250+
build-name: build-test-mv2-webpack
251+
build-command: yarn build:test:webpack:mv2
252+
validate-source-maps: false # Disabled as webpack outputs are not supported by validate-source-maps
253+
builds-from-run: ${{ needs.identify-builds.outputs.builds-from-run }}
254+
secrets: inherit
255+
245256
run-benchmarks:
246257
# If not a fork, run benchmarks
247258
if: ${{ !(github.event.pull_request.head.repo.fork || github.event.repository.fork) }}
@@ -250,7 +261,9 @@ jobs:
250261
- identify-builds
251262
- prep-deps
252263
- build-test-browserify
264+
- build-test-mv2-browserify
253265
- build-test-webpack
266+
- build-test-mv2-webpack
254267
with:
255268
builds-from-run: ${{ needs.identify-builds.outputs.builds-from-run }}
256269
secrets:
@@ -339,8 +352,9 @@ jobs:
339352
needs:
340353
- identify-builds
341354
- needs-e2e
355+
- build-dist-mv2-browserify
342356
- build-test-mv2-browserify
343-
- build-test-webpack
357+
- build-test-mv2-webpack
344358
- build-test-flask-mv2-browserify
345359
if: ${{ needs.needs-e2e.outputs.needs-e2e == 'true' }}
346360
uses: ./.github/workflows/e2e-firefox.yml
@@ -538,6 +552,7 @@ jobs:
538552
- build-test-flask-browserify
539553
- build-test-flask-mv2-browserify
540554
- build-test-webpack
555+
- build-test-mv2-webpack
541556
- run-tests
542557
- build-storybook
543558
- build-ts-migration-dashboard

.github/workflows/publish-release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ jobs:
4646
QUICKNODE_MAINNET_URL: ${{ secrets.QUICKNODE_MAINNET_URL }}
4747
QUICKNODE_OPTIMISM_URL: ${{ secrets.QUICKNODE_OPTIMISM_URL }}
4848
QUICKNODE_POLYGON_URL: ${{ secrets.QUICKNODE_POLYGON_URL }}
49+
QUICKNODE_SEI_URL: ${{ secrets.QUICKNODE_SEI_URL }}
4950
SEGMENT_BETA_WRITE_KEY: ${{ secrets.SEGMENT_BETA_WRITE_KEY }}
5051
SEGMENT_EXPERIMENTAL_WRITE_KEY: ${{ secrets.SEGMENT_EXPERIMENTAL_WRITE_KEY }}
5152
SEGMENT_FLASK_WRITE_KEY: ${{ secrets.SEGMENT_FLASK_WRITE_KEY }}

.github/workflows/run-benchmarks.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ env:
2020
jobs:
2121
benchmarks:
2222
if: ${{ github.event_name != 'merge_group' }} # Skip this job for the Merge Queue
23-
runs-on: ubuntu-22.04
23+
runs-on: ubuntu-latest
2424
timeout-minutes: 30
2525
container:
2626
image: ghcr.io/metamask/metamask-extension-e2e-image:v24.11.0
@@ -37,7 +37,7 @@ jobs:
3737
env:
3838
SELENIUM_BROWSER: ${{ matrix.browser }}
3939
HEADLESS: false
40-
ARTIFACT_NAME: build-test-${{ matrix.buildType }}
40+
ARTIFACT_NAME: build-test${{ matrix.browser == 'firefox' && '-mv2' || '' }}-${{ matrix.buildType }}
4141
OUTPUT_NAME: benchmark-${{ matrix.browser }}-${{ matrix.buildType }}-${{ matrix.pageType }}.json
4242
INFURA_PROJECT_ID: ${{ secrets.INFURA_PROJECT_ID }}
4343
continue-on-error: true
@@ -73,7 +73,7 @@ jobs:
7373

7474
# TODO: Pre-install this in the container image
7575
- name: Install AWS CLI (needed in the container)
76-
run: sudo apt-get install python3-pip && sudo pip install awscli --break-system-packages
76+
run: sudo apt-get update && sudo apt-get install python3-pip && sudo pip install awscli --break-system-packages
7777

7878
- name: Run the benchmark
7979
# Choose a benchmark command from env.COMMANDS

.github/workflows/run-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ jobs:
7777
QUICKNODE_MAINNET_URL: ${{ secrets.QUICKNODE_MAINNET_URL }}
7878
QUICKNODE_OPTIMISM_URL: ${{ secrets.QUICKNODE_OPTIMISM_URL }}
7979
QUICKNODE_POLYGON_URL: ${{ secrets.QUICKNODE_POLYGON_URL }}
80+
QUICKNODE_SEI_URL: ${{ secrets.QUICKNODE_SEI_URL }}
8081
SEGMENT_BETA_WRITE_KEY: ${{ secrets.SEGMENT_BETA_WRITE_KEY }}
8182
SEGMENT_EXPERIMENTAL_WRITE_KEY: ${{ secrets.SEGMENT_EXPERIMENTAL_WRITE_KEY }}
8283
SEGMENT_FLASK_WRITE_KEY: ${{ secrets.SEGMENT_FLASK_WRITE_KEY }}

.github/workflows/update-lavamoat-policies.yml

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,43 @@ jobs:
162162
path: lavamoat/browserify/${{ matrix.build-type }}
163163
key: cache-${{ matrix.build-type }}-${{ needs.prepare.outputs.COMMIT_SHA }}
164164

165+
update-lavamoat-webpack-policy-mv2:
166+
name: Update LavaMoat webpack MV2 policy
167+
runs-on: ubuntu-latest
168+
timeout-minutes: 30
169+
needs:
170+
- prepare
171+
steps:
172+
- name: Checkout repository
173+
uses: actions/checkout@v4
174+
175+
- name: Checkout pull request
176+
run: gh pr checkout "${PR_NUMBER}"
177+
env:
178+
GITHUB_TOKEN: ${{ secrets.LAVAMOAT_UPDATE_TOKEN }}
179+
PR_NUMBER: ${{ github.event.issue.number }}
180+
181+
- name: Checkout and setup environment
182+
uses: MetaMask/action-checkout-and-setup@v1
183+
with:
184+
is-high-risk-environment: false
185+
skip-allow-scripts: true
186+
use-yarn-hydrate: true
187+
188+
- name: Update LavaMoat webpack MV2 policy
189+
run: yarn webpack --env production --no-cache --generatePolicy -v 2
190+
env:
191+
INFURA_PROD_PROJECT_ID: 00000000000
192+
SEGMENT_PROD_WRITE_KEY: 00000000000
193+
GOOGLE_PROD_CLIENT_ID: 00000000000
194+
APPLE_PROD_CLIENT_ID: 00000000000
195+
196+
- name: Cache webpack MV2 policy
197+
uses: actions/cache/save@v4
198+
with:
199+
path: lavamoat/webpack/mv2
200+
key: cache-webpack-mv2-${{ needs.prepare.outputs.COMMIT_SHA }}
201+
165202
update-lavamoat-webpack-policy:
166203
name: Update LavaMoat webpack policy
167204
runs-on: ubuntu-latest
@@ -196,7 +233,7 @@ jobs:
196233
- name: Cache webpack policy
197234
uses: actions/cache/save@v4
198235
with:
199-
path: lavamoat/webpack
236+
path: lavamoat/webpack/mv3
200237
key: cache-webpack-${{ needs.prepare.outputs.COMMIT_SHA }}
201238

202239
commit-updated-policies:
@@ -208,6 +245,7 @@ jobs:
208245
- is-fork-pull-request
209246
- update-lavamoat-build-policy
210247
- update-lavamoat-webapp-policy
248+
- update-lavamoat-webpack-policy-mv2
211249
- update-lavamoat-webpack-policy
212250
# Ensure forks don't get access to the LavaMoat update token
213251
if: ${{ needs.is-fork-pull-request.outputs.IS_FORK == 'false' }}
@@ -266,10 +304,17 @@ jobs:
266304
key: cache-experimental-${{ needs.prepare.outputs.COMMIT_SHA }}
267305
fail-on-cache-miss: true
268306

307+
- name: Restore webpack MV2 policy
308+
uses: actions/cache/restore@v4
309+
with:
310+
path: lavamoat/webpack/mv2
311+
key: cache-webpack-mv2-${{ needs.prepare.outputs.COMMIT_SHA }}
312+
fail-on-cache-miss: true
313+
269314
- name: Restore webpack policy
270315
uses: actions/cache/restore@v4
271316
with:
272-
path: lavamoat/webpack
317+
path: lavamoat/webpack/mv3
273318
key: cache-webpack-${{ needs.prepare.outputs.COMMIT_SHA }}
274319
fail-on-cache-miss: true
275320

0 commit comments

Comments
 (0)