Skip to content

Commit 63a50cc

Browse files
authored
Merge pull request #26973 from MetaMask/Version-v12.3.0
Version v12.3.0
2 parents d6b95fc + 318aaad commit 63a50cc

File tree

1,058 files changed

+52744
-21596
lines changed

Some content is hidden

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

1,058 files changed

+52744
-21596
lines changed

.circleci/config.yml

Lines changed: 102 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ aliases:
9595
9696
workflows:
9797
test_and_release:
98+
when:
99+
not:
100+
matches:
101+
pattern: /^l10n_crowdin_action$/
102+
value: << pipeline.git.branch >>
98103
jobs:
99104
- create_release_pull_request:
100105
<<: *rc_branch_only
@@ -154,6 +159,9 @@ workflows:
154159
- prep-build-test-mv2:
155160
requires:
156161
- prep-deps
162+
- prep-build-test-webpack:
163+
requires:
164+
- prep-deps
157165
- prep-build-test-flask:
158166
requires:
159167
- prep-deps
@@ -184,6 +192,10 @@ workflows:
184192
- test-lint-changelog:
185193
requires:
186194
- prep-deps
195+
- test-e2e-chrome-webpack:
196+
requires:
197+
- prep-build-test-webpack
198+
- get-changed-files-with-git-diff
187199
- test-e2e-chrome:
188200
requires:
189201
- prep-build-test
@@ -230,9 +242,6 @@ workflows:
230242
- /^Version-v(\d+)[.](\d+)[.](\d+)/
231243
requires:
232244
- prep-build
233-
- test-unit-global:
234-
requires:
235-
- prep-deps
236245
- test-storybook:
237246
requires:
238247
- prep-deps
@@ -273,7 +282,6 @@ workflows:
273282
- test-lint-shellcheck
274283
- test-lint-lockfile
275284
- test-lint-changelog
276-
- test-unit-global
277285
- validate-source-maps
278286
- validate-source-maps-beta
279287
- validate-source-maps-flask
@@ -288,6 +296,7 @@ workflows:
288296
- test-e2e-chrome-mmi
289297
- test-e2e-chrome-rpc-mmi
290298
- test-e2e-chrome-vault-decryption
299+
- test-e2e-chrome-webpack
291300
- test-storybook
292301
- benchmark:
293302
requires:
@@ -338,9 +347,30 @@ workflows:
338347
requires:
339348
- prep-build-ts-migration-dashboard
340349

350+
locales_only:
351+
when:
352+
matches:
353+
pattern: /^l10n_crowdin_action$/
354+
value: << pipeline.git.branch >>
355+
jobs:
356+
- prep-deps
357+
- get-changed-files-with-git-diff:
358+
requires:
359+
- prep-deps
360+
- validate-locales-only:
361+
requires:
362+
- get-changed-files-with-git-diff
363+
- test-lint:
364+
requires:
365+
- prep-deps
366+
- all-tests-pass:
367+
requires:
368+
- test-lint
369+
- validate-locales-only
370+
341371
jobs:
342372
trigger-beta-build:
343-
executor: node-browsers-medium-plus
373+
executor: node-browsers-small
344374
steps:
345375
- run: *shallow-git-clone
346376
- run: sudo corepack enable
@@ -355,8 +385,7 @@ jobs:
355385
steps:
356386
- run:
357387
name: Build beta prod
358-
command: |
359-
.circleci/scripts/trigger-beta-build.sh
388+
command: .circleci/scripts/trigger-beta-build.sh
360389
- run:
361390
name: Move beta build to 'dist-beta' to avoid conflict with production build
362391
command: mv ./dist ./dist-beta
@@ -429,8 +458,7 @@ jobs:
429458
- run: sudo corepack enable
430459
- run:
431460
name: Save Yarn version
432-
command: |
433-
yarn --version > /tmp/YARN_VERSION
461+
command: yarn --version > /tmp/YARN_VERSION
434462
- restore_cache:
435463
keys:
436464
# First try to get the specific cache for the checksum of the yarn.lock file.
@@ -476,6 +504,15 @@ jobs:
476504
paths:
477505
- changed-files
478506

