Skip to content

Commit 304559e

Browse files
temp+ci: update github-tools for new auto-changelog (#36351)
## **Description** Updates `github-tools` to after MetaMask/github-tools#133 so we get @metamask/auto-changelog v5.1.0 ## **Changelog** CHANGELOG entry: null <!--## **Related issues** ## **Manual testing steps** ## **Screenshots/Recordings** ## **Pre-merge author checklist** ## **Pre-merge reviewer checklist**-->
1 parent 1583570 commit 304559e

File tree

945 files changed

+36421
-55507
lines changed

Some content is hidden

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

945 files changed

+36421
-55507
lines changed

.depcheckrc.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ ignores:
9696
- '@metamask/bitcoin-wallet-snap'
9797
- '@metamask/solana-wallet-snap'
9898
- '@metamask/institutional-wallet-snap'
99-
- '@metamask/gator-permissions-snap'
100-
- '@metamask/permissions-kernel-snap'
10199

102100
# files depcheck should not parse
103101
ignorePatterns:

.github/CODEOWNERS

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,19 @@ tailwind.config.js @MetaMask/design-system-engineers
6565
**/pages/notification*/** @MetaMask/notifications
6666
**/utils/notification.util.ts @MetaMask/notifications
6767

68+
# Identity team is responsible for authentication and backup and sync inside the Extension.
69+
# Slack handle: @identity_team | Slack channel: #metamask-identity
70+
**/identity/** @MetaMask/identity
71+
6872
# Accounts team is responsible for code related with snap management accounts
6973
# Slack handle: @accounts-team-devs | Slack channel: #metamask-accounts-team
7074

7175
app/scripts/lib/snap-keyring @MetaMask/accounts-engineers
7276

73-
# Multichain Accounts, Authentication, Backup and sync
74-
# Those features are owned by the multichain account tiger team
77+
# Multichain Accounts
78+
# This feature is owned by the multichain account tiger team
7579
# Slack handle: @multichain-accounts-devs | Slack channel: #metamask-bip44-team
7680
**/multichain-accounts/** @MetaMask/accounts-engineers
77-
**/identity/** @MetaMask/accounts-engineers
7881

7982
# Swaps-Bridge team to own code for the swaps folder
8083
ui/pages/swaps @MetaMask/swaps-engineers
@@ -96,21 +99,20 @@ app/scripts/constants/snaps.ts @MetaMask/core-platform
9699
# Co-owned by Confirmations and Snaps
97100
ui/components/app/metamask-template-renderer @MetaMask/confirmations @MetaMask/core-platform
98101

99-
# Core Extension UX
100-
ui/components/app/whats-new-popup @MetaMask/core-extension-ux
101-
ui/css @MetaMask/core-extension-ux
102-
ui/pages/home @MetaMask/core-extension-ux
103-
ui/pages/core @MetaMask/core-extension-ux
104-
ui/components/multichain/ @MetaMask/core-extension-ux
105-
106-
# Co-owned by accounts and core-extension-ux
107-
ui/components/multichain/multi-srp/ @MetaMask/accounts-engineers @MetaMask/core-extension-ux
108-
ui/components/multichain/account-picker/ @MetaMask/accounts-engineers @MetaMask/core-extension-ux
109-
ui/components/multichain/account-details/ @MetaMask/accounts-engineers @MetaMask/core-extension-ux
110-
ui/components/multichain/account-overview/ @MetaMask/accounts-engineers @MetaMask/core-extension-ux
111-
ui/components/multichain/account-list-item/ @MetaMask/accounts-engineers @MetaMask/core-extension-ux
112-
ui/components/multichain/account-list-menu/ @MetaMask/accounts-engineers @MetaMask/core-extension-ux
113-
ui/components/multichain/account-list-item-menu/ @MetaMask/accounts-engineers @MetaMask/core-extension-ux
102+
# Wallet UX
103+
ui/components/app/whats-new-popup @MetaMask/wallet-ux
104+
ui/css @MetaMask/wallet-ux
105+
ui/pages/home @MetaMask/wallet-ux
106+
ui/components/multichain/ @MetaMask/wallet-ux
107+
108+
# Co-owned by accounts and wallet-ux
109+
ui/components/multichain/multi-srp/ @MetaMask/accounts-engineers @MetaMask/wallet-ux
110+
ui/components/multichain/account-picker/ @MetaMask/accounts-engineers @MetaMask/wallet-ux
111+
ui/components/multichain/account-details/ @MetaMask/accounts-engineers @MetaMask/wallet-ux
112+
ui/components/multichain/account-overview/ @MetaMask/accounts-engineers @MetaMask/wallet-ux
113+
ui/components/multichain/account-list-item/ @MetaMask/accounts-engineers @MetaMask/wallet-ux
114+
ui/components/multichain/account-list-menu/ @MetaMask/accounts-engineers @MetaMask/wallet-ux
115+
ui/components/multichain/account-list-item-menu/ @MetaMask/accounts-engineers @MetaMask/wallet-ux
114116

115117
# Web3Auth / Onboarding
116118
ui/pages/onboarding-flow @MetaMask/web3auth

.github/guidelines/LABELING_GUIDELINES.md

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,38 @@
22

33
To maintain a consistent and efficient development workflow, we have set specific label guidelines for all pull requests (PRs). Please ensure you adhere to the following instructions:
44

5-
## Mandatory team label (automated)
5+
### Mandatory team labels:
66

77
- **Internal Developers**: Every PR raised by an internal developer must include a label prefixed with `team-` (e.g., `team-extension-ux`, `team-extension-platform`, etc.). This indicates the respective internal team responsible for the PR.
88

99
- **External Contributors**: PRs submitted by contributors who are not part of the organization will be automatically labeled with `external-contributor`.
1010

11-
## Mandatory checklog entry or label (manual addition)
11+
It's essential to ensure that PRs have the appropriate labels before they are considered for merging.
1212

13-
The releases changelog generation is based on PR's changelog entries.
14-
The check can be bypassed when necessary, either by setting the changelog entry to "null" or by adding following label:
13+
### Mandatory release version labels:
1514

16-
- **no-changelog**: PR's changes do not need to be included in the changelog.
17-
18-
## Optional labels (manual addition)
19-
20-
Any label can be manually added on demand depending on the PR's content. For instance, the label **QA passed** will indicate that a thorough manual testing has been performed and the PR is ready to be merged. In addition, following labels have some specific use cases.
15+
- **release-x.y.z**: This label is automatically added to a PR and its linked issues upon the PR's merge. The `x.y.z` in the label represents the version in which the changes from the PR will be included. This label is auto-generated by a [GitHub action](../workflows/add-release-label.yml), which determines the version by incrementing the minor version number from the most recent release. Manual intervention is only required in specific cases. For instance, if a merged PR is cherry-picked into a release branch, typically done to address Release Candidate (RC) bugs, the label would need to be manually updated to reflect the correct version.
16+
- **regression-prod-x.y.z**: This label is automatically added to a bug report issue at the time of its creation. The `x.y.z` in the label represents the version in which the bug first appeared. This label is auto-generated by a [GitHub action](../workflows/check-template-and-add-labels.yml), which determines the `x.y.z` value based on the version information provided in the bug report issue form. Manual intervention is only necessary under certain circumstances. For example, if a user submits a bug report and specifies the version they are currently using, but the bug was actually introduced in a prior version, the label would need to be manually updated to accurately reflect the version where the bug originated.
17+
- **regression-RC-x.y.z**: This label is manually added to a bug report issue by release engineers when a bug is found during release regerssion testing phase. The `x.y.z` in the label represents the release candidate (RC) version in which the bug's been discovered.
2118

22-
### Bypass Quality Gates
19+
### Optional labels:
2320

24-
Using any of these labels should be exceptional in case of CI friction and urgencies. Please use them reasonably and verify new changes and regressions manually.
21+
- **regression-main**: This label can manually be added to a bug report issue at the time of its creation if the bug is present on the development branch, i.e., `main`, but is not yet released in production.
22+
- **feature-branch-bug**: This label can manually be added to a bug report issue at the time of its creation if the bug is present on a feature branch, i.e., before merging to `main`.
23+
- **needs-qa**: If the PR includes a new features, complex testing steps, or large refactors, this label must be added to indicated PR requires a full manual QA prior being merged and added to a release.
2524

26-
- **skip-e2e-quality-gate**: This label will disable the default test retries for E2E test files modified in the PR. Useful when making large refactors or when changes don't pose flakiness risk.
25+
### Labels prohibited when PR needs to be merged:
2726

28-
### Block merge if any is present
27+
Any PR that includes one of the following labels can not be merged:
2928

3029
- **needs-qa**: The PR requires a full manual QA prior to being merged and added to a release.
30+
- **QA'd but questions**: The PR has been checked by QA, but there are pending questions or clarifications needed on minor issues that were found.
31+
- **issues-found**: The PR has been checked by QA or other reviewers, and appeared to include issues that need to be addressed.
3132
- **need-ux-ds-review**: The PR requires a review from the User Experience or Design System teams.
3233
- **blocked**: There are unresolved dependencies or other issues blocking the progress of this PR.
3334
- **stale**: The PR has not had recent activity in the last 90 days. It will be closed in 7 days.
3435
- **DO-NOT-MERGE**: The PR should not be merged under any circumstances.
3536

36-
## Release version label (automated)
37-
38-
- **release-x.y.z**: This label is automatically added to a PR and its linked issues upon the PR's merge. The `x.y.z` in the label represents the version in which the changes from the PR will be included. This label is auto-generated by a [GitHub action](../workflows/add-release-label.yml), which determines the version by incrementing the minor version number from the most recent release. Manual intervention is only required in specific cases. For instance, if a merged PR is cherry-picked into a release branch, typically done to address Release Candidate (RC) bugs, the label would need to be manually updated to reflect the correct version.
39-
4037
To maintain code quality and project integrity, it's crucial to respect these label guidelines. Please ensure you review and update labels appropriately throughout the PR lifecycle.
4138

4239
Thank you for your cooperation!

.github/scripts/check-pr-has-required-labels.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ async function main(): Promise<void> {
4242

4343
const preventMergeLabels = [
4444
'needs-qa',
45+
"QA'd but questions",
46+
'issues-found',
4547
'need-ux-ds-review',
4648
'blocked',
4749
'stale',

.github/scripts/split-tests-by-timings.ts

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
// Quality Gate Retries
1111
const RETRIES_FOR_NEW_OR_CHANGED_TESTS = 4;
1212

13-
function readTestResults(TEST_RESULTS_PATH: string): TestRun {
13+
function readTestResults(TEST_RESULTS_PATH: string): TestRun | undefined {
1414
const testSuiteName =
1515
process.env.TEST_SUITE_NAME || 'test-e2e-chrome-browserify';
1616

@@ -19,12 +19,9 @@ function readTestResults(TEST_RESULTS_PATH: string): TestRun {
1919
readFileSync(TEST_RESULTS_PATH, 'utf8'),
2020
);
2121

22-
const testRun: TestRun = testRuns.find(
22+
const testRun: TestRun | undefined = testRuns.find(
2323
(run) => run.name === testSuiteName,
24-
) || { // If the TestRun is not found, return a dummy object to do the naïve split
25-
name: testSuiteName,
26-
testFiles: [],
27-
};
24+
);
2825

2926
return testRun;
3027
} catch (error) {
@@ -85,22 +82,31 @@ export function splitTestsByTimings(
8582
TEST_RESULTS_FILE = `test/test-results/test-runs-${process.env.SELENIUM_BROWSER}.json`,
8683
} = process.env;
8784

88-
const testRunLastTime = readTestResults(TEST_RESULTS_FILE);
89-
let testRunNew: TestRun = { name: testRunLastTime.name, testFiles: [] };
85+
try {
86+
const testRunLastTime = readTestResults(TEST_RESULTS_FILE);
9087

91-
testList.forEach((path) => {
92-
const testFileLastTime = testRunLastTime.testFiles.find(
93-
(file) => file.path === path,
94-
);
88+
if (testRunLastTime) {
89+
let testRunNew: TestRun = { name: testRunLastTime.name, testFiles: [] };
9590

96-
if (testFileLastTime) {
97-
testRunNew.testFiles.push(testFileLastTime);
98-
} else {
99-
testRunNew.testFiles.push(getNewBlankTestFile(path));
91+
testList.forEach((path) => {
92+
const testFileLastTime = testRunLastTime.testFiles.find(
93+
(file) => file.path === path,
94+
);
95+
96+
if (testFileLastTime) {
97+
testRunNew.testFiles.push(testFileLastTime);
98+
} else {
99+
testRunNew.testFiles.push(getNewBlankTestFile(path));
100+
}
101+
});
102+
103+
return splitTests(testRunNew, changedOrNewTests, totalChunks);
100104
}
101-
});
105+
} catch (error) {
106+
console.trace(error);
107+
}
102108

103-
return splitTests(testRunNew, changedOrNewTests, totalChunks);
109+
return [];
104110
}
105111

106112
/**

.github/workflows/release-pr-approval.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- release/*
88

99
jobs:
10-
check:
10+
release-pr-approval:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Require Release Team approval

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ test-results/
7171
!.yarn/versions
7272
development/generate-attributions/.yarn/*
7373

74-
# This entry would keep track of the yarn binaries tarball generated by corepack
75-
!.yarn/yarn-corepack.tgz
76-
7774
# MetaMask
7875
.metamask/*
7976

.storybook/locales.js

Lines changed: 2 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import * as mr from '../app/_locales/mr/messages.json';
3434
import * as ms from '../app/_locales/ms/messages.json';
3535
import * as nl from '../app/_locales/nl/messages.json';
3636
import * as no from '../app/_locales/no/messages.json';
37+
import * as ph from '../app/_locales/ph/messages.json';
3738
import * as pl from '../app/_locales/pl/messages.json';
3839
import * as pt from '../app/_locales/pt/messages.json';
3940
import * as pt_BR from '../app/_locales/pt_BR/messages.json';
@@ -48,68 +49,10 @@ import * as sw from '../app/_locales/sw/messages.json';
4849
import * as ta from '../app/_locales/ta/messages.json';
4950
import * as te from '../app/_locales/te/messages.json';
5051
import * as th from '../app/_locales/th/messages.json';
51-
import * as tl from '../app/_locales/tl/messages.json';
5252
import * as tr from '../app/_locales/tr/messages.json';
5353
import * as uk from '../app/_locales/uk/messages.json';
5454
import * as vi from '../app/_locales/vi/messages.json';
5555
import * as zh_CN from '../app/_locales/zh_CN/messages.json';
5656
import * as zh_TW from '../app/_locales/zh_TW/messages.json';
5757

58-
export {
59-
am,
60-
ar,
61-
bg,
62-
bn,
63-
ca,
64-
cs,
65-
da,
66-
de,
67-
el,
68-
en,
69-
es,
70-
es_419,
71-
et,
72-
fa,
73-
fi,
74-
fil,
75-
fr,
76-
gu,
77-
he,
78-
hi,
79-
hn,
80-
hr,
81-
ht,
82-
hu,
83-
id,
84-
it,
85-
ja,
86-
kn,
87-
ko,
88-
lt,
89-
lv,
90-
ml,
91-
mr,
92-
ms,
93-
nl,
94-
no,
95-
pl,
96-
pt,
97-
pt_BR,
98-
pt_PT,
99-
ro,
100-
ru,
101-
sk,
102-
sl,
103-
sr,
104-
sv,
105-
sw,
106-
ta,
107-
te,
108-
th,
109-
tl,
110-
tr,
111-
uk,
112-
vi,
113-
zh_CN,
114-
zh_TW,
115-
};
58+
export { am, ar, bg, bn, ca, cs, da, de, el, en, es, es_419, et, fa, fi, fil, fr, gu, he, hi, hn, hr, ht, hu, id, it, ja, kn, ko, lt, lv, ml, mr, ms, nl, no, ph, pl, pt, pt_BR, pt_PT, ro, ru, sk, sl, sr, sv, sw, ta, te, th, tr, uk, vi, zh_CN, zh_TW };

.vscode/package.json-schema.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,6 @@
2525
"postinstall": {
2626
"type": "string",
2727
"description": "Runs automatically after running `yarn` (`yarn install`) in order to prime the webpack dev build."
28-
},
29-
"yarn-binary:download": {
30-
"type": "string",
31-
"description": "Downloads and packages the yarn version specified in package.json packageManager field into .yarn/yarn-corepack.tgz for offline use."
32-
},
33-
"yarn-binary:hydrate": {
34-
"type": "string",
35-
"description": "Activates the yarn version from the committed .yarn/yarn-corepack.tgz tarball using corepack hydrate."
3628
}
3729
}
3830
},

.yarn/patches/@metamask-assets-controllers-npm-76.0.0-95e99a2835.patch renamed to .yarn/patches/@metamask-assets-controllers-npm-74.3.2-900afb3754.patch

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/dist/assetsUtil.cjs b/dist/assetsUtil.cjs
2-
index b3db76c39d78362273ff081d8c8efe30040ffc28..cab60d3a8541ad0459112638f027c7e303b68b1e 100644
2+
index 2c759f2ecc76b0a6f467166a2e4d077dc951445e..a29468add0e2c43015be096f3aba3271879d735d 100644
33
--- a/dist/assetsUtil.cjs
44
+++ b/dist/assetsUtil.cjs
55
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
@@ -10,16 +10,12 @@ index b3db76c39d78362273ff081d8c8efe30040ffc28..cab60d3a8541ad0459112638f027c7e3
1010
exports.accountAddressToCaipReference = exports.getKeyByValue = exports.fetchTokenContractExchangeRates = exports.reduceInBatchesSerially = exports.divideIntoBatches = exports.ethersBigNumberToBN = exports.addUrlProtocolPrefix = exports.getFormattedIpfsUrl = exports.getIpfsCIDv1AndPath = exports.removeIpfsProtocolPrefix = exports.isTokenListSupportedForNetwork = exports.isTokenDetectionSupportedForNetwork = exports.SupportedStakedBalanceNetworks = exports.SupportedTokenDetectionNetworks = exports.formatIconUrlWithProxy = exports.formatAggregatorNames = exports.hasNewCollectionFields = exports.compareNftMetadata = exports.TOKEN_PRICES_BATCH_SIZE = void 0;
1111
const controller_utils_1 = require("@metamask/controller-utils");
1212
const utils_1 = require("@metamask/utils");
13-
@@ -240,7 +241,12 @@ async function getIpfsCIDv1AndPath(ipfsUrl) {
13+
@@ -237,7 +238,8 @@ async function getIpfsCIDv1AndPath(ipfsUrl) {
1414
const index = url.indexOf('/');
1515
const cid = index !== -1 ? url.substring(0, index) : url;
1616
const path = index !== -1 ? url.substring(index) : undefined;
1717
- const { CID } = await import("multiformats");
18-
+ // Dynamic import is used here in `core` for CJS compatbility, because 'multiformats' is ESM-
19-
+ // only. However, dynamic import is not supported by LavaMoat.
20-
+ // See here for details: https://github.com/MetaMask/metamask-extension/pull/27629#discussion_r1791797810
21-
+ // TODO: Attempt deleting this patch after migrating to Webpack, which may support dynamic
22-
+ // import with LavaMoat.
18+
+ // Use CJS require to allow Jest to parse without ESM transform
2319
+ const { CID } = _interopRequireWildcard(require("multiformats"));
2420
// We want to ensure that the CID is v1 (https://docs.ipfs.io/concepts/content-addressing/#identifier-formats)
2521
// because most cid v0s appear to be incompatible with IPFS subdomains

0 commit comments

Comments
 (0)