Skip to content

Commit 22bf4ad

Browse files
authored
Merge pull request #27411 from MetaMask/Version-v12.5.0
Version v12.5.0
2 parents 626289d + ab0250e commit 22bf4ad

File tree

1,097 files changed

+45154
-27459
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,097 files changed

+45154
-27459
lines changed

.circleci/config.yml

Lines changed: 66 additions & 60 deletions
Large diffs are not rendered by default.

.circleci/scripts/enable-vnc.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
3+
# This script is based on the documentation from CircleCI, which does not work as written
4+
# https://circleci.com/docs/browser-testing/#interacting-with-the-browser-over-vnc
5+
6+
set -e
7+
set -u
8+
set -o pipefail
9+
set -x
10+
11+
cd "${HOME}/project"
12+
13+
# Install a VNC server
14+
readonly LOCK_FILE="installed.lock"
15+
if [ ! -f "${LOCK_FILE}" ]; then
16+
sudo apt update
17+
sudo apt install -y x11vnc
18+
19+
touch "${LOCK_FILE}"
20+
fi
21+
22+
# Start VNC server
23+
if ! pgrep x11vnc > /dev/null; then
24+
x11vnc -display "$DISPLAY" -bg -forever -nopw -quiet -listen localhost -xkb -rfbport 5901 -passwd password
25+
fi
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { filterE2eChangedFiles } from '../../test/e2e/changedFilesUtil';
2+
3+
const changedOrNewTests = filterE2eChangedFiles();
4+
5+
//15 minutes, plus 3 minutes for every changed file, up to a maximum of 30 minutes
6+
const extraTime = Math.min(15 + changedOrNewTests.length * 3, 30);
7+
8+
console.log(extraTime);

.circleci/scripts/test-run-e2e.sh

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,23 @@ then
1111
exit 1
1212
fi
1313

14+
# Skip running e2e tests if we're doing "Rerun job with SSH" and we're not on the first node
15+
if netstat -tnlp | grep -q 'circleci-agent' && [ "$CIRCLE_NODE_INDEX" -ne 0 ]
16+
then
17+
printf '"Rerun job with SSH" and not on the first node, shutting down\n'
18+
circleci-agent step halt
19+
exit 1
20+
fi
21+
22+
TIMEOUT_MINUTES=$(yarn tsx .circleci/scripts/test-run-e2e-timeout-minutes.ts)
23+
echo "TIMEOUT_MINUTES: $TIMEOUT_MINUTES"
24+
1425
# Run the actual test command from the parameters
15-
timeout 20m "$@" --retries 1
26+
timeout "${TIMEOUT_MINUTES}"m "$@" --retries 1
1627

1728
# Error code 124 means the command timed out
18-
if [ $? -eq 124 ]; then
29+
if [ $? -eq 124 ]
30+
then
1931
# Once deleted, if someone tries to "Rerun failed tests" the result will be
2032
# "Error: can not rerun failed tests: no failed tests could be found"
2133
echo 'Timeout error, deleting the test results'

