-
-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standardize with module template #351
base: main
Are you sure you want to change the base?
Conversation
1307906
to
f55d0cf
Compare
New, updated, and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: @metamask/[email protected], [email protected] |
🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎ To accept the risk, merge this PR and you will not be notified again.
Next stepsWhat is an invalid package.json?Package has an invalid package.json and can cause installation problems if you try to use it. Fix syntax errors in the invalid package.json and publish a new version with a valid package.json. Consumers can use npm overrides to force a version that does not have this problem if one exists. What is network access?This module accesses the network. Packages should remove all network access that is functionally unnecessary. Consumers should audit network access to ensure legitimate use. What is shell access?This module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code. Packages should avoid accessing the shell which can reduce portability, and make it easier for malicious shell access to be introduced. What is new author?A new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package. Scrutinize new collaborator additions to packages because they now have the ability to publish code into your dependency tree. Packages should avoid frequent or unnecessary additions or changes to publishing rights. Why are READMEs important?Package does not have a README. This may indicate a failed publish or a low quality package. Add a README to to the package and publish a new version. Take a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with
|
"./encryption": { | ||
"import": "./dist/encryption.mjs", | ||
"require": "./dist/encryption.js", | ||
"types": "./dist/types/encryption.d.ts" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can confirm that these are created by running rm -rf dist && yarn build
.
"sourceMap": true, | ||
"moduleResolution": "node", | ||
"noEmit": true, | ||
"noErrorTruncation": true, | ||
"strictNullChecks": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a ticket to change this to strict: true
here: #352
"strictNullChecks": true, | ||
"target": "ES2017", | ||
"typeRoots": ["./node_modules/@types"] | ||
"target": "es2017" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth noting that in the module template we use a target of es2020
. I've added a ticket here: #353
// ], | ||
|
||
// Indicates which provider should be used to instrument code for coverage | ||
coverageProvider: 'babel', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a new setting and may be the cause of the coverage threshold bumping.
"@metamask/eslint-config-nodejs": "^12.0.0", | ||
"@metamask/eslint-config-typescript": "^12.0.0", | ||
"@types/jest": "^28.1.6", | ||
"@types/node": "^16", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This matches the module template: https://github.com/MetaMask/metamask-module-template/blob/085b701d9084b45179caef9db1c0b60afa659a78/package.json#L52
f55d0cf
to
a7efba4
Compare
- Bring GitHub workflows up to date - Bump our actions - Bump `gh-pages` action, which now requires setting PUBLISH_DOCS_TOKEN - Send release candidate notifications to Slack, which requires SLACK_WEBHOOK_URL - Update dotfiles - Update `.nvmrc` so we're always using the current LTS - Add Yarn constraints - Update build script to publish ESM and CJS versions, and split `tsconfig.json` into development and build versions - Downgrade Yarn to 3.2.1 to match module template - Upgrade ESLint packages and fix lint violations - Upgrade other dev dependencies
a7efba4
to
55dbc77
Compare
"@lavamoat/preinstall-always-fail", | ||
"@metamask/auto-changelog", | ||
"@types/*", | ||
"@yarnpkg/*", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The addition of clipanion
and @yarnpkg/*
is different from the module template.
It seems that newer versions of depcheck
(at the time of this writing, I was testing with 1.4.7) cause depcheck
to mistakenly think that none of the packages being referred to in the .yarn/plugins
directory are installed:
Missing dependencies
* @yarnpkg/core: ./.yarn/plugins/@yarnpkg/plugin-constraints.cjs
* @yarnpkg/cli: ./.yarn/plugins/@yarnpkg/plugin-constraints.cjs
* clipanion: ./.yarn/plugins/@yarnpkg/plugin-constraints.cjs
* @yarnpkg/fslib: ./.yarn/plugins/@yarnpkg/plugin-constraints.cjs
We probably need to add these lines to the module template.
Invalid package json, network access, shell access, new authors, no README ok.
(edit: I'm not sure why these comment don't do anything for me, but whatever) |
gh-pages
action, which now requires setting PUBLISH_DOCS_TOKEN.nvmrc
so we're always using the current LTStsconfig.json
into development and build versions