507+
validate-locales-only:
508+
executor: node-browsers-small
509+
steps:
510+
- run: *shallow-git-clone
511+
- run: sudo corepack enable
512+
- attach_workspace:
513+
at: .
514+
- run: yarn tsx .circleci/scripts/validate-locales-only.ts
515+
479516
validate-lavamoat-allow-scripts:
480517
executor: node-browsers-small
481518
steps:
@@ -870,6 +907,26 @@ jobs:
870907
- dist-test-mv2
871908
- builds-test-mv2
872909

910+
prep-build-test-webpack:
911+
executor: node-linux-medium
912+
steps:
913+
- run: *shallow-git-clone
914+
- attach_workspace:
915+
at: .
916+
- run:
917+
name: Activate yarn
918+
command: corepack enable
919+
- run:
920+
name: Build extension for testing
921+
command: yarn build:test:webpack
922+
- run:
923+
name: Move test build to 'dist-test-webpack' to avoid conflict with production build
924+
command: mv ./dist ./dist-test-webpack
925+
- persist_to_workspace:
926+
root: .
927+
paths:
928+
- dist-test-webpack
929+
873930
prep-build-storybook:
874931
executor: node-linux-medium
875932
steps:
@@ -1011,6 +1068,27 @@ jobs:
10111068
name: depcheck
10121069
command: yarn depcheck
10131070

