Skip to content

Commit 996910f

Browse files
committed
Merge remote-tracking branch 'origin/main' into refactor/5477/v5-compat
2 parents 202a374 + a208c0b commit 996910f

File tree

336 files changed

+10895
-2715
lines changed

Some content is hidden

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

336 files changed

+10895
-2715
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-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: 15 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:
@@ -341,7 +354,7 @@ jobs:
341354
- needs-e2e
342355
- build-dist-mv2-browserify
343356
- build-test-mv2-browserify
344-
- build-test-webpack
357+
- build-test-mv2-webpack
345358
- build-test-flask-mv2-browserify
346359
if: ${{ needs.needs-e2e.outputs.needs-e2e == 'true' }}
347360
uses: ./.github/workflows/e2e-firefox.yml
@@ -539,6 +552,7 @@ jobs:
539552
- build-test-flask-browserify
540553
- build-test-flask-mv2-browserify
541554
- build-test-webpack
555+
- build-test-mv2-webpack
542556
- run-tests
543557
- build-storybook
544558
- 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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

.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

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

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,33 @@ jobs:
7171
exit 1
7272
fi
7373
74+
validate-lavamoat-policy-webpack-mv2:
75+
name: Validate LavaMoat webpack MV2 policy
76+
runs-on: ubuntu-latest
77+
timeout-minutes: 30
78+
steps:
79+
- name: Checkout and setup environment
80+
uses: MetaMask/action-checkout-and-setup@v1
81+
with:
82+
is-high-risk-environment: false
83+
skip-allow-scripts: true
84+
use-yarn-hydrate: true
85+
86+
- name: Validate LavaMoat webpack MV2 policy
87+
run: yarn webpack --env production --no-cache --generatePolicy -v 2
88+
env:
89+
INFURA_PROD_PROJECT_ID: 00000000000
90+
SEGMENT_PROD_WRITE_KEY: 00000000000
91+
GOOGLE_PROD_CLIENT_ID: 00000000000
92+
APPLE_PROD_CLIENT_ID: 00000000000
93+
94+
- name: Check working tree
95+
run: |
96+
if ! git diff --exit-code; then
97+
echo "::error::Working tree dirty."
98+
exit 1
99+
fi
100+
74101
validate-lavamoat-policy-webpack:
75102
name: Validate LavaMoat webpack policy
76103
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)