.circleci/scripts/validate-locales-only.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ const { readChangedFiles } = require('../../test/e2e/changedFilesUtil.js');
55
* Fails the build if any changed files are outside of the /_locales/ directory.
66
* Fails if no changed files are detected.
77
*/
8-
async function validateLocalesOnlyChangedFiles() {
9-
const changedFiles = await readChangedFiles();
8+
function validateLocalesOnlyChangedFiles() {
9+
const changedFiles = readChangedFiles();
1010
if (!changedFiles || changedFiles.length === 0) {
1111
console.error('Failure: No changed files detected.');
1212
process.exit(1);

.depcheckrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ ignores:
2828
- '@sentry/cli' # invoked as `sentry-cli`
2929
- 'chromedriver'
3030
- 'depcheck' # ooo meta
31+
- 'ethers' # ethers @5.7.0 expected by @account-abstraction/contracts, but conflicts with transitive [email protected]
3132
- 'ganache-cli'
3233
- 'geckodriver'
3334
- 'jest'

.eslintrc.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,36 @@ module.exports = {
2121
plugins: ['@metamask/design-tokens'],
2222
rules: {
2323
'@metamask/design-tokens/color-no-hex': 'warn',
24+
'import/no-restricted-paths': [
25+
'error',
26+
{
27+
basePath: './',
28+
zones: [
29+
{
30+
target: './app',
31+
from: './ui',
32+
message:
33+
'Should not import from UI in background, use shared directory instead',
34+
},
35+
{
36+
target: './ui',
37+
from: './app',
38+
message:
39+
'Should not import from background in UI, use shared directory instead',
40+
},
41+
{
42+
target: './shared',
43+
from: './app',
44+
message: 'Should not import from background in shared',
45+
},
46+
{
47+
target: './shared',
48+
from: './ui',
49+
message: 'Should not import from UI in shared',
50+
},
51+
],
52+
},
53+
],
2454
},
2555
overrides: [
2656
/**

.github/CODEOWNERS

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
* @MetaMask/extension-devs
1111
development/ @MetaMask/extension-devs @kumavis
12-
lavamoat/ @MetaMask/extension-devs @MetaMask/supply-chain @MetaMask/snaps-devs
12+
lavamoat/ @MetaMask/extension-devs @MetaMask/supply-chain
1313

1414
# The offscreen.ts script file that is included in the offscreen document html
1515
# file is responsible, at present, for loading the snaps execution environment
@@ -93,3 +93,24 @@ app/scripts/controllers/swaps @MetaMask/swaps-engineers
9393
shared/constants/permissions.ts @MetaMask/snaps-devs
9494
ui/helpers/utils/permission.js @MetaMask/snaps-devs
9595
ui/hooks/useTransactionInsights.js @MetaMask/snaps-devs
96+
97+
# Wallet UX
98+
ui/components/multichain @MetaMask/wallet-ux
99+
ui/components/app/whats-new-popup @MetaMask/wallet-ux
100+
ui/css @MetaMask/wallet-ux
101+
ui/pages/home @MetaMask/wallet-ux
102+
ui/pages/onboarding-flow @MetaMask/wallet-ux
103+
104+
# Assets
105+
ui/components/app/add-network @MetaMask/metamask-assets
106+
ui/components/app/auto-detect-nft @MetaMask/metamask-assets
107+
ui/components/app/auto-detect-token @MetaMask/metamask-assets
108+
ui/components/app/import-token @MetaMask/metamask-assets
109+
ui/components/app/nft-default-image @MetaMask/metamask-assets
110+
ui/components/app/nft-details @MetaMask/metamask-assets
111+
ui/components/app/nft-options @MetaMask/metamask-assets
112+
ui/components/app/nfts-detection-notice-import-nfts @MetaMask/metamask-assets
113+
ui/components/app/nfts-items @MetaMask/metamask-assets
114+
ui/components/app/nfts-tab @MetaMask/metamask-assets
115+
ui/components/ui/deprecated-networks @MetaMask/metamask-assets
116+
ui/components/ui/nft-collection-image @MetaMask/metamask-assets

.github/scripts/check-template-and-add-labels.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ enum RegressionStage {
2828
Production
2929
}
3030

31-
const knownBots = ["metamaskbot", "dependabot", "github-actions", "sentry-io"];
31+
const knownBots = ["metamaskbot", "dependabot", "github-actions", "sentry-io", "devin-ai-integration"];
3232

3333
main().catch((error: Error): void => {
3434
console.error(error);
@@ -82,7 +82,7 @@ async function main(): Promise<void> {
8282
}
8383

8484
// If author is not part of the MetaMask organisation
85-
if (!(await userBelongsToMetaMaskOrg(octokit, labelable?.author))) {
85+
if (!knownBots.includes(labelable?.author) && !(await userBelongsToMetaMaskOrg(octokit, labelable?.author))) {
8686
// Add external contributor label to the issue
8787
await addLabelToLabelable(octokit, labelable, externalContributorLabel);
8888
}

.github/workflows/create-bug-report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
payload=$(cat <<EOF
2424
{
2525
"title": "v${{ env.version }} Bug Report",
26-
"body": "This bug report was automatically created by a GitHub action upon the creation of release branch \`Version-v${{ env.version }}\` (release cut).\n\n**Expected actions for release engineers:**\n\n1. Convert this issue into a Zenhub epic and link all bugs identified during the release regression testing phase to this epic.\n\n2. After completing the first regression run, move this epic to \"Regression Completed\" on the [Extension Release Regression board](https://app.zenhub.com/workspaces/extension-release-regression-6478c62d937eaa15e95c33c5/board?filterLogic=any&labels=release-${{ env.version }},release-task).\n\nNote that once the release is prepared for store submission, meaning the \`Version-v${{ env.version }}\` branch merges into \`master\`, another GitHub action will automatically close this epic.",
26+
"body": "**What is this bug report issue for?**\n\n1. This issue is used to track release dates on this [Github Project board](https://github.com/orgs/MetaMask/projects/86/views/1), which content then gets pulled into our metrics system.\n\n2. This issue is also used by our Zapier automations, to determine if automated notifications shall be sent on Slack for release \`${{ env.version }}\`. Notifications will only be sent as long as this issue is open.\n\n**Who created and/or closed this issue?**\n\n- This issue was automatically created by a GitHub action upon the creation of the release branch \`Version-v${{ env.version }}\`, indicating the release was cut.\n\n- This issue gets automatically closed by another GitHub action, once the \`Version-v${{ env.version }}\` branch merges into \`master\`, indicating the release is prepared for store submission.",
2727
"labels": ["type-bug", "team-extension-platform", "regression-RC-${{ env.version }}"]
2828
}
2929
EOF

0 commit comments

Comments
 (0)