* Update sentry/cli to 2.19.4
* Ensure sentry files are loaded and referenced with a valid url
* Temp to eliminate errors in sentry (should be split into other PRs)
* bump parse5; port patch
* devDeps: jsdom@11.5.1->16.7.0
- patch-revert https://github.com/jsdom/jsdom/pull/2076
- jsdom's storage-overriding does not play well with test suite usage of
localforage:
$ yarn test:unit:global
✖ ERROR: TypeError: Cannot set property localStorage of #<Window> which has only a getter
at Object.<anonymous> (/app/test/helpers/setup-helper.js:79:32)
at Module._compile (node:internal/modules/cjs/loader:1198:14)
at Module.m._compile (/app/node_modules/ts-node/src/index.ts:1459:23)
at Module._compile (/app/node_modules/pirates/lib/index.js:136:24)
at Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
at newLoader (/app/node_modules/pirates/lib/index.js:141:7)
at Object.require.extensions.<computed> [as .js] (/app/node_modules/ts-node/src/index.ts:1462:12)
at Module.load (node:internal/modules/cjs/loader:1076:32)
at Function.Module._load (node:internal/modules/cjs/loader:911:12)
at Module.require (node:internal/modules/cjs/loader:1100:19)
at require (node:internal/modules/cjs/helpers:108:18)
at Object.<anonymous> (/app/test/setup.js:4:1)
at Module._compile (node:internal/modules/cjs/loader:1198:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
at Module.load (node:internal/modules/cjs/loader:1076:32)
at Function.Module._load (node:internal/modules/cjs/loader:911:12)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:169:29)
at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
at async Promise.all (index 0)
at ESMLoader.import (node:internal/modules/esm/loader:530:24)
at importModuleDynamicallyWrapper (node:internal/vm/module:438:15)
at formattedImport (/app/node_modules/mocha/lib/nodejs/esm-utils.js:7:14)
at exports.requireOrImport (/app/node_modules/mocha/lib/nodejs/esm-utils.js:48:32)
at exports.handleRequires (/app/node_modules/mocha/lib/cli/run-helpers.js:94:28)
at /app/node_modules/mocha/lib/cli/run.js:353:25
* update lavamoat policies
* update lavamoat build policy
Occasionally our builds have been failing with the error "Unexpected
end of JSON input", with a stack pointing at `lavamoat-core`. The file
in question was reading the policy, reading overrides, merging them,
then writing the policy back to disk.
The intermittent errors can be explained if the policy file was read in
one process while it was being written in another. The extension build
script builds bundles in multiple processes in parallel, so it does
follow that this would happen some of the time. This could result in a
partial policy file being read by the build script, resulting in a JSON
parsing error.
This has been fixed by removing the policy write step using a patch.
We don't need this step. We update the policy using a different
function altogether, and we have a CI job to ensure we never forget to
update it.
* Validate LavaMoat policies on each PR
The LavaMoat policies are now validated on every PR. This makes it
easier to validate policy changes, as they should always correspond
with the changes made in the PR (unlike today, when they could be due
to a change in platform or a previous PR).
Closes#19680
* Update LavaMoat policies
---------
Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
* fix: refactor linea goerli testnet implementation
* fix: rename linea goerli network
* feat: add linea testnet logo
* update linea goerli block explorer url
* update @metamask/eth-json-rpc-infura package to version 8.1.0
* fix: refactor ticker map object in shared/constants/networks.ts files
* Update message manager and signature controller
The packages `@metamask/message-manager` and
`@metamask/signature-controller` have been updated to the latest
versions. These versions were part of part of the [core monorepo v53](MetaMask/core#1385)
release. The remaining packages released as part of v53 will be updated
in later PRs.
These releases included a few breaking changes, but none that affect
the extension. Both packages now expect `getCurrentChainId` to return
`Hex`, but that was already the case here. Additionally the signature
controller now has a peer dependency on the approval controller v3,
which is already present and at the correct version.
Relates to #19271
* Ignore error caused by TS bug
* Update types to omit metadata for encryption requests
* Update lavamoat policy
Currently, all test files are excluded from TypeScript's purview. That
means that if any test file fails to typecheck, we won't know about it.
In fact if we were to remove all test files from the `exclude` list,
then some files would indeed fail to be typechecked.
At the moment all we care about is the unit test file for
NetworkController. Due to how the `include`/`exclude` rules work in
`tsconfig.json`, we can't "un-exclude" that file after it's excluded, so
to fix this, we simply exclude fewer things.
While we're at it, we also:
- Add `esModuleInterop: true` to address warnings we sometimes see
around imports
- Add `noEmit: true` so that we can run `tsc` to test typechecking on
its own without producing any compiled files (so that ESLint doesn't
accidentally pick them up)
- Clean up `tsconfig.json` slightly
The `@metamask/base-controller` has been updated to v3, which is the
version released in the core monorepo v53 release. The other packages
released as part of v53 will be updated in later PRs.
Relates to #19271
* devDeps: pin @babel/core and @babel/runtime in resulotions
Without this: misses patch, lavamoat error
* storybook 6 to 7 migration
* devDeps: add @storybook/addon-mdx-gfm
* fix lint deps
* devDeps: remove unused require-from-string
* devDeps/resolutions: @types/react@^16.9.53
* devDeps: add @storybook/cli
* storybook: new-frameworks migration
* iyarc: remove resolved dependency advisory
* deps: set globalthis@1.0.1 in resolutions
This is required since a file is copied over from a set path in the dist
package subdirectory as of d13aabde23 (#10014).
A future update should either vendor the shim, or update to
compatibility with a maintained upstream version.
* mdx2 migration fixes
* chore: bump ljharb packages
* devDeps: @storybook/*@^7.0.10->^7.0.11
* storybook: update preview.js to use v7 addon api
* ci/test/storybook: echo between storybook build&test
* ci/circleci: resources tweak
* info-tab: handle undefined global.platform
* update lavamoat build policy
* update lavamoat browserify policies
The mobile sync feature has been removed. It has been disabled for
years. When we enable sync again, it will be using a different
implementation. This has already been removed on the mobile side.
* added storybook test runner
* added test runner in ci
* updated test for ci and fixed lint error
* updated lavamoat policy
* updated test command
* updated playwright
* changed command to storybook;ci
* updated command
* updated instance for test-storybook
* updated playwright
* added playwright step
* replaced concurrently with start-server-and-test
* updated the static storybook directory
* replaced first with last
* updated lock file
* replaced first with last
* updated test-storybook with maxworkers
* updated .depchechrc
* updated yml
* removed id from banner base
* replaced broken stories with .stories-to-do.js extesnsion
* updated token allowance story
* removed duplicacies from yarn
* fixed lavamoat
* removed filename comment
* updated links for docs
* fixed file extension for stories
* updated path for stories.json
* updated stories.json path
* yarn updated
* updated stories
* updated yarn
* updated wait on
* Migrate to new controller packages
`@metamask/controllers` is deprecated, and most of the controllers that
lived here are now located in their own package ([1]). This commit
replaces `@metamask/controllers` in `package.json` with references to
these packages and updates `import` lines to match.
[1]: https://github.com/MetaMask/controllers/pull/831
* Support GitHub registry for draft PRs (#16549)
* Add additional allowed host to lockfile linter
* Update LavaMoat policies
* Add policy exception for nanoid
* Add additional nanoid overrides
* Update LavaMoat policies again
* Bump controller packages
* Update lavamoat
* Bump controller packages
* Update packages to v1.0.0
* Expand gitignore comment
* Unpin controller dependencies, using ^ range instead
Co-authored-by: Mark Stacey <markjstacey@gmail.com>