-
Notifications
You must be signed in to change notification settings - Fork 15
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
Upgrade node version to v18-20 and yarn to v3 #600
Conversation
🚨 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 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. 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 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 a deprecated package?The maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed. Research the state of the package and determine if there are non-deprecated versions that can be used, or if it should be replaced with a new, supported solution. 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
|
@@ -34,7 +34,7 @@ jobs: | |||
- run: | |||
name: Postinstall | |||
command: | | |||
yarn setup | |||
yarn |
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 yarn setup script was previously used in our project as a means to include Lavamoat's allow-scripts. This was necessary at the time due to certain limitations in Lavamoat's developer experience. However, recent improvements in Lavamoat have eliminated these hindrances, particularly when updating dependencies.
"setup": "yarn install && yarn allow-scripts",
As a result, the yarn setup script, which essentially ran yarn install and yarn allow-scripts, has become redundant. Many projects, including ours, are now moving away from using it.
In this pull request, we have removed every instance of the yarn setup script, as shown in the attached screenshot. This change simplifies our scripts and aligns with current best practices
@@ -48,7 +48,7 @@ jobs: | |||
at: . | |||
- run: | |||
name: build:storybook | |||
command: yarn build-storybook | |||
command: yarn build:storybook |
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.
@@ -5,7 +5,6 @@ module.exports = { | |||
'@storybook/addon-essentials', | |||
'@storybook/preset-scss', | |||
'@storybook/addon-a11y', | |||
'@storybook/addon-mdx-gfm', |
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.
Only used for mdx migration which we don't require
@@ -1,4 +1,5 @@ | |||
# Changelog |
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.
"@yarnpkg/core", | ||
"@yarnpkg/cli", | ||
"clipanion", | ||
"@yarnpkg/fslib" |
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.
Hey @mcmire I'm not sure why buy when I run yarn lint
it picks up that the yarnpkg are missing dependencies?
"@yarnpkg/core",
"@yarnpkg/cli",
"clipanion",
"@yarnpkg/fslib"
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 makes sense. All of these dependencies are used by Yarn, and depcheck
is unable to see that these are used, since they're never imported anywhere. So this is the right call.
|
||
start().catch((error) => { | ||
console.error(error); | ||
process.exit(1); | ||
}); | ||
|
||
async function start() { | ||
const fetch = (await import('node-fetch')).default; | ||
|
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.
Closing in favor of #601 |
Description
This PR aims to update the design token package, which was originally generated from the metamask-module-template. Over time, the package has become outdated and incompatible with mobile and portfolio due to dependency issues, particularly with node versions. This PR addresses these issues by updating the dependencies and aligning the package with the most recent module template.
The package.json file was compared with the latest module template using chatGPT, which streamlined the process of identifying and updating outdated dependencies. The upgrade to yarn version 3 also necessitated changes to the GitHub workflow files, which were updated to align with the module template. This alignment should enhance the automation of our releases. Due to the upgraded node and yarn versions, this PR includes numerous other dependency updates, file changes, lint fixes, and the inclusion of config files.
Fixes: 597
Manual Testing Steps
Because mobile and portfolio are using yarn v1 and the design tokens is using v3. It's quite hard to test using yarn link. But if you pull this branch and try to use yarn link on a project that use yarn 3 it will work like the module template.
yarn && yarn build
yarn link ../path/to/design-tokens
brandColor
in to theindex.ts
fileOther smoke tests
yarn storybook
Screencasts/Screenshots
Screencast below shows yarn link version of the design-tokens to the module-template as a test to ensure that the
brandColor
object in thev1.13
release is importing and working as intendedafter1080.mov