2021-07-28 05:03:03 +02:00
|
|
|
# things that *are* used, that depcheck is wrong about
|
|
|
|
ignores:
|
2021-10-29 19:22:07 +02:00
|
|
|
#
|
2021-07-28 05:03:03 +02:00
|
|
|
# webapp deps
|
2021-10-29 19:22:07 +02:00
|
|
|
#
|
2021-07-28 05:03:03 +02:00
|
|
|
|
2021-10-29 19:22:07 +02:00
|
|
|
- '@babel/runtime'
|
|
|
|
- '@fortawesome/fontawesome-free'
|
|
|
|
- 'punycode'
|
|
|
|
|
|
|
|
#
|
2021-07-28 05:03:03 +02:00
|
|
|
# dev deps
|
|
|
|
#
|
Add build-time code exclusion using code fencing (#12060)
This PR adds build-time code exclusion by means of code fencing. For details, please see the README in `./development/build/transforms`. Note that linting of transformed files as a form of validation is added in a follow-up, #12075.
Hopefully exhaustive tests are added to ensure that the transform works according to its specification. Since these tests are Node-only, they required their own Jest config. The recommended way to work with multiple Jest configs is using the `projects` field in the Jest config, however [that feature breaks coverage collection](https://github.com/facebook/jest/issues/9628). That being the case, I had to set up two separate Jest configs. In order to get both test suites to run in parallel, Jest is now invoked via a script, `./test/run-jest.sh`.
By way of example, this build system feature allows us to add fences like this:
```javascript
this.store.updateStructure({
...,
GasFeeController: this.gasFeeController,
TokenListController: this.tokenListController,
///: BEGIN:ONLY_INCLUDE_IN(beta)
PluginController: this.pluginController,
///: END:ONLY_INCLUDE_IN
});
```
Which at build time are transformed to the following if the build type is not `beta`:
```javascript
this.store.updateStructure({
...,
GasFeeController: this.gasFeeController,
TokenListController: this.tokenListController,
});
```
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2021-09-14 19:00:04 +02:00
|
|
|
|
Add TypeScript migration dashboard (#13820)
As we convert parts of the codebase to TypeScript, we will want a way to
track progress. This commit adds a dashboard which displays all of the
files that we wish to convert to TypeScript and which files we've
already converted.
The list of all possible files to convert is predetermined by walking
the dependency graph of each entrypoint the build system uses to compile
the extension (the files that the entrypoint imports, the files that the
imports import, etc). The list should not need to be regenerated, but
you can do it by running:
yarn ts-migration:enumerate
The dashboard is implemented as a separate React app. The CircleCI
configuration has been updated so that when a new commit is pushed, the
React app is built and stored in the CircleCI artifacts. When a PR is
merged, the built files will be pushed to a separate repo whose sole
purpose is to serve the dashboard via GitHub Pages (this is the same
way that the Storybook works). All of the app code and script to build
the app are self-contained under
`development/ts-migration-dashboard`. To build this app yourself, you
can run:
yarn ts-migration:dashboard:build
or if you want to build automatically as you change files, run:
yarn ts-migration:dashboard:watch
Then open the following file in your browser (there is no server
component):
development/ts-migration-dashboard/build/index.html
Finally, although you shouldn't have to do this, to manually deploy the
dashboard once built, you can run:
git remote add ts-migration-dashboard git@github.com:MetaMask/metamask-extension-ts-migration-dashboard.git
yarn ts-migration:dashboard:deploy
2022-08-09 22:16:08 +02:00
|
|
|
# all @types/* packages are imported implicitly by TypeScript
|
|
|
|
- '@types/*'
|
2021-07-28 05:03:03 +02:00
|
|
|
# safety fallback for npm lifecycle scripts, not used normally
|
2021-10-29 19:22:07 +02:00
|
|
|
- '@lavamoat/preinstall-always-fail'
|
2021-07-28 05:03:03 +02:00
|
|
|
# used in testing + ci
|
2021-10-29 19:22:07 +02:00
|
|
|
- '@metamask/auto-changelog' # invoked as `auto-changelog`
|
|
|
|
- '@metamask/forwarder'
|
2022-05-16 20:12:00 +02:00
|
|
|
- '@metamask/phishing-warning' # statically hosted as part of some e2e tests
|
2021-10-29 19:22:07 +02:00
|
|
|
- '@metamask/test-dapp'
|
2022-02-23 03:26:11 +01:00
|
|
|
- '@metamask/design-tokens' # Only imported in index.css
|
2022-03-21 19:54:47 +01:00
|
|
|
- '@tsconfig/node14' # required dynamically by TS, used in tsconfig.json
|
2021-10-29 19:22:07 +02:00
|
|
|
- '@sentry/cli' # invoked as `sentry-cli`
|
|
|
|
- 'chromedriver'
|
|
|
|
- 'depcheck' # ooo meta
|
|
|
|
- 'ganache-cli'
|
|
|
|
- 'geckodriver'
|
|
|
|
- 'jest'
|
|
|
|
- 'lavamoat-viz'
|
|
|
|
- 'prettier-plugin-sort-json' # automatically imported by prettier
|
|
|
|
- 'source-map-explorer'
|
2021-07-28 05:03:03 +02:00
|
|
|
# development tool
|
2021-10-29 19:22:07 +02:00
|
|
|
- 'yarn-deduplicate'
|
|
|
|
- 'improved-yarn-audit'
|
2021-07-28 05:03:03 +02:00
|
|
|
# storybook
|
2021-10-29 19:22:07 +02:00
|
|
|
- '@storybook/core'
|
|
|
|
- '@storybook/addon-essentials'
|
|
|
|
- '@storybook/addon-a11y'
|
2022-02-25 23:11:22 +01:00
|
|
|
- 'storybook-dark-mode'
|
2021-10-29 19:22:07 +02:00
|
|
|
- 'style-loader'
|
|
|
|
- 'css-loader'
|
|
|
|
- 'sass-loader'
|
|
|
|
- 'resolve-url-loader'
|
2021-07-28 05:03:03 +02:00
|
|
|
|
2021-10-29 19:22:07 +02:00
|
|
|
# files depcheck should not parse
|
2021-07-28 05:03:03 +02:00
|
|
|
ignorePatterns:
|
|
|
|
# seems to incorrectly parse scss @include pragmas?
|
2021-10-29 19:22:07 +02:00
|
|
|
- '**/*.scss'
|
2021-07-28 05:03:03 +02:00
|
|
|
# self-contained bundle used for testing
|
2021-10-29 19:22:07 +02:00
|
|
|
- '**/send-eth-with-private-key-test/web3js.js'
|
|
|
|
- '**/send-eth-with-private-key-test/ethereumjs-tx.js'
|