1071+
test-e2e-chrome-webpack:
1072+
executor: node-browsers-medium-plus
1073+
parallelism: 20
1074+
steps:
1075+
- run: *shallow-git-clone
1076+
- run: sudo corepack enable
1077+
- attach_workspace:
1078+
at: .
1079+
- run:
1080+
name: Move test build to dist
1081+
command: mv ./dist-test-webpack ./dist
1082+
- run:
1083+
name: test:e2e:chrome:webpack
1084+
command: .circleci/scripts/test-run-e2e.sh yarn test:e2e:chrome:webpack
1085+
no_output_timeout: 5m
1086+
- store_artifacts:
1087+
path: test-artifacts
1088+
destination: test-artifacts
1089+
- store_test_results:
1090+
path: test/test-results/e2e
1091+
10141092
test-api-specs:
10151093
executor: node-browsers-medium-plus
10161094
steps:
@@ -1027,8 +1105,7 @@ jobs:
10271105
- gh/install
10281106
- run:
10291107
name: test:api-specs
1030-
command: |
1031-
timeout 20m yarn test:api-specs --retries 2
1108+
command: .circleci/scripts/test-run-e2e.sh yarn test:api-specs
10321109
no_output_timeout: 5m
10331110
- run:
10341111
name: Comment on PR
@@ -1059,11 +1136,7 @@ jobs:
10591136
command: mv ./builds-test ./builds
10601137
- run:
10611138
name: test:e2e:chrome
1062-
command: |
1063-
if .circleci/scripts/test-run-e2e.sh
1064-
then
1065-
timeout 20m yarn test:e2e:chrome --retries 1
1066-
fi
1139+
command: .circleci/scripts/test-run-e2e.sh yarn test:e2e:chrome
10671140
no_output_timeout: 5m
10681141
- store_artifacts:
10691142
path: test-artifacts
@@ -1087,11 +1160,7 @@ jobs:
10871160
command: mv ./builds-test ./builds
10881161
- run:
10891162
name: test:e2e:chrome:rpc
1090-
command: |
1091-
if .circleci/scripts/test-run-e2e.sh
1092-
then
1093-
timeout 20m yarn test:e2e:chrome:rpc --retries 1
1094-
fi
1163+
command: .circleci/scripts/test-run-e2e.sh yarn test:e2e:chrome:rpc
10951164
no_output_timeout: 5m
10961165
- store_artifacts:
10971166
path: test-artifacts
@@ -1115,11 +1184,7 @@ jobs:
11151184
command: mv ./builds-test ./builds
11161185
- run:
11171186
name: test:e2e:chrome:multi-provider
1118-
command: |
1119-
if .circleci/scripts/test-run-e2e.sh
1120-
then
1121-
yarn test:e2e:chrome:multi-provider --retries 1
1122-
fi
1187+
command: .circleci/scripts/test-run-e2e.sh yarn test:e2e:chrome:multi-provider
11231188
no_output_timeout: 5m
11241189
- store_artifacts:
11251190
path: test-artifacts
@@ -1142,11 +1207,7 @@ jobs:
11421207
command: mv ./builds-test-mmi ./builds
11431208
- run:
11441209
name: test:e2e:chrome:rpc
1145-
command: |
1146-
if .circleci/scripts/test-run-e2e.sh
1147-
then
1148-
timeout 20m yarn test:e2e:chrome:rpc --retries 1 --build-type=mmi
1149-
fi
1210+
command: .circleci/scripts/test-run-e2e.sh yarn test:e2e:chrome:rpc --build-type=mmi
11501211
no_output_timeout: 5m
11511212
- store_artifacts:
11521213
path: test-artifacts
@@ -1162,12 +1223,8 @@ jobs:
11621223
- attach_workspace:
11631224
at: .
11641225
- run:
1165-
name: test:e2e:chrome:vault
1166-
command: |
1167-
if .circleci/scripts/test-run-e2e.sh
1168-
then
1169-
yarn test:e2e:single test/e2e/vault-decryption-chrome.spec.js --browser chrome --retries 1
1170-
fi
1226+
name: test:e2e:single
1227+
command: .circleci/scripts/test-run-e2e.sh yarn test:e2e:single test/e2e/vault-decryption-chrome.spec.js --browser chrome
11711228
no_output_timeout: 5m
11721229
- store_artifacts:
11731230
path: test-artifacts
@@ -1191,12 +1248,7 @@ jobs:
11911248
command: mv ./builds-test-flask-mv2 ./builds
11921249
- run:
11931250
name: test:e2e:firefox:flask
1194-
command: |
1195-
export ENABLE_MV3=false
1196-
if .circleci/scripts/test-run-e2e.sh
1197-
then
1198-
timeout 20m yarn test:e2e:firefox:flask --retries 1
1199-
fi
1251+
command: ENABLE_MV3=false .circleci/scripts/test-run-e2e.sh yarn test:e2e:firefox:flask
12001252
no_output_timeout: 5m
12011253
- store_artifacts:
12021254
path: test-artifacts
@@ -1220,11 +1272,7 @@ jobs:
12201272
command: mv ./builds-test-flask ./builds
12211273
- run:
12221274
name: test:e2e:chrome:flask
1223-
command: |
1224-
if .circleci/scripts/test-run-e2e.sh
1225-
then
1226-
timeout 20m yarn test:e2e:chrome:flask --retries 1
1227-
fi
1275+
command: .circleci/scripts/test-run-e2e.sh yarn test:e2e:chrome:flask
12281276
no_output_timeout: 5m
12291277
- store_artifacts:
12301278
path: test-artifacts
@@ -1248,11 +1296,7 @@ jobs:
12481296
command: mv ./builds-test-mmi ./builds
12491297
- run:
12501298
name: test:e2e:chrome:mmi
1251-
command: |
1252-
if .circleci/scripts/test-run-e2e.sh
1253-
then
1254-
timeout 20m yarn test:e2e:chrome:mmi --retries 1 --build-type=mmi
1255-
fi
1299+
command: .circleci/scripts/test-run-e2e.sh yarn test:e2e:chrome:mmi --build-type=mmi
12561300
no_output_timeout: 5m
12571301
- store_artifacts:
12581302
path: test-artifacts
@@ -1274,8 +1318,7 @@ jobs:
12741318
command: mv ./dist-test-mmi-playwright ./dist
12751319
- run:
12761320
name: Install chromium
1277-
command: |
1278-
yarn playwright install chromium
1321+
command: yarn playwright install chromium
12791322
- run:
12801323
name: test:e2e:chrome:mmi
12811324
command: |
@@ -1312,8 +1355,7 @@ jobs:
13121355
at: .
13131356
- run:
13141357
name: Install chromium
1315-
command: |
1316-
yarn playwright install chromium
1358+
command: yarn playwright install chromium
13171359
- run:
13181360
name: test:e2e:chrome:swap
13191361
command: |
@@ -1349,12 +1391,7 @@ jobs:
13491391
command: mv ./builds-test-mv2 ./builds
13501392
- run:
13511393
name: test:e2e:firefox
1352-
command: |
1353-
export ENABLE_MV3=false
1354-
if .circleci/scripts/test-run-e2e.sh
1355-
then
1356-
timeout 20m yarn test:e2e:firefox --retries 1
1357-
fi
1394+
command: ENABLE_MV3=false .circleci/scripts/test-run-e2e.sh yarn test:e2e:firefox
13581395
no_output_timeout: 5m
13591396
- store_artifacts:
13601397
path: test-artifacts
@@ -1510,12 +1547,6 @@ jobs:
15101547
command: |
15111548
echo "export PARENT_COMMIT=$(git merge-base origin/HEAD HEAD)" >> $BASH_ENV
15121549
source $BASH_ENV
1513-
- run:
1514-
name: Set commit message env var
1515-
command: |
1516-
commit_title=$(git show -s --format='%s' HEAD)
1517-
echo "export SHA1_COMMIT_TITLE=\"$commit_title\"" >> $BASH_ENV
1518-
source $BASH_ENV
15191550
- run:
15201551
name: build:announce
15211552
command: ./development/metamaskbot-build-announce.js
@@ -1544,8 +1575,7 @@ jobs:
15441575
command: yarn sentry:publish --build-type mmi
15451576
- run:
15461577
name: Create GitHub release
1547-
command: |
1548-
.circleci/scripts/release-create-gh-release.sh
1578+
command: .circleci/scripts/release-create-gh-release.sh
15491579

