A Metamask fork with Infura removed and default networks editable
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ciphermask/lavamoat/build-system/policy.json

7734 lines
232 KiB

{
"resources": {
"@babel/code-frame": {
"globals": {
"console.warn": true,
"process.emitWarning": true
},
"packages": {
"lavamoat>@babel/highlight": true
}
},
"@babel/core": {
"builtin": {
"assert": true,
"fs": true,
"module": true,
"path": true,
"url": true,
"util": true
},
"globals": {
"console.error": true,
"console.log": true,
"process": true
},
"packages": {
"$root$": true,
"@babel/code-frame": true,
"@babel/core>@ampproject/remapping": true,
"@babel/core>@babel/generator": true,
"@babel/core>@babel/helper-compilation-targets": true,
"@babel/core>@babel/helper-module-transforms": true,
"@babel/core>@babel/helpers": true,
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
2 years ago
"@babel/core>@babel/parser": true,
"@babel/core>@babel/template": true,
"@babel/core>@babel/types": true,
"@babel/core>gensync": true,
"@babel/core>semver": true,
"@babel/plugin-proposal-class-properties": true,
"@babel/plugin-proposal-nullish-coalescing-operator": true,
"@babel/plugin-proposal-object-rest-spread": true,
"@babel/plugin-proposal-optional-chaining": true,
"@babel/plugin-transform-runtime": true,
"@babel/preset-env": true,
"@babel/preset-react": true,
"@babel/preset-typescript": true,
"depcheck>@babel/traverse": true,
"depcheck>json5": true,
"nock>debug": true,
"nyc>convert-source-map": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"@babel/core>@ampproject/remapping": {
"globals": {
"define": true
},
"packages": {
"@babel/core>@ampproject/remapping>@jridgewell/gen-mapping": true,
"terser>@jridgewell/source-map>@jridgewell/trace-mapping": true
}
},
"@babel/core>@ampproject/remapping>@jridgewell/gen-mapping": {
"globals": {
"define": true
},
"packages": {
"terser>@jridgewell/source-map>@jridgewell/gen-mapping>@jridgewell/set-array": true,
"terser>@jridgewell/source-map>@jridgewell/gen-mapping>@jridgewell/sourcemap-codec": true
}
},
"@babel/core>@babel/generator": {
"globals": {
"console.error": true
},
"packages": {
"@babel/core>@babel/generator>jsesc": true,
"@babel/core>@babel/types": true,
"terser>@jridgewell/source-map>@jridgewell/gen-mapping": true
}
},
"@babel/core>@babel/generator>jsesc": {
"globals": {
"Buffer.isBuffer": true
}
},
"@babel/core>@babel/helper-compilation-targets": {
"globals": {
"console.warn": true,
"process.versions.node": true
},
"packages": {
"@babel/core>@babel/helper-compilation-targets>semver": true,
"@babel/preset-env>@babel/compat-data": true,
"@babel/preset-env>@babel/helper-validator-option": true,
"stylelint>autoprefixer>browserslist": true
}
},
"@babel/core>@babel/helper-compilation-targets>semver": {
"globals": {
"console": true,
"process": true
}
},
"@babel/core>@babel/helper-module-transforms": {
"builtin": {
"assert": true,
"path.basename": true,
"path.extname": true
},
"packages": {
"@babel/core>@babel/helper-module-transforms>@babel/helper-module-imports": true,
"@babel/core>@babel/helper-module-transforms>@babel/helper-simple-access": true,
"@babel/core>@babel/template": true,
"@babel/core>@babel/types": true,
"depcheck>@babel/traverse": true,
"depcheck>@babel/traverse>@babel/helper-environment-visitor": true,
"depcheck>@babel/traverse>@babel/helper-split-export-declaration": true,
"lavamoat>@babel/highlight>@babel/helper-validator-identifier": true
}
},
"@babel/core>@babel/helper-module-transforms>@babel/helper-module-imports": {
"builtin": {
"assert": true
},
"packages": {
"@babel/core>@babel/types": true
}
},
"@babel/core>@babel/helper-module-transforms>@babel/helper-simple-access": {
"packages": {
"@babel/core>@babel/types": true
}
},
"@babel/core>@babel/helpers": {
Add TypeScript to the build system (#13489) This commit modifies the build system so that TypeScript files can be transpiled into ES5 just like JavaScript files. Note that this commit does NOT change the build system to run TypeScript files through the TypeScript compiler. In other words, no files will be type-checked at the build stage, as we expect type-checking to be handled elsewhere (live, via your editor integration with `tsserver`, and before a PR is merged, via `yarn lint`). Rather, we merely instruct Babel to strip TypeScript-specific syntax from any files that have it, as if those files had been written using JavaScript syntax alone. Why take this approach? Because it prevents the build process from being negatively impacted with respect to performance (as TypeScript takes a significant amount of time to run). It's worth noting the downside of this approach: because we aren't running files through TypeScript, but relying on Babel's [TypeScript transform][1] to identify TypeScript syntax, this transform has to keep up with any syntax changes that TypeScript adds in the future. In fact there are a few syntactical forms that Babel already does not recognize. These forms are rare or are deprecated by TypeScript, so I don't consider them to be a blocker, but it's worth noting just in case it comes up later. Also, any settings we place in `tsconfig.json` will be completely ignored by Babel. Again, this isn't a blocker because there are some analogs for the most important settings reflected in the options we can pass to the transform. These and other caveats are detailed in the [documentation for the transform][2]. [1]: https://babeljs.io/docs/en/babel-plugin-transform-typescript [2]: https://babeljs.io/docs/en/babel-plugin-transform-typescript#caveats
3 years ago
"packages": {
"@babel/core>@babel/template": true,
"@babel/core>@babel/types": true,
"depcheck>@babel/traverse": true
Add TypeScript to the build system (#13489) This commit modifies the build system so that TypeScript files can be transpiled into ES5 just like JavaScript files. Note that this commit does NOT change the build system to run TypeScript files through the TypeScript compiler. In other words, no files will be type-checked at the build stage, as we expect type-checking to be handled elsewhere (live, via your editor integration with `tsserver`, and before a PR is merged, via `yarn lint`). Rather, we merely instruct Babel to strip TypeScript-specific syntax from any files that have it, as if those files had been written using JavaScript syntax alone. Why take this approach? Because it prevents the build process from being negatively impacted with respect to performance (as TypeScript takes a significant amount of time to run). It's worth noting the downside of this approach: because we aren't running files through TypeScript, but relying on Babel's [TypeScript transform][1] to identify TypeScript syntax, this transform has to keep up with any syntax changes that TypeScript adds in the future. In fact there are a few syntactical forms that Babel already does not recognize. These forms are rare or are deprecated by TypeScript, so I don't consider them to be a blocker, but it's worth noting just in case it comes up later. Also, any settings we place in `tsconfig.json` will be completely ignored by Babel. Again, this isn't a blocker because there are some analogs for the most important settings reflected in the options we can pass to the transform. These and other caveats are detailed in the [documentation for the transform][2]. [1]: https://babeljs.io/docs/en/babel-plugin-transform-typescript [2]: https://babeljs.io/docs/en/babel-plugin-transform-typescript#caveats
3 years ago
}
},
"@babel/core>@babel/template": {
"packages": {
"@babel/code-frame": true,
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
2 years ago
"@babel/core>@babel/parser": true,
"@babel/core>@babel/types": true
}
},
"@babel/core>@babel/types": {
"globals": {
"console.trace": true,
"process.env.BABEL_TYPES_8_BREAKING": true
},
"packages": {
"@babel/core>@babel/types>@babel/helper-string-parser": true,
"@babel/core>@babel/types>to-fast-properties": true,
"lavamoat>@babel/highlight>@babel/helper-validator-identifier": true
}
},
"@babel/core>semver": {
"globals": {
"console": true,
"process": true
}
},
"@babel/eslint-parser": {
"builtin": {
"path": true
},
"globals": {
"process.versions": true
},
"packages": {
"@babel/core": true,
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
2 years ago
"@babel/core>@babel/parser": true,
"@babel/eslint-parser>eslint-scope": true,
"@babel/eslint-parser>eslint-visitor-keys": true,
"@babel/eslint-parser>semver": true,
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
2 years ago
"@babel/parser": true,
"depcheck>@babel/parser": true,
"eslint": true,
"lavamoat>lavamoat-tofu>@babel/parser": true
}
},
"@babel/eslint-parser>eslint-scope": {
"builtin": {
"assert": true
},
"packages": {
"@babel/eslint-parser>eslint-scope>estraverse": true,
"eslint>eslint-scope>esrecurse": true
}
},
"@babel/eslint-parser>semver": {
"globals": {
"console": true,
"process": true
}
},
"@babel/eslint-plugin": {
"packages": {
"@babel/eslint-plugin>eslint-rule-composer": true,
"eslint": true
}
},
"@babel/preset-env": {
"globals": {
"console.log": true,
"console.warn": true,
"process.cwd": true,
"process.env.BABEL_ENV": true
},
"packages": {
"@babel/core>@babel/helper-compilation-targets": true,
"@babel/core>@babel/types": true,
"@babel/preset-env>@babel/compat-data": true,
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/helper-validator-option": true,
"@babel/preset-env>@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": true,
"@babel/preset-env>@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": true,
"@babel/preset-env>@babel/plugin-proposal-async-generator-functions": true,
"@babel/preset-env>@babel/plugin-proposal-class-properties": true,
"@babel/preset-env>@babel/plugin-proposal-class-static-block": true,
"@babel/preset-env>@babel/plugin-proposal-dynamic-import": true,
"@babel/preset-env>@babel/plugin-proposal-export-namespace-from": true,
"@babel/preset-env>@babel/plugin-proposal-json-strings": true,
"@babel/preset-env>@babel/plugin-proposal-logical-assignment-operators": true,
"@babel/preset-env>@babel/plugin-proposal-nullish-coalescing-operator": true,
"@babel/preset-env>@babel/plugin-proposal-numeric-separator": true,
"@babel/preset-env>@babel/plugin-proposal-object-rest-spread": true,
"@babel/preset-env>@babel/plugin-proposal-optional-catch-binding": true,
"@babel/preset-env>@babel/plugin-proposal-optional-chaining": true,
"@babel/preset-env>@babel/plugin-proposal-private-methods": true,
"@babel/preset-env>@babel/plugin-proposal-private-property-in-object": true,
"@babel/preset-env>@babel/plugin-proposal-unicode-property-regex": true,
"@babel/preset-env>@babel/plugin-syntax-async-generators": true,
"@babel/preset-env>@babel/plugin-syntax-class-properties": true,
"@babel/preset-env>@babel/plugin-syntax-class-static-block": true,
"@babel/preset-env>@babel/plugin-syntax-dynamic-import": true,
"@babel/preset-env>@babel/plugin-syntax-export-namespace-from": true,
"@babel/preset-env>@babel/plugin-syntax-import-assertions": true,
"@babel/preset-env>@babel/plugin-syntax-json-strings": true,
"@babel/preset-env>@babel/plugin-syntax-logical-assignment-operators": true,
"@babel/preset-env>@babel/plugin-syntax-nullish-coalescing-operator": true,
"@babel/preset-env>@babel/plugin-syntax-numeric-separator": true,
"@babel/preset-env>@babel/plugin-syntax-object-rest-spread": true,
"@babel/preset-env>@babel/plugin-syntax-optional-catch-binding": true,
"@babel/preset-env>@babel/plugin-syntax-optional-chaining": true,
"@babel/preset-env>@babel/plugin-syntax-private-property-in-object": true,
"@babel/preset-env>@babel/plugin-syntax-top-level-await": true,
"@babel/preset-env>@babel/plugin-transform-arrow-functions": true,
"@babel/preset-env>@babel/plugin-transform-async-to-generator": true,
"@babel/preset-env>@babel/plugin-transform-block-scoped-functions": true,
"@babel/preset-env>@babel/plugin-transform-block-scoping": true,
"@babel/preset-env>@babel/plugin-transform-classes": true,
"@babel/preset-env>@babel/plugin-transform-computed-properties": true,
"@babel/preset-env>@babel/plugin-transform-destructuring": true,
"@babel/preset-env>@babel/plugin-transform-dotall-regex": true,
"@babel/preset-env>@babel/plugin-transform-duplicate-keys": true,
"@babel/preset-env>@babel/plugin-transform-exponentiation-operator": true,
"@babel/preset-env>@babel/plugin-transform-for-of": true,
"@babel/preset-env>@babel/plugin-transform-function-name": true,
"@babel/preset-env>@babel/plugin-transform-literals": true,
"@babel/preset-env>@babel/plugin-transform-member-expression-literals": true,
"@babel/preset-env>@babel/plugin-transform-modules-amd": true,
"@babel/preset-env>@babel/plugin-transform-modules-commonjs": true,
"@babel/preset-env>@babel/plugin-transform-modules-systemjs": true,
"@babel/preset-env>@babel/plugin-transform-modules-umd": true,
"@babel/preset-env>@babel/plugin-transform-named-capturing-groups-regex": true,
"@babel/preset-env>@babel/plugin-transform-new-target": true,
"@babel/preset-env>@babel/plugin-transform-object-super": true,
"@babel/preset-env>@babel/plugin-transform-parameters": true,
"@babel/preset-env>@babel/plugin-transform-property-literals": true,
"@babel/preset-env>@babel/plugin-transform-regenerator": true,
"@babel/preset-env>@babel/plugin-transform-reserved-words": true,
"@babel/preset-env>@babel/plugin-transform-shorthand-properties": true,
"@babel/preset-env>@babel/plugin-transform-spread": true,
"@babel/preset-env>@babel/plugin-transform-sticky-regex": true,
"@babel/preset-env>@babel/plugin-transform-template-literals": true,
"@babel/preset-env>@babel/plugin-transform-typeof-symbol": true,
"@babel/preset-env>@babel/plugin-transform-unicode-escapes": true,
"@babel/preset-env>@babel/plugin-transform-unicode-regex": true,
"@babel/preset-env>@babel/preset-modules": true,
"@babel/preset-env>babel-plugin-polyfill-corejs2": true,
"@babel/preset-env>babel-plugin-polyfill-corejs3": true,
"@babel/preset-env>babel-plugin-polyfill-regenerator": true,
"@babel/preset-env>core-js-compat": true,
"@babel/preset-env>semver": true
}
},
"@babel/preset-env>@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": {
"packages": {
"@babel/core": true,
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-proposal-optional-chaining": true,
"@babel/preset-env>@babel/plugin-transform-spread>@babel/helper-skip-transparent-expression-wrappers": true
}
},
"@babel/preset-env>@babel/plugin-proposal-async-generator-functions": {
"packages": {
"@babel/core": true,
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-syntax-async-generators": true,
"@babel/preset-env>@babel/plugin-transform-async-to-generator>@babel/helper-remap-async-to-generator": true,
"depcheck>@babel/traverse>@babel/helper-environment-visitor": true
}
},
"@babel/preset-env>@babel/plugin-proposal-class-properties": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-proposal-private-methods>@babel/helper-create-class-features-plugin": true
}
},
"@babel/preset-env>@babel/plugin-proposal-class-static-block": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-proposal-private-methods>@babel/helper-create-class-features-plugin": true,
"@babel/preset-env>@babel/plugin-syntax-class-static-block": true
}
},
"@babel/preset-env>@babel/plugin-proposal-dynamic-import": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-syntax-dynamic-import": true
}
},
"@babel/preset-env>@babel/plugin-proposal-export-namespace-from": {
"packages": {
"@babel/core": true,
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-syntax-export-namespace-from": true
}
},
"@babel/preset-env>@babel/plugin-proposal-json-strings": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-syntax-json-strings": true
}
},
"@babel/preset-env>@babel/plugin-proposal-logical-assignment-operators": {
"packages": {
"@babel/core": true,
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-syntax-logical-assignment-operators": true
}
},
"@babel/preset-env>@babel/plugin-proposal-nullish-coalescing-operator": {
"packages": {
"@babel/core": true,
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-syntax-nullish-coalescing-operator": true
}
},
"@babel/preset-env>@babel/plugin-proposal-numeric-separator": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-syntax-numeric-separator": true
}
},
"@babel/preset-env>@babel/plugin-proposal-object-rest-spread": {
"packages": {
"@babel/core": true,
"@babel/core>@babel/helper-compilation-targets": true,
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-syntax-object-rest-spread": true,
"@babel/preset-env>@babel/plugin-transform-parameters": true
}
},
"@babel/preset-env>@babel/plugin-proposal-optional-catch-binding": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-syntax-optional-catch-binding": true
}
},
"@babel/preset-env>@babel/plugin-proposal-optional-chaining": {
"packages": {
"@babel/core": true,
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-syntax-optional-chaining": true,
"@babel/preset-env>@babel/plugin-transform-spread>@babel/helper-skip-transparent-expression-wrappers": true
}
},
"@babel/preset-env>@babel/plugin-proposal-private-methods": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-proposal-private-methods>@babel/helper-create-class-features-plugin": true
}
},
"@babel/preset-env>@babel/plugin-proposal-private-methods>@babel/helper-create-class-features-plugin": {
"globals": {
"console.warn": true
},
"packages": {
"@babel/core": true,
"@babel/preset-env>@babel/plugin-transform-classes>@babel/helper-annotate-as-pure": true,
"@babel/preset-env>@babel/plugin-transform-classes>@babel/helper-optimise-call-expression": true,
"@babel/preset-env>@babel/plugin-transform-classes>@babel/helper-replace-supers": true,
"@babel/preset-env>@babel/plugin-transform-classes>@babel/helper-replace-supers>@babel/helper-member-expression-to-functions": true,
"depcheck>@babel/traverse>@babel/helper-environment-visitor": true,
"depcheck>@babel/traverse>@babel/helper-function-name": true,
"depcheck>@babel/traverse>@babel/helper-split-export-declaration": true
}
},
"@babel/preset-env>@babel/plugin-proposal-private-property-in-object": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-proposal-private-methods>@babel/helper-create-class-features-plugin": true,
"@babel/preset-env>@babel/plugin-syntax-private-property-in-object": true,
"@babel/preset-env>@babel/plugin-transform-classes>@babel/helper-annotate-as-pure": true
}
},
"@babel/preset-env>@babel/plugin-proposal-unicode-property-regex": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-transform-dotall-regex>@babel/helper-create-regexp-features-plugin": true
}
},
"@babel/preset-env>@babel/plugin-syntax-async-generators": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-syntax-class-properties": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-syntax-class-static-block": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-syntax-dynamic-import": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-syntax-export-namespace-from": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-syntax-import-assertions": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-syntax-json-strings": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-syntax-logical-assignment-operators": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-syntax-nullish-coalescing-operator": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-syntax-numeric-separator": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-syntax-object-rest-spread": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-syntax-optional-catch-binding": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-syntax-optional-chaining": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-syntax-private-property-in-object": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-syntax-top-level-await": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-transform-arrow-functions": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-transform-async-to-generator": {
"packages": {
"@babel/core": true,
"@babel/core>@babel/helper-module-transforms>@babel/helper-module-imports": true,
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-transform-async-to-generator>@babel/helper-remap-async-to-generator": true
}
},
"@babel/preset-env>@babel/plugin-transform-async-to-generator>@babel/helper-remap-async-to-generator": {
"packages": {
"@babel/core": true,
"@babel/core>@babel/types": true,
"@babel/preset-env>@babel/plugin-transform-async-to-generator>@babel/helper-remap-async-to-generator>@babel/helper-wrap-function": true,
"@babel/preset-env>@babel/plugin-transform-classes>@babel/helper-annotate-as-pure": true,
"depcheck>@babel/traverse>@babel/helper-environment-visitor": true
}
},
"@babel/preset-env>@babel/plugin-transform-async-to-generator>@babel/helper-remap-async-to-generator>@babel/helper-wrap-function": {
"packages": {
"@babel/core>@babel/template": true,
"@babel/core>@babel/types": true,
"depcheck>@babel/traverse>@babel/helper-function-name": true
}
},
"@babel/preset-env>@babel/plugin-transform-block-scoped-functions": {
"packages": {
"@babel/core": true,
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-transform-block-scoping": {
"packages": {
"@babel/core": true,
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-transform-classes": {
Add TypeScript to the build system (#13489) This commit modifies the build system so that TypeScript files can be transpiled into ES5 just like JavaScript files. Note that this commit does NOT change the build system to run TypeScript files through the TypeScript compiler. In other words, no files will be type-checked at the build stage, as we expect type-checking to be handled elsewhere (live, via your editor integration with `tsserver`, and before a PR is merged, via `yarn lint`). Rather, we merely instruct Babel to strip TypeScript-specific syntax from any files that have it, as if those files had been written using JavaScript syntax alone. Why take this approach? Because it prevents the build process from being negatively impacted with respect to performance (as TypeScript takes a significant amount of time to run). It's worth noting the downside of this approach: because we aren't running files through TypeScript, but relying on Babel's [TypeScript transform][1] to identify TypeScript syntax, this transform has to keep up with any syntax changes that TypeScript adds in the future. In fact there are a few syntactical forms that Babel already does not recognize. These forms are rare or are deprecated by TypeScript, so I don't consider them to be a blocker, but it's worth noting just in case it comes up later. Also, any settings we place in `tsconfig.json` will be completely ignored by Babel. Again, this isn't a blocker because there are some analogs for the most important settings reflected in the options we can pass to the transform. These and other caveats are detailed in the [documentation for the transform][2]. [1]: https://babeljs.io/docs/en/babel-plugin-transform-typescript [2]: https://babeljs.io/docs/en/babel-plugin-transform-typescript#caveats
3 years ago
"packages": {
"@babel/core": true,
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-transform-classes>@babel/helper-annotate-as-pure": true,
"@babel/preset-env>@babel/plugin-transform-classes>@babel/helper-optimise-call-expression": true,
"@babel/preset-env>@babel/plugin-transform-classes>@babel/helper-replace-supers": true,
"@babel/preset-env>@babel/plugin-transform-classes>globals": true,
"depcheck>@babel/traverse>@babel/helper-environment-visitor": true,
"depcheck>@babel/traverse>@babel/helper-function-name": true,
"depcheck>@babel/traverse>@babel/helper-split-export-declaration": true
Add TypeScript to the build system (#13489) This commit modifies the build system so that TypeScript files can be transpiled into ES5 just like JavaScript files. Note that this commit does NOT change the build system to run TypeScript files through the TypeScript compiler. In other words, no files will be type-checked at the build stage, as we expect type-checking to be handled elsewhere (live, via your editor integration with `tsserver`, and before a PR is merged, via `yarn lint`). Rather, we merely instruct Babel to strip TypeScript-specific syntax from any files that have it, as if those files had been written using JavaScript syntax alone. Why take this approach? Because it prevents the build process from being negatively impacted with respect to performance (as TypeScript takes a significant amount of time to run). It's worth noting the downside of this approach: because we aren't running files through TypeScript, but relying on Babel's [TypeScript transform][1] to identify TypeScript syntax, this transform has to keep up with any syntax changes that TypeScript adds in the future. In fact there are a few syntactical forms that Babel already does not recognize. These forms are rare or are deprecated by TypeScript, so I don't consider them to be a blocker, but it's worth noting just in case it comes up later. Also, any settings we place in `tsconfig.json` will be completely ignored by Babel. Again, this isn't a blocker because there are some analogs for the most important settings reflected in the options we can pass to the transform. These and other caveats are detailed in the [documentation for the transform][2]. [1]: https://babeljs.io/docs/en/babel-plugin-transform-typescript [2]: https://babeljs.io/docs/en/babel-plugin-transform-typescript#caveats
3 years ago
}
},
"@babel/preset-env>@babel/plugin-transform-classes>@babel/helper-annotate-as-pure": {
"packages": {
"@babel/core>@babel/types": true
}
},
"@babel/preset-env>@babel/plugin-transform-classes>@babel/helper-optimise-call-expression": {
"packages": {
"@babel/core>@babel/types": true
}
},
"@babel/preset-env>@babel/plugin-transform-classes>@babel/helper-replace-supers": {
"packages": {
"@babel/core>@babel/types": true,
"@babel/preset-env>@babel/plugin-transform-classes>@babel/helper-optimise-call-expression": true,
"@babel/preset-env>@babel/plugin-transform-classes>@babel/helper-replace-supers>@babel/helper-member-expression-to-functions": true,
"depcheck>@babel/traverse": true,
"depcheck>@babel/traverse>@babel/helper-environment-visitor": true
}
},
"@babel/preset-env>@babel/plugin-transform-classes>@babel/helper-replace-supers>@babel/helper-member-expression-to-functions": {
"packages": {
"@babel/core>@babel/types": true
}
},
"@babel/preset-env>@babel/plugin-transform-computed-properties": {
"packages": {
"@babel/core": true,
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-transform-destructuring": {
"packages": {
"@babel/core": true,
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-transform-dotall-regex": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-transform-dotall-regex>@babel/helper-create-regexp-features-plugin": true
}
},
"@babel/preset-env>@babel/plugin-transform-dotall-regex>@babel/helper-create-regexp-features-plugin": {
"packages": {
"@babel/core": true,
"@babel/preset-env>@babel/plugin-transform-classes>@babel/helper-annotate-as-pure": true,
"@babel/preset-env>@babel/plugin-transform-dotall-regex>@babel/helper-create-regexp-features-plugin>regexpu-core": true
}
},
"@babel/preset-env>@babel/plugin-transform-dotall-regex>@babel/helper-create-regexp-features-plugin>regexpu-core": {
"globals": {
"characterClassItem.kind": true
},
"packages": {
"@babel/preset-env>@babel/plugin-transform-dotall-regex>@babel/helper-create-regexp-features-plugin>regexpu-core>regenerate": true,
"@babel/preset-env>@babel/plugin-transform-dotall-regex>@babel/helper-create-regexp-features-plugin>regexpu-core>regjsgen": true,
"@babel/preset-env>@babel/plugin-transform-dotall-regex>@babel/helper-create-regexp-features-plugin>regexpu-core>regjsparser": true,
"@babel/preset-env>@babel/plugin-transform-dotall-regex>@babel/helper-create-regexp-features-plugin>regexpu-core>unicode-match-property-ecmascript": true,
"@babel/preset-env>@babel/plugin-transform-dotall-regex>@babel/helper-create-regexp-features-plugin>regexpu-core>unicode-match-property-value-ecmascript": true
}
},
"@babel/preset-env>@babel/plugin-transform-dotall-regex>@babel/helper-create-regexp-features-plugin>regexpu-core>regenerate": {
"globals": {
"define": true
}
},
"@babel/preset-env>@babel/plugin-transform-dotall-regex>@babel/helper-create-regexp-features-plugin>regexpu-core>regjsgen": {
"globals": {
"define": true
}
},
"@babel/preset-env>@babel/plugin-transform-dotall-regex>@babel/helper-create-regexp-features-plugin>regexpu-core>regjsparser": {
"globals": {
"regjsparser": "write"
}
},
"@babel/preset-env>@babel/plugin-transform-dotall-regex>@babel/helper-create-regexp-features-plugin>regexpu-core>unicode-match-property-ecmascript": {
"packages": {
"@babel/preset-env>@babel/plugin-transform-dotall-regex>@babel/helper-create-regexp-features-plugin>regexpu-core>unicode-match-property-ecmascript>unicode-canonical-property-names-ecmascript": true,
"@babel/preset-env>@babel/plugin-transform-dotall-regex>@babel/helper-create-regexp-features-plugin>regexpu-core>unicode-match-property-ecmascript>unicode-property-aliases-ecmascript": true
}
},
"@babel/preset-env>@babel/plugin-transform-duplicate-keys": {
"packages": {
"@babel/core": true,
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-transform-exponentiation-operator": {
"packages": {
"@babel/core": true,
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-transform-exponentiation-operator>@babel/helper-builder-binary-assignment-operator-visitor": true
}
},
"@babel/preset-env>@babel/plugin-transform-exponentiation-operator>@babel/helper-builder-binary-assignment-operator-visitor": {
"packages": {
"@babel/core>@babel/types": true,
"@babel/preset-env>@babel/plugin-transform-exponentiation-operator>@babel/helper-builder-binary-assignment-operator-visitor>@babel/helper-explode-assignable-expression": true
}
},
"@babel/preset-env>@babel/plugin-transform-exponentiation-operator>@babel/helper-builder-binary-assignment-operator-visitor>@babel/helper-explode-assignable-expression": {
"packages": {
"@babel/core>@babel/types": true
}
},
"@babel/preset-env>@babel/plugin-transform-for-of": {
"packages": {
"@babel/core": true,
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-transform-function-name": {
"packages": {
"@babel/core>@babel/helper-compilation-targets": true,
"@babel/preset-env>@babel/helper-plugin-utils": true,
"depcheck>@babel/traverse>@babel/helper-function-name": true
}
},
"@babel/preset-env>@babel/plugin-transform-literals": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-transform-member-expression-literals": {
"packages": {
"@babel/core": true,
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-transform-modules-amd": {
"packages": {
"@babel/core": true,
"@babel/core>@babel/helper-module-transforms": true,
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-transform-modules-amd>babel-plugin-dynamic-import-node": true
}
},
"@babel/preset-env>@babel/plugin-transform-modules-commonjs": {
"packages": {
"@babel/core": true,
"@babel/core>@babel/helper-module-transforms": true,
"@babel/core>@babel/helper-module-transforms>@babel/helper-simple-access": true,
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-transform-modules-amd>babel-plugin-dynamic-import-node": true
}
},
"@babel/preset-env>@babel/plugin-transform-modules-systemjs": {
"globals": {
"console.warn": true
},
"packages": {
"@babel/core": true,
"@babel/core>@babel/helper-module-transforms": true,
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-transform-modules-amd>babel-plugin-dynamic-import-node": true,
"depcheck>@babel/traverse>@babel/helper-hoist-variables": true,
"lavamoat>@babel/highlight>@babel/helper-validator-identifier": true
}
},
"@babel/preset-env>@babel/plugin-transform-modules-umd": {
"builtin": {
"path.basename": true,
"path.extname": true
},
"packages": {
"@babel/core": true,
"@babel/core>@babel/helper-module-transforms": true,
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-transform-named-capturing-groups-regex": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-transform-dotall-regex>@babel/helper-create-regexp-features-plugin": true
}
},
"@babel/preset-env>@babel/plugin-transform-new-target": {
"packages": {
"@babel/core": true,
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-transform-object-super": {
"packages": {
"@babel/core": true,
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-transform-classes>@babel/helper-replace-supers": true
}
},
"@babel/preset-env>@babel/plugin-transform-parameters": {
"packages": {
"@babel/core": true,
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-transform-property-literals": {
"packages": {
"@babel/core": true,
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-transform-regenerator": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-transform-regenerator>regenerator-transform": true
}
},
"@babel/preset-env>@babel/plugin-transform-regenerator>regenerator-transform": {
"builtin": {
"assert": true,
"util.inherits": true
},
"packages": {
"@babel/runtime": true
}
},
"@babel/preset-env>@babel/plugin-transform-reserved-words": {
"packages": {
"@babel/core": true,
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-transform-shorthand-properties": {
"packages": {
"@babel/core": true,
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-transform-spread": {
"packages": {
"@babel/core": true,
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-transform-spread>@babel/helper-skip-transparent-expression-wrappers": true
}
},
"@babel/preset-env>@babel/plugin-transform-spread>@babel/helper-skip-transparent-expression-wrappers": {
"packages": {
"@babel/core>@babel/types": true
}
},
"@babel/preset-env>@babel/plugin-transform-sticky-regex": {
"packages": {
"@babel/core": true,
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-transform-template-literals": {
"packages": {
"@babel/core": true,
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-transform-typeof-symbol": {
"packages": {
"@babel/core": true,
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-transform-unicode-escapes": {
"packages": {
"@babel/core": true,
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-env>@babel/plugin-transform-unicode-regex": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-transform-dotall-regex>@babel/helper-create-regexp-features-plugin": true
}
},
"@babel/preset-env>babel-plugin-polyfill-corejs2": {
"packages": {
"@babel/core": true,
"@babel/preset-env>@babel/compat-data": true,
"@babel/preset-env>babel-plugin-polyfill-corejs2>semver": true,
"@babel/preset-env>babel-plugin-polyfill-corejs3>@babel/helper-define-polyfill-provider": true
}
},
"@babel/preset-env>babel-plugin-polyfill-corejs2>semver": {
"globals": {
"console": true,
"process": true
}
},
"@babel/preset-env>babel-plugin-polyfill-corejs3": {
"packages": {
"@babel/core": true,
"@babel/preset-env>babel-plugin-polyfill-corejs3>@babel/helper-define-polyfill-provider": true,
"@babel/preset-env>core-js-compat": true
}
},
"@babel/preset-env>babel-plugin-polyfill-corejs3>@babel/helper-define-polyfill-provider": {
Add TypeScript to the build system (#13489) This commit modifies the build system so that TypeScript files can be transpiled into ES5 just like JavaScript files. Note that this commit does NOT change the build system to run TypeScript files through the TypeScript compiler. In other words, no files will be type-checked at the build stage, as we expect type-checking to be handled elsewhere (live, via your editor integration with `tsserver`, and before a PR is merged, via `yarn lint`). Rather, we merely instruct Babel to strip TypeScript-specific syntax from any files that have it, as if those files had been written using JavaScript syntax alone. Why take this approach? Because it prevents the build process from being negatively impacted with respect to performance (as TypeScript takes a significant amount of time to run). It's worth noting the downside of this approach: because we aren't running files through TypeScript, but relying on Babel's [TypeScript transform][1] to identify TypeScript syntax, this transform has to keep up with any syntax changes that TypeScript adds in the future. In fact there are a few syntactical forms that Babel already does not recognize. These forms are rare or are deprecated by TypeScript, so I don't consider them to be a blocker, but it's worth noting just in case it comes up later. Also, any settings we place in `tsconfig.json` will be completely ignored by Babel. Again, this isn't a blocker because there are some analogs for the most important settings reflected in the options we can pass to the transform. These and other caveats are detailed in the [documentation for the transform][2]. [1]: https://babeljs.io/docs/en/babel-plugin-transform-typescript [2]: https://babeljs.io/docs/en/babel-plugin-transform-typescript#caveats
3 years ago
"builtin": {
"module": true,
"path": true
Add TypeScript to the build system (#13489) This commit modifies the build system so that TypeScript files can be transpiled into ES5 just like JavaScript files. Note that this commit does NOT change the build system to run TypeScript files through the TypeScript compiler. In other words, no files will be type-checked at the build stage, as we expect type-checking to be handled elsewhere (live, via your editor integration with `tsserver`, and before a PR is merged, via `yarn lint`). Rather, we merely instruct Babel to strip TypeScript-specific syntax from any files that have it, as if those files had been written using JavaScript syntax alone. Why take this approach? Because it prevents the build process from being negatively impacted with respect to performance (as TypeScript takes a significant amount of time to run). It's worth noting the downside of this approach: because we aren't running files through TypeScript, but relying on Babel's [TypeScript transform][1] to identify TypeScript syntax, this transform has to keep up with any syntax changes that TypeScript adds in the future. In fact there are a few syntactical forms that Babel already does not recognize. These forms are rare or are deprecated by TypeScript, so I don't consider them to be a blocker, but it's worth noting just in case it comes up later. Also, any settings we place in `tsconfig.json` will be completely ignored by Babel. Again, this isn't a blocker because there are some analogs for the most important settings reflected in the options we can pass to the transform. These and other caveats are detailed in the [documentation for the transform][2]. [1]: https://babeljs.io/docs/en/babel-plugin-transform-typescript [2]: https://babeljs.io/docs/en/babel-plugin-transform-typescript#caveats
3 years ago
},
"globals": {
"console.log": true,
"console.warn": true,
"process.exitCode": "write",
"process.versions.node": true
Add TypeScript to the build system (#13489) This commit modifies the build system so that TypeScript files can be transpiled into ES5 just like JavaScript files. Note that this commit does NOT change the build system to run TypeScript files through the TypeScript compiler. In other words, no files will be type-checked at the build stage, as we expect type-checking to be handled elsewhere (live, via your editor integration with `tsserver`, and before a PR is merged, via `yarn lint`). Rather, we merely instruct Babel to strip TypeScript-specific syntax from any files that have it, as if those files had been written using JavaScript syntax alone. Why take this approach? Because it prevents the build process from being negatively impacted with respect to performance (as TypeScript takes a significant amount of time to run). It's worth noting the downside of this approach: because we aren't running files through TypeScript, but relying on Babel's [TypeScript transform][1] to identify TypeScript syntax, this transform has to keep up with any syntax changes that TypeScript adds in the future. In fact there are a few syntactical forms that Babel already does not recognize. These forms are rare or are deprecated by TypeScript, so I don't consider them to be a blocker, but it's worth noting just in case it comes up later. Also, any settings we place in `tsconfig.json` will be completely ignored by Babel. Again, this isn't a blocker because there are some analogs for the most important settings reflected in the options we can pass to the transform. These and other caveats are detailed in the [documentation for the transform][2]. [1]: https://babeljs.io/docs/en/babel-plugin-transform-typescript [2]: https://babeljs.io/docs/en/babel-plugin-transform-typescript#caveats
3 years ago
},
"packages": {
"@babel/core": true,
"@babel/core>@babel/helper-compilation-targets": true,
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>babel-plugin-polyfill-corejs3>@babel/helper-define-polyfill-provider>lodash.debounce": true,
"brfs>resolve": true
}
},
"@babel/preset-env>babel-plugin-polyfill-corejs3>@babel/helper-define-polyfill-provider>lodash.debounce": {
"globals": {
"clearTimeout": true,
"setTimeout": true
Add TypeScript to the build system (#13489) This commit modifies the build system so that TypeScript files can be transpiled into ES5 just like JavaScript files. Note that this commit does NOT change the build system to run TypeScript files through the TypeScript compiler. In other words, no files will be type-checked at the build stage, as we expect type-checking to be handled elsewhere (live, via your editor integration with `tsserver`, and before a PR is merged, via `yarn lint`). Rather, we merely instruct Babel to strip TypeScript-specific syntax from any files that have it, as if those files had been written using JavaScript syntax alone. Why take this approach? Because it prevents the build process from being negatively impacted with respect to performance (as TypeScript takes a significant amount of time to run). It's worth noting the downside of this approach: because we aren't running files through TypeScript, but relying on Babel's [TypeScript transform][1] to identify TypeScript syntax, this transform has to keep up with any syntax changes that TypeScript adds in the future. In fact there are a few syntactical forms that Babel already does not recognize. These forms are rare or are deprecated by TypeScript, so I don't consider them to be a blocker, but it's worth noting just in case it comes up later. Also, any settings we place in `tsconfig.json` will be completely ignored by Babel. Again, this isn't a blocker because there are some analogs for the most important settings reflected in the options we can pass to the transform. These and other caveats are detailed in the [documentation for the transform][2]. [1]: https://babeljs.io/docs/en/babel-plugin-transform-typescript [2]: https://babeljs.io/docs/en/babel-plugin-transform-typescript#caveats
3 years ago
}
},
"@babel/preset-env>babel-plugin-polyfill-regenerator": {
"packages": {
"@babel/preset-env>babel-plugin-polyfill-corejs3>@babel/helper-define-polyfill-provider": true
}
},
"@babel/preset-env>core-js-compat": {
"packages": {
"@babel/preset-env>core-js-compat>semver": true
}
},
"@babel/preset-env>core-js-compat>semver": {
"globals": {
"console.error": true,
"process": true
}
},
"@babel/preset-env>semver": {
"globals": {
"console": true,
"process": true
}
},
"@babel/preset-react": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/helper-validator-option": true,
"@babel/preset-react>@babel/plugin-transform-react-display-name": true,
"@babel/preset-react>@babel/plugin-transform-react-jsx": true,
"@babel/preset-react>@babel/plugin-transform-react-jsx-development": true,
"@babel/preset-react>@babel/plugin-transform-react-pure-annotations": true
}
},
"@babel/preset-react>@babel/plugin-transform-react-display-name": {
"builtin": {
"path.basename": true,
"path.dirname": true,
"path.extname": true
},
"packages": {
"@babel/core": true,
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-react>@babel/plugin-transform-react-jsx": {
"packages": {
"@babel/core": true,
"@babel/core>@babel/helper-module-transforms>@babel/helper-module-imports": true,
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-transform-classes>@babel/helper-annotate-as-pure": true,
"@babel/preset-react>@babel/plugin-transform-react-jsx>@babel/plugin-syntax-jsx": true
}
},
"@babel/preset-react>@babel/plugin-transform-react-jsx-development": {
Add TypeScript to the build system (#13489) This commit modifies the build system so that TypeScript files can be transpiled into ES5 just like JavaScript files. Note that this commit does NOT change the build system to run TypeScript files through the TypeScript compiler. In other words, no files will be type-checked at the build stage, as we expect type-checking to be handled elsewhere (live, via your editor integration with `tsserver`, and before a PR is merged, via `yarn lint`). Rather, we merely instruct Babel to strip TypeScript-specific syntax from any files that have it, as if those files had been written using JavaScript syntax alone. Why take this approach? Because it prevents the build process from being negatively impacted with respect to performance (as TypeScript takes a significant amount of time to run). It's worth noting the downside of this approach: because we aren't running files through TypeScript, but relying on Babel's [TypeScript transform][1] to identify TypeScript syntax, this transform has to keep up with any syntax changes that TypeScript adds in the future. In fact there are a few syntactical forms that Babel already does not recognize. These forms are rare or are deprecated by TypeScript, so I don't consider them to be a blocker, but it's worth noting just in case it comes up later. Also, any settings we place in `tsconfig.json` will be completely ignored by Babel. Again, this isn't a blocker because there are some analogs for the most important settings reflected in the options we can pass to the transform. These and other caveats are detailed in the [documentation for the transform][2]. [1]: https://babeljs.io/docs/en/babel-plugin-transform-typescript [2]: https://babeljs.io/docs/en/babel-plugin-transform-typescript#caveats
3 years ago
"packages": {
"@babel/preset-react>@babel/plugin-transform-react-jsx": true
Add TypeScript to the build system (#13489) This commit modifies the build system so that TypeScript files can be transpiled into ES5 just like JavaScript files. Note that this commit does NOT change the build system to run TypeScript files through the TypeScript compiler. In other words, no files will be type-checked at the build stage, as we expect type-checking to be handled elsewhere (live, via your editor integration with `tsserver`, and before a PR is merged, via `yarn lint`). Rather, we merely instruct Babel to strip TypeScript-specific syntax from any files that have it, as if those files had been written using JavaScript syntax alone. Why take this approach? Because it prevents the build process from being negatively impacted with respect to performance (as TypeScript takes a significant amount of time to run). It's worth noting the downside of this approach: because we aren't running files through TypeScript, but relying on Babel's [TypeScript transform][1] to identify TypeScript syntax, this transform has to keep up with any syntax changes that TypeScript adds in the future. In fact there are a few syntactical forms that Babel already does not recognize. These forms are rare or are deprecated by TypeScript, so I don't consider them to be a blocker, but it's worth noting just in case it comes up later. Also, any settings we place in `tsconfig.json` will be completely ignored by Babel. Again, this isn't a blocker because there are some analogs for the most important settings reflected in the options we can pass to the transform. These and other caveats are detailed in the [documentation for the transform][2]. [1]: https://babeljs.io/docs/en/babel-plugin-transform-typescript [2]: https://babeljs.io/docs/en/babel-plugin-transform-typescript#caveats
3 years ago
}
},
"@babel/preset-react>@babel/plugin-transform-react-jsx>@babel/plugin-syntax-jsx": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/preset-react>@babel/plugin-transform-react-pure-annotations": {
"packages": {
"@babel/core": true,
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-transform-classes>@babel/helper-annotate-as-pure": true
}
},
"@babel/preset-typescript": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/helper-validator-option": true,
"@babel/preset-typescript>@babel/plugin-transform-typescript": true
}
},
"@babel/preset-typescript>@babel/plugin-transform-typescript": {
"builtin": {
"assert": true
},
"globals": {
"console.warn": true
},
"packages": {
"@babel/core": true,
"@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-proposal-private-methods>@babel/helper-create-class-features-plugin": true,
"@babel/preset-typescript>@babel/plugin-transform-typescript>@babel/plugin-syntax-typescript": true
}
},
"@babel/preset-typescript>@babel/plugin-transform-typescript>@babel/plugin-syntax-typescript": {
"packages": {
"@babel/preset-env>@babel/helper-plugin-utils": true
}
},
"@babel/register>clone-deep>is-plain-object": {
"packages": {
"gulp>gulp-cli>isobject": true
}
},
Build - refactor for bundle factoring and swappable runtime (#11080) * wip * build - breakout sentry-install bundle * deps - move new build sys deps to published versions * chore: lint fix * clean - remove unused file * clean - remove unsused package script * lavamoat - update build system policy * build - render html to all platforms * development - improve sourcemap debugger output * deps - update lavapack * lint - fix * deps - update lavapack for bugfix * deps - update lavapack for bugfix * deps - bump lavapack for line ending normalization * sourcemap explorer - disable boundary validation * ci - reset normal ci flow * build - re-enable minification on prod * build - remove noisy log about html dest * build - update terser and remove gulp wrapper for sourcemap fix * Revert "sourcemap explorer - disable boundary validation" This reverts commit 94112209ed880a6ebf4ee2ded411e59db6908162. * build - reenable react-devtools in dev mode * wip * build - breakout sentry-install bundle * deps - move new build sys deps to published versions * chore: lint fix * clean - remove unused file * clean - remove unsused package script * lavamoat - update build system policy * build - render html to all platforms * development - improve sourcemap debugger output * deps - update lavapack * lint - fix * deps - update lavapack for bugfix * deps - update lavapack for bugfix * deps - bump lavapack for line ending normalization * sourcemap explorer - disable boundary validation * ci - reset normal ci flow * build - re-enable minification on prod * build - remove noisy log about html dest * build - update terser and remove gulp wrapper for sourcemap fix * Revert "sourcemap explorer - disable boundary validation" This reverts commit 94112209ed880a6ebf4ee2ded411e59db6908162. * build - reenable react-devtools in dev mode * Updating lockfile * lint fix * build/dev - patch watchifys incompatible binary stats output * ui - add comment about conditional import * build - improve comment * Update development/stream-flat-map.js Co-authored-by: Brad Decker <git@braddecker.dev> * Outputting all bundle file links (metamaskbot) Co-authored-by: ryanml <ryanlanese@gmail.com> Co-authored-by: Brad Decker <git@braddecker.dev>
3 years ago
"@lavamoat/lavapack": {
"builtin": {
"assert": true,
Build - refactor for bundle factoring and swappable runtime (#11080) * wip * build - breakout sentry-install bundle * deps - move new build sys deps to published versions * chore: lint fix * clean - remove unused file * clean - remove unsused package script * lavamoat - update build system policy * build - render html to all platforms * development - improve sourcemap debugger output * deps - update lavapack * lint - fix * deps - update lavapack for bugfix * deps - update lavapack for bugfix * deps - bump lavapack for line ending normalization * sourcemap explorer - disable boundary validation * ci - reset normal ci flow * build - re-enable minification on prod * build - remove noisy log about html dest * build - update terser and remove gulp wrapper for sourcemap fix * Revert "sourcemap explorer - disable boundary validation" This reverts commit 94112209ed880a6ebf4ee2ded411e59db6908162. * build - reenable react-devtools in dev mode * wip * build - breakout sentry-install bundle * deps - move new build sys deps to published versions * chore: lint fix * clean - remove unused file * clean - remove unsused package script * lavamoat - update build system policy * build - render html to all platforms * development - improve sourcemap debugger output * deps - update lavapack * lint - fix * deps - update lavapack for bugfix * deps - update lavapack for bugfix * deps - bump lavapack for line ending normalization * sourcemap explorer - disable boundary validation * ci - reset normal ci flow * build - re-enable minification on prod * build - remove noisy log about html dest * build - update terser and remove gulp wrapper for sourcemap fix * Revert "sourcemap explorer - disable boundary validation" This reverts commit 94112209ed880a6ebf4ee2ded411e59db6908162. * build - reenable react-devtools in dev mode * Updating lockfile * lint fix * build/dev - patch watchifys incompatible binary stats output * ui - add comment about conditional import * build - improve comment * Update development/stream-flat-map.js Co-authored-by: Brad Decker <git@braddecker.dev> * Outputting all bundle file links (metamaskbot) Co-authored-by: ryanml <ryanlanese@gmail.com> Co-authored-by: Brad Decker <git@braddecker.dev>
3 years ago
"buffer.Buffer.from": true,
"fs.readFileSync": true,
"path.join": true,
Build - refactor for bundle factoring and swappable runtime (#11080) * wip * build - breakout sentry-install bundle * deps - move new build sys deps to published versions * chore: lint fix * clean - remove unused file * clean - remove unsused package script * lavamoat - update build system policy * build - render html to all platforms * development - improve sourcemap debugger output * deps - update lavapack * lint - fix * deps - update lavapack for bugfix * deps - update lavapack for bugfix * deps - bump lavapack for line ending normalization * sourcemap explorer - disable boundary validation * ci - reset normal ci flow * build - re-enable minification on prod * build - remove noisy log about html dest * build - update terser and remove gulp wrapper for sourcemap fix * Revert "sourcemap explorer - disable boundary validation" This reverts commit 94112209ed880a6ebf4ee2ded411e59db6908162. * build - reenable react-devtools in dev mode * wip * build - breakout sentry-install bundle * deps - move new build sys deps to published versions * chore: lint fix * clean - remove unused file * clean - remove unsused package script * lavamoat - update build system policy * build - render html to all platforms * development - improve sourcemap debugger output * deps - update lavapack * lint - fix * deps - update lavapack for bugfix * deps - update lavapack for bugfix * deps - bump lavapack for line ending normalization * sourcemap explorer - disable boundary validation * ci - reset normal ci flow * build - re-enable minification on prod * build - remove noisy log about html dest * build - update terser and remove gulp wrapper for sourcemap fix * Revert "sourcemap explorer - disable boundary validation" This reverts commit 94112209ed880a6ebf4ee2ded411e59db6908162. * build - reenable react-devtools in dev mode * Updating lockfile * lint fix * build/dev - patch watchifys incompatible binary stats output * ui - add comment about conditional import * build - improve comment * Update development/stream-flat-map.js Co-authored-by: Brad Decker <git@braddecker.dev> * Outputting all bundle file links (metamaskbot) Co-authored-by: ryanml <ryanlanese@gmail.com> Co-authored-by: Brad Decker <git@braddecker.dev>
3 years ago
"path.relative": true
},
"globals": {
"__dirname": true,
"process.cwd": true,
"setTimeout": true
},
"packages": {
"@lavamoat/lavapack>combine-source-map": true,
"@lavamoat/lavapack>readable-stream": true,
"@lavamoat/lavapack>umd": true,
"browserify>JSONStream": true,
"lavamoat>json-stable-stringify": true,
"lavamoat>lavamoat-core": true,
"nyc>convert-source-map": true,
"through2": true
}
},
"@lavamoat/lavapack>combine-source-map": {
"builtin": {
"path.dirname": true,
"path.join": true
},
"globals": {
"process.platform": true
},
"packages": {
"@lavamoat/lavapack>combine-source-map>convert-source-map": true,
"@lavamoat/lavapack>combine-source-map>inline-source-map": true,
"@lavamoat/lavapack>combine-source-map>lodash.memoize": true,
"@lavamoat/lavapack>combine-source-map>source-map": true
}
},
"@lavamoat/lavapack>combine-source-map>convert-source-map": {
"builtin": {
"fs.readFileSync": true,
"path.join": true
},
"globals": {
"Buffer.from": true
}
},
"@lavamoat/lavapack>combine-source-map>inline-source-map": {
"globals": {
"Buffer.from": true
},
"packages": {
"@lavamoat/lavapack>combine-source-map>inline-source-map>source-map": true
}
},
"@lavamoat/lavapack>readable-stream": {
"builtin": {
"buffer.Buffer": true,
"events.EventEmitter": true,
"stream": true,
"util": true
},
"globals": {
"process.env.READABLE_STREAM": true,
"process.nextTick": true,
"process.stderr": true,
"process.stdout": true
},
"packages": {
"@storybook/api>util-deprecate": true,
"browserify>string_decoder": true,
"pumpify>inherits": true
}
},
"@metamask/eth-token-tracker>deep-equal>is-date-object": {
"packages": {
"koa>is-generator-function>has-tostringtag": true
}
},
"@metamask/jazzicon>color>color-convert": {
"packages": {
"@metamask/jazzicon>color>color-convert>color-name": true
}
},
"@sentry/utils>tslib": {
"globals": {
"define": true
}
},
"@storybook/addon-essentials>@storybook/addon-docs>remark-slug>unist-util-visit": {
"packages": {
"@storybook/addon-essentials>@storybook/addon-docs>remark-slug>unist-util-visit>unist-util-visit-parents": true
}
},
"@storybook/addon-essentials>@storybook/addon-docs>remark-slug>unist-util-visit>unist-util-visit-parents": {
"packages": {
"stylelint>@stylelint/postcss-markdown>unist-util-find-all-after>unist-util-is": true
}
},
"@storybook/api>telejson>is-symbol": {
"packages": {
"string.prototype.matchall>has-symbols": true
}
},
"@storybook/api>util-deprecate": {
"builtin": {
"util.deprecate": true
}
},
"@storybook/components>qs": {
"packages": {
"string.prototype.matchall>side-channel": true
}
},
"@storybook/react>acorn-walk": {
"globals": {
"define": true
}
},
"@storybook/react>webpack>json-parse-even-better-errors": {
"globals": {
"Buffer.isBuffer": true
}
},
"@typescript-eslint/eslint-plugin": {
"packages": {
"@typescript-eslint/eslint-plugin>@typescript-eslint/type-utils": true,
"@typescript-eslint/eslint-plugin>@typescript-eslint/utils": true,
"@typescript-eslint/eslint-plugin>tsutils": true,
"@typescript-eslint/parser>@typescript-eslint/scope-manager": true,
"eslint": true,
"eslint-plugin-jest>@typescript-eslint/utils": true,
"eslint>debug": true,
"eslint>regexpp": true,
"globby>ignore": true,
"semver": true,
"typescript": true
}
},
"@typescript-eslint/eslint-plugin>@typescript-eslint/type-utils": {
"packages": {
"@typescript-eslint/eslint-plugin>@typescript-eslint/type-utils>debug": true,
"@typescript-eslint/eslint-plugin>@typescript-eslint/utils": true,
"@typescript-eslint/eslint-plugin>tsutils": true,
"eslint-plugin-jest>@typescript-eslint/utils": true,
"eslint>debug": true,
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
2 years ago
"madge>debug": true,
"nock>debug": true,
"typescript": true
}
},
"@typescript-eslint/eslint-plugin>@typescript-eslint/type-utils>debug": {
"globals": {
"console.debug": true,
"console.log": true
},
"packages": {
"@typescript-eslint/eslint-plugin>@typescript-eslint/type-utils>debug>ms": true
}
},
"@typescript-eslint/eslint-plugin>@typescript-eslint/utils": {
"builtin": {
"path": true
},
"packages": {
"@babel/eslint-parser>eslint-scope": true,
"@typescript-eslint/parser>@typescript-eslint/scope-manager": true,
"@typescript-eslint/parser>@typescript-eslint/types": true,
"@typescript-eslint/utils": true,
"eslint": true,
"eslint>eslint-utils": true
}
},
"@typescript-eslint/eslint-plugin>tsutils": {
"packages": {
"@sentry/utils>tslib": true,
"typescript": true
}
},
"@typescript-eslint/parser": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"packages": {
"@typescript-eslint/parser>@typescript-eslint/scope-manager": true,
"@typescript-eslint/parser>@typescript-eslint/typescript-estree": true,
"nock>debug": true,
"typescript": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"@typescript-eslint/parser>@typescript-eslint/scope-manager": {
"packages": {
"@typescript-eslint/parser>@typescript-eslint/scope-manager>@typescript-eslint/visitor-keys": true,
"@typescript-eslint/parser>@typescript-eslint/types": true
}
},
"@typescript-eslint/parser>@typescript-eslint/scope-manager>@typescript-eslint/visitor-keys": {
"packages": {
"eslint>eslint-visitor-keys": true
}
},
"@typescript-eslint/parser>@typescript-eslint/typescript-estree": {
"builtin": {
"fs": true,
"path": true
},
"globals": {
"console.log": true,
"console.warn": true,
"new": true,
"process": true,
"target": true
},
"packages": {
"@typescript-eslint/eslint-plugin>tsutils": true,
"@typescript-eslint/parser>@typescript-eslint/scope-manager>@typescript-eslint/visitor-keys": true,
"@typescript-eslint/parser>@typescript-eslint/types": true,
"eslint>is-glob": true,
"globby": true,
"nock>debug": true,
"semver": true,
"typescript": true
}
},
"addons-linter>postcss>picocolors": {
"builtin": {
"tty.isatty": true
},
"globals": {
"process.argv.includes": true,
"process.env": true,
"process.platform": true
}
},
"babelify": {
"builtin": {
"path.extname": true,
"path.resolve": true,
"stream.PassThrough": true,
"stream.Transform": true,
"util": true
},
"globals": {
"Buffer.concat": true
},
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"packages": {
"@babel/core": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"bify-module-groups": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"packages": {
"bify-module-groups>through2": true,
"pify": true,
"pump": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"bify-module-groups>through2": {
"builtin": {
"util.inherits": true
},
"globals": {
"process.nextTick": true
},
"packages": {
"bify-module-groups>through2>readable-stream": true
}
},
"bify-module-groups>through2>readable-stream": {
"builtin": {
"buffer.Buffer": true,
"events.EventEmitter": true,
"stream": true,
"util": true
},
"globals": {
"process.env.READABLE_STREAM": true,
"process.nextTick": true,
"process.stderr": true,
"process.stdout": true
},
"packages": {
"@storybook/api>util-deprecate": true,
"browserify>string_decoder": true,
"pumpify>inherits": true
}
},
"brfs": {
"builtin": {
"fs.createReadStream": true,
"fs.readdir": true,
"path": true
},
"packages": {
"brfs>quote-stream": true,
"brfs>resolve": true,
"brfs>static-module": true,
"brfs>through2": true
}
},
"brfs>quote-stream": {
"globals": {
"Buffer": true
},
"packages": {
"brfs>quote-stream>buffer-equal": true,
"brfs>quote-stream>through2": true
}
},
"brfs>quote-stream>buffer-equal": {
"builtin": {
"buffer.Buffer.isBuffer": true
}
},
"brfs>quote-stream>through2": {
"builtin": {
"util.inherits": true
},
"globals": {
"process.nextTick": true
},
"packages": {
"readable-stream": true,
"watchify>xtend": true
}
},
"brfs>resolve": {
"builtin": {
"fs.readFile": true,
"fs.readFileSync": true,
"fs.realpath": true,
"fs.realpathSync": true,
"fs.stat": true,
"fs.statSync": true,
"os.homedir": true,
"path.dirname": true,
"path.join": true,
"path.parse": true,
"path.relative": true,
"path.resolve": true
},
"globals": {
"process.env.HOME": true,
"process.env.HOMEDRIVE": true,
"process.env.HOMEPATH": true,
"process.env.LNAME": true,
"process.env.LOGNAME": true,
"process.env.USER": true,
"process.env.USERNAME": true,
"process.env.USERPROFILE": true,
"process.getuid": true,
"process.nextTick": true,
"process.platform": true,
"process.versions": true
},
"packages": {
"brfs>resolve>path-parse": true,
"depcheck>is-core-module": true
}
},
"brfs>resolve>path-parse": {
"globals": {
"process.platform": true
}
},
"brfs>static-module": {
"packages": {
"brfs>static-module>acorn-node": true,
"brfs>static-module>magic-string": true,
"brfs>static-module>merge-source-map": true,
"brfs>static-module>scope-analyzer": true,
"brfs>static-module>shallow-copy": true,
"brfs>static-module>static-eval": true,
"brfs>static-module>through2": true,
"browserify>concat-stream": true,
"browserify>duplexer2": true,
"enzyme>has": true,
"enzyme>object-inspect": true,
"jsdom>escodegen": true,
"nyc>convert-source-map": true,
"readable-stream": true
}
},
"brfs>static-module>acorn-node": {
"packages": {
"@storybook/react>acorn-walk": true,
"brfs>static-module>acorn-node>acorn": true,
"watchify>xtend": true
}
},
"brfs>static-module>acorn-node>acorn": {
"globals": {
"define": true
}
},
"brfs>static-module>magic-string": {
"globals": {
"Buffer": true,
"btoa": true,
"console.warn": true
},
"packages": {
"brfs>static-module>magic-string>sourcemap-codec": true
}
},
"brfs>static-module>magic-string>sourcemap-codec": {
"globals": {
"define": true
}
},
"brfs>static-module>merge-source-map": {
Build - refactor for bundle factoring and swappable runtime (#11080) * wip * build - breakout sentry-install bundle * deps - move new build sys deps to published versions * chore: lint fix * clean - remove unused file * clean - remove unsused package script * lavamoat - update build system policy * build - render html to all platforms * development - improve sourcemap debugger output * deps - update lavapack * lint - fix * deps - update lavapack for bugfix * deps - update lavapack for bugfix * deps - bump lavapack for line ending normalization * sourcemap explorer - disable boundary validation * ci - reset normal ci flow * build - re-enable minification on prod * build - remove noisy log about html dest * build - update terser and remove gulp wrapper for sourcemap fix * Revert "sourcemap explorer - disable boundary validation" This reverts commit 94112209ed880a6ebf4ee2ded411e59db6908162. * build - reenable react-devtools in dev mode * wip * build - breakout sentry-install bundle * deps - move new build sys deps to published versions * chore: lint fix * clean - remove unused file * clean - remove unsused package script * lavamoat - update build system policy * build - render html to all platforms * development - improve sourcemap debugger output * deps - update lavapack * lint - fix * deps - update lavapack for bugfix * deps - update lavapack for bugfix * deps - bump lavapack for line ending normalization * sourcemap explorer - disable boundary validation * ci - reset normal ci flow * build - re-enable minification on prod * build - remove noisy log about html dest * build - update terser and remove gulp wrapper for sourcemap fix * Revert "sourcemap explorer - disable boundary validation" This reverts commit 94112209ed880a6ebf4ee2ded411e59db6908162. * build - reenable react-devtools in dev mode * Updating lockfile * lint fix * build/dev - patch watchifys incompatible binary stats output * ui - add comment about conditional import * build - improve comment * Update development/stream-flat-map.js Co-authored-by: Brad Decker <git@braddecker.dev> * Outputting all bundle file links (metamaskbot) Co-authored-by: ryanml <ryanlanese@gmail.com> Co-authored-by: Brad Decker <git@braddecker.dev>
3 years ago
"packages": {
"brfs>static-module>merge-source-map>source-map": true
Build - refactor for bundle factoring and swappable runtime (#11080) * wip * build - breakout sentry-install bundle * deps - move new build sys deps to published versions * chore: lint fix * clean - remove unused file * clean - remove unsused package script * lavamoat - update build system policy * build - render html to all platforms * development - improve sourcemap debugger output * deps - update lavapack * lint - fix * deps - update lavapack for bugfix * deps - update lavapack for bugfix * deps - bump lavapack for line ending normalization * sourcemap explorer - disable boundary validation * ci - reset normal ci flow * build - re-enable minification on prod * build - remove noisy log about html dest * build - update terser and remove gulp wrapper for sourcemap fix * Revert "sourcemap explorer - disable boundary validation" This reverts commit 94112209ed880a6ebf4ee2ded411e59db6908162. * build - reenable react-devtools in dev mode * wip * build - breakout sentry-install bundle * deps - move new build sys deps to published versions * chore: lint fix * clean - remove unused file * clean - remove unsused package script * lavamoat - update build system policy * build - render html to all platforms * development - improve sourcemap debugger output * deps - update lavapack * lint - fix * deps - update lavapack for bugfix * deps - update lavapack for bugfix * deps - bump lavapack for line ending normalization * sourcemap explorer - disable boundary validation * ci - reset normal ci flow * build - re-enable minification on prod * build - remove noisy log about html dest * build - update terser and remove gulp wrapper for sourcemap fix * Revert "sourcemap explorer - disable boundary validation" This reverts commit 94112209ed880a6ebf4ee2ded411e59db6908162. * build - reenable react-devtools in dev mode * Updating lockfile * lint fix * build/dev - patch watchifys incompatible binary stats output * ui - add comment about conditional import * build - improve comment * Update development/stream-flat-map.js Co-authored-by: Brad Decker <git@braddecker.dev> * Outputting all bundle file links (metamaskbot) Co-authored-by: ryanml <ryanlanese@gmail.com> Co-authored-by: Brad Decker <git@braddecker.dev>
3 years ago
}
},
"brfs>static-module>scope-analyzer": {
"builtin": {
"assert.ok": true,
"assert.strictEqual": true
},
"packages": {
"brfs>static-module>scope-analyzer>array-from": true,
"brfs>static-module>scope-analyzer>dash-ast": true,
"brfs>static-module>scope-analyzer>es6-map": true,
"brfs>static-module>scope-analyzer>es6-set": true,
"brfs>static-module>scope-analyzer>estree-is-function": true,
"brfs>static-module>scope-analyzer>get-assigned-identifiers": true,
"resolve-url-loader>es6-iterator>es6-symbol": true
}
},
"brfs>static-module>scope-analyzer>dash-ast": {
"builtin": {
"assert": true
}
},
"brfs>static-module>scope-analyzer>es6-map": {
"packages": {
"gulp-sourcemaps>debug-fabulous>memoizee>event-emitter": true,
"resolve-url-loader>es6-iterator": true,
"resolve-url-loader>es6-iterator>d": true,
"resolve-url-loader>es6-iterator>es5-ext": true,
"resolve-url-loader>es6-iterator>es6-symbol": true
}
},
"brfs>static-module>scope-analyzer>es6-set": {
"packages": {
"gulp-sourcemaps>debug-fabulous>memoizee>event-emitter": true,
"resolve-url-loader>es6-iterator": true,
"resolve-url-loader>es6-iterator>d": true,
"resolve-url-loader>es6-iterator>es5-ext": true,
"resolve-url-loader>es6-iterator>es6-symbol": true
}
},
"brfs>static-module>scope-analyzer>get-assigned-identifiers": {
"builtin": {
"assert.equal": true
}
},
"brfs>static-module>static-eval": {
"packages": {
"jsdom>escodegen": true
}
},
"brfs>static-module>through2": {
"builtin": {
"util.inherits": true
},
"globals": {
"process.nextTick": true
},
"packages": {
"readable-stream": true,
"watchify>xtend": true
}
},
"brfs>through2": {
"builtin": {
"util.inherits": true
},
"globals": {
"process.nextTick": true
},
"packages": {
"readable-stream": true,
"watchify>xtend": true
}
},
"browserify": {
"builtin": {
"events.EventEmitter": true,
"fs.realpath": true,
"path.dirname": true,
"path.join": true,
"path.relative": true,
"path.resolve": true,
"path.sep": true
},
"globals": {
"__dirname": true,
"process.cwd": true,
"process.nextTick": true,
"process.platform": true
},
"packages": {
"brfs>resolve": true,
"browserify>browser-pack": true,
"browserify>browser-resolve": true,
"browserify>cached-path-relative": true,
"browserify>concat-stream": true,
"browserify>deps-sort": true,
"browserify>insert-module-globals": true,
"browserify>module-deps": true,
"browserify>read-only-stream": true,
"browserify>shasum": true,
"browserify>syntax-error": true,
"browserify>through2": true,
"enzyme>has": true,
"labeled-stream-splicer": true,
"lavamoat>htmlescape": true,
"pumpify>inherits": true,
"watchify>defined": true,
"watchify>xtend": true
}
},
"browserify>JSONStream": {
"globals": {
"Buffer": true
},
"packages": {
"browserify>JSONStream>jsonparse": true,
"debounce-stream>through": true
}
},
"browserify>JSONStream>jsonparse": {
"globals": {
"Buffer": true
}
},
"browserify>browser-pack": {
"builtin": {
"fs.readFileSync": true,
"path.join": true,
"path.relative": true
},
"globals": {
"__dirname": true,
"process.cwd": true
},
"packages": {
"@lavamoat/lavapack>combine-source-map": true,
"@lavamoat/lavapack>umd": true,
"browserify>JSONStream": true,
"browserify>browser-pack>through2": true,
"ethereumjs-wallet>safe-buffer": true,
"watchify>defined": true
}
},
"browserify>browser-pack>through2": {
"builtin": {
"util.inherits": true
},
"globals": {
"process.nextTick": true
},
"packages": {
"readable-stream": true,
"watchify>xtend": true
}
},
"browserify>browser-resolve": {
"builtin": {
"fs.readFile": true,
"fs.readFileSync": true,
"path": true
},
"globals": {
"__dirname": true,
"process.platform": true
},
"packages": {
"browserify>browser-resolve>resolve": true
}
},
"browserify>browser-resolve>resolve": {
"builtin": {
"fs.readFile": true,
"fs.readFileSync": true,
"fs.stat": true,
"fs.statSync": true,
"path": true
},
"globals": {
"process.nextTick": true,
"process.platform": true
}
},
"browserify>cached-path-relative": {
"builtin": {
"path": true
},
"globals": {
"process.cwd": true
}
},
"browserify>concat-stream": {
"globals": {
"Buffer.concat": true,
"Buffer.isBuffer": true
},
"packages": {
"browserify>concat-stream>typedarray": true,
"pumpify>inherits": true,
"readable-stream": true,
"terser>source-map-support>buffer-from": true
}
},
"browserify>deps-sort": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"packages": {
"browserify>deps-sort>through2": true,
"watchify>browserify>shasum-object": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"browserify>deps-sort>through2": {
"builtin": {
"util.inherits": true
},
"globals": {
"process.nextTick": true
},
"packages": {
"readable-stream": true,
"watchify>xtend": true
}
},
"browserify>duplexer2": {
"packages": {
"readable-stream": true
}
},
"browserify>insert-module-globals": {
"builtin": {
"path.dirname": true,
"path.isAbsolute": true,
"path.relative": true,
"path.sep": true
},
"globals": {
"Buffer.concat": true,
"Buffer.isBuffer": true
},
"packages": {
"@lavamoat/lavapack>combine-source-map": true,
"brfs>static-module>acorn-node": true,
"browserify>insert-module-globals>through2": true,
"browserify>insert-module-globals>undeclared-identifiers": true,
"gulp-watch>path-is-absolute": true,
"watchify>xtend": true
}
},
"browserify>insert-module-globals>through2": {
"builtin": {
"util.inherits": true
},
"globals": {
"process.nextTick": true
},
"packages": {
"readable-stream": true,
"watchify>xtend": true
}
},
"browserify>insert-module-globals>undeclared-identifiers": {
"packages": {
"brfs>static-module>acorn-node": true,
"brfs>static-module>scope-analyzer>get-assigned-identifiers": true,
"watchify>xtend": true
}
},
"browserify>module-deps": {
"builtin": {
"fs.createReadStream": true,
"fs.readFile": true,
"path.delimiter": true,
"path.dirname": true,
"path.join": true,
"path.resolve": true
},
"globals": {
"process.cwd": true,
"process.env.NODE_PATH": true,
"process.nextTick": true,
"process.platform": true,
"setTimeout": true,
"tr": true
},
"packages": {
"brfs>resolve": true,
"browserify>cached-path-relative": true,
"browserify>concat-stream": true,
"browserify>duplexer2": true,
"browserify>module-deps>detective": true,
"browserify>module-deps>stream-combiner2": true,
"browserify>module-deps>through2": true,
"browserify>parents": true,
"lavamoat-browserify>browser-resolve": true,
"loose-envify": true,
"pumpify>inherits": true,
"readable-stream": true,
"watchify>defined": true,
"watchify>xtend": true
}
},
"browserify>module-deps>detective": {
"packages": {
"brfs>static-module>acorn-node": true,
"watchify>defined": true
}
},
"browserify>module-deps>stream-combiner2": {
"packages": {
"browserify>duplexer2": true,
"readable-stream": true
}
},
"browserify>module-deps>through2": {
"builtin": {
"util.inherits": true
},
"globals": {
"process.nextTick": true
},
"packages": {
"readable-stream": true,
"watchify>xtend": true
}
},
"browserify>parents": {
"globals": {
"process.cwd": true,
"process.platform": true
},
"packages": {
"browserify>parents>path-platform": true
}
},
"browserify>parents>path-platform": {
"builtin": {
"path": true,
"util.isObject": true,
"util.isString": true
},
"globals": {
"process.cwd": true,
"process.env": true,
"process.platform": true
}
},
"browserify>read-only-stream": {
"packages": {
"readable-stream": true
}
},
"browserify>shasum": {
"builtin": {
"buffer.Buffer.isBuffer": true,
"crypto.createHash": true
},
"packages": {
"browserify>shasum>json-stable-stringify": true
}
},
"browserify>shasum>json-stable-stringify": {
"packages": {
"lavamoat>json-stable-stringify>jsonify": true
}
},
"browserify>string_decoder": {
"packages": {
"ethereumjs-wallet>safe-buffer": true
}
},
"browserify>syntax-error": {
"packages": {
"brfs>static-module>acorn-node": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"browserify>through2": {
"builtin": {
"util.inherits": true
},
"globals": {
"process.nextTick": true
},
"packages": {
"readable-stream": true,
"watchify>xtend": true
}
},
"chalk": {
"packages": {
"chalk>ansi-styles": true,
"sinon>supports-color": true
}
},
"chalk>ansi-styles": {
"packages": {
"chalk>ansi-styles>color-convert": true
}
},
"chalk>ansi-styles>color-convert": {
"packages": {
"jest-canvas-mock>moo-color>color-name": true
}
},
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
2 years ago
"chokidar": {
"builtin": {
"events.EventEmitter": true,
"fs.close": true,
"fs.lstat": true,
"fs.open": true,
"fs.readdir": true,
"fs.realpath": true,
"fs.stat": true,
"fs.unwatchFile": true,
"fs.watch": true,
"fs.watchFile": true,
"os.type": true,
"path.basename": true,
"path.dirname": true,
"path.extname": true,
"path.isAbsolute": true,
"path.join": true,
"path.normalize": true,
"path.relative": true,
"path.resolve": true,
"path.sep": true,
"util.promisify": true
},
"globals": {
"clearTimeout": true,
"console.error": true,
"process.env.CHOKIDAR_INTERVAL": true,
"process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR": true,
"process.env.CHOKIDAR_USEPOLLING": true,
"process.nextTick": true,
"process.platform": true,
"process.version.match": true,
"setTimeout": true
},
"packages": {
"chokidar>braces": true,
"chokidar>glob-parent": true,
"chokidar>is-binary-path": true,
"chokidar>normalize-path": true,
"depcheck>readdirp": true,
"eslint>is-glob": true,
"watchify>anymatch": true
}
},
"chokidar>braces": {
"packages": {
"chokidar>braces>fill-range": true
}
},
"chokidar>braces>fill-range": {
"builtin": {
"util.inspect": true
},
"packages": {
"chokidar>braces>fill-range>to-regex-range": true
}
},
"chokidar>braces>fill-range>to-regex-range": {
"packages": {
"chokidar>braces>fill-range>to-regex-range>is-number": true
}
},
"chokidar>glob-parent": {
"builtin": {
"os.platform": true,
"path.posix.dirname": true
},
"packages": {
"eslint>is-glob": true
}
},
"chokidar>is-binary-path": {
"builtin": {
"path.extname": true
},
"packages": {
"chokidar>is-binary-path>binary-extensions": true
}
},
"cross-spawn": {
"builtin": {
"child_process.spawn": true,
"child_process.spawnSync": true,
"fs.closeSync": true,
"fs.openSync": true,
"fs.readSync": true,
"path.delimiter": true,
"path.normalize": true,
"path.resolve": true
},
"globals": {
"Buffer.alloc": true,
"process.chdir": true,
"process.cwd": true,
"process.env": true,
"process.platform": true
},
"packages": {
"cross-spawn>path-key": true,
"cross-spawn>shebang-command": true,
"cross-spawn>which": true
}
},
"cross-spawn>path-key": {
"globals": {
"process.env": true,
"process.platform": true
}
},
"cross-spawn>shebang-command": {
"packages": {
"cross-spawn>shebang-command>shebang-regex": true
}
},
"cross-spawn>which": {
"builtin": {
"path.join": true
},
"globals": {
"process.cwd": true,
"process.env.OSTYPE": true,
"process.env.PATH": true,
"process.env.PATHEXT": true,
"process.platform": true
},
"packages": {
"mocha>which>isexe": true
}
},
"debounce-stream>duplexer": {
"builtin": {
"stream": true
}
},
"debounce-stream>through": {
"builtin": {
"stream": true
},
"globals": {
"process.nextTick": true
}
},
"del": {
"builtin": {
"path.resolve": true
},
"packages": {
"del>globby": true,
"del>is-path-cwd": true,
"del>is-path-in-cwd": true,
"del>p-map": true,
"del>pify": true,
"del>rimraf": true
}
},
"del>globby": {
"packages": {
"del>globby>array-union": true,
"del>globby>pify": true,
"del>globby>pinkie-promise": true,
"nyc>glob": true,
"react>object-assign": true
}
},
"del>globby>array-union": {
"packages": {
"del>globby>array-union>array-uniq": true
}
},
"del>globby>pinkie-promise": {
"packages": {
"del>globby>pinkie-promise>pinkie": true
}
},
"del>globby>pinkie-promise>pinkie": {
"globals": {
"process": true,
"setImmediate": true,
"setTimeout": true
}
},
"del>is-path-cwd": {
"builtin": {
"path.resolve": true
},
"globals": {
"process.cwd": true
}
},
"del>is-path-in-cwd": {
"globals": {
"process.cwd": true
},
"packages": {
"del>is-path-in-cwd>is-path-inside": true
}
},
"del>is-path-in-cwd>is-path-inside": {
"builtin": {
"path.resolve": true
},
"packages": {
"serve-handler>path-is-inside": true
}
},
"del>rimraf": {
"builtin": {
"assert": true,
"fs": true,
"path.join": true
},
"globals": {
"process.platform": true,
"setTimeout": true
},
"packages": {
"nyc>glob": true
}
},
"depcheck>@babel/traverse": {
"globals": {
"console.log": true,
"console.trace": true
},
"packages": {
"@babel/code-frame": true,
"@babel/core>@babel/generator": true,
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
2 years ago
"@babel/core>@babel/parser": true,
"@babel/core>@babel/types": true,
"babel/preset-env>b@babel/types": true,
"depcheck>@babel/traverse>@babel/helper-environment-visitor": true,
"depcheck>@babel/traverse>@babel/helper-function-name": true,
"depcheck>@babel/traverse>@babel/helper-hoist-variables": true,
"depcheck>@babel/traverse>@babel/helper-split-export-declaration": true,
"depcheck>@babel/traverse>globals": true,
"nock>debug": true
}
},
"depcheck>@babel/traverse>@babel/helper-function-name": {
"packages": {
"@babel/core>@babel/template": true,
"@babel/core>@babel/types": true
}
},
"depcheck>@babel/traverse>@babel/helper-hoist-variables": {
"packages": {
"@babel/core>@babel/types": true
}
},
"depcheck>@babel/traverse>@babel/helper-split-export-declaration": {
"packages": {
"@babel/core>@babel/types": true
}
},
"depcheck>cosmiconfig>parse-json": {
"packages": {
"@babel/code-frame": true,
"@storybook/react>webpack>json-parse-even-better-errors": true,
"depcheck>cosmiconfig>parse-json>error-ex": true,
"depcheck>cosmiconfig>parse-json>lines-and-columns": true
}
},
"depcheck>cosmiconfig>parse-json>error-ex": {
"builtin": {
"util.inherits": true
},
"packages": {
"depcheck>cosmiconfig>parse-json>error-ex>is-arrayish": true
}
},
"depcheck>cosmiconfig>yaml": {
"globals": {
"Buffer": true,
"YAML_SILENCE_DEPRECATION_WARNINGS": true,
"YAML_SILENCE_WARNINGS": true,
"atob": true,
"btoa": true,
"console.warn": true,
"process": true
}
},
"depcheck>is-core-module": {
"globals": {
"process.versions": true
},
"packages": {
"enzyme>has": true
}
},
"depcheck>json5": {
"globals": {
"console.warn": true
}
},
"depcheck>readdirp": {
"builtin": {
"fs": true,
"path.join": true,
"path.relative": true,
"path.resolve": true,
"path.sep": true,
"stream.Readable": true,
"util.promisify": true
},
"globals": {
"process.platform": true,
"process.versions.node.split": true
},
"packages": {
"depcheck>readdirp>picomatch": true
}
},
"depcheck>readdirp>picomatch": {
"builtin": {
"path.basename": true,
"path.sep": true
},
"globals": {
"process.platform": true,
"process.version.slice": true
}
},
"duplexify": {
"globals": {
"Buffer": true,
"process.nextTick": true
},
"packages": {
"duplexify>readable-stream": true,
"duplexify>stream-shift": true,
"end-of-stream": true,
"pumpify>inherits": true
}
},
"duplexify>readable-stream": {
"builtin": {
"buffer.Buffer": true,
"events.EventEmitter": true,
"stream": true,
"util": true
},
"globals": {
"process.env.READABLE_STREAM": true,
"process.nextTick": true,
"process.stderr": true,
"process.stdout": true
},
"packages": {
"@storybook/api>util-deprecate": true,
"browserify>string_decoder": true,
"pumpify>inherits": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"end-of-stream": {
"globals": {
"process.nextTick": true
},
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"packages": {
"pump>once": true
}
},
"enzyme>array.prototype.flat": {
"packages": {
"enzyme>array.prototype.flat>es-shim-unscopables": true,
"globalthis>define-properties": true,
"string.prototype.matchall>call-bind": true,
"string.prototype.matchall>es-abstract": true
}
},
"enzyme>array.prototype.flat>es-shim-unscopables": {
"packages": {
"enzyme>has": true
}
},
"enzyme>has": {
"packages": {
"mocha>object.assign>function-bind": true
}
},
"enzyme>is-callable": {
"globals": {
"document": true
}
},
"enzyme>is-regex": {
"packages": {
"koa>is-generator-function>has-tostringtag": true,
"string.prototype.matchall>call-bind": true
}
},
"enzyme>is-string": {
"packages": {
"koa>is-generator-function>has-tostringtag": true
}
},
"enzyme>object-inspect": {
"builtin": {
"util.inspect": true
},
"globals": {
"HTMLElement": true,
"WeakRef": true
}
},
"enzyme>object.assign": {
"packages": {
"globalthis>define-properties": true,
"mocha>object.assign>object-keys": true,
"string.prototype.matchall>call-bind": true,
"string.prototype.matchall>has-symbols": true
}
},
"enzyme>object.entries": {
"packages": {
"globalthis>define-properties": true,
"string.prototype.matchall>call-bind": true,
"string.prototype.matchall>es-abstract": true
}
},
"eslint": {
"builtin": {
"assert": true,
"fs.existsSync": true,
"fs.lstatSync": true,
"fs.readFileSync": true,
"fs.readdirSync": true,
"fs.statSync": true,
"fs.unlinkSync": true,
"fs.writeFile": true,
"fs.writeFileSync": true,
"path.extname": true,
"path.isAbsolute": true,
"path.join": true,
"path.normalize": true,
"path.relative": true,
"path.resolve": true,
"path.sep": true,
"util.format": true,
"util.inspect": true,
"util.promisify": true
},
"globals": {
"__dirname": true,
"console.log": true,
"describe": true,
"it": true,
"process": true
},
"packages": {
"eslint>@eslint/eslintrc": true,
"eslint>@humanwhocodes/config-array": true,
"eslint>ajv": true,
"eslint>doctrine": true,
"eslint>escape-string-regexp": true,
"eslint>eslint-scope": true,
"eslint>eslint-utils": true,
"eslint>eslint-visitor-keys": true,
"eslint>espree": true,
"eslint>esquery": true,
"eslint>esutils": true,
"eslint>fast-deep-equal": true,
"eslint>file-entry-cache": true,
"eslint>functional-red-black-tree": true,
"eslint>glob-parent": true,
"eslint>globals": true,
"eslint>imurmurhash": true,
"eslint>is-glob": true,
"eslint>json-stable-stringify-without-jsonify": true,
"eslint>levn": true,
"eslint>lodash.merge": true,
"eslint>minimatch": true,
"eslint>natural-compare": true,
"eslint>regexpp": true,
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
2 years ago
"globby>ignore": true,
"nock>debug": true
}
},
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"eslint-config-prettier": {
"globals": {
"process.env.ESLINT_CONFIG_PRETTIER_NO_DEPRECATED": true
}
},
"eslint-import-resolver-node": {
"builtin": {
"path.dirname": true,
"path.join": true,
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"path.resolve": true
},
"packages": {
"brfs>resolve": true,
"eslint-import-resolver-node>debug": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"eslint-import-resolver-node>debug": {
"builtin": {
"tty.isatty": true,
"util": true
},
"globals": {
"console": true,
"document": true,
"localStorage": true,
"navigator": true,
"process": true
},
"packages": {
"gulp-livereload>debug>ms": true,
"sinon>supports-color": true
}
},
"eslint-import-resolver-typescript": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"builtin": {
"path": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
},
"globals": {
"console.warn": true,
"process.cwd": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
},
"packages": {
"brfs>resolve": true,
"eslint-plugin-import>tsconfig-paths": true,
"eslint>is-glob": true,
"nock>debug": true,
"nyc>glob": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"eslint-plugin-import": {
"builtin": {
"fs": true,
"path": true,
"vm": true
},
"globals": {
"process.cwd": true,
"process.env": true
},
"packages": {
"depcheck>is-core-module": true,
"enzyme>array.prototype.flat": true,
"enzyme>has": true,
"enzyme>object.values": true,
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"eslint": true,
"eslint-plugin-import>debug": true,
"eslint-plugin-import>doctrine": true,
"eslint-plugin-import>eslint-module-utils": true,
"eslint-plugin-import>tsconfig-paths": true,
"eslint-plugin-react>array-includes": true,
"eslint>is-glob": true,
"eslint>minimatch": true,
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"typescript": true
}
},
"eslint-plugin-import>debug": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"builtin": {
"fs.SyncWriteStream": true,
"net.Socket": true,
"tty.WriteStream": true,
"tty.isatty": true,
"util": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
},
"globals": {
"chrome": true,
"console": true,
"document": true,
"localStorage": true,
"navigator": true,
"process": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
},
"packages": {
"eslint-plugin-import>debug>ms": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"eslint-plugin-import>doctrine": {
"builtin": {
"assert": true
},
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"packages": {
"eslint>esutils": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"eslint-plugin-import>eslint-module-utils": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"builtin": {
"crypto.createHash": true,
"fs.existsSync": true,
"fs.readFileSync": true,
"fs.readdirSync": true,
"module": true,
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"path.dirname": true,
"path.extname": true,
"path.join": true,
"path.parse": true,
"path.resolve": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
},
"globals": {
"__dirname.toUpperCase": true,
"console.warn": true,
"process.cwd": true,
"process.hrtime": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
},
"packages": {
"@babel/eslint-parser": true,
"eslint-import-resolver-node": true,
"eslint-plugin-import>eslint-module-utils>debug": true,
"eslint-plugin-import>eslint-module-utils>find-up": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"eslint-plugin-import>eslint-module-utils>debug": {
"builtin": {
"tty.isatty": true,
"util": true
},
"globals": {
"console": true,
"document": true,
"localStorage": true,
"navigator": true,
"process": true
},
"packages": {
"gulp-livereload>debug>ms": true,
"sinon>supports-color": true
}
},
"eslint-plugin-import>eslint-module-utils>find-up": {
"builtin": {
"path.dirname": true,
"path.join": true,
"path.parse": true,
"path.resolve": true
},
"packages": {
"eslint-plugin-import>eslint-module-utils>find-up>locate-path": true
}
},
"eslint-plugin-import>eslint-module-utils>find-up>locate-path": {
"builtin": {
"path.resolve": true
},
"globals": {
"process.cwd": true
},
"packages": {
"eslint-plugin-import>eslint-module-utils>find-up>locate-path>p-locate": true,
"mocha>find-up>locate-path>path-exists": true
}
},
"eslint-plugin-import>eslint-module-utils>find-up>locate-path>p-locate": {
"packages": {
"eslint-plugin-import>eslint-module-utils>find-up>locate-path>p-locate>p-limit": true
}
},
"eslint-plugin-import>eslint-module-utils>find-up>locate-path>p-locate>p-limit": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"packages": {
"eslint-plugin-import>eslint-module-utils>find-up>locate-path>p-locate>p-limit>p-try": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"eslint-plugin-import>tsconfig-paths": {
"builtin": {
"fs.existsSync": true,
"fs.lstatSync": true,
"fs.readFile": true,
"fs.readFileSync": true,
"fs.stat": true,
"fs.statSync": true,
"module._resolveFilename": true,
"module.builtinModules": true,
"path.dirname": true,
"path.isAbsolute": true,
"path.join": true,
"path.resolve": true
},
"globals": {
"console.warn": true,
"process.argv.slice": true,
"process.cwd": true,
"process.env": true
},
"packages": {
"eslint-plugin-import>tsconfig-paths>json5": true,
"eslint-plugin-import>tsconfig-paths>strip-bom": true,
"patch-package>minimist": true
}
},
"eslint-plugin-import>tsconfig-paths>json5": {
"globals": {
"console.warn": true
}
},
"eslint-plugin-jest": {
"builtin": {
"fs.readdirSync": true,
"path.join": true,
"path.parse": true
},
"globals": {
"__dirname": true
},
"packages": {
"@typescript-eslint/eslint-plugin": true,
"eslint-plugin-jest>@typescript-eslint/utils": true
}
},
"eslint-plugin-jest>@typescript-eslint/experimental-utils": {
"builtin": {
"path": true
},
"packages": {
"@typescript-eslint/parser>@typescript-eslint/scope-manager": true,
"@typescript-eslint/parser>@typescript-eslint/types": true,
"eslint": true,
"eslint-plugin-jest>@typescript-eslint/experimental-utils>@typescript-eslint/types": true,
"eslint-plugin-jest>@typescript-eslint/experimental-utils>eslint-utils": true,
"eslint>eslint-scope": true,
"eslint>eslint-utils": true
}
},
"eslint-plugin-jest>@typescript-eslint/experimental-utils>eslint-utils": {
"packages": {
"eslint-plugin-jest>@typescript-eslint/experimental-utils>eslint-utils>eslint-visitor-keys": true
}
},
"eslint-plugin-jest>@typescript-eslint/utils": {
"builtin": {
"path": true
},
"packages": {
"@babel/eslint-parser>eslint-scope": true,
"@typescript-eslint/parser>@typescript-eslint/scope-manager": true,
"@typescript-eslint/parser>@typescript-eslint/types": true,
"eslint": true,
"eslint-plugin-jest>@typescript-eslint/experimental-utils>@typescript-eslint/types": true,
"eslint-plugin-jest>@typescript-eslint/utils>@typescript-eslint/scope-manager": true,
"eslint-plugin-jest>@typescript-eslint/utils>@typescript-eslint/types": true,
"eslint-plugin-jest>@typescript-eslint/utils>eslint-utils": true,
"eslint>eslint-scope": true,
"eslint>eslint-utils": true
}
},
"eslint-plugin-jest>@typescript-eslint/utils>@typescript-eslint/scope-manager": {
"builtin": {
"path": true
},
"packages": {
"eslint-plugin-jest>@typescript-eslint/utils>@typescript-eslint/scope-manager>@typescript-eslint/visitor-keys": true,
"eslint-plugin-jest>@typescript-eslint/utils>@typescript-eslint/types": true
}
},
"eslint-plugin-jest>@typescript-eslint/utils>@typescript-eslint/scope-manager>@typescript-eslint/visitor-keys": {
"builtin": {
"path": true
},
"packages": {
"eslint>eslint-visitor-keys": true
}
},
"eslint-plugin-jest>@typescript-eslint/utils>eslint-utils": {
"packages": {
"eslint-plugin-jest>@typescript-eslint/utils>eslint-utils>eslint-visitor-keys": true
}
},
"eslint-plugin-jsdoc": {
"packages": {
"eslint": true,
"eslint-plugin-jsdoc>@es-joy/jsdoccomment": true,
"eslint-plugin-jsdoc>comment-parser": true,
"eslint-plugin-jsdoc>escape-string-regexp": true,
"eslint-plugin-jsdoc>spdx-expression-parse": true,
"eslint>esquery": true,
"nock>debug": true,
"semver": true
}
},
"eslint-plugin-jsdoc>@es-joy/jsdoccomment": {
"packages": {
"eslint-plugin-jsdoc>@es-joy/jsdoccomment>jsdoc-type-pratt-parser": true,
"eslint-plugin-jsdoc>comment-parser": true,
"eslint>esquery": true
}
},
"eslint-plugin-jsdoc>@es-joy/jsdoccomment>jsdoc-type-pratt-parser": {
"globals": {
"define": true
}
},
"eslint-plugin-jsdoc>spdx-expression-parse": {
"packages": {
"eslint-plugin-jsdoc>spdx-expression-parse>spdx-exceptions": true,
"eslint-plugin-jsdoc>spdx-expression-parse>spdx-license-ids": true
}
},
"eslint-plugin-node": {
"builtin": {
"fs.readFileSync": true,
"fs.readdirSync": true,
"fs.statSync": true,
"path.basename": true,
"path.dirname": true,
"path.extname": true,
"path.isAbsolute": true,
"path.join": true,
"path.relative": true,
"path.resolve": true,
"path.sep": true
},
"globals": {
"process.cwd": true
},
"packages": {
"brfs>resolve": true,
"eslint-plugin-node>eslint-plugin-es": true,
"eslint-plugin-node>eslint-utils": true,
"eslint-plugin-node>semver": true,
"eslint>minimatch": true,
"globby>ignore": true
}
},
"eslint-plugin-node>eslint-plugin-es": {
"packages": {
"eslint-plugin-node>eslint-plugin-es>eslint-utils": true,
"eslint>regexpp": true
}
},
"eslint-plugin-node>eslint-plugin-es>eslint-utils": {
"packages": {
"eslint-plugin-node>eslint-plugin-es>eslint-utils>eslint-visitor-keys": true
}
},
"eslint-plugin-node>eslint-utils": {
"packages": {
"eslint-plugin-node>eslint-utils>eslint-visitor-keys": true
}
},
"eslint-plugin-node>semver": {
"globals": {
"console": true,
"process": true
}
},
"eslint-plugin-prettier": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"packages": {
"eslint-plugin-prettier>prettier-linter-helpers": true,
"prettier": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"eslint-plugin-prettier>prettier-linter-helpers": {
"packages": {
"eslint-plugin-prettier>prettier-linter-helpers>fast-diff": true
}
},
"eslint-plugin-react": {
"builtin": {
"fs.statSync": true,
"path.dirname": true,
"path.extname": true
},
"globals": {
"console.error": true,
"console.log": true,
"process.argv.join": true,
"process.cwd": true
},
"packages": {
"enzyme>object.entries": true,
"enzyme>object.values": true,
"eslint": true,
"eslint-plugin-react>array-includes": true,
"eslint-plugin-react>array.prototype.flatmap": true,
"eslint-plugin-react>doctrine": true,
"eslint-plugin-react>estraverse": true,
"eslint-plugin-react>jsx-ast-utils": true,
"eslint-plugin-react>object.hasown": true,
"eslint-plugin-react>resolve": true,
"eslint-plugin-react>semver": true,
"eslint>minimatch": true,
"lavamoat>object.fromentries": true,
"prop-types": true,
"string.prototype.matchall": true
}
},
"eslint-plugin-react-hooks": {
"globals": {
"process.env.NODE_ENV": true
}
},
"eslint-plugin-react>array-includes": {
"packages": {
"enzyme>is-string": true,
"globalthis>define-properties": true,
"string.prototype.matchall>call-bind": true,
"string.prototype.matchall>es-abstract": true,
"string.prototype.matchall>get-intrinsic": true
}
},
"eslint-plugin-react>array.prototype.flatmap": {
"packages": {
"enzyme>array.prototype.flat>es-shim-unscopables": true,
"globalthis>define-properties": true,
"string.prototype.matchall>call-bind": true,
"string.prototype.matchall>es-abstract": true
}
},
"eslint-plugin-react>doctrine": {
"builtin": {
"assert": true
},
"packages": {
"eslint>esutils": true
}
},
"eslint-plugin-react>jsx-ast-utils": {
"globals": {
"console.error": true
},
"packages": {
"enzyme>object.assign": true
}
},
"eslint-plugin-react>object.hasown": {
"packages": {
"string.prototype.matchall>es-abstract": true
}
},
"eslint-plugin-react>resolve": {
"builtin": {
"fs.readFile": true,
"fs.readFileSync": true,
"fs.realpath": true,
"fs.realpathSync": true,
"fs.stat": true,
"fs.statSync": true,
"os.homedir": true,
"path.dirname": true,
"path.join": true,
"path.parse": true,
"path.relative": true,
"path.resolve": true
},
"globals": {
"process.env.HOME": true,
"process.env.HOMEDRIVE": true,
"process.env.HOMEPATH": true,
"process.env.LNAME": true,
"process.env.LOGNAME": true,
"process.env.USER": true,
"process.env.USERNAME": true,
"process.env.USERPROFILE": true,
"process.getuid": true,
"process.nextTick": true,
"process.platform": true
},
"packages": {
"brfs>resolve>path-parse": true,
"depcheck>is-core-module": true
}
},
"eslint-plugin-react>semver": {
"globals": {
"console": true,
"process": true
}
},
"eslint>@eslint/eslintrc": {
"builtin": {
"assert": true,
"fs": true,
"module": true,
"os": true,
"path": true,
"url": true,
"util": true
},
"globals": {
"process.platform": true
},
"packages": {
"$root$": true,
"@babel/eslint-parser": true,
"@babel/eslint-plugin": true,
"@metamask/eslint-config": true,
"@metamask/eslint-config-nodejs": true,
"@metamask/eslint-config-typescript": true,
"@typescript-eslint/eslint-plugin": true,
"eslint": true,
"eslint-config-prettier": true,
"eslint-plugin-import": true,
"eslint-plugin-jsdoc": true,
"eslint-plugin-node": true,
"eslint-plugin-prettier": true,
"eslint-plugin-react": true,
"eslint-plugin-react-hooks": true,
"eslint>ajv": true,
"eslint>globals": true,
"eslint>minimatch": true,
"eslint>strip-json-comments": true,
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
2 years ago
"globby>ignore": true,
"nock>debug": true
}
},
"eslint>@humanwhocodes/config-array": {
"builtin": {
"path": true
},
"packages": {
"eslint>@humanwhocodes/config-array>@humanwhocodes/object-schema": true,
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
2 years ago
"eslint>minimatch": true,
"nock>debug": true
}
},
"eslint>ajv": {
"globals": {
"console": true
},
"packages": {
"eslint>ajv>fast-json-stable-stringify": true,
"eslint>ajv>json-schema-traverse": true,
"eslint>ajv>uri-js": true,
"eslint>fast-deep-equal": true
}
},
"eslint>ajv>uri-js": {
"globals": {
"define": true
}
},
"eslint>doctrine": {
"builtin": {
"assert": true
},
"packages": {
"eslint>esutils": true
}
},
"eslint>eslint-scope": {
"builtin": {
"assert": true
},
"packages": {
"eslint-plugin-react>estraverse": true,
"eslint>eslint-scope>esrecurse": true
}
},
"eslint>eslint-scope>esrecurse": {
"packages": {
"eslint-plugin-react>estraverse": true
}
},
"eslint>eslint-utils": {
"packages": {
"eslint>eslint-utils>eslint-visitor-keys": true
}
},
"eslint>espree": {
"packages": {
"eslint>eslint-visitor-keys": true,
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
2 years ago
"eslint>espree>acorn-jsx": true,
"terser>acorn": true
}
},
"eslint>espree>acorn-jsx": {
"packages": {
"eslint>espree>acorn-jsx>acorn": true
}
},
"eslint>espree>acorn-jsx>acorn": {
"globals": {
"define": true
}
},
"eslint>esquery": {
"globals": {
"define": true
}
},
"eslint>file-entry-cache": {
"builtin": {
"crypto.createHash": true,
"fs.readFileSync": true,
"fs.statSync": true,
"path.basename": true,
"path.dirname": true
},
"packages": {
"eslint>file-entry-cache>flat-cache": true
}
},
"eslint>file-entry-cache>flat-cache": {
"builtin": {
"fs.existsSync": true,
"fs.mkdirSync": true,
"fs.readFileSync": true,
"fs.writeFileSync": true,
"path.basename": true,
"path.dirname": true,
"path.resolve": true
},
"globals": {
"__dirname": true
},
"packages": {
"eslint>file-entry-cache>flat-cache>flatted": true,
"nyc>rimraf": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"eslint>glob-parent": {
"builtin": {
"os.platform": true,
"path.posix.dirname": true
},
"packages": {
"eslint>is-glob": true
}
},
"eslint>import-fresh": {
"builtin": {
"path.dirname": true
},
"globals": {
"__filename": true
},
"packages": {
"eslint>import-fresh>parent-module": true,
"eslint>import-fresh>resolve-from": true
}
},
"eslint>import-fresh>parent-module": {
"packages": {
"eslint>import-fresh>parent-module>callsites": true
}
},
"eslint>import-fresh>resolve-from": {
"builtin": {
"fs.realpathSync": true,
"module._nodeModulePaths": true,
"module._resolveFilename": true,
"path.join": true,
"path.resolve": true
}
},
"eslint>is-glob": {
"packages": {
"eslint>is-glob>is-extglob": true
}
},
"eslint>levn": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"packages": {
"eslint>levn>prelude-ls": true,
"eslint>levn>type-check": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"eslint>levn>type-check": {
"packages": {
"eslint>levn>prelude-ls": true
}
},
"eslint>minimatch": {
"builtin": {
"path": true
},
"globals": {
"console": true
},
"packages": {
"mocha>minimatch>brace-expansion": true
}
},
"eslint>strip-ansi": {
"packages": {
"eslint>strip-ansi>ansi-regex": true
}
},
"ethereumjs-wallet>safe-buffer": {
"builtin": {
"buffer": true
}
},
"fancy-log": {
"builtin": {
"console.Console": true
},
"globals": {
"process.argv.indexOf": true,
"process.platform": true,
"process.stderr": true,
"process.stdout": true,
"process.version": true
},
"packages": {
"fancy-log>ansi-gray": true,
"fancy-log>color-support": true,
"fancy-log>parse-node-version": true,
"fancy-log>time-stamp": true
}
},
"fancy-log>ansi-gray": {
"packages": {
"fancy-log>ansi-gray>ansi-wrap": true
}
},
"fancy-log>color-support": {
"globals": {
"process": true
}
},
"fast-glob": {
"builtin": {
"fs.lstat": true,
"fs.lstatSync": true,
"fs.readdir": true,
"fs.readdirSync": true,
"fs.stat": true,
"fs.statSync": true,
"os.cpus": true,
"path.basename": true,
"path.resolve": true,
"stream.PassThrough": true,
"stream.Readable": true
},
"globals": {
"process.cwd": true
},
"packages": {
"fast-glob>@nodelib/fs.stat": true,
"fast-glob>@nodelib/fs.walk": true,
"fast-glob>glob-parent": true,
"globby>merge2": true,
"stylelint>micromatch": true
}
},
"fast-glob>@nodelib/fs.stat": {
"builtin": {
"fs.lstat": true,
"fs.lstatSync": true,
"fs.stat": true,
"fs.statSync": true
}
},
"fast-glob>@nodelib/fs.walk": {
"builtin": {
"events.EventEmitter": true,
"path.sep": true,
"stream.Readable": true
},
"globals": {
"setImmediate": true
},
"packages": {
"fast-glob>@nodelib/fs.walk>@nodelib/fs.scandir": true,
"fast-glob>@nodelib/fs.walk>fastq": true
}
},
"fast-glob>@nodelib/fs.walk>@nodelib/fs.scandir": {
"builtin": {
"fs.lstat": true,
"fs.lstatSync": true,
"fs.readdir": true,
"fs.readdirSync": true,
"fs.stat": true,
"fs.statSync": true,
"path.sep": true
},
"globals": {
"process.versions.node.split": true
},
"packages": {
"fast-glob>@nodelib/fs.stat": true,
"fast-glob>@nodelib/fs.walk>@nodelib/fs.scandir>run-parallel": true
}
},
"fast-glob>@nodelib/fs.walk>@nodelib/fs.scandir>run-parallel": {
"globals": {
"process.nextTick": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"fast-glob>@nodelib/fs.walk>fastq": {
"packages": {
"fast-glob>@nodelib/fs.walk>fastq>reusify": true
}
},
"fast-glob>glob-parent": {
"builtin": {
"os.platform": true,
"path.posix.dirname": true
},
"packages": {
"eslint>is-glob": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"fs-extra": {
"builtin": {
"assert": true,
"fs": true,
"os.tmpdir": true,
"path.dirname": true,
"path.isAbsolute": true,
"path.join": true,
"path.normalize": true,
"path.parse": true,
"path.relative": true,
"path.resolve": true,
"path.sep": true
},
"globals": {
"Buffer": true,
"console.warn": true,
"process.arch": true,
"process.cwd": true,
"process.platform": true,
"process.umask": true,
"process.versions.node.split": true,
"setTimeout": true
},
"packages": {
"fs-extra>graceful-fs": true,
"fs-extra>jsonfile": true,
"fs-extra>universalify": true
}
},
"fs-extra>graceful-fs": {
"builtin": {
"assert.equal": true,
"constants.O_SYMLINK": true,
"constants.O_WRONLY": true,
"constants.hasOwnProperty": true,
"fs": true,
"stream.Stream.call": true,
"util": true
},
"globals": {
"clearTimeout": true,
"console.error": true,
"process": true,
"setTimeout": true
}
},
"fs-extra>jsonfile": {
"builtin": {
"fs": true
},
"globals": {
"Buffer.isBuffer": true
},
"packages": {
"fs-extra>graceful-fs": true
}
},
"globalthis": {
"packages": {
"globalthis>define-properties": true
}
},
"globalthis>define-properties": {
"packages": {
"globalthis>define-properties>has-property-descriptors": true,
"mocha>object.assign>object-keys": true
}
},
"globalthis>define-properties>has-property-descriptors": {
"packages": {
"string.prototype.matchall>get-intrinsic": true
}
},
"globby": {
"builtin": {
"fs.Stats": true,
"fs.readFile": true,
"fs.readFileSync": true,
"fs.statSync": true,
"path.dirname": true,
"path.isAbsolute": true,
"path.join": true,
"path.posix.join": true,
"path.relative": true,
"stream.Transform": true,
"util.promisify": true
},
"globals": {
"process.cwd": true
},
"packages": {
"fast-glob": true,
"globby>array-union": true,
"globby>dir-glob": true,
"globby>ignore": true,
"globby>merge2": true,
"globby>slash": true
}
},
"globby>dir-glob": {
"builtin": {
"path.extname": true,
"path.isAbsolute": true,
"path.join": true,
"path.posix.join": true
},
"globals": {
"process.cwd": true
},
"packages": {
"globby>dir-glob>path-type": true
}
},
"globby>dir-glob>path-type": {
"builtin": {
"fs": true,
"util.promisify": true
}
},
"globby>ignore": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"globals": {
"process": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"globby>merge2": {
"builtin": {
"stream.PassThrough": true
},
"globals": {
"process.nextTick": true
}
},
"gulp": {
"builtin": {
"util.inherits": true
},
"packages": {
"gulp>glob-watcher": true,
"gulp>undertaker": true,
"gulp>vinyl-fs": true
}
},
"gulp-autoprefixer": {
"globals": {
"Buffer.from": true,
"setImmediate": true
},
"packages": {
"fancy-log": true,
"gulp-autoprefixer>autoprefixer": true,
"gulp-autoprefixer>postcss": true,
"gulp-zip>plugin-error": true,
"through2": true,
"vinyl-sourcemaps-apply": true
}
},
"gulp-autoprefixer>autoprefixer": {
"globals": {
"console": true,
"process.cwd": true,
"process.env.AUTOPREFIXER_GRID": true
},
"packages": {
"addons-linter>postcss>picocolors": true,
"gulp-autoprefixer>autoprefixer>fraction.js": true,
"gulp-autoprefixer>postcss": true,
"stylelint>autoprefixer>browserslist": true,
"stylelint>autoprefixer>caniuse-lite": true,
"stylelint>autoprefixer>normalize-range": true,
"stylelint>postcss-value-parser": true
}
},
"gulp-autoprefixer>autoprefixer>fraction.js": {
"globals": {
"define": true
}
},
"gulp-autoprefixer>postcss": {
"builtin": {
"fs.existsSync": true,
"fs.readFileSync": true,
"path.dirname": true,
"path.isAbsolute": true,
"path.join": true,
"path.relative": true,
"path.resolve": true,
"path.sep": true,
"url.fileURLToPath": true,
"url.pathToFileURL": true
},
"globals": {
"Buffer": true,
"URL": true,
"atob": true,
"btoa": true,
"console": true,
"process.env.LANG": true,
"process.env.NODE_ENV": true
},
"packages": {
"addons-linter>postcss>picocolors": true,
"addons-linter>postcss>source-map-js": true,
"gulp-autoprefixer>postcss>nanoid": true
}
},
"gulp-dart-sass": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"builtin": {
"path.basename": true,
"path.dirname": true,
"path.extname": true,
"path.join": true,
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"path.relative": true
},
"globals": {
"process.cwd": true,
"process.stderr.write": true
},
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"packages": {
"gulp-dart-sass>chalk": true,
"gulp-dart-sass>lodash.clonedeep": true,
"gulp-dart-sass>strip-ansi": true,
"gulp-dart-sass>through2": true,
"gulp-zip>plugin-error": true,
"sass": true,
"vinyl-sourcemaps-apply": true,
"vinyl>replace-ext": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"gulp-dart-sass>chalk": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"globals": {
"process.env.TERM": true,
"process.platform": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
},
"packages": {
"gulp-dart-sass>chalk>ansi-styles": true,
"gulp-dart-sass>chalk>supports-color": true,
"mocha>escape-string-regexp": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"gulp-dart-sass>chalk>ansi-styles": {
"packages": {
"@metamask/jazzicon>color>color-convert": true
}
},
"gulp-dart-sass>chalk>supports-color": {
"builtin": {
"os.release": true
},
"globals": {
"process.env": true,
"process.platform": true,
"process.stderr": true,
"process.stdout": true,
"process.versions.node.split": true
},
"packages": {
"mocha>supports-color>has-flag": true
}
},
"gulp-dart-sass>strip-ansi": {
"packages": {
"gulp-dart-sass>strip-ansi>ansi-regex": true
}
},
"gulp-dart-sass>through2": {
"builtin": {
"util.inherits": true
},
"globals": {
"process.nextTick": true
},
"packages": {
"readable-stream": true,
"watchify>xtend": true
}
},
"gulp-livereload": {
"builtin": {
"path.relative": true
},
"packages": {
"fancy-log": true,
"gulp-livereload>chalk": true,
"gulp-livereload>debug": true,
"gulp-livereload>event-stream": true,
"gulp-livereload>lodash.assign": true,
"gulp-livereload>tiny-lr": true
}
},
"gulp-livereload>chalk": {
"globals": {
"process.env.TERM": true,
"process.platform": true
},
"packages": {
"gulp-livereload>chalk>ansi-styles": true,
"gulp-livereload>chalk>supports-color": true,
"mocha>escape-string-regexp": true
}
},
"gulp-livereload>chalk>ansi-styles": {
"packages": {
"@metamask/jazzicon>color>color-convert": true
}
},
"gulp-livereload>chalk>supports-color": {
"builtin": {
"os.release": true
},
"globals": {
"process.env": true,
"process.platform": true,
"process.stderr": true,
"process.stdout": true,
"process.versions.node.split": true
},
"packages": {
"mocha>supports-color>has-flag": true
}
},
"gulp-livereload>debug": {
"builtin": {
"tty.isatty": true,
"util": true
},
"globals": {
"console": true,
"document": true,
"localStorage": true,
"navigator": true,
"process": true
},
"packages": {
"gulp-livereload>chalk>supports-color": true,
"gulp-livereload>debug>ms": true
}
},
"gulp-livereload>event-stream": {
"builtin": {
"buffer.Buffer.isBuffer": true,
"stream.Stream": true
},
"globals": {
"Buffer.concat": true,
"Buffer.isBuffer": true,
"console.error": true,
"process.nextTick": true,
"setImmediate": true
},
"packages": {
"debounce-stream>duplexer": true,
"debounce-stream>through": true,
"gulp-livereload>event-stream>from": true,
"gulp-livereload>event-stream>map-stream": true,
"gulp-livereload>event-stream>pause-stream": true,
"gulp-livereload>event-stream>split": true,
"gulp-livereload>event-stream>stream-combiner": true
}
},
"gulp-livereload>event-stream>from": {
"builtin": {
"stream": true
},
"globals": {
"process.nextTick": true
}
},
"gulp-livereload>event-stream>map-stream": {
"builtin": {
"stream.Stream": true
},
"globals": {
"process.nextTick": true
}
},
"gulp-livereload>event-stream>pause-stream": {
"packages": {
"debounce-stream>through": true
}
},
"gulp-livereload>event-stream>split": {
"builtin": {
"string_decoder.StringDecoder": true
},
"packages": {
"debounce-stream>through": true
}
},
"gulp-livereload>event-stream>stream-combiner": {
"packages": {
"debounce-stream>duplexer": true
}
},
"gulp-livereload>tiny-lr": {
"builtin": {
"events": true,
"fs": true,
"http": true,
"https": true,
"url.parse": true
},
"globals": {
"console.error": true
},
"packages": {
"@storybook/components>qs": true,
"gulp-livereload>tiny-lr>body": true,
"gulp-livereload>tiny-lr>debug": true,
"gulp-livereload>tiny-lr>faye-websocket": true,
"react>object-assign": true
}
},
"gulp-livereload>tiny-lr>body": {
"builtin": {
"querystring.parse": true
},
"packages": {
"gulp-livereload>tiny-lr>body>continuable-cache": true,
"gulp-livereload>tiny-lr>body>error": true,
"gulp-livereload>tiny-lr>body>raw-body": true,
"gulp-livereload>tiny-lr>body>safe-json-parse": true
}
},
"gulp-livereload>tiny-lr>body>error": {
"builtin": {
"assert": true
},
"packages": {
"gulp-livereload>tiny-lr>body>error>string-template": true,
"watchify>xtend": true
}
},
"gulp-livereload>tiny-lr>body>raw-body": {
"globals": {
"Buffer.concat": true,
"process.nextTick": true
},
"packages": {
"gulp-livereload>tiny-lr>body>raw-body>bytes": true,
"gulp-livereload>tiny-lr>body>raw-body>string_decoder": true
}
},
"gulp-livereload>tiny-lr>body>raw-body>string_decoder": {
"builtin": {
"buffer.Buffer": true
}
},
"gulp-livereload>tiny-lr>debug": {
"builtin": {
"tty.isatty": true,
"util": true
},
"globals": {
"console": true,
"document": true,
"localStorage": true,
"navigator": true,
"process": true
},
"packages": {
"gulp-livereload>debug>ms": true,
"sinon>supports-color": true
}
},
"gulp-livereload>tiny-lr>faye-websocket": {
"builtin": {
"net.connect": true,
"stream.Stream": true,
"tls.connect": true,
"url.parse": true,
"util.inherits": true
},
"globals": {
"Buffer": true,
"clearInterval": true,
"process.nextTick": true,
"setInterval": true
},
"packages": {
"gulp-livereload>tiny-lr>faye-websocket>websocket-driver": true
}
},
"gulp-livereload>tiny-lr>faye-websocket>websocket-driver": {
"builtin": {
"crypto.createHash": true,
"crypto.randomBytes": true,
"events.EventEmitter": true,
"stream.Stream": true,
"url.parse": true,
"util.inherits": true
},
"globals": {
"Buffer": true,
"process.version.match": true
},
"packages": {
"gulp-livereload>tiny-lr>faye-websocket>websocket-driver>http-parser-js": true,
"gulp-livereload>tiny-lr>faye-websocket>websocket-driver>websocket-extensions": true
}
},
"gulp-livereload>tiny-lr>faye-websocket>websocket-driver>http-parser-js": {
"builtin": {
"assert.equal": true,
"assert.ok": true
}
},
"gulp-rename": {
"builtin": {
"path.basename": true,
"path.dirname": true,
"path.extname": true,
"path.join": true,
"stream.Transform": true
}
},
"gulp-rtlcss": {
"globals": {
"Buffer.from": true
},
"packages": {
"gulp-rtlcss>rtlcss": true,
"gulp-rtlcss>through2": true,
"gulp-zip>plugin-error": true,
"vinyl-sourcemaps-apply": true
}
},
"gulp-rtlcss>rtlcss": {
"builtin": {
"fs.readFileSync": true,
"path.join": true,
"path.normalize": true
},
"globals": {
"process.cwd": true,
"process.env.HOME": true,
"process.env.HOMEPATH": true,
"process.env.USERPROFILE": true
},
"packages": {
"gulp-rtlcss>rtlcss>@choojs/findup": true,
"gulp-rtlcss>rtlcss>postcss": true,
"gulp-rtlcss>rtlcss>strip-json-comments": true
}
},
"gulp-rtlcss>rtlcss>@choojs/findup": {
"builtin": {
"events.EventEmitter": true,
"fs.access": true,
"fs.accessSync": true,
"fs.exists": true,
"fs.existsSync": true,
"path.join": true,
"util.inherits": true
},
"globals": {
"console.log": true
}
},
"gulp-rtlcss>rtlcss>chalk": {
"globals": {
"process.env.TERM": true,
"process.platform": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
},
"packages": {
"gulp-rtlcss>rtlcss>chalk>ansi-styles": true,
"gulp-rtlcss>rtlcss>chalk>supports-color": true,
"mocha>escape-string-regexp": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"gulp-rtlcss>rtlcss>chalk>ansi-styles": {
"packages": {
"@metamask/jazzicon>color>color-convert": true
}
},
"gulp-rtlcss>rtlcss>chalk>supports-color": {
"builtin": {
"os.release": true
},
"globals": {
"process.env": true,
"process.platform": true,
"process.stderr": true,
"process.stdout": true,
"process.versions.node.split": true
},
"packages": {
"mocha>supports-color>has-flag": true
}
},
"gulp-rtlcss>rtlcss>postcss": {
"builtin": {
"fs": true,
"path": true
},
"globals": {
"Buffer": true,
"atob": true,
"btoa": true,
"console": true
},
"packages": {
"gulp-rtlcss>rtlcss>chalk": true,
"gulp-rtlcss>rtlcss>chalk>supports-color": true,
"gulp-rtlcss>rtlcss>postcss>source-map": true
}
},
"gulp-rtlcss>through2": {
"builtin": {
"util.inherits": true
},
"globals": {
"process.nextTick": true
},
"packages": {
"readable-stream": true,
"watchify>xtend": true
}
},
"gulp-sort": {
"packages": {
"gulp-sort>through2": true
}
},
"gulp-sort>through2": {
"builtin": {
"util.inherits": true
},
"globals": {
"process.nextTick": true
},
"packages": {
"readable-stream": true,
"watchify>xtend": true
}
},
"gulp-sourcemaps": {
"builtin": {
"path.dirname": true,
"path.extname": true,
"path.join": true,
"path.relative": true,
"path.resolve": true,
"path.sep": true
},
"globals": {
"Buffer.concat": true,
"Buffer.from": true
},
"packages": {
"fs-extra>graceful-fs": true,
"gulp-sourcemaps>@gulp-sourcemaps/identity-map": true,
"gulp-sourcemaps>@gulp-sourcemaps/map-sources": true,
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
2 years ago
"gulp-sourcemaps>acorn": true,
"gulp-sourcemaps>css": true,
"gulp-sourcemaps>debug-fabulous": true,
"gulp-sourcemaps>detect-newline": true,
"gulp-sourcemaps>source-map": true,
"gulp-sourcemaps>strip-bom-string": true,
"gulp-sourcemaps>through2": true,
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
2 years ago
"nyc>convert-source-map": true
}
},
"gulp-sourcemaps>@gulp-sourcemaps/identity-map": {
"packages": {
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
2 years ago
"chokidar>normalize-path": true,
"gulp-sourcemaps>@gulp-sourcemaps/identity-map>acorn": true,
"gulp-sourcemaps>@gulp-sourcemaps/identity-map>source-map": true,
"gulp-sourcemaps>@gulp-sourcemaps/identity-map>through2": true,
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
2 years ago
"stylelint>postcss": true
}
},
"gulp-sourcemaps>@gulp-sourcemaps/identity-map>acorn": {
"globals": {
"define": true
}
},
"gulp-sourcemaps>@gulp-sourcemaps/identity-map>through2": {
"builtin": {
"util.inherits": true
},
"globals": {
"process.nextTick": true
},
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"packages": {
"gulp-sourcemaps>@gulp-sourcemaps/identity-map>through2>readable-stream": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"gulp-sourcemaps>@gulp-sourcemaps/identity-map>through2>readable-stream": {
"builtin": {
"buffer.Buffer": true,
"events.EventEmitter": true,
"stream": true,
"util": true
},
"globals": {
"process.env.READABLE_STREAM": true,
"process.nextTick": true,
"process.stderr": true,
"process.stdout": true
},
"packages": {
"@storybook/api>util-deprecate": true,
"browserify>string_decoder": true,
"pumpify>inherits": true
}
},
"gulp-sourcemaps>@gulp-sourcemaps/map-sources": {
"packages": {
"gulp-sourcemaps>@gulp-sourcemaps/map-sources>normalize-path": true,
"gulp-sourcemaps>@gulp-sourcemaps/map-sources>through2": true
}
},
"gulp-sourcemaps>@gulp-sourcemaps/map-sources>normalize-path": {
"packages": {
"vinyl>remove-trailing-separator": true
}
},
"gulp-sourcemaps>@gulp-sourcemaps/map-sources>through2": {
"builtin": {
"util.inherits": true
},
"globals": {
"process.nextTick": true
},
"packages": {
"readable-stream": true,
"watchify>xtend": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
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
2 years ago
"gulp-sourcemaps>acorn": {
"globals": {
"define": true
}
},
"gulp-sourcemaps>css": {
"builtin": {
"fs.readFileSync": true,
"path.dirname": true,
"path.sep": true
},
"packages": {
"gulp-sourcemaps>css>source-map": true,
"gulp-sourcemaps>css>source-map-resolve": true,
"pumpify>inherits": true
}
},
"gulp-sourcemaps>css>source-map-resolve": {
"builtin": {
"path.sep": true,
"url.resolve": true
},
"globals": {
"TextDecoder": true,
"setImmediate": true
},
"packages": {
"gulp-sourcemaps>css>source-map-resolve>atob": true,
"gulp-sourcemaps>css>source-map-resolve>decode-uri-component": true
}
},
"gulp-sourcemaps>css>source-map-resolve>atob": {
"globals": {
"Buffer.from": true
}
},
"gulp-sourcemaps>debug-fabulous": {
"packages": {
"gulp-sourcemaps>debug-fabulous>debug": true,
"gulp-sourcemaps>debug-fabulous>memoizee": true,
"react>object-assign": true
}
},
"gulp-sourcemaps>debug-fabulous>debug": {
"builtin": {
"tty.isatty": true,
"util": true
},
"globals": {
"console": true,
"document": true,
"localStorage": true,
"navigator": true,
"process": true
},
"packages": {
"gulp-livereload>debug>ms": true,
"sinon>supports-color": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"gulp-sourcemaps>debug-fabulous>memoizee": {
"globals": {
"clearTimeout": true,
"setTimeout": true
},
"packages": {
"gulp-sourcemaps>debug-fabulous>memoizee>event-emitter": true,
"gulp-sourcemaps>debug-fabulous>memoizee>is-promise": true,
"gulp-sourcemaps>debug-fabulous>memoizee>lru-queue": true,
"gulp-sourcemaps>debug-fabulous>memoizee>next-tick": true,
"gulp-sourcemaps>debug-fabulous>memoizee>timers-ext": true,
"resolve-url-loader>es6-iterator>d": true,
"resolve-url-loader>es6-iterator>es5-ext": true
}
},
"gulp-sourcemaps>debug-fabulous>memoizee>event-emitter": {
"packages": {
"resolve-url-loader>es6-iterator>d": true,
"resolve-url-loader>es6-iterator>es5-ext": true
}
},
"gulp-sourcemaps>debug-fabulous>memoizee>lru-queue": {
"packages": {
"resolve-url-loader>es6-iterator>es5-ext": true
}
},
"gulp-sourcemaps>debug-fabulous>memoizee>next-tick": {
"globals": {
"MutationObserver": true,
"WebKitMutationObserver": true,
"document": true,
"process": true,
"setImmediate": true,
"setTimeout": true
}
},
"gulp-sourcemaps>debug-fabulous>memoizee>timers-ext": {
"packages": {
"resolve-url-loader>es6-iterator>es5-ext": true
}
},
"gulp-sourcemaps>through2": {
"builtin": {
"util.inherits": true
},
"globals": {
"process.nextTick": true
},
"packages": {
"readable-stream": true,
"watchify>xtend": true
}
},
"gulp-stylelint": {
"builtin": {
"fs.mkdir": true,
"fs.writeFile": true,
"path.dirname": true,
"path.resolve": true
},
"globals": {
"Buffer.from": true,
"process.cwd": true,
"process.nextTick": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
},
"packages": {
"eslint>strip-ansi": true,
"fancy-log": true,
"gulp-stylelint>through2": true,
"gulp-zip>plugin-error": true,
"source-map": true,
"stylelint": true
}
},
"gulp-stylelint>through2": {
"builtin": {
"util.inherits": true
},
"globals": {
"process.nextTick": true
},
"packages": {
"gulp-stylelint>through2>readable-stream": true
}
},
"gulp-stylelint>through2>readable-stream": {
"builtin": {
"buffer.Buffer": true,
"events.EventEmitter": true,
"stream": true,
"util": true
},
"globals": {
"process.env.READABLE_STREAM": true,
"process.nextTick": true,
"process.stderr": true,
"process.stdout": true
},
"packages": {
"@storybook/api>util-deprecate": true,
"browserify>string_decoder": true,
"pumpify>inherits": true
}
},
"gulp-watch": {
"builtin": {
"path.dirname": true,
"path.normalize": true,
"path.resolve": true
},
"globals": {
"process.arch": true,
"process.cwd": true,
"process.platform": true,
"process.version": true,
"setTimeout": true
},
"packages": {
"gulp-watch>ansi-colors": true,
"gulp-watch>anymatch": true,
"gulp-watch>chokidar": true,
"gulp-watch>fancy-log": true,
"gulp-watch>glob-parent": true,
"gulp-watch>path-is-absolute": true,
"gulp-watch>slash": true,
"gulp-watch>vinyl-file": true,
"gulp-zip>plugin-error": true,
"react>object-assign": true,
"readable-stream": true,
"vinyl": true
}
},
"gulp-watch>ansi-colors": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"packages": {
"fancy-log>ansi-gray>ansi-wrap": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"gulp-watch>anymatch": {
"builtin": {
"path.sep": true
},
"packages": {
"gulp-watch>anymatch>micromatch": true,
"gulp-watch>anymatch>normalize-path": true
}
},
"gulp-watch>anymatch>micromatch": {
"builtin": {
"path.sep": true
},
"globals": {
"process": true
},
"packages": {
"gulp-watch>anymatch>micromatch>arr-diff": true,
"gulp-watch>anymatch>micromatch>array-unique": true,
"gulp-watch>anymatch>micromatch>braces": true,
"gulp-watch>anymatch>micromatch>expand-brackets": true,
"gulp-watch>anymatch>micromatch>extglob": true,
"gulp-watch>anymatch>micromatch>filename-regex": true,
"gulp-watch>anymatch>micromatch>is-extglob": true,
"gulp-watch>anymatch>micromatch>is-glob": true,
"gulp-watch>anymatch>micromatch>kind-of": true,
"gulp-watch>anymatch>micromatch>object.omit": true,
"gulp-watch>anymatch>micromatch>parse-glob": true,
"gulp-watch>anymatch>micromatch>regex-cache": true,
"gulp-watch>anymatch>normalize-path": true
}
},
"gulp-watch>anymatch>micromatch>arr-diff": {
"packages": {
"gulp>undertaker>arr-flatten": true
}
},
"gulp-watch>anymatch>micromatch>braces": {
"packages": {
"gulp-watch>anymatch>micromatch>braces>expand-range": true,
"gulp-watch>anymatch>micromatch>braces>preserve": true,
"webpack>micromatch>braces>repeat-element": true
}
},
"gulp-watch>anymatch>micromatch>braces>expand-range": {
"packages": {
"gulp-watch>anymatch>micromatch>braces>expand-range>fill-range": true
}
},
"gulp-watch>anymatch>micromatch>braces>expand-range>fill-range": {
"packages": {
"gulp-watch>anymatch>micromatch>braces>expand-range>fill-range>is-number": true,
"gulp-watch>anymatch>micromatch>braces>expand-range>fill-range>isobject": true,
"gulp-watch>anymatch>micromatch>braces>expand-range>fill-range>randomatic": true,
"webpack>micromatch>braces>fill-range>repeat-string": true,
"webpack>micromatch>braces>repeat-element": true
}
},
"gulp-watch>anymatch>micromatch>braces>expand-range>fill-range>is-number": {
"packages": {
"gulp-watch>anymatch>micromatch>braces>expand-range>fill-range>is-number>kind-of": true
}
},
"gulp-watch>anymatch>micromatch>braces>expand-range>fill-range>is-number>kind-of": {
"packages": {
"browserify>insert-module-globals>is-buffer": true
}
},
"gulp-watch>anymatch>micromatch>braces>expand-range>fill-range>isobject": {
"packages": {
"readable-stream>isarray": true
}
},
"gulp-watch>anymatch>micromatch>braces>expand-range>fill-range>randomatic": {
"packages": {
"gulp-watch>anymatch>micromatch>braces>expand-range>fill-range>randomatic>math-random": true,
"gulp>undertaker>bach>array-last>is-number": true,
"webpack>micromatch>kind-of": true
}
},
"gulp-watch>anymatch>micromatch>braces>expand-range>fill-range>randomatic>math-random": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"builtin": {
"crypto.randomBytes": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"gulp-watch>anymatch>micromatch>expand-brackets": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"packages": {
"gulp-watch>anymatch>micromatch>expand-brackets>is-posix-bracket": true
}
},
"gulp-watch>anymatch>micromatch>extglob": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"packages": {
"gulp-watch>anymatch>micromatch>is-extglob": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"gulp-watch>anymatch>micromatch>is-glob": {
"packages": {
"gulp-watch>anymatch>micromatch>is-extglob": true
}
},
"gulp-watch>anymatch>micromatch>kind-of": {
"packages": {
"browserify>insert-module-globals>is-buffer": true
}
},
"gulp-watch>anymatch>micromatch>object.omit": {
"packages": {
"gulp-watch>anymatch>micromatch>object.omit>for-own": true,
"webpack>micromatch>extglob>extend-shallow>is-extendable": true
}
},
"gulp-watch>anymatch>micromatch>object.omit>for-own": {
"packages": {
"gulp>undertaker>object.reduce>for-own>for-in": true
}
},
"gulp-watch>anymatch>micromatch>parse-glob": {
"packages": {
"gulp-watch>anymatch>micromatch>is-extglob": true,
"gulp-watch>anymatch>micromatch>parse-glob>glob-base": true,
"gulp-watch>anymatch>micromatch>parse-glob>is-dotfile": true,
"gulp-watch>anymatch>micromatch>parse-glob>is-glob": true
}
},
"gulp-watch>anymatch>micromatch>parse-glob>glob-base": {
"builtin": {
"path.dirname": true
},
"packages": {
"gulp-watch>anymatch>micromatch>parse-glob>glob-base>glob-parent": true,
"gulp-watch>anymatch>micromatch>parse-glob>glob-base>is-glob": true
}
},
"gulp-watch>anymatch>micromatch>parse-glob>glob-base>glob-parent": {
"builtin": {
"path.dirname": true
},
"packages": {
"gulp-watch>anymatch>micromatch>parse-glob>glob-base>is-glob": true
}
},
"gulp-watch>anymatch>micromatch>parse-glob>glob-base>is-glob": {
"packages": {
"gulp-watch>anymatch>micromatch>is-extglob": true
}
},
"gulp-watch>anymatch>micromatch>parse-glob>is-glob": {
"packages": {
"gulp-watch>anymatch>micromatch>is-extglob": true
}
},
"gulp-watch>anymatch>micromatch>regex-cache": {
"packages": {
"gulp-watch>anymatch>micromatch>regex-cache>is-equal-shallow": true
}
},
"gulp-watch>anymatch>micromatch>regex-cache>is-equal-shallow": {
"packages": {
"gulp-watch>anymatch>micromatch>regex-cache>is-equal-shallow>is-primitive": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"gulp-watch>anymatch>normalize-path": {
"packages": {
"vinyl>remove-trailing-separator": true
}
},
"gulp-watch>chokidar": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"builtin": {
"events.EventEmitter": true,
"fs": true,
"path.basename": true,
"path.dirname": true,
"path.extname": true,
"path.join": true,
"path.relative": true,
"path.resolve": true,
"path.sep": true
},
"globals": {
"clearTimeout": true,
"console.error": true,
"process.env.CHOKIDAR_INTERVAL": true,
"process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR": true,
"process.env.CHOKIDAR_USEPOLLING": true,
"process.nextTick": true,
"process.platform": true,
"setTimeout": true
},
"packages": {
"eslint>is-glob": true,
"gulp-watch>chokidar>anymatch": true,
"gulp-watch>chokidar>async-each": true,
"gulp-watch>chokidar>braces": true,
"gulp-watch>chokidar>is-binary-path": true,
"gulp-watch>chokidar>normalize-path": true,
"gulp-watch>chokidar>readdirp": true,
"gulp-watch>chokidar>upath": true,
"gulp-watch>glob-parent": true,
"gulp-watch>path-is-absolute": true,
"pumpify>inherits": true
}
},
"gulp-watch>chokidar>anymatch": {
"builtin": {
"path.sep": true
},
"packages": {
"gulp-watch>chokidar>anymatch>micromatch": true,
"gulp-watch>chokidar>anymatch>normalize-path": true
}
},
"gulp-watch>chokidar>anymatch>micromatch": {
"builtin": {
"path.basename": true,
"path.sep": true,
"util.inspect": true
},
"globals": {
"process.platform": true
},
"packages": {
"gulp-watch>chokidar>anymatch>micromatch>arr-diff": true,
"gulp-watch>chokidar>anymatch>micromatch>array-unique": true,
"gulp-watch>chokidar>anymatch>micromatch>extend-shallow": true,
"gulp-watch>chokidar>anymatch>micromatch>extglob": true,
"gulp-watch>chokidar>anymatch>micromatch>kind-of": true,
"gulp-watch>chokidar>braces": true,
"gulp-watch>chokidar>readdirp>micromatch>define-property": true,
"webpack>micromatch>fragment-cache": true,
"webpack>micromatch>nanomatch": true,
"webpack>micromatch>object.pick": true,
"webpack>micromatch>regex-not": true,
"webpack>micromatch>snapdragon": true,
"webpack>micromatch>to-regex": true
}
},
"gulp-watch>chokidar>anymatch>micromatch>extend-shallow": {
"packages": {
"gulp-watch>chokidar>readdirp>micromatch>extend-shallow>is-extendable": true,
"webpack>micromatch>extend-shallow>assign-symbols": true
}
},
"gulp-watch>chokidar>anymatch>micromatch>extglob": {
"packages": {
"gulp-watch>chokidar>anymatch>micromatch>array-unique": true,
"gulp-watch>chokidar>anymatch>micromatch>extglob>define-property": true,
"gulp-watch>chokidar>anymatch>micromatch>extglob>expand-brackets": true,
"gulp-watch>chokidar>anymatch>micromatch>extglob>extend-shallow": true,
"webpack>micromatch>fragment-cache": true,
"webpack>micromatch>regex-not": true,
"webpack>micromatch>snapdragon": true,
"webpack>micromatch>to-regex": true
}
},
"gulp-watch>chokidar>anymatch>micromatch>extglob>define-property": {
"packages": {
"webpack>micromatch>define-property>is-descriptor": true
}
},
"gulp-watch>chokidar>anymatch>micromatch>extglob>expand-brackets": {
"globals": {
"__filename": true
},
"packages": {
"gulp-watch>chokidar>anymatch>micromatch>extglob>expand-brackets>define-property": true,
"gulp-watch>chokidar>anymatch>micromatch>extglob>expand-brackets>extend-shallow": true,
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>debug": true,
"webpack>micromatch>extglob>expand-brackets>posix-character-classes": true,
"webpack>micromatch>regex-not": true,
"webpack>micromatch>snapdragon": true,
"webpack>micromatch>to-regex": true
}
},
"gulp-watch>chokidar>anymatch>micromatch>extglob>expand-brackets>define-property": {
"packages": {
"gulp-watch>chokidar>anymatch>micromatch>extglob>expand-brackets>define-property>is-descriptor": true
}
},
"gulp-watch>chokidar>anymatch>micromatch>extglob>expand-brackets>define-property>is-descriptor": {
"packages": {
"gulp-watch>chokidar>anymatch>micromatch>extglob>expand-brackets>define-property>is-descriptor>kind-of": true,
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-accessor-descriptor": true,
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-data-descriptor": true
}
},
"gulp-watch>chokidar>anymatch>micromatch>extglob>expand-brackets>extend-shallow": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"packages": {
"gulp-watch>chokidar>anymatch>micromatch>extglob>expand-brackets>extend-shallow>is-extendable": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"gulp-watch>chokidar>anymatch>micromatch>extglob>extend-shallow": {
"packages": {
"gulp-watch>chokidar>anymatch>micromatch>extglob>extend-shallow>is-extendable": true
}
},
"gulp-watch>chokidar>anymatch>normalize-path": {
"packages": {
"vinyl>remove-trailing-separator": true
}
},
"gulp-watch>chokidar>async-each": {
"globals": {
"define": true
}
},
"gulp-watch>chokidar>braces": {
"packages": {
"gulp-watch>chokidar>braces>array-unique": true,
"gulp-watch>chokidar>braces>fill-range": true,
"gulp>gulp-cli>isobject": true,
"gulp>undertaker>arr-flatten": true,
"webpack>micromatch>braces>repeat-element": true,
"webpack>micromatch>braces>snapdragon-node": true,
"webpack>micromatch>braces>split-string": true,
"webpack>micromatch>extglob>extend-shallow": true,
"webpack>micromatch>snapdragon": true,
"webpack>micromatch>to-regex": true
}
},
"gulp-watch>chokidar>braces>fill-range": {
"builtin": {
"util.inspect": true
},
"packages": {
"gulp-watch>chokidar>braces>fill-range>is-number": true,
"gulp-watch>chokidar>braces>fill-range>to-regex-range": true,
"webpack>micromatch>braces>fill-range>repeat-string": true,
"webpack>micromatch>extglob>extend-shallow": true
}
},
"gulp-watch>chokidar>braces>fill-range>is-number": {
"packages": {
"gulp-watch>anymatch>micromatch>kind-of": true
}
},
"gulp-watch>chokidar>braces>fill-range>to-regex-range": {
"packages": {
"gulp-watch>chokidar>braces>fill-range>is-number": true,
"webpack>micromatch>braces>fill-range>repeat-string": true
}
},
"gulp-watch>chokidar>is-binary-path": {
"builtin": {
"path.extname": true
},
"packages": {
"gulp-watch>chokidar>is-binary-path>binary-extensions": true
}
},
"gulp-watch>chokidar>readdirp": {
"builtin": {
"path.join": true,
"path.relative": true,
"util.inherits": true
},
"globals": {
"setImmediate": true
},
"packages": {
"fs-extra>graceful-fs": true,
"gulp-watch>chokidar>readdirp>micromatch": true,
"readable-stream": true
}
},
"gulp-watch>chokidar>readdirp>micromatch": {
"builtin": {
"path.basename": true,
"path.sep": true,
"util.inspect": true
},
"globals": {
"process.platform": true
},
"packages": {
"gulp-watch>chokidar>braces": true,
"gulp-watch>chokidar>readdirp>micromatch>arr-diff": true,
"gulp-watch>chokidar>readdirp>micromatch>array-unique": true,
"gulp-watch>chokidar>readdirp>micromatch>define-property": true,
"gulp-watch>chokidar>readdirp>micromatch>extend-shallow": true,
"gulp-watch>chokidar>readdirp>micromatch>extglob": true,
"gulp-watch>chokidar>readdirp>micromatch>kind-of": true,
"webpack>micromatch>fragment-cache": true,
"webpack>micromatch>nanomatch": true,
"webpack>micromatch>object.pick": true,
"webpack>micromatch>regex-not": true,
"webpack>micromatch>snapdragon": true,
"webpack>micromatch>to-regex": true
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
2 years ago
}
},
"gulp-watch>chokidar>readdirp>micromatch>define-property": {
"packages": {
"gulp>gulp-cli>isobject": true,
"webpack>micromatch>define-property>is-descriptor": true
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
2 years ago
}
},
"gulp-watch>chokidar>readdirp>micromatch>extend-shallow": {
"packages": {
"gulp-watch>chokidar>readdirp>micromatch>extend-shallow>is-extendable": true,
"webpack>micromatch>extend-shallow>assign-symbols": true
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
2 years ago
}
},
"gulp-watch>chokidar>readdirp>micromatch>extend-shallow>is-extendable": {
"packages": {
"@babel/register>clone-deep>is-plain-object": true
}
},
"gulp-watch>chokidar>readdirp>micromatch>extglob": {
"packages": {
"gulp-watch>chokidar>readdirp>micromatch>array-unique": true,
"gulp-watch>chokidar>readdirp>micromatch>extglob>define-property": true,
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets": true,
"gulp-watch>chokidar>readdirp>micromatch>extglob>extend-shallow": true,
"webpack>micromatch>fragment-cache": true,
"webpack>micromatch>regex-not": true,
"webpack>micromatch>snapdragon": true,
"webpack>micromatch>to-regex": true
}
},
"gulp-watch>chokidar>readdirp>micromatch>extglob>define-property": {
"packages": {
"webpack>micromatch>define-property>is-descriptor": true
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
2 years ago
}
},
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets": {
"globals": {
"__filename": true
},
"packages": {
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>debug": true,
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property": true,
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>extend-shallow": true,
"webpack>micromatch>extglob>expand-brackets>posix-character-classes": true,
"webpack>micromatch>regex-not": true,
"webpack>micromatch>snapdragon": true,
"webpack>micromatch>to-regex": true
}
},
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>debug": {
"builtin": {
"fs.SyncWriteStream": true,
"net.Socket": true,
"tty.WriteStream": true,
"tty.isatty": true,
"util": true
},
"globals": {
"chrome": true,
"console": true,
"document": true,
"localStorage": true,
"navigator": true,
"process": true
},
"packages": {
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>debug>ms": true
}
},
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property": {
"packages": {
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor": true
}
},
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor": {
"packages": {
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-accessor-descriptor": true,
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-data-descriptor": true,
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor>kind-of": true
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
2 years ago
}
},
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-accessor-descriptor": {
"packages": {
"gulp-watch>anymatch>micromatch>kind-of": true
}
},
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-data-descriptor": {
"packages": {
"gulp-watch>anymatch>micromatch>kind-of": true
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
2 years ago
}
},
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>extend-shallow": {
"packages": {
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>extend-shallow>is-extendable": true
}
},
"gulp-watch>chokidar>readdirp>micromatch>extglob>extend-shallow": {
"packages": {
"gulp-watch>chokidar>readdirp>micromatch>extglob>extend-shallow>is-extendable": true
}
},
"gulp-watch>chokidar>upath": {
"builtin": {
"path": true
}
},
"gulp-watch>fancy-log": {
"globals": {
"console": true,
"process.argv.indexOf": true,
"process.stderr.write": true,
"process.stdout.write": true
},
"packages": {
"fancy-log>ansi-gray": true,
"fancy-log>color-support": true,
"fancy-log>time-stamp": true
}
},
"gulp-watch>glob-parent": {
"builtin": {
"os.platform": true,
"path": true
},
"packages": {
"gulp-watch>glob-parent>is-glob": true,
"gulp-watch>glob-parent>path-dirname": true
}
},
"gulp-watch>glob-parent>is-glob": {
"packages": {
"gulp-watch>glob-parent>is-glob>is-extglob": true
}
},
"gulp-watch>glob-parent>path-dirname": {
"builtin": {
"path": true,
"util.inspect": true
},
"globals": {
"process.platform": true
}
},
"gulp-watch>path-is-absolute": {
"globals": {
"process.platform": true
}
},
"gulp-watch>vinyl-file": {
"builtin": {
"path.resolve": true
},
"globals": {
"process.cwd": true
},
"packages": {
"del>globby>pinkie-promise": true,
"fs-extra>graceful-fs": true,
"gulp-watch>vinyl-file>pify": true,
"gulp-watch>vinyl-file>strip-bom": true,
"gulp-watch>vinyl-file>strip-bom-stream": true,
"gulp-watch>vinyl-file>vinyl": true
}
},
"gulp-watch>vinyl-file>strip-bom": {
"globals": {
"Buffer.isBuffer": true
},
"packages": {
"gulp>vinyl-fs>remove-bom-buffer>is-utf8": true
}
},
"gulp-watch>vinyl-file>strip-bom-stream": {
"packages": {
"gulp-watch>vinyl-file>strip-bom": true,
"gulp-watch>vinyl-file>strip-bom-stream>first-chunk-stream": true
}
},
"gulp-watch>vinyl-file>strip-bom-stream>first-chunk-stream": {
"builtin": {
"util.inherits": true
},
"globals": {
"Buffer.concat": true,
"setImmediate": true
},
"packages": {
"readable-stream": true
}
},
"gulp-watch>vinyl-file>vinyl": {
"builtin": {
"buffer.Buffer": true,
"path.basename": true,
"path.dirname": true,
"path.extname": true,
"path.join": true,
"path.relative": true,
"stream.PassThrough": true,
"stream.Stream": true
},
"globals": {
"process.cwd": true
},
"packages": {
"gulp-watch>vinyl-file>vinyl>clone": true,
"gulp-watch>vinyl-file>vinyl>clone-stats": true,
"gulp-watch>vinyl-file>vinyl>replace-ext": true
}
},
"gulp-watch>vinyl-file>vinyl>clone": {
"globals": {
"Buffer": true
}
},
"gulp-watch>vinyl-file>vinyl>clone-stats": {
"builtin": {
"fs.Stats": true
}
},
"gulp-watch>vinyl-file>vinyl>replace-ext": {
"builtin": {
"path.basename": true,
"path.dirname": true,
"path.extname": true,
"path.join": true
}
},
"gulp-zip": {
"builtin": {
"buffer.constants.MAX_LENGTH": true,
"path.join": true
},
"packages": {
"gulp-zip>get-stream": true,
"gulp-zip>plugin-error": true,
"gulp-zip>through2": true,
"gulp-zip>yazl": true,
"vinyl": true
}
},
"gulp-zip>get-stream": {
"builtin": {
"buffer.constants.MAX_LENGTH": true,
"stream.PassThrough": true
},
"globals": {
"Buffer.concat": true
},
"packages": {
"pump": true
}
},
"gulp-zip>plugin-error": {
"builtin": {
"util.inherits": true
},
"packages": {
"gulp-watch>ansi-colors": true,
"gulp-zip>plugin-error>arr-union": true,
"gulp-zip>plugin-error>extend-shallow": true,
"webpack>micromatch>arr-diff": true
}
},
"gulp-zip>plugin-error>extend-shallow": {
"packages": {
"gulp-zip>plugin-error>extend-shallow>is-extendable": true,
"webpack>micromatch>extend-shallow>assign-symbols": true
}
},
"gulp-zip>plugin-error>extend-shallow>is-extendable": {
"packages": {
"@babel/register>clone-deep>is-plain-object": true
}
},
"gulp-zip>through2": {
"builtin": {
"util.inherits": true
},
"globals": {
"process.nextTick": true
},
"packages": {
"gulp-zip>through2>readable-stream": true
}
},
"gulp-zip>through2>readable-stream": {
"builtin": {
"buffer.Buffer": true,
"events.EventEmitter": true,
"stream": true,
"util": true
},
"globals": {
"process.env.READABLE_STREAM": true,
"process.nextTick": true,
"process.stderr": true,
"process.stdout": true
},
"packages": {
"@storybook/api>util-deprecate": true,
"browserify>string_decoder": true,
"pumpify>inherits": true
}
},
"gulp-zip>yazl": {
"builtin": {
"events.EventEmitter": true,
"fs.createReadStream": true,
"fs.stat": true,
"stream.PassThrough": true,
"stream.Transform": true,
"util.inherits": true,
"zlib.DeflateRaw": true,
"zlib.deflateRaw": true
},
"globals": {
"Buffer": true,
"setImmediate": true,
"utf8FileName.length": true
},
"packages": {
"gulp-zip>yazl>buffer-crc32": true
}
},
"gulp-zip>yazl>buffer-crc32": {
"builtin": {
"buffer.Buffer": true
}
},
"gulp>glob-watcher": {
"packages": {
"gulp>glob-watcher>anymatch": true,
"gulp>glob-watcher>async-done": true,
"gulp>glob-watcher>chokidar": true,
"gulp>glob-watcher>is-negated-glob": true,
"gulp>glob-watcher>just-debounce": true,
"gulp>undertaker>object.defaults": true
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
2 years ago
}
},
"gulp>glob-watcher>anymatch": {
"builtin": {
"path.sep": true
},
"packages": {
"gulp>glob-watcher>anymatch>micromatch": true,
"gulp>glob-watcher>anymatch>normalize-path": true
}
},
"gulp>glob-watcher>anymatch>micromatch": {
"builtin": {
"path.basename": true,
"path.sep": true,
"util.inspect": true
},
"globals": {
"process.platform": true
},
"packages": {
"gulp>glob-watcher>anymatch>micromatch>define-property": true,
"gulp>glob-watcher>anymatch>micromatch>extend-shallow": true,
"gulp>glob-watcher>chokidar>braces": true,
"webpack>micromatch>arr-diff": true,
"webpack>micromatch>array-unique": true,
"webpack>micromatch>extglob": true,
"webpack>micromatch>fragment-cache": true,
"webpack>micromatch>kind-of": true,
"webpack>micromatch>nanomatch": true,
"webpack>micromatch>object.pick": true,
"webpack>micromatch>regex-not": true,
"webpack>micromatch>snapdragon": true,
"webpack>micromatch>to-regex": true
}
},
"gulp>glob-watcher>anymatch>micromatch>define-property": {
"packages": {
"gulp>gulp-cli>isobject": true,
"webpack>micromatch>define-property>is-descriptor": true
}
},
"gulp>glob-watcher>anymatch>micromatch>extend-shallow": {
"packages": {
"gulp>glob-watcher>anymatch>micromatch>extend-shallow>is-extendable": true,
"webpack>micromatch>extend-shallow>assign-symbols": true
}
},
"gulp>glob-watcher>anymatch>micromatch>extend-shallow>is-extendable": {
"packages": {
"@babel/register>clone-deep>is-plain-object": true
}
},
"gulp>glob-watcher>anymatch>normalize-path": {
"packages": {
"vinyl>remove-trailing-separator": true
}
},
"gulp>glob-watcher>async-done": {
"builtin": {
"domain.create": true
},
"globals": {
"process.nextTick": true
},
"packages": {
"end-of-stream": true,
"gulp>glob-watcher>async-done>process-nextick-args": true,
"gulp>glob-watcher>async-done>stream-exhaust": true,
"pump>once": true
}
},
"gulp>glob-watcher>async-done>process-nextick-args": {
"globals": {
"process": true
}
},
"gulp>glob-watcher>async-done>stream-exhaust": {
"builtin": {
"stream.Writable": true,
"util.inherits": true
},
"globals": {
"setImmediate": true
}
},
"gulp>glob-watcher>chokidar": {
"builtin": {
"events.EventEmitter": true,
"fs": true,
"path.basename": true,
"path.dirname": true,
"path.extname": true,
"path.join": true,
"path.relative": true,
"path.resolve": true,
"path.sep": true
},
"globals": {
"clearTimeout": true,
"console.error": true,
"process.env.CHOKIDAR_INTERVAL": true,
"process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR": true,
"process.env.CHOKIDAR_USEPOLLING": true,
"process.nextTick": true,
"process.platform": true,
"setTimeout": true
},
"packages": {
"eslint>is-glob": true,
"gulp-watch>chokidar>async-each": true,
"gulp-watch>glob-parent": true,
"gulp-watch>path-is-absolute": true,
"gulp>glob-watcher>anymatch": true,
"gulp>glob-watcher>chokidar>braces": true,
"gulp>glob-watcher>chokidar>is-binary-path": true,
"gulp>glob-watcher>chokidar>normalize-path": true,
"gulp>glob-watcher>chokidar>readdirp": true,
"gulp>glob-watcher>chokidar>upath": true,
"pumpify>inherits": true
}
},
"gulp>glob-watcher>chokidar>braces": {
"packages": {
"gulp>glob-watcher>chokidar>braces>fill-range": true,
"gulp>gulp-cli>isobject": true,
"gulp>undertaker>arr-flatten": true,
"webpack>micromatch>array-unique": true,
"webpack>micromatch>braces>repeat-element": true,
"webpack>micromatch>braces>snapdragon-node": true,
"webpack>micromatch>braces>split-string": true,
"webpack>micromatch>extglob>extend-shallow": true,
"webpack>micromatch>snapdragon": true,
"webpack>micromatch>to-regex": true
}
},
"gulp>glob-watcher>chokidar>braces>fill-range": {
"builtin": {
"util.inspect": true
},
"packages": {
"gulp>glob-watcher>chokidar>braces>fill-range>is-number": true,
"gulp>glob-watcher>chokidar>braces>fill-range>to-regex-range": true,
"webpack>micromatch>braces>fill-range>repeat-string": true,
"webpack>micromatch>extglob>extend-shallow": true
}
},
"gulp>glob-watcher>chokidar>braces>fill-range>is-number": {
"packages": {
"gulp>glob-watcher>chokidar>braces>fill-range>is-number>kind-of": true
}
},
"gulp>glob-watcher>chokidar>braces>fill-range>is-number>kind-of": {
"packages": {
"browserify>insert-module-globals>is-buffer": true
}
},
"gulp>glob-watcher>chokidar>braces>fill-range>to-regex-range": {
"packages": {
"gulp>glob-watcher>chokidar>braces>fill-range>is-number": true,
"webpack>micromatch>braces>fill-range>repeat-string": true
}
},
"gulp>glob-watcher>chokidar>is-binary-path": {
"builtin": {
"path.extname": true
},
"packages": {
"gulp>glob-watcher>chokidar>is-binary-path>binary-extensions": true
}
},
"gulp>glob-watcher>chokidar>readdirp": {
"builtin": {
"path.join": true,
"path.relative": true,
"util.inherits": true
},
"globals": {
"setImmediate": true
},
"packages": {
"fs-extra>graceful-fs": true,
"gulp>glob-watcher>anymatch>micromatch": true,
"readable-stream": true
}
},
"gulp>glob-watcher>chokidar>upath": {
"builtin": {
"path": true
}
},
"gulp>glob-watcher>just-debounce": {
"globals": {
"clearTimeout": true,
"setTimeout": true
}
},
"gulp>gulp-cli>replace-homedir>is-absolute": {
"packages": {
"gulp>gulp-cli>replace-homedir>is-absolute>is-relative": true,
"nyc>spawn-wrap>is-windows": true
}
},
"gulp>gulp-cli>replace-homedir>is-absolute>is-relative": {
"packages": {
"gulp>gulp-cli>replace-homedir>is-absolute>is-relative>is-unc-path": true
}
},
"gulp>gulp-cli>replace-homedir>is-absolute>is-relative>is-unc-path": {
"packages": {
"gulp>gulp-cli>replace-homedir>is-absolute>is-relative>is-unc-path>unc-path-regex": true
}
},
"gulp>undertaker": {
"builtin": {
"assert": true,
"events.EventEmitter": true,
"util.inherits": true
},
"globals": {
"process.env.UNDERTAKER_SETTLE": true,
"process.env.UNDERTAKER_TIME_RESOLUTION": true,
"process.hrtime": true
},
"packages": {
"gulp>undertaker>arr-flatten": true,
"gulp>undertaker>arr-map": true,
"gulp>undertaker>bach": true,
"gulp>undertaker>collection-map": true,
"gulp>undertaker>es6-weak-map": true,
"gulp>undertaker>last-run": true,
"gulp>undertaker>object.defaults": true,
"gulp>undertaker>object.reduce": true,
"gulp>undertaker>undertaker-registry": true
}
},
"gulp>undertaker>arr-map": {
"packages": {
"gulp>undertaker>arr-map>make-iterator": true
}
},
"gulp>undertaker>arr-map>make-iterator": {
"packages": {
"webpack>micromatch>kind-of": true
}
},
"gulp>undertaker>bach": {
"builtin": {
"assert.ok": true
},
"packages": {
"gulp>glob-watcher>async-done": true,
"gulp>undertaker>arr-flatten": true,
"gulp>undertaker>arr-map": true,
"gulp>undertaker>bach>arr-filter": true,
"gulp>undertaker>bach>array-each": true,
"gulp>undertaker>bach>array-initial": true,
"gulp>undertaker>bach>array-last": true,
"gulp>undertaker>bach>async-settle": true,
"gulp>vinyl-fs>vinyl-sourcemap>now-and-later": true
}
},
"gulp>undertaker>bach>arr-filter": {
"packages": {
"gulp>undertaker>arr-map>make-iterator": true
}
},
"gulp>undertaker>bach>array-initial": {
"packages": {
"gulp>undertaker>bach>array-last>is-number": true,
"gulp>undertaker>object.defaults>array-slice": true
}
},
"gulp>undertaker>bach>array-last": {
"packages": {
"gulp>undertaker>bach>array-last>is-number": true
}
},
"gulp>undertaker>bach>async-settle": {
"packages": {
"gulp>glob-watcher>async-done": true
}
},
"gulp>undertaker>collection-map": {
"packages": {
"gulp>undertaker>arr-map": true,
"gulp>undertaker>arr-map>make-iterator": true,
"gulp>undertaker>object.reduce>for-own": true
}
},
"gulp>undertaker>es6-weak-map": {
"packages": {
"resolve-url-loader>es6-iterator": true,
"resolve-url-loader>es6-iterator>d": true,
"resolve-url-loader>es6-iterator>es5-ext": true,
"resolve-url-loader>es6-iterator>es6-symbol": true
}
},
"gulp>undertaker>last-run": {
"builtin": {
"assert": true
},
"packages": {
"gulp>undertaker>es6-weak-map": true,
"gulp>undertaker>last-run>default-resolution": true
}
},
"gulp>undertaker>last-run>default-resolution": {
"globals": {
"process.version.match": true
}
},
"gulp>undertaker>object.defaults": {
"packages": {
"gulp>gulp-cli>isobject": true,
"gulp>undertaker>bach>array-each": true,
"gulp>undertaker>object.defaults>array-slice": true,
"gulp>undertaker>object.reduce>for-own": true
}
},
"gulp>undertaker>object.reduce": {
"packages": {
"gulp>undertaker>arr-map>make-iterator": true,
"gulp>undertaker>object.reduce>for-own": true
}
},
"gulp>undertaker>object.reduce>for-own": {
"packages": {
"gulp>undertaker>object.reduce>for-own>for-in": true
}
},
"gulp>vinyl-fs": {
"builtin": {
"os.platform": true,
"path.relative": true,
"path.resolve": true,
"util.inherits": true
},
"globals": {
"Buffer.isBuffer": true,
"process.cwd": true,
"process.geteuid": true,
"process.getuid": true,
"process.nextTick": true
},
"packages": {
"enzyme>object.assign": true,
"fs-extra>graceful-fs": true,
"gulp>vinyl-fs>fs-mkdirp-stream": true,
"gulp>vinyl-fs>glob-stream": true,
"gulp>vinyl-fs>is-valid-glob": true,
"gulp>vinyl-fs>lazystream": true,
"gulp>vinyl-fs>lead": true,
"gulp>vinyl-fs>pumpify": true,
"gulp>vinyl-fs>remove-bom-buffer": true,
"gulp>vinyl-fs>remove-bom-stream": true,
"gulp>vinyl-fs>resolve-options": true,
"gulp>vinyl-fs>through2": true,
"gulp>vinyl-fs>to-through": true,
"gulp>vinyl-fs>value-or-function": true,
"gulp>vinyl-fs>vinyl-sourcemap": true,
"readable-stream": true,
"vinyl": true
}
},
"gulp>vinyl-fs>fs-mkdirp-stream": {
"builtin": {
"path.dirname": true,
"path.resolve": true
},
"globals": {
"process.umask": true
},
"packages": {
"fs-extra>graceful-fs": true,
"gulp>vinyl-fs>fs-mkdirp-stream>through2": true
}
},
"gulp>vinyl-fs>fs-mkdirp-stream>through2": {
"builtin": {
"util.inherits": true
},
"globals": {
"process.nextTick": true
},
"packages": {
"readable-stream": true,
"watchify>xtend": true
}
},
"gulp>vinyl-fs>glob-stream": {
"builtin": {
"util.inherits": true
},
"globals": {
"process.cwd": true,
"process.nextTick": true
},
"packages": {
"gulp-watch>glob-parent": true,
"gulp>glob-watcher>is-negated-glob": true,
"gulp>vinyl-fs>glob-stream>ordered-read-streams": true,
"gulp>vinyl-fs>glob-stream>pumpify": true,
"gulp>vinyl-fs>glob-stream>to-absolute-glob": true,
"gulp>vinyl-fs>glob-stream>unique-stream": true,
"jsdom>request>extend": true,
"nyc>glob": true,
"readable-stream": true,
"vinyl>remove-trailing-separator": true
}
},
"gulp>vinyl-fs>glob-stream>ordered-read-streams": {
"builtin": {
"util.inherits": true
},
"packages": {
"readable-stream": true
}
},
"gulp>vinyl-fs>glob-stream>pumpify": {
"packages": {
"gulp>vinyl-fs>glob-stream>pumpify>duplexify": true,
"gulp>vinyl-fs>glob-stream>pumpify>pump": true,
"pumpify>inherits": true
}
},
"gulp>vinyl-fs>glob-stream>pumpify>duplexify": {
"globals": {
"Buffer": true,
"process.nextTick": true
},
"packages": {
"duplexify>stream-shift": true,
"end-of-stream": true,
"pumpify>inherits": true,
"readable-stream": true
}
},
"gulp>vinyl-fs>glob-stream>pumpify>pump": {
"builtin": {
"fs": true
},
"packages": {
"end-of-stream": true,
"pump>once": true
}
},
"gulp>vinyl-fs>glob-stream>to-absolute-glob": {
"builtin": {
"path.resolve": true
},
"globals": {
"process.cwd": true,
"process.platform": true
},
"packages": {
"gulp>glob-watcher>is-negated-glob": true,
"gulp>gulp-cli>replace-homedir>is-absolute": true
}
},
"gulp>vinyl-fs>glob-stream>unique-stream": {
"packages": {
"gulp>vinyl-fs>glob-stream>unique-stream>through2-filter": true,
"lavamoat>json-stable-stringify": true
}
},
"gulp>vinyl-fs>glob-stream>unique-stream>through2-filter": {
"packages": {
"gulp>vinyl-fs>glob-stream>unique-stream>through2-filter>through2": true,
"watchify>xtend": true
}
},
"gulp>vinyl-fs>glob-stream>unique-stream>through2-filter>through2": {
"builtin": {
"util.inherits": true
},
"globals": {
"process.nextTick": true
},
"packages": {
"readable-stream": true,
"watchify>xtend": true
}
},
"gulp>vinyl-fs>lazystream": {
"builtin": {
"util.inherits": true
},
"packages": {
"readable-stream": true
}
},
"gulp>vinyl-fs>lead": {
"globals": {
"process.nextTick": true
},
"packages": {
"gulp>vinyl-fs>lead>flush-write-stream": true
}
},
"gulp>vinyl-fs>lead>flush-write-stream": {
"globals": {
"Buffer": true
},
"packages": {
"pumpify>inherits": true,
"readable-stream": true
}
},
"gulp>vinyl-fs>pumpify": {
"packages": {
"gulp>vinyl-fs>pumpify>duplexify": true,
"gulp>vinyl-fs>pumpify>pump": true,
"pumpify>inherits": true
}
},
"gulp>vinyl-fs>pumpify>duplexify": {
"globals": {
"Buffer": true,
"process.nextTick": true
},
"packages": {
"duplexify>stream-shift": true,
"end-of-stream": true,
"pumpify>inherits": true,
"readable-stream": true
}
},
"gulp>vinyl-fs>pumpify>pump": {
"builtin": {
"fs": true
},
"packages": {
"end-of-stream": true,
"pump>once": true
}
},
"gulp>vinyl-fs>remove-bom-buffer": {
"packages": {
"browserify>insert-module-globals>is-buffer": true,
"gulp>vinyl-fs>remove-bom-buffer>is-utf8": true
}
},
"gulp>vinyl-fs>remove-bom-stream": {
"packages": {
"ethereumjs-wallet>safe-buffer": true,
"gulp>vinyl-fs>remove-bom-buffer": true,
"gulp>vinyl-fs>remove-bom-stream>through2": true
}
},
"gulp>vinyl-fs>remove-bom-stream>through2": {
"builtin": {
"util.inherits": true
},
"globals": {
"process.nextTick": true
},
"packages": {
"readable-stream": true,
"watchify>xtend": true
}
},
"gulp>vinyl-fs>resolve-options": {
"packages": {
"gulp>vinyl-fs>value-or-function": true
}
},
"gulp>vinyl-fs>through2": {
"builtin": {
"util.inherits": true
},
"globals": {
"process.nextTick": true
},
"packages": {
"readable-stream": true,
"watchify>xtend": true
}
},
"gulp>vinyl-fs>to-through": {
"packages": {
"gulp>vinyl-fs>to-through>through2": true
}
},
"gulp>vinyl-fs>to-through>through2": {
"builtin": {
"util.inherits": true
},
"globals": {
"process.nextTick": true
},
"packages": {
"readable-stream": true,
"watchify>xtend": true
}
},
"gulp>vinyl-fs>vinyl-sourcemap": {
"builtin": {
"path.dirname": true,
"path.join": true,
"path.relative": true,
"path.resolve": true
},
"globals": {
"Buffer": true
},
"packages": {
"fs-extra>graceful-fs": true,
"gulp>vinyl-fs>remove-bom-buffer": true,
"gulp>vinyl-fs>vinyl-sourcemap>append-buffer": true,
"gulp>vinyl-fs>vinyl-sourcemap>normalize-path": true,
"gulp>vinyl-fs>vinyl-sourcemap>now-and-later": true,
"nyc>convert-source-map": true,
"vinyl": true
}
},
"gulp>vinyl-fs>vinyl-sourcemap>append-buffer": {
"builtin": {
"os.EOL": true
},
"globals": {
"Buffer": true
},
"packages": {
"gulp>vinyl-fs>vinyl-sourcemap>append-buffer>buffer-equal": true
}
},
"gulp>vinyl-fs>vinyl-sourcemap>append-buffer>buffer-equal": {
"builtin": {
"buffer.Buffer.isBuffer": true
}
},
"gulp>vinyl-fs>vinyl-sourcemap>normalize-path": {
"packages": {
"vinyl>remove-trailing-separator": true
}
},
"gulp>vinyl-fs>vinyl-sourcemap>now-and-later": {
"packages": {
"pump>once": true
}
},
"ini": {
"globals": {
"process": true
}
},
"jsdom>escodegen": {
"globals": {
"sourceMap.SourceNode": true
},
"packages": {
"eslint>esutils": true,
"jsdom>escodegen>estraverse": true,
"jsdom>escodegen>source-map": true
}
},
"koa>is-generator-function>has-tostringtag": {
"packages": {
"string.prototype.matchall>has-symbols": true
}
},
"labeled-stream-splicer": {
"packages": {
"labeled-stream-splicer>stream-splicer": true,
"pumpify>inherits": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"labeled-stream-splicer>stream-splicer": {
"globals": {
"process.nextTick": true,
"setImmediate": true
},
"packages": {
"pumpify>inherits": true,
"readable-stream": true
}
},
"lavamoat-browserify": {
"builtin": {
"fs.existsSync": true,
"fs.mkdirSync": true,
"fs.readFileSync": true,
"fs.writeFileSync": true,
"path.dirname": true,
"path.extname": true,
"path.resolve": true,
"util.callbackify": true
},
"globals": {
"console.warn": true,
"process.cwd": true,
"setTimeout": true
},
"packages": {
"@lavamoat/lavapack": true,
"duplexify": true,
"lavamoat-browserify>browser-resolve": true,
"lavamoat-browserify>concat-stream": true,
"lavamoat-browserify>readable-stream": true,
"lavamoat-browserify>through2": true,
"lavamoat>@lavamoat/aa": true,
"lavamoat>json-stable-stringify": true,
"lavamoat>lavamoat-core": true
}
},
"lavamoat-browserify>browser-resolve": {
"builtin": {
"fs.readFile": true,
"fs.readFileSync": true,
"path": true
},
"globals": {
"__dirname": true,
"process.platform": true
},
"packages": {
"brfs>resolve": true
}
},
"lavamoat-browserify>concat-stream": {
"globals": {
"Buffer.concat": true,
"Buffer.from": true,
"Buffer.isBuffer": true
},
"packages": {
"lavamoat-browserify>readable-stream": true,
"pumpify>inherits": true
}
},
"lavamoat-browserify>readable-stream": {
"builtin": {
"buffer.Buffer": true,
"events.EventEmitter": true,
"stream": true,
"util": true
},
"globals": {
"process.env.READABLE_STREAM": true,
"process.nextTick": true,
"process.stderr": true,
"process.stdout": true
},
"packages": {
"@storybook/api>util-deprecate": true,
"browserify>string_decoder": true,
"pumpify>inherits": true
}
},
"lavamoat-browserify>through2": {
"builtin": {
"util.inherits": true
},
"globals": {
"process.nextTick": true
},
"packages": {
"lavamoat-browserify>readable-stream": true
}
},
"lavamoat>@babel/highlight": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"packages": {
"lavamoat>@babel/highlight>@babel/helper-validator-identifier": true,
"lavamoat>@babel/highlight>chalk": true,
"loose-envify>js-tokens": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"lavamoat>@babel/highlight>chalk": {
"globals": {
"process.env.TERM": true,
"process.platform": true
},
"packages": {
"lavamoat>@babel/highlight>chalk>ansi-styles": true,
"lavamoat>@babel/highlight>chalk>supports-color": true,
"mocha>escape-string-regexp": true
}
},
"lavamoat>@babel/highlight>chalk>ansi-styles": {
"packages": {
"@metamask/jazzicon>color>color-convert": true
}
},
"lavamoat>@babel/highlight>chalk>supports-color": {
"builtin": {
"os.release": true
},
"globals": {
"process.env": true,
"process.platform": true,
"process.stderr": true,
"process.stdout": true,
"process.versions.node.split": true
},
"packages": {
"mocha>supports-color>has-flag": true
}
},
"lavamoat>@lavamoat/aa": {
"builtin": {
"fs.readFileSync": true,
"fs.statSync": true,
"path.dirname": true,
"path.join": true,
"path.relative": true
},
"globals": {
"performantResolve": true
},
"packages": {
"brfs>resolve": true
}
},
"lavamoat>json-stable-stringify": {
"packages": {
"lavamoat>json-stable-stringify>jsonify": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"lavamoat>lavamoat-core": {
"builtin": {
"events": true,
"fs.existsSync": true,
"fs.readFileSync": true,
"path.extname": true,
"path.join": true
},
"globals": {
"__dirname": true,
"console.error": true,
"console.warn": true,
"define": true
},
"packages": {
"lavamoat>json-stable-stringify": true,
"lavamoat>lavamoat-core>merge-deep": true,
"lavamoat>lavamoat-tofu": true,
"nyc>process-on-spawn>fromentries": true
}
},
"lavamoat>lavamoat-core>merge-deep": {
"packages": {
"gulp-zip>plugin-error>arr-union": true,
"lavamoat>lavamoat-core>merge-deep>clone-deep": true,
"lavamoat>lavamoat-core>merge-deep>kind-of": true
}
},
"lavamoat>lavamoat-core>merge-deep>clone-deep": {
"packages": {
"@babel/register>clone-deep>is-plain-object": true,
"lavamoat>lavamoat-core>merge-deep>clone-deep>for-own": true,
"lavamoat>lavamoat-core>merge-deep>clone-deep>lazy-cache": true,
"lavamoat>lavamoat-core>merge-deep>clone-deep>shallow-clone": true,
"lavamoat>lavamoat-core>merge-deep>kind-of": true
}
},
"lavamoat>lavamoat-core>merge-deep>clone-deep>for-own": {
"packages": {
"gulp>undertaker>object.reduce>for-own>for-in": true
}
},
"lavamoat>lavamoat-core>merge-deep>clone-deep>lazy-cache": {
"globals": {
"process.env.TRAVIS": true,
"process.env.UNLAZY": true
}
},
"lavamoat>lavamoat-core>merge-deep>clone-deep>shallow-clone": {
"packages": {
"lavamoat>lavamoat-core>merge-deep>clone-deep>shallow-clone>kind-of": true,
"lavamoat>lavamoat-core>merge-deep>clone-deep>shallow-clone>lazy-cache": true,
"lavamoat>lavamoat-core>merge-deep>clone-deep>shallow-clone>mixin-object": true,
"webpack>micromatch>extglob>extend-shallow>is-extendable": true
}
},
"lavamoat>lavamoat-core>merge-deep>clone-deep>shallow-clone>kind-of": {
"globals": {
"Buffer": true
},
"packages": {
"browserify>insert-module-globals>is-buffer": true
}
},
"lavamoat>lavamoat-core>merge-deep>clone-deep>shallow-clone>lazy-cache": {
"globals": {
"process.env.UNLAZY": true
}
},
"lavamoat>lavamoat-core>merge-deep>clone-deep>shallow-clone>mixin-object": {
"packages": {
"lavamoat>lavamoat-core>merge-deep>clone-deep>shallow-clone>mixin-object>for-in": true,
"webpack>micromatch>extglob>extend-shallow>is-extendable": true
}
},
"lavamoat>lavamoat-core>merge-deep>kind-of": {
"packages": {
"browserify>insert-module-globals>is-buffer": true
}
},
"lavamoat>lavamoat-tofu": {
"globals": {
"console.log": true
},
"packages": {
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
2 years ago
"@babel/core>@babel/parser": true,
"depcheck>@babel/traverse": true
}
},
"lavamoat>object.fromentries": {
"packages": {
"globalthis>define-properties": true,
"string.prototype.matchall>call-bind": true,
"string.prototype.matchall>es-abstract": true
}
},
"lodash": {
"globals": {
"define": true
}
},
"loose-envify": {
"builtin": {
"stream.PassThrough": true,
"stream.Transform": true,
"util.inherits": true
},
"globals": {
"process.env": true
},
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"packages": {
"loose-envify>js-tokens": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
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
2 years ago
"madge>detective-scss>gonzales-pe": {
"globals": {
"console.error": true,
"define": true
}
},
"madge>ora>is-unicode-supported": {
"globals": {
"process.env.CI": true,
"process.env.TERM": true,
"process.env.TERM_PROGRAM": true,
"process.env.WT_SESSION": true,
"process.platform": true
}
},
"mocha>find-up>locate-path>path-exists": {
"builtin": {
"fs.access": true,
"fs.accessSync": true
}
},
"mocha>minimatch>brace-expansion": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"packages": {
"mocha>minimatch>brace-expansion>concat-map": true,
"stylelint>balanced-match": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"mocha>mkdirp": {
"builtin": {
"fs": true,
"path.dirname": true,
"path.resolve": true
}
},
"mocha>supports-color>has-flag": {
"globals": {
"process.argv": true
}
},
"mocha>which": {
"builtin": {
"path.join": true
},
"globals": {
"process.cwd": true,
"process.env.OSTYPE": true,
"process.env.PATH": true,
"process.env.PATHEXT": true,
"process.platform": true
},
"packages": {
"mocha>which>isexe": true
}
},
"mocha>which>isexe": {
"builtin": {
"fs": true
},
"globals": {
"TESTING_WINDOWS": true,
"process.env.PATHEXT": true,
"process.getgid": true,
"process.getuid": true,
"process.platform": true
}
},
"nock>debug": {
"builtin": {
"tty.isatty": true,
"util.deprecate": true,
"util.format": true,
"util.inspect": true
},
"globals": {
"console": true,
"document": true,
"localStorage": true,
"navigator": true,
"process": true
},
"packages": {
"nock>debug>ms": true,
"sinon>supports-color": true
}
},
"node-sass": {
"native": true
},
"nyc>convert-source-map": {
"builtin": {
"fs.readFileSync": true,
"path.resolve": true
},
"packages": {
"nyc>convert-source-map>safe-buffer": true
}
},
"nyc>convert-source-map>safe-buffer": {
"builtin": {
"buffer": true
}
},
"nyc>glob": {
"builtin": {
"assert": true,
"events.EventEmitter": true,
"fs": true,
"path.join": true,
"path.resolve": true,
"util": true
},
"globals": {
"console.error": true,
"process.cwd": true,
"process.nextTick": true,
"process.platform": true
},
"packages": {
"eslint>minimatch": true,
"gulp-watch>path-is-absolute": true,
"nyc>glob>fs.realpath": true,
"nyc>glob>inflight": true,
"pump>once": true,
"pumpify>inherits": true
}
},
"nyc>glob>fs.realpath": {
"builtin": {
"fs.lstat": true,
"fs.lstatSync": true,
"fs.readlink": true,
"fs.readlinkSync": true,
"fs.realpath": true,
"fs.realpathSync": true,
"fs.stat": true,
"fs.statSync": true,
"path.normalize": true,
"path.resolve": true
},
"globals": {
"console.error": true,
"console.trace": true,
"process.env.NODE_DEBUG": true,
"process.nextTick": true,
"process.noDeprecation": true,
"process.platform": true,
"process.throwDeprecation": true,
"process.traceDeprecation": true,
"process.version": true
}
},
"nyc>glob>inflight": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"globals": {
"process.nextTick": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
},
"packages": {
"pump>once": true,
"pump>once>wrappy": true
}
},
"nyc>resolve-from": {
"builtin": {
"fs.realpathSync": true,
"module._nodeModulePaths": true,
"module._resolveFilename": true,
"path.join": true,
"path.resolve": true
}
},
"nyc>rimraf": {
"builtin": {
"assert": true,
"fs": true,
"path.join": true
},
"globals": {
"process.platform": true,
"setTimeout": true
},
"packages": {
"nyc>glob": true
}
},
"nyc>signal-exit": {
"builtin": {
"assert.equal": true,
"events": true
},
"globals": {
"process": true
}
},
"nyc>spawn-wrap>is-windows": {
"globals": {
"define": true,
"isWindows": "write",
"process": true
}
},
"prettier": {
"builtin": {
"assert": true,
"events.EventEmitter": true,
"fs": true,
"module._nodeModulePaths": true,
"module._resolveFilename": true,
"os": true,
"path": true,
"stream.PassThrough": true,
"stream.Readable": true,
"util.inherits": true,
"util.inspect": true,
"util.promisify": true
},
"globals": {
"Buffer": true,
"Element": true,
"HTMLElement": true,
"Intl": true,
"PerformanceObserver": true,
"SVGElement": true,
"WorkerGlobalScope": true,
"YAML_SILENCE_DEPRECATION_WARNINGS": true,
"YAML_SILENCE_WARNINGS": true,
"__dirname": true,
"__filename": true,
"__magic__": true,
"assertDoc": true,
"atob": true,
"btoa": true,
"clearTimeout": true,
"console": true,
"define": true,
"document": true,
"globalThis": "write",
"localStorage": true,
"location": true,
"navigator": true,
"new": true,
"performance": true,
"process": true,
"queueMicrotask": true,
"setImmediate": true,
"setTimeout": true,
"target": true
}
},
"prop-types": {
"globals": {
"console": true,
"process.env.NODE_ENV": true
},
"packages": {
"prop-types>react-is": true,
"react>object-assign": true
}
},
"prop-types>react-is": {
"globals": {
"console": true,
"process.env.NODE_ENV": true
}
},
"pump": {
"builtin": {
"fs": true
},
"globals": {
"process.version": true
},
"packages": {
"end-of-stream": true,
"pump>once": true
}
},
"pump>once": {
"packages": {
"pump>once>wrappy": true
}
},
"pumpify": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"packages": {
"duplexify": true,
"pump": true,
"pumpify>inherits": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"pumpify>inherits": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"builtin": {
"util.inherits": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"randomcolor": {
"globals": {
"define": true
}
},
"readable-stream": {
"builtin": {
"events.EventEmitter": true,
"stream": true,
"util": true
},
"globals": {
"process.browser": true,
"process.env.READABLE_STREAM": true,
"process.stderr": true,
"process.stdout": true,
"process.version.slice": true,
"setImmediate": true
},
"packages": {
"@storybook/api>util-deprecate": true,
"pumpify>inherits": true,
"readable-stream>core-util-is": true,
"readable-stream>isarray": true,
"readable-stream>process-nextick-args": true,
"readable-stream>safe-buffer": true,
"readable-stream>string_decoder": true
}
},
"readable-stream>core-util-is": {
"globals": {
"Buffer.isBuffer": true
}
},
"readable-stream>process-nextick-args": {
"globals": {
"process": true
}
},
"readable-stream>safe-buffer": {
"builtin": {
"buffer": true
}
},
"readable-stream>string_decoder": {
"packages": {
"readable-stream>safe-buffer": true
}
},
"resolve-url-loader>es6-iterator": {
"packages": {
"resolve-url-loader>es6-iterator>d": true,
"resolve-url-loader>es6-iterator>es5-ext": true,
"resolve-url-loader>es6-iterator>es6-symbol": true
}
},
"resolve-url-loader>es6-iterator>d": {
"packages": {
"resolve-url-loader>es6-iterator>es5-ext": true
}
},
"resolve-url-loader>es6-iterator>es5-ext": {
"packages": {
"resolve-url-loader>es6-iterator>es6-symbol": true
}
},
"resolve-url-loader>es6-iterator>es6-symbol": {
"packages": {
"resolve-url-loader>es6-iterator>d": true
}
},
"resolve-url-loader>rework>css>urix": {
"builtin": {
"path.sep": true
}
},
"sass": {
"builtin": {
"fs": true,
"readline": true,
"url": true
},
"env": "unfrozen",
"globals": {
"Buffer": true,
"HTMLElement": true,
"InternalError": true,
"TextDecoder": true,
"WorkerGlobalScope": true,
"__dirname": true,
"__filename": true,
"__non_webpack_require__": true,
"__webpack_require__": true,
"console": true,
"dartExperimentalFixupGetTag": true,
"dartMainRunner": true,
"dartNativeDispatchHooksTransformer": true,
"dartPrint": true,
"document": true,
"load": true,
"navigator": true,
"print": true,
"process": true,
"setImmediate": true,
"setTimeout": true,
"version": true
},
"packages": {
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
2 years ago
"chokidar": true
}
},
"semver": {
"globals": {
"console.error": true,
"process": true
},
"packages": {
"semver>lru-cache": true
}
},
"semver>lru-cache": {
"packages": {
"semver>lru-cache>yallist": true
}
},
"serve-handler>path-is-inside": {
"builtin": {
"path.sep": true
},
"globals": {
"process.platform": true
}
},
"sinon>supports-color": {
"builtin": {
"os.release": true,
"tty.isatty": true
},
"globals": {
"process.env": true,
"process.platform": true
},
"packages": {
"sinon>supports-color>has-flag": true
}
},
"sinon>supports-color>has-flag": {
"globals": {
"process.argv": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"source-map": {
"builtin": {
"fs.readFile": true,
"path.join": true
},
"globals": {
"WebAssembly.instantiate": true,
"__dirname": true,
"console.debug": true,
"console.time": true,
"console.timeEnd": true,
"fetch": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"squirrelly": {
"builtin": {
"fs.existsSync": true,
"fs.readFileSync": true,
"path.dirname": true,
"path.extname": true,
"path.resolve": true
}
},
"string.prototype.matchall": {
"packages": {
"globalthis>define-properties": true,
"string.prototype.matchall>call-bind": true,
"string.prototype.matchall>es-abstract": true,
"string.prototype.matchall>has-symbols": true,
"string.prototype.matchall>regexp.prototype.flags": true
}
},
"string.prototype.matchall>call-bind": {
"packages": {
"mocha>object.assign>function-bind": true,
"string.prototype.matchall>get-intrinsic": true
}
},
"string.prototype.matchall>es-abstract": {
"packages": {
"enzyme>has": true,
"enzyme>is-callable": true,
"enzyme>is-regex": true,
"enzyme>is-string": true,
"enzyme>object-inspect": true,
"globalthis>define-properties>has-property-descriptors": true,
"string.prototype.matchall>call-bind": true,
"string.prototype.matchall>es-abstract>es-to-primitive": true,
"string.prototype.matchall>get-intrinsic": true,
"string.prototype.matchall>has-symbols": true,
"string.prototype.matchall>internal-slot": true
}
},
"string.prototype.matchall>es-abstract>es-to-primitive": {
"packages": {
"@metamask/eth-token-tracker>deep-equal>is-date-object": true,
"@storybook/api>telejson>is-symbol": true,
"enzyme>is-callable": true
}
},
"string.prototype.matchall>get-intrinsic": {
"globals": {
"AggregateError": true,
"FinalizationRegistry": true,
"WeakRef": true
},
"packages": {
"enzyme>has": true,
"mocha>object.assign>function-bind": true,
"string.prototype.matchall>has-symbols": true
}
},
"string.prototype.matchall>internal-slot": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"packages": {
"enzyme>has": true,
"string.prototype.matchall>get-intrinsic": true,
"string.prototype.matchall>side-channel": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"string.prototype.matchall>regexp.prototype.flags": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"packages": {
"enzyme>function.prototype.name>functions-have-names": true,
"globalthis>define-properties": true,
"string.prototype.matchall>call-bind": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"string.prototype.matchall>side-channel": {
"packages": {
"enzyme>object-inspect": true,
"string.prototype.matchall>call-bind": true,
"string.prototype.matchall>get-intrinsic": true
}
},
"stylelint": {
"builtin": {
"fs.lstatSync": true,
"fs.readFile": true,
"fs.readFileSync": true,
"fs.stat": true,
"os.EOL": true,
"path.dirname": true,
"path.isAbsolute": true,
"path.join": true,
"path.normalize": true,
"path.relative": true,
"path.resolve": true,
"path.sep": true,
"url.URL": true
},
"globals": {
"__dirname": true,
"assert": true,
"console.warn": true,
"process.cwd": true,
"process.env.NODE_ENV": true,
"process.stdout.columns": true,
"process.stdout.isTTY": true
},
"packages": {
"eslint>imurmurhash": true,
"globby": true,
"globby>ignore": true,
"globby>slash": true,
"lodash": true,
"nock>debug": true,
"nyc>resolve-from": true,
"stylelint>@stylelint/postcss-css-in-js": true,
"stylelint>@stylelint/postcss-markdown": true,
"stylelint>autoprefixer": true,
"stylelint>balanced-match": true,
"stylelint>chalk": true,
"stylelint>cosmiconfig": true,
"stylelint>execall": true,
"stylelint>file-entry-cache": true,
"stylelint>global-modules": true,
"stylelint>globjoin": true,
"stylelint>html-tags": true,
"stylelint>import-lazy": true,
"stylelint>known-css-properties": true,
"stylelint>leven": true,
"stylelint>log-symbols": true,
"stylelint>mathml-tag-names": true,
"stylelint>micromatch": true,
"stylelint>normalize-selector": true,
"stylelint>postcss": true,
"stylelint>postcss-html": true,
"stylelint>postcss-less": true,
"stylelint>postcss-media-query-parser": true,
"stylelint>postcss-reporter": true,
"stylelint>postcss-resolve-nested-selector": true,
"stylelint>postcss-safe-parser": true,
"stylelint>postcss-sass": true,
"stylelint>postcss-scss": true,
"stylelint>postcss-selector-parser": true,
"stylelint>postcss-syntax": true,
"stylelint>postcss-value-parser": true,
"stylelint>specificity": true,
"stylelint>style-search": true,
"stylelint>sugarss": true,
"stylelint>svg-tags": true,
"stylelint>table": true,
"stylelint>write-file-atomic": true,
"yargs>string-width": true
}
},
"stylelint>@stylelint/postcss-css-in-js": {
"globals": {
"__dirname": true
},
"packages": {
"@babel/core": true,
"stylelint>postcss": true,
"stylelint>postcss-syntax": true
}
},
"stylelint>@stylelint/postcss-markdown": {
"packages": {
"stylelint>@stylelint/postcss-markdown>remark": true,
"stylelint>@stylelint/postcss-markdown>unist-util-find-all-after": true,
"stylelint>postcss-html": true,
"stylelint>postcss-syntax": true
}
},
"stylelint>@stylelint/postcss-markdown>remark": {
"packages": {
"stylelint>@stylelint/postcss-markdown>remark>remark-parse": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-stringify": true,
"stylelint>@stylelint/postcss-markdown>remark>unified": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"stylelint>@stylelint/postcss-markdown>remark>remark-parse": {
"packages": {
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>ccount": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>collapse-white-space": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>is-alphabetical": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>is-decimal": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>is-whitespace-character": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>is-word-character": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>markdown-escapes": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>parse-entities": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>state-toggle": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>trim": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>trim-trailing-lines": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>unherit": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>unist-util-remove-position": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>vfile-location": true,
"watchify>xtend": true,
"webpack>micromatch>braces>fill-range>repeat-string": true
}
},
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>parse-entities": {
"packages": {
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>is-decimal": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>parse-entities>character-entities": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>parse-entities>character-entities-legacy": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>parse-entities>character-reference-invalid": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>parse-entities>is-alphanumerical": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>parse-entities>is-hexadecimal": true
}
},
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>parse-entities>is-alphanumerical": {
"packages": {
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>is-alphabetical": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>is-decimal": true
}
},
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>unherit": {
"packages": {
"pumpify>inherits": true,
"watchify>xtend": true
}
},
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>unist-util-remove-position": {
"packages": {
"@storybook/addon-essentials>@storybook/addon-docs>remark-slug>unist-util-visit": true
}
},
"stylelint>@stylelint/postcss-markdown>remark>remark-stringify": {
"packages": {
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>ccount": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>is-decimal": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>is-whitespace-character": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>markdown-escapes": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>parse-entities": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>state-toggle": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>unherit": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-stringify>is-alphanumeric": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-stringify>longest-streak": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-stringify>markdown-table": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-stringify>mdast-util-compact": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-stringify>stringify-entities": true,
"watchify>xtend": true,
"webpack>micromatch>braces>fill-range>repeat-string": true
}
},
"stylelint>@stylelint/postcss-markdown>remark>remark-stringify>markdown-table": {
"packages": {
"webpack>micromatch>braces>fill-range>repeat-string": true
}
},
"stylelint>@stylelint/postcss-markdown>remark>remark-stringify>mdast-util-compact": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"packages": {
"@storybook/addon-essentials>@storybook/addon-docs>remark-slug>unist-util-visit": true
}
},
"stylelint>@stylelint/postcss-markdown>remark>remark-stringify>stringify-entities": {
"packages": {
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>is-decimal": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>parse-entities>character-entities-legacy": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>parse-entities>is-alphanumerical": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>parse-entities>is-hexadecimal": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-stringify>stringify-entities>character-entities-html4": true
}
},
"stylelint>@stylelint/postcss-markdown>remark>unified": {
"packages": {
"jsdom>request>extend": true,
"stylelint>@stylelint/postcss-markdown>remark>unified>bail": true,
"stylelint>@stylelint/postcss-markdown>remark>unified>is-buffer": true,
"stylelint>@stylelint/postcss-markdown>remark>unified>is-plain-obj": true,
"stylelint>@stylelint/postcss-markdown>remark>unified>trough": true,
"stylelint>@stylelint/postcss-markdown>remark>unified>vfile": true
}
},
"stylelint>@stylelint/postcss-markdown>remark>unified>vfile": {
"builtin": {
"path.basename": true,
"path.dirname": true,
"path.extname": true,
"path.join": true,
"path.sep": true
},
"globals": {
"process.cwd": true
},
"packages": {
"stylelint>@stylelint/postcss-markdown>remark>unified>vfile>is-buffer": true,
"stylelint>@stylelint/postcss-markdown>remark>unified>vfile>vfile-message": true,
"vinyl>replace-ext": true
}
},
"stylelint>@stylelint/postcss-markdown>remark>unified>vfile>vfile-message": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"packages": {
"stylelint>@stylelint/postcss-markdown>remark>unified>vfile>unist-util-stringify-position": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"stylelint>@stylelint/postcss-markdown>unist-util-find-all-after": {
"packages": {
"stylelint>@stylelint/postcss-markdown>unist-util-find-all-after>unist-util-is": true
}
},
"stylelint>autoprefixer": {
"globals": {
"console": true,
"process.cwd": true,
"process.env.AUTOPREFIXER_GRID": true
},
"packages": {
"stylelint>autoprefixer>browserslist": true,
"stylelint>autoprefixer>caniuse-lite": true,
"stylelint>autoprefixer>normalize-range": true,
"stylelint>autoprefixer>num2fraction": true,
"stylelint>autoprefixer>picocolors": true,
"stylelint>postcss": true,
"stylelint>postcss-value-parser": true
}
},
"stylelint>autoprefixer>browserslist": {
"builtin": {
"fs.existsSync": true,
"fs.readFileSync": true,
"fs.statSync": true,
"path.basename": true,
"path.dirname": true,
"path.join": true,
"path.resolve": true
},
"globals": {
"console.warn": true,
"process.env.BROWSERSLIST": true,
"process.env.BROWSERSLIST_CONFIG": true,
"process.env.BROWSERSLIST_DANGEROUS_EXTEND": true,
"process.env.BROWSERSLIST_DISABLE_CACHE": true,
"process.env.BROWSERSLIST_ENV": true,
"process.env.BROWSERSLIST_IGNORE_OLD_DATA": true,
"process.env.BROWSERSLIST_STATS": true,
"process.env.NODE_ENV": true,
"process.versions.node": true
},
"packages": {
"stylelint>autoprefixer>browserslist>electron-to-chromium": true,
"stylelint>autoprefixer>browserslist>node-releases": true,
"stylelint>autoprefixer>caniuse-lite": true
}
},
"stylelint>autoprefixer>picocolors": {
"builtin": {
"tty.isatty": true
},
"globals": {
"process.argv.includes": true,
"process.env": true,
"process.platform": true
}
},
"stylelint>chalk": {
"packages": {
"chalk>ansi-styles": true,
"sinon>supports-color": true
}
},
"stylelint>cosmiconfig": {
"builtin": {
"fs": true,
"os": true,
"path": true
},
"globals": {
"process.cwd": true
},
"packages": {
"depcheck>cosmiconfig>parse-json": true,
"depcheck>cosmiconfig>yaml": true,
"eslint>import-fresh": true,
"globby>dir-glob>path-type": true
}
},
"stylelint>execall": {
"packages": {
"stylelint>execall>clone-regexp": true
}
},
"stylelint>execall>clone-regexp": {
"packages": {
"stylelint>execall>clone-regexp>is-regexp": true
}
},
"stylelint>file-entry-cache": {
"builtin": {
"crypto.createHash": true,
"fs.readFileSync": true,
"fs.statSync": true,
"path.basename": true,
"path.dirname": true
},
"packages": {
"stylelint>file-entry-cache>flat-cache": true
}
},
"stylelint>file-entry-cache>flat-cache": {
"builtin": {
"fs.existsSync": true,
"fs.readFileSync": true,
"path.basename": true,
"path.dirname": true,
"path.resolve": true
},
"globals": {
"__dirname": true
},
"packages": {
"stylelint>file-entry-cache>flat-cache>flatted": true,
"stylelint>file-entry-cache>flat-cache>rimraf": true,
"stylelint>file-entry-cache>flat-cache>write": true
}
},
"stylelint>file-entry-cache>flat-cache>rimraf": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"builtin": {
"assert": true,
"fs": true,
"path.join": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
},
"globals": {
"process.platform": true,
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"setTimeout": true
},
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"packages": {
"nyc>glob": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"stylelint>file-entry-cache>flat-cache>write": {
"builtin": {
"fs.createWriteStream": true,
"fs.writeFile": true,
"fs.writeFileSync": true,
"path.dirname": true
},
"packages": {
"mocha>mkdirp": true
}
},
"stylelint>global-modules": {
"builtin": {
"path.resolve": true
},
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"globals": {
"process.env.OSTYPE": true,
"process.platform": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
},
"packages": {
"stylelint>global-modules>global-prefix": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"stylelint>global-modules>global-prefix": {
"builtin": {
"fs.readFileSync": true,
"fs.realpathSync": true,
"os.homedir": true,
"path.dirname": true,
"path.join": true,
"path.resolve": true
},
"globals": {
"process.env.APPDATA": true,
"process.env.DESTDIR": true,
"process.env.OSTYPE": true,
"process.env.PREFIX": true,
"process.execPath": true,
"process.platform": true
},
"packages": {
"mocha>which": true,
"stylelint>global-modules>global-prefix>ini": true
}
},
"stylelint>global-modules>global-prefix>ini": {
"globals": {
"process": true
}
},
"stylelint>globjoin": {
"builtin": {
"path.join": true
}
},
"stylelint>log-symbols": {
"packages": {
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
2 years ago
"madge>ora>is-unicode-supported": true,
"stylelint>log-symbols>chalk": true
}
},
"stylelint>log-symbols>chalk": {
"packages": {
"chalk>ansi-styles": true,
"sinon>supports-color": true
}
},
"stylelint>micromatch": {
"builtin": {
"util.inspect": true
},
"packages": {
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
2 years ago
"chokidar>braces": true,
"depcheck>readdirp>picomatch": true
}
},
"stylelint>normalize-selector": {
"globals": {
"define": true
}
},
"stylelint>postcss": {
"builtin": {
"fs": true,
"path": true
},
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"globals": {
"Buffer": true,
"atob": true,
"btoa": true,
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"console": true,
"process.env.NODE_ENV": true
},
"packages": {
"stylelint>postcss>picocolors": true,
"stylelint>postcss>source-map": true
}
},
"stylelint>postcss-html": {
"globals": {
"__dirname": true
},
"packages": {
"stylelint>postcss-html>htmlparser2": true,
"stylelint>postcss-syntax": true
}
},
"stylelint>postcss-html>htmlparser2": {
"builtin": {
"buffer.Buffer": true,
"events.EventEmitter": true,
"string_decoder.StringDecoder": true
},
"packages": {
"pumpify>inherits": true,
"stylelint>postcss-html>htmlparser2>domelementtype": true,
"stylelint>postcss-html>htmlparser2>domhandler": true,
"stylelint>postcss-html>htmlparser2>domutils": true,
"stylelint>postcss-html>htmlparser2>entities": true,
"stylelint>postcss-html>htmlparser2>readable-stream": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"stylelint>postcss-html>htmlparser2>domhandler": {
"packages": {
"stylelint>postcss-html>htmlparser2>domelementtype": true
}
},
"stylelint>postcss-html>htmlparser2>domutils": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"packages": {
"stylelint>postcss-html>htmlparser2>domelementtype": true,
"stylelint>postcss-html>htmlparser2>domutils>dom-serializer": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"stylelint>postcss-html>htmlparser2>domutils>dom-serializer": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"packages": {
"stylelint>postcss-html>htmlparser2>domelementtype": true,
"stylelint>postcss-html>htmlparser2>entities": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"stylelint>postcss-html>htmlparser2>readable-stream": {
"builtin": {
"buffer.Buffer": true,
"events.EventEmitter": true,
"stream": true,
"util": true
},
"globals": {
"process.env.READABLE_STREAM": true,
"process.nextTick": true,
"process.stderr": true,
"process.stdout": true
},
"packages": {
"@storybook/api>util-deprecate": true,
"browserify>string_decoder": true,
"pumpify>inherits": true
}
},
"stylelint>postcss-less": {
"packages": {
"stylelint>postcss": true
}
},
"stylelint>postcss-reporter": {
"packages": {
"lodash": true
}
},
"stylelint>postcss-safe-parser": {
"packages": {
"stylelint>postcss": true
}
},
"stylelint>postcss-sass": {
"packages": {
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
2 years ago
"madge>detective-scss>gonzales-pe": true,
"stylelint>postcss": true
}
},
"stylelint>postcss-scss": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"packages": {
"stylelint>postcss": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"stylelint>postcss-selector-parser": {
"packages": {
"@storybook/api>util-deprecate": true,
"stylelint>postcss-selector-parser>cssesc": true
}
},
"stylelint>postcss-syntax": {
"builtin": {
"path.isAbsolute": true,
"path.resolve": true,
"path.sep": true
},
"packages": {
"stylelint>postcss": true
}
},
"stylelint>postcss>picocolors": {
"builtin": {
"tty.isatty": true
},
"globals": {
"process.argv.includes": true,
"process.env": true,
"process.platform": true
}
},
"stylelint>specificity": {
"globals": {
"define": true
}
},
"stylelint>sugarss": {
"packages": {
"stylelint>postcss": true
}
},
"stylelint>table": {
"globals": {
"process.stdout.write": true
},
"packages": {
"eslint>ajv": true,
"lodash": true,
"stylelint>table>slice-ansi": true,
"stylelint>table>string-width": true
}
},
"stylelint>table>slice-ansi": {
"packages": {
"mocha>yargs>string-width>is-fullwidth-code-point": true,
"stylelint>table>slice-ansi>ansi-styles": true,
"stylelint>table>slice-ansi>astral-regex": true
}
},
"stylelint>table>slice-ansi>ansi-styles": {
"packages": {
"@metamask/jazzicon>color>color-convert": true
}
},
"stylelint>table>string-width": {
"packages": {
"mocha>yargs>string-width>is-fullwidth-code-point": true,
"stylelint>table>string-width>emoji-regex": true,
"stylelint>table>string-width>strip-ansi": true
}
},
"stylelint>table>string-width>strip-ansi": {
"packages": {
"stylelint>table>string-width>strip-ansi>ansi-regex": true
}
},
"stylelint>write-file-atomic": {
"builtin": {
"fs.chmod": true,
"fs.chmodSync": true,
"fs.chown": true,
"fs.chownSync": true,
"fs.close": true,
"fs.closeSync": true,
"fs.fsync": true,
"fs.fsyncSync": true,
"fs.open": true,
"fs.openSync": true,
"fs.realpath": true,
"fs.realpathSync": true,
"fs.rename": true,
"fs.renameSync": true,
"fs.stat": true,
"fs.statSync": true,
"fs.unlink": true,
"fs.unlinkSync": true,
"fs.write": true,
"fs.writeSync": true,
"path.resolve": true,
"util.promisify": true,
"worker_threads.threadId": true
},
"globals": {
"Buffer.isBuffer": true,
"__filename": true,
"process.getuid": true,
"process.pid": true
},
"packages": {
"eslint>imurmurhash": true,
"jsdom>request>is-typedarray": true,
"nyc>signal-exit": true,
"stylelint>write-file-atomic>typedarray-to-buffer": true
}
},
"stylelint>write-file-atomic>typedarray-to-buffer": {
"globals": {
"Buffer.from": true
},
"packages": {
"jsdom>request>is-typedarray": true
}
},
"terser": {
"globals": {
"Buffer.from": true,
"atob": true,
"btoa": true,
"console.log": true,
"console.warn": true,
"define": true,
"process": true
},
"packages": {
"terser>@jridgewell/source-map": true,
"terser>acorn": true
}
},
"terser>@jridgewell/source-map": {
"globals": {
"Buffer": true,
"TextDecoder": true,
"define": true
}
},
"terser>@jridgewell/source-map>@jridgewell/gen-mapping": {
"globals": {
"define": true
},
"packages": {
"terser>@jridgewell/source-map>@jridgewell/gen-mapping>@jridgewell/set-array": true,
"terser>@jridgewell/source-map>@jridgewell/gen-mapping>@jridgewell/sourcemap-codec": true,
"terser>@jridgewell/source-map>@jridgewell/trace-mapping": true
}
},
"terser>@jridgewell/source-map>@jridgewell/gen-mapping>@jridgewell/set-array": {
"globals": {
"define": true
}
},
"terser>@jridgewell/source-map>@jridgewell/gen-mapping>@jridgewell/sourcemap-codec": {
"globals": {
"Buffer": true,
"TextDecoder": true,
"define": true
}
},
"terser>@jridgewell/source-map>@jridgewell/trace-mapping": {
"globals": {
"define": true
},
"packages": {
"terser>@jridgewell/source-map>@jridgewell/gen-mapping>@jridgewell/sourcemap-codec": true,
"terser>@jridgewell/source-map>@jridgewell/trace-mapping>@jridgewell/resolve-uri": true
}
},
"terser>@jridgewell/source-map>@jridgewell/trace-mapping>@jridgewell/resolve-uri": {
"globals": {
"define": true
}
},
"terser>acorn": {
"globals": {
"console": true,
"define": true
}
},
"terser>source-map-support": {
"builtin": {
"fs": true,
"path.dirname": true,
"path.resolve": true
},
"globals": {
"XMLHttpRequest": true,
"console.error": true,
"process": true
},
"packages": {
"terser>source-map-support>buffer-from": true,
"terser>source-map-support>source-map": true
}
},
"terser>source-map-support>buffer-from": {
"globals": {
"Buffer": true
}
},
"through2": {
"packages": {
"through2>readable-stream": true
}
},
"through2>readable-stream": {
"builtin": {
"buffer.Buffer": true,
"events.EventEmitter": true,
"stream": true,
"util": true
},
"globals": {
"process.env.READABLE_STREAM": true,
"process.nextTick": true,
"process.stderr": true,
"process.stdout": true
},
"packages": {
"@storybook/api>util-deprecate": true,
"browserify>string_decoder": true,
"pumpify>inherits": true
}
},
"tsutils": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"packages": {
"tslib": true,
"typescript": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"typescript": {
"builtin": {
"buffer.Buffer": true,
"crypto": true,
"fs": true,
"inspector": true,
"os.EOL": true,
"os.platform": true,
"path.dirname": true,
"path.join": true,
"path.resolve": true,
"perf_hooks.PerformanceObserver": true,
"perf_hooks.performance": true
},
"globals": {
"Intl": true,
"PerformanceObserver": true,
"TypeScript": "write",
"__dirname": true,
"__filename": true,
"__magic__": true,
"clearTimeout": true,
"console.log": true,
"gc": true,
"globalThis": true,
"performance": true,
"process": true,
"setTimeout": true,
"toolsVersion": "write"
},
"packages": {
"terser>source-map-support": true
}
},
"vinyl": {
"builtin": {
"buffer.Buffer.isBuffer": true,
"path.basename": true,
"path.dirname": true,
"path.extname": true,
"path.join": true,
"path.normalize": true,
"path.relative": true,
"util.inspect.custom": true
},
"globals": {
"process.cwd": true
},
"packages": {
"vinyl>clone": true,
"vinyl>clone-buffer": true,
"vinyl>clone-stats": true,
"vinyl>cloneable-readable": true,
"vinyl>remove-trailing-separator": true,
"vinyl>replace-ext": true
}
},
"vinyl-buffer": {
"packages": {
"vinyl-buffer>bl": true,
"vinyl-buffer>through2": true
}
},
"vinyl-buffer>bl": {
"builtin": {
"util.inherits": true
},
"packages": {
"ethereumjs-wallet>safe-buffer": true,
"readable-stream": true
}
},
"vinyl-buffer>through2": {
"builtin": {
"util.inherits": true
},
"globals": {
"process.nextTick": true
},
"packages": {
"readable-stream": true,
"watchify>xtend": true
}
},
"vinyl-source-stream": {
"builtin": {
"path.resolve": true
},
"globals": {
"process.cwd": true
},
"packages": {
"vinyl": true,
"vinyl-source-stream>through2": true
}
},
"vinyl-source-stream>through2": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"builtin": {
"util.inherits": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
},
"globals": {
"process.nextTick": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
},
"packages": {
"readable-stream": true,
"watchify>xtend": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"vinyl-sourcemaps-apply": {
"packages": {
"vinyl-sourcemaps-apply>source-map": true
}
},
"vinyl>clone": {
"globals": {
"Buffer": true
}
},
"vinyl>clone-buffer": {
"builtin": {
"buffer.Buffer": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"vinyl>clone-stats": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"builtin": {
"fs.Stats": true
}
},
"vinyl>cloneable-readable": {
"packages": {
"pumpify>inherits": true,
"vinyl>cloneable-readable>process-nextick-args": true,
"vinyl>cloneable-readable>through2": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"vinyl>cloneable-readable>process-nextick-args": {
"globals": {
"process.nextTick": true,
"process.version": true
}
},
"vinyl>cloneable-readable>through2": {
"builtin": {
"util.inherits": true
},
"globals": {
"process.nextTick": true
},
"packages": {
"readable-stream": true,
"watchify>xtend": true
}
},
"vinyl>remove-trailing-separator": {
"globals": {
"process.platform": true
}
},
"vinyl>replace-ext": {
Build - refactor for bundle factoring and swappable runtime (#11080) * wip * build - breakout sentry-install bundle * deps - move new build sys deps to published versions * chore: lint fix * clean - remove unused file * clean - remove unsused package script * lavamoat - update build system policy * build - render html to all platforms * development - improve sourcemap debugger output * deps - update lavapack * lint - fix * deps - update lavapack for bugfix * deps - update lavapack for bugfix * deps - bump lavapack for line ending normalization * sourcemap explorer - disable boundary validation * ci - reset normal ci flow * build - re-enable minification on prod * build - remove noisy log about html dest * build - update terser and remove gulp wrapper for sourcemap fix * Revert "sourcemap explorer - disable boundary validation" This reverts commit 94112209ed880a6ebf4ee2ded411e59db6908162. * build - reenable react-devtools in dev mode * wip * build - breakout sentry-install bundle * deps - move new build sys deps to published versions * chore: lint fix * clean - remove unused file * clean - remove unsused package script * lavamoat - update build system policy * build - render html to all platforms * development - improve sourcemap debugger output * deps - update lavapack * lint - fix * deps - update lavapack for bugfix * deps - update lavapack for bugfix * deps - bump lavapack for line ending normalization * sourcemap explorer - disable boundary validation * ci - reset normal ci flow * build - re-enable minification on prod * build - remove noisy log about html dest * build - update terser and remove gulp wrapper for sourcemap fix * Revert "sourcemap explorer - disable boundary validation" This reverts commit 94112209ed880a6ebf4ee2ded411e59db6908162. * build - reenable react-devtools in dev mode * Updating lockfile * lint fix * build/dev - patch watchifys incompatible binary stats output * ui - add comment about conditional import * build - improve comment * Update development/stream-flat-map.js Co-authored-by: Brad Decker <git@braddecker.dev> * Outputting all bundle file links (metamaskbot) Co-authored-by: ryanml <ryanlanese@gmail.com> Co-authored-by: Brad Decker <git@braddecker.dev>
3 years ago
"builtin": {
"path.basename": true,
Build - refactor for bundle factoring and swappable runtime (#11080) * wip * build - breakout sentry-install bundle * deps - move new build sys deps to published versions * chore: lint fix * clean - remove unused file * clean - remove unsused package script * lavamoat - update build system policy * build - render html to all platforms * development - improve sourcemap debugger output * deps - update lavapack * lint - fix * deps - update lavapack for bugfix * deps - update lavapack for bugfix * deps - bump lavapack for line ending normalization * sourcemap explorer - disable boundary validation * ci - reset normal ci flow * build - re-enable minification on prod * build - remove noisy log about html dest * build - update terser and remove gulp wrapper for sourcemap fix * Revert "sourcemap explorer - disable boundary validation" This reverts commit 94112209ed880a6ebf4ee2ded411e59db6908162. * build - reenable react-devtools in dev mode * wip * build - breakout sentry-install bundle * deps - move new build sys deps to published versions * chore: lint fix * clean - remove unused file * clean - remove unsused package script * lavamoat - update build system policy * build - render html to all platforms * development - improve sourcemap debugger output * deps - update lavapack * lint - fix * deps - update lavapack for bugfix * deps - update lavapack for bugfix * deps - bump lavapack for line ending normalization * sourcemap explorer - disable boundary validation * ci - reset normal ci flow * build - re-enable minification on prod * build - remove noisy log about html dest * build - update terser and remove gulp wrapper for sourcemap fix * Revert "sourcemap explorer - disable boundary validation" This reverts commit 94112209ed880a6ebf4ee2ded411e59db6908162. * build - reenable react-devtools in dev mode * Updating lockfile * lint fix * build/dev - patch watchifys incompatible binary stats output * ui - add comment about conditional import * build - improve comment * Update development/stream-flat-map.js Co-authored-by: Brad Decker <git@braddecker.dev> * Outputting all bundle file links (metamaskbot) Co-authored-by: ryanml <ryanlanese@gmail.com> Co-authored-by: Brad Decker <git@braddecker.dev>
3 years ago
"path.dirname": true,
"path.extname": true,
"path.join": true
}
},
"watchify": {
"builtin": {
"path.join": true
},
"globals": {
"clearTimeout": true,
"setTimeout": true
},
"packages": {
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
2 years ago
"chokidar": true,
"through2": true,
"watchify>anymatch": true,
"watchify>xtend": true
Build - refactor for bundle factoring and swappable runtime (#11080) * wip * build - breakout sentry-install bundle * deps - move new build sys deps to published versions * chore: lint fix * clean - remove unused file * clean - remove unsused package script * lavamoat - update build system policy * build - render html to all platforms * development - improve sourcemap debugger output * deps - update lavapack * lint - fix * deps - update lavapack for bugfix * deps - update lavapack for bugfix * deps - bump lavapack for line ending normalization * sourcemap explorer - disable boundary validation * ci - reset normal ci flow * build - re-enable minification on prod * build - remove noisy log about html dest * build - update terser and remove gulp wrapper for sourcemap fix * Revert "sourcemap explorer - disable boundary validation" This reverts commit 94112209ed880a6ebf4ee2ded411e59db6908162. * build - reenable react-devtools in dev mode * wip * build - breakout sentry-install bundle * deps - move new build sys deps to published versions * chore: lint fix * clean - remove unused file * clean - remove unsused package script * lavamoat - update build system policy * build - render html to all platforms * development - improve sourcemap debugger output * deps - update lavapack * lint - fix * deps - update lavapack for bugfix * deps - update lavapack for bugfix * deps - bump lavapack for line ending normalization * sourcemap explorer - disable boundary validation * ci - reset normal ci flow * build - re-enable minification on prod * build - remove noisy log about html dest * build - update terser and remove gulp wrapper for sourcemap fix * Revert "sourcemap explorer - disable boundary validation" This reverts commit 94112209ed880a6ebf4ee2ded411e59db6908162. * build - reenable react-devtools in dev mode * Updating lockfile * lint fix * build/dev - patch watchifys incompatible binary stats output * ui - add comment about conditional import * build - improve comment * Update development/stream-flat-map.js Co-authored-by: Brad Decker <git@braddecker.dev> * Outputting all bundle file links (metamaskbot) Co-authored-by: ryanml <ryanlanese@gmail.com> Co-authored-by: Brad Decker <git@braddecker.dev>
3 years ago
}
},
"watchify>anymatch": {
"packages": {
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
2 years ago
"chokidar>normalize-path": true,
"depcheck>readdirp>picomatch": true
}
},
"watchify>browserify>shasum-object": {
"builtin": {
"crypto.createHash": true
},
"globals": {
"Buffer.isBuffer": true
},
"packages": {
"eth-rpc-errors>fast-safe-stringify": true
}
},
"webpack>micromatch>braces>snapdragon-node": {
"packages": {
"gulp>gulp-cli>isobject": true,
"webpack>micromatch>braces>snapdragon-node>define-property": true,
"webpack>micromatch>braces>snapdragon-node>snapdragon-util": true
}
},
"webpack>micromatch>braces>snapdragon-node>define-property": {
"packages": {
"webpack>micromatch>define-property>is-descriptor": true
}
},
"webpack>micromatch>braces>snapdragon-node>snapdragon-util": {
"packages": {
"webpack>micromatch>braces>snapdragon-node>snapdragon-util>kind-of": true
}
},
"webpack>micromatch>braces>snapdragon-node>snapdragon-util>kind-of": {
"packages": {
"browserify>insert-module-globals>is-buffer": true
}
},
"webpack>micromatch>braces>split-string": {
"packages": {
"webpack>micromatch>braces>split-string>extend-shallow": true
}
},
"webpack>micromatch>braces>split-string>extend-shallow": {
"packages": {
"webpack>micromatch>braces>split-string>extend-shallow>is-extendable": true,
"webpack>micromatch>extend-shallow>assign-symbols": true
}
},
"webpack>micromatch>braces>split-string>extend-shallow>is-extendable": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"packages": {
"@babel/register>clone-deep>is-plain-object": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"webpack>micromatch>define-property>is-descriptor": {
"packages": {
"webpack>micromatch>define-property>is-descriptor>is-accessor-descriptor": true,
"webpack>micromatch>define-property>is-descriptor>is-data-descriptor": true,
"webpack>micromatch>kind-of": true
}
},
"webpack>micromatch>define-property>is-descriptor>is-accessor-descriptor": {
"packages": {
"webpack>micromatch>kind-of": true
}
},
"webpack>micromatch>define-property>is-descriptor>is-data-descriptor": {
"packages": {
"webpack>micromatch>kind-of": true
}
},
"webpack>micromatch>extglob": {
"packages": {
"webpack>micromatch>array-unique": true,
"webpack>micromatch>extglob>define-property": true,
"webpack>micromatch>extglob>expand-brackets": true,
"webpack>micromatch>extglob>extend-shallow": true,
"webpack>micromatch>fragment-cache": true,
"webpack>micromatch>regex-not": true,
"webpack>micromatch>snapdragon": true,
"webpack>micromatch>to-regex": true
}
},
"webpack>micromatch>extglob>define-property": {
"packages": {
"webpack>micromatch>define-property>is-descriptor": true
}
},
"webpack>micromatch>extglob>expand-brackets": {
"globals": {
"__filename": true
},
"packages": {
"webpack>micromatch>extglob>expand-brackets>debug": true,
"webpack>micromatch>extglob>expand-brackets>define-property": true,
"webpack>micromatch>extglob>expand-brackets>posix-character-classes": true,
"webpack>micromatch>extglob>extend-shallow": true,
"webpack>micromatch>regex-not": true,
"webpack>micromatch>snapdragon": true,
"webpack>micromatch>to-regex": true
}
},
"webpack>micromatch>extglob>expand-brackets>debug": {
"builtin": {
"fs.SyncWriteStream": true,
"net.Socket": true,
"tty.WriteStream": true,
"tty.isatty": true,
"util": true
},
"globals": {
"chrome": true,
"console": true,
"document": true,
"localStorage": true,
"navigator": true,
"process": true
},
"packages": {
"webpack>micromatch>extglob>expand-brackets>debug>ms": true
}
},
"webpack>micromatch>extglob>expand-brackets>define-property": {
"packages": {
"webpack>micromatch>extglob>expand-brackets>define-property>is-descriptor": true
}
},
"webpack>micromatch>extglob>expand-brackets>define-property>is-descriptor": {
"packages": {
"webpack>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-accessor-descriptor": true,
"webpack>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-data-descriptor": true,
"webpack>micromatch>extglob>expand-brackets>define-property>is-descriptor>kind-of": true
}
},
"webpack>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-accessor-descriptor": {
"packages": {
"webpack>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-accessor-descriptor>kind-of": true
}
},
"webpack>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-accessor-descriptor>kind-of": {
"packages": {
"browserify>insert-module-globals>is-buffer": true
}
},
"webpack>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-data-descriptor": {
"packages": {
"webpack>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-data-descriptor>kind-of": true
}
},
"webpack>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-data-descriptor>kind-of": {
"packages": {
"browserify>insert-module-globals>is-buffer": true
}
},
"webpack>micromatch>extglob>extend-shallow": {
"packages": {
"webpack>micromatch>extglob>extend-shallow>is-extendable": true
}
},
"webpack>micromatch>fragment-cache": {
"packages": {
"webpack>micromatch>snapdragon>map-cache": true
}
},
"webpack>micromatch>nanomatch": {
"builtin": {
"path.basename": true,
"path.sep": true,
"util.inspect": true
},
"packages": {
"nyc>spawn-wrap>is-windows": true,
"webpack>micromatch>arr-diff": true,
"webpack>micromatch>array-unique": true,
"webpack>micromatch>fragment-cache": true,
"webpack>micromatch>kind-of": true,
"webpack>micromatch>nanomatch>define-property": true,
"webpack>micromatch>nanomatch>extend-shallow": true,
"webpack>micromatch>nanomatch>is-odd": true,
"webpack>micromatch>object.pick": true,
"webpack>micromatch>regex-not": true,
"webpack>micromatch>snapdragon": true,
"webpack>micromatch>to-regex": true
}
},
"webpack>micromatch>nanomatch>define-property": {
"packages": {
"gulp>gulp-cli>isobject": true,
"webpack>micromatch>define-property>is-descriptor": true
}
},
"webpack>micromatch>nanomatch>extend-shallow": {
"packages": {
"webpack>micromatch>extend-shallow>assign-symbols": true,
"webpack>micromatch>nanomatch>extend-shallow>is-extendable": true
}
},
"webpack>micromatch>nanomatch>extend-shallow>is-extendable": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"packages": {
"@babel/register>clone-deep>is-plain-object": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"webpack>micromatch>nanomatch>is-odd": {
"packages": {
"gulp>undertaker>bach>array-last>is-number": true
}
},
"webpack>micromatch>object.pick": {
"packages": {
"gulp>gulp-cli>isobject": true
}
},
"webpack>micromatch>regex-not": {
"packages": {
"webpack>micromatch>regex-not>extend-shallow": true,
"webpack>micromatch>to-regex>safe-regex": true
}
},
"webpack>micromatch>regex-not>extend-shallow": {
"packages": {
"webpack>micromatch>extend-shallow>assign-symbols": true,
"webpack>micromatch>regex-not>extend-shallow>is-extendable": true
}
},
"webpack>micromatch>regex-not>extend-shallow>is-extendable": {
"packages": {
"@babel/register>clone-deep>is-plain-object": true
}
},
"webpack>micromatch>snapdragon": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"builtin": {
"fs.readFileSync": true,
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"path.dirname": true,
"util.inspect": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
},
"globals": {
"__filename": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
},
"packages": {
"webpack>micromatch>extglob>extend-shallow": true,
"webpack>micromatch>snapdragon>base": true,
"webpack>micromatch>snapdragon>debug": true,
"webpack>micromatch>snapdragon>define-property": true,
"webpack>micromatch>snapdragon>map-cache": true,
"webpack>micromatch>snapdragon>source-map": true,
"webpack>micromatch>snapdragon>source-map-resolve": true,
"webpack>micromatch>snapdragon>use": true
}
},
"webpack>micromatch>snapdragon>base": {
"builtin": {
"util.inherits": true
},
"packages": {
"gulp>gulp-cli>isobject": true,
"pubnub>superagent>component-emitter": true,
"webpack>micromatch>snapdragon>base>cache-base": true,
"webpack>micromatch>snapdragon>base>class-utils": true,
"webpack>micromatch>snapdragon>base>define-property": true,
"webpack>micromatch>snapdragon>base>mixin-deep": true,
"webpack>micromatch>snapdragon>base>pascalcase": true
}
},
"webpack>micromatch>snapdragon>base>cache-base": {
"packages": {
"gulp>gulp-cli>array-sort>get-value": true,
"gulp>gulp-cli>isobject": true,
"pubnub>superagent>component-emitter": true,
"webpack>micromatch>snapdragon>base>cache-base>collection-visit": true,
"webpack>micromatch>snapdragon>base>cache-base>has-value": true,
"webpack>micromatch>snapdragon>base>cache-base>set-value": true,
"webpack>micromatch>snapdragon>base>cache-base>to-object-path": true,
"webpack>micromatch>snapdragon>base>cache-base>union-value": true,
"webpack>micromatch>snapdragon>base>cache-base>unset-value": true
}
},
"webpack>micromatch>snapdragon>base>cache-base>collection-visit": {
"packages": {
"webpack>micromatch>snapdragon>base>cache-base>collection-visit>map-visit": true,
"webpack>micromatch>snapdragon>base>cache-base>collection-visit>object-visit": true
}
},
"webpack>micromatch>snapdragon>base>cache-base>collection-visit>map-visit": {
"builtin": {
"util.inspect": true
},
"packages": {
"webpack>micromatch>snapdragon>base>cache-base>collection-visit>object-visit": true
}
},
"webpack>micromatch>snapdragon>base>cache-base>collection-visit>object-visit": {
"packages": {
"gulp>gulp-cli>isobject": true
}
},
"webpack>micromatch>snapdragon>base>cache-base>has-value": {
"packages": {
"gulp>gulp-cli>array-sort>get-value": true,
"gulp>gulp-cli>isobject": true,
"webpack>micromatch>snapdragon>base>cache-base>has-value>has-values": true
}
},
"webpack>micromatch>snapdragon>base>cache-base>has-value>has-values": {
"packages": {
"webpack>micromatch>snapdragon>base>cache-base>has-value>has-values>is-number": true,
"webpack>micromatch>snapdragon>base>cache-base>has-value>has-values>kind-of": true
}
},
"webpack>micromatch>snapdragon>base>cache-base>has-value>has-values>is-number": {
"packages": {
"webpack>micromatch>snapdragon>base>cache-base>has-value>has-values>is-number>kind-of": true
}
},
"webpack>micromatch>snapdragon>base>cache-base>has-value>has-values>is-number>kind-of": {
"packages": {
"browserify>insert-module-globals>is-buffer": true
}
},
"webpack>micromatch>snapdragon>base>cache-base>has-value>has-values>kind-of": {
"packages": {
"browserify>insert-module-globals>is-buffer": true
}
},
"webpack>micromatch>snapdragon>base>cache-base>set-value": {
"packages": {
"@babel/register>clone-deep>is-plain-object": true,
"webpack>micromatch>braces>split-string": true,
"webpack>micromatch>extglob>extend-shallow": true,
"webpack>micromatch>extglob>extend-shallow>is-extendable": true
}
},
"webpack>micromatch>snapdragon>base>cache-base>to-object-path": {
"packages": {
"webpack>micromatch>snapdragon>base>cache-base>to-object-path>kind-of": true
}
},
"webpack>micromatch>snapdragon>base>cache-base>to-object-path>kind-of": {
"packages": {
"browserify>insert-module-globals>is-buffer": true
}
},
"webpack>micromatch>snapdragon>base>cache-base>union-value": {
"packages": {
"gulp-zip>plugin-error>arr-union": true,
"gulp>gulp-cli>array-sort>get-value": true,
"webpack>micromatch>extglob>extend-shallow>is-extendable": true,
"webpack>micromatch>snapdragon>base>cache-base>set-value": true
}
},
"webpack>micromatch>snapdragon>base>cache-base>unset-value": {
"packages": {
"gulp>gulp-cli>isobject": true,
"webpack>micromatch>snapdragon>base>cache-base>unset-value>has-value": true
}
},
"webpack>micromatch>snapdragon>base>cache-base>unset-value>has-value": {
"packages": {
"gulp>gulp-cli>array-sort>get-value": true,
"webpack>micromatch>snapdragon>base>cache-base>unset-value>has-value>has-values": true,
"webpack>micromatch>snapdragon>base>cache-base>unset-value>has-value>isobject": true
}
},
"webpack>micromatch>snapdragon>base>cache-base>unset-value>has-value>isobject": {
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
"packages": {
"readable-stream>isarray": true
Exclude files from builds by build type (#12521) This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions. The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details. ### Code Fencing and ESLint When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor. ### File Exclusion For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`. As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice. Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
3 years ago
}
},
"webpack>micromatch>snapdragon>base>class-utils": {
"builtin": {
"util": true
},
"packages": {
"gulp-zip>plugin-error>arr-union": true,
"gulp>gulp-cli>isobject": true,
"webpack>micromatch>snapdragon>base>class-utils>static-extend": true,
"webpack>micromatch>snapdragon>define-property": true
}
},
"webpack>micromatch>snapdragon>base>class-utils>static-extend": {
"builtin": {
"util.inherits": true
},
"packages": {
"webpack>micromatch>snapdragon>base>class-utils>static-extend>object-copy": true,
"webpack>micromatch>snapdragon>define-property": true
}
},
"webpack>micromatch>snapdragon>base>class-utils>static-extend>object-copy": {
"packages": {
"webpack>micromatch>snapdragon>base>class-utils>static-extend>object-copy>copy-descriptor": true,
"webpack>micromatch>snapdragon>base>class-utils>static-extend>object-copy>kind-of": true,
"webpack>micromatch>snapdragon>define-property": true
}
},
"webpack>micromatch>snapdragon>base>class-utils>static-extend>object-copy>kind-of": {
"packages": {
"browserify>insert-module-globals>is-buffer": true
}
},
"webpack>micromatch>snapdragon>base>define-property": {
"packages": {
"webpack>micromatch>define-property>is-descriptor": true
}
},
"webpack>micromatch>snapdragon>base>mixin-deep": {
"packages": {
"gulp>undertaker>object.reduce>for-own>for-in": true,
"webpack>micromatch>snapdragon>base>mixin-deep>is-extendable": true
}
},
"webpack>micromatch>snapdragon>base>mixin-deep>is-extendable": {
"packages": {
"@babel/register>clone-deep>is-plain-object": true
}
},
"webpack>micromatch>snapdragon>debug": {
"builtin": {
"fs.SyncWriteStream": true,
"net.Socket": true,
"tty.WriteStream": true,
"tty.isatty": true,
"util": true
},
"globals": {
"chrome": true,
"console": true,
"document": true,
"localStorage": true,
"navigator": true,
"process": true
},
"packages": {
"webpack>micromatch>snapdragon>debug>ms": true
}
},
"webpack>micromatch>snapdragon>define-property": {
"packages": {
"webpack>micromatch>snapdragon>define-property>is-descriptor": true
}
},
"webpack>micromatch>snapdragon>define-property>is-descriptor": {
"packages": {
"webpack>micromatch>snapdragon>define-property>is-descriptor>is-accessor-descriptor": true,
"webpack>micromatch>snapdragon>define-property>is-descriptor>is-data-descriptor": true,
"webpack>micromatch>snapdragon>define-property>is-descriptor>kind-of": true
}
},
"webpack>micromatch>snapdragon>define-property>is-descriptor>is-accessor-descriptor": {
"packages": {
"webpack>micromatch>snapdragon>define-property>is-descriptor>is-accessor-descriptor>kind-of": true
}
},
"webpack>micromatch>snapdragon>define-property>is-descriptor>is-accessor-descriptor>kind-of": {
"packages": {
"browserify>insert-module-globals>is-buffer": true
}
},
"webpack>micromatch>snapdragon>define-property>is-descriptor>is-data-descriptor": {
"packages": {
"webpack>micromatch>snapdragon>define-property>is-descriptor>is-data-descriptor>kind-of": true
}
},
"webpack>micromatch>snapdragon>define-property>is-descriptor>is-data-descriptor>kind-of": {
"packages": {
"browserify>insert-module-globals>is-buffer": true
}
},
"webpack>micromatch>snapdragon>source-map-resolve": {
"builtin": {
"url.resolve": true
},
"globals": {
"setImmediate": true
},
"packages": {
"gulp-sourcemaps>css>source-map-resolve>atob": true,
"gulp-sourcemaps>css>source-map-resolve>decode-uri-component": true,
"resolve-url-loader>rework>css>urix": true,
"webpack>micromatch>snapdragon>source-map-resolve>source-map-url": true
}
},
"webpack>micromatch>snapdragon>source-map-resolve>source-map-url": {
"globals": {
"define": true
}
},
"webpack>micromatch>snapdragon>use": {
"packages": {
"webpack>micromatch>kind-of": true
}
},
"webpack>micromatch>to-regex": {
"packages": {
"webpack>micromatch>regex-not": true,
"webpack>micromatch>to-regex>define-property": true,
"webpack>micromatch>to-regex>extend-shallow": true,
"webpack>micromatch>to-regex>safe-regex": true
}
},
"webpack>micromatch>to-regex>define-property": {
"packages": {
"gulp>gulp-cli>isobject": true,
"webpack>micromatch>define-property>is-descriptor": true
}
},
"webpack>micromatch>to-regex>extend-shallow": {
"packages": {
"webpack>micromatch>extend-shallow>assign-symbols": true,
"webpack>micromatch>to-regex>extend-shallow>is-extendable": true
}
},
"webpack>micromatch>to-regex>extend-shallow>is-extendable": {
"packages": {
"@babel/register>clone-deep>is-plain-object": true
}
},
"webpack>micromatch>to-regex>safe-regex": {
"packages": {
"enzyme>rst-selector-parser>nearley>randexp>ret": true
}
},
"yargs": {
"builtin": {
"assert": true,
"fs": true,
"path": true,
"util": true
},
"globals": {
"Error": true,
"console": true,
"process": true
},
"packages": {
"yargs>cliui": true,
"yargs>escalade": true,
"yargs>get-caller-file": true,
"yargs>require-directory": true,
"yargs>string-width": true,
"yargs>y18n": true,
"yargs>yargs-parser": true
}
},
"yargs>cliui": {
"packages": {
"eslint>strip-ansi": true,
"yargs>cliui>wrap-ansi": true,
"yargs>string-width": true
}
},
"yargs>cliui>wrap-ansi": {
"packages": {
"chalk>ansi-styles": true,
"eslint>strip-ansi": true,
"yargs>string-width": true
}
},
"yargs>escalade": {
"builtin": {
"fs.readdirSync": true,
"fs.statSync": true,
"path.dirname": true,
"path.resolve": true
}
},
"yargs>require-directory": {
"builtin": {
"fs.readdirSync": true,
"fs.statSync": true,
"path.dirname": true,
"path.join": true,
"path.resolve": true
}
},
"yargs>string-width": {
"packages": {
"eslint>strip-ansi": true,
"yargs>string-width>emoji-regex": true,
"yargs>string-width>is-fullwidth-code-point": true
}
},
"yargs>y18n": {
"builtin": {
"fs": true,
"path": true,
"util": true
}
},
"yargs>yargs-parser": {
"builtin": {
"fs": true,
"path": true,
"util": true
},
"globals": {
"process": true
}
}
}
}