15501580
job-publish-storybook:
15511581
executor: node-browsers-small
@@ -1581,17 +1611,6 @@ jobs:
15811611
git config user.email [email protected]
15821612
yarn ts-migration:dashboard:deploy
15831613
1584-
test-unit-global:
1585-
executor: node-browsers-small
1586-
steps:
1587-
- run: *shallow-git-clone
1588-
- run: sudo corepack enable
1589-
- attach_workspace:
1590-
at: .
1591-
- run:
1592-
name: test:unit:global
1593-
command: yarn test:unit:global
1594-
15951614
validate-source-maps:
15961615
executor: node-browsers-small
15971616
steps:
@@ -1612,8 +1631,7 @@ jobs:
16121631
at: .
16131632
- run:
16141633
name: Validate source maps
1615-
command: |
1616-
.circleci/scripts/validate-source-maps-beta.sh
1634+
command: .circleci/scripts/validate-source-maps-beta.sh
16171635

16181636
validate-source-maps-mmi:
16191637
executor: node-browsers-small

.circleci/scripts/git-diff-develop.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ async function storeGitDiffOutput() {
123123

124124
// Store the output of git diff
125125
const outputPath = path.resolve(outputDir, 'changed-files.txt');
126-
fs.writeFileSync(outputPath, diffOutput);
126+
fs.writeFileSync(outputPath, diffOutput.trim());
127127

128128
console.log(`Git diff results saved to ${outputPath}`);
129129
process.exit(0);

0 commit comments

Comments
 (0)