MetaMask / metamask-design-system

0 stars 0 forks source link

chore: initial yarn constraints with storybook install test #30

Open georgewrmarshall opened 4 hours ago

georgewrmarshall commented 4 hours ago

Description

This pull request modifies the monorepo configuration to exclude the docs workspace from monorepo-wide constraints and linting checks, such as those applied to package names. The docs workspace, which contains our Storybook for React and React Native components, does not require these checks. The goal is to streamline the configuration and avoid applying unnecessary constraints to this workspace.

The solution involves updating the relevant configuration files to ensure that the docs workspace is ignored, while other workspaces remain unaffected by this change.

yarn.config.cjs

Related issues

Fixes: https://github.com/MetaMask/metamask-design-system/issues/28

Manual testing steps

  1. Run the linting process across the monorepo.
  2. Verify that the docs workspace is excluded from linting checks.
  3. Confirm that all other workspaces continue to be subject to the current linting rules and constraints.
  4. Check that the Storybook for React and React Native still works as expected in the docs workspace.

Screenshots/Recordings

N/A

Before

Linting checks and package constraints applied to all workspaces, including docs.

After

docs workspace is excluded from linting and package constraints.

Pre-merge author checklist

Pre-merge reviewer checklist

socket-security[bot] commented 4 hours ago

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@babel/code-frame@7.25.7 environment 0 67.2 kB nicolo-ribaudo
npm/@babel/compat-data@7.25.7 None 0 108 kB existentialism, hzoo, jlhwung, ...1 more
npm/@babel/core@7.25.7 None 0 864 kB existentialism, hzoo, jlhwung, ...1 more
npm/@babel/generator@7.25.7 None 0 487 kB existentialism, hzoo, jlhwung, ...1 more
npm/@babel/helper-compilation-targets@7.25.7 None 0 91.5 kB nicolo-ribaudo
npm/@babel/helper-module-imports@7.25.7 None 0 122 kB existentialism, hzoo, jlhwung, ...1 more
npm/@babel/helper-module-transforms@7.25.7 None 0 233 kB existentialism, hzoo, jlhwung, ...1 more
npm/@babel/helper-plugin-utils@7.25.7 None 0 82.2 kB nicolo-ribaudo
npm/@babel/helper-simple-access@7.25.7 None 0 71.8 kB existentialism, hzoo, jlhwung, ...1 more
npm/@babel/helper-string-parser@7.25.7 None 0 74.4 kB nicolo-ribaudo
npm/@babel/helper-validator-identifier@7.25.7 None 0 93.3 kB existentialism, hzoo, jlhwung, ...1 more
npm/@babel/helper-validator-option@7.25.7 None 0 54.7 kB existentialism, hzoo, jlhwung, ...1 more
npm/@babel/helpers@7.25.7 None 0 936 kB existentialism, hzoo, jlhwung, ...1 more
npm/@babel/highlight@7.25.7 environment 0 63.9 kB existentialism, hzoo, jlhwung, ...1 more
npm/@babel/parser@7.25.7 None 0 1.89 MB existentialism, hzoo, jlhwung, ...1 more
npm/@babel/template@7.25.7 None 0 131 kB existentialism, hzoo, jlhwung, ...1 more
npm/@babel/traverse@7.25.7 None 0 740 kB existentialism, hzoo, jlhwung, ...1 more
npm/@babel/types@7.25.7 environment 0 2.61 MB nicolo-ribaudo
npm/@chromatic-com/storybook@1.9.0 Transitive: filesystem +8 9.76 MB ghengeveld
npm/@storybook/addon-essentials@8.3.5 Transitive: environment, filesystem +41 6.4 MB domyen, ghengeveld, jreinhold, ...8 more
npm/@storybook/addon-interactions@8.3.5 Transitive: environment, eval +13 3.81 MB shilman
npm/@storybook/addon-links@8.3.5 None +3 97.6 kB shilman
npm/@storybook/addon-onboarding@8.3.5 None +2 450 kB shilman
npm/@storybook/blocks@8.3.5 eval Transitive: environment +15 5.83 MB shilman
npm/@storybook/react-vite@8.3.5 Transitive: environment, eval, filesystem, network, unsafe +107 47.8 MB shilman
npm/@storybook/react@8.3.5 Transitive: environment +18 4.08 MB shilman
npm/@storybook/test@8.3.5 Transitive: environment, eval +45 6.32 MB
npm/@types/lodash@4.17.10 None 0 867 kB types
npm/@types/prop-types@15.7.13 None 0 6.96 kB types
npm/@types/react-dom@18.3.0 None 0 37.8 kB types
npm/@types/react@18.3.11 None +1 1.68 MB types
npm/@vitejs/plugin-react-swc@3.7.1 filesystem, unsafe +13 443 MB vitebot
npm/browserslist@4.24.0 environment, filesystem 0 63.5 kB ai
npm/caniuse-lite@1.0.30001667 None 0 2.11 MB ai, beneb, caniuse-lite
npm/electron-to-chromium@1.5.34 None 0 148 kB kilianvalkhof
npm/jsesc@3.0.2 None 0 31.7 kB mathias
npm/picocolors@1.1.0 environment 0 11.4 kB alexeyraspopov
npm/postcss@8.4.47 environment, filesystem 0 200 kB ai
npm/prop-types@15.8.1 environment +3 130 kB ljharb
npm/react-dom@18.3.1 environment +2 4.61 MB react-bot
npm/react@18.3.1 environment +1 324 kB react-bot
npm/source-map-js@1.2.1 None 0 140 kB 7rulnik
npm/storybook@8.3.5 Transitive: environment, eval, filesystem, network, shell, unsafe +102 279 MB ghengeveld, jreinhold, ndelangen, ...3 more
npm/vite@5.4.8 Transitive: environment, filesystem, network, shell +43 274 MB antfu, patak, soda, ...2 more

🚮 Removed packages: npm/@babel/code-frame@7.24.7, npm/@babel/compat-data@7.25.4, npm/@babel/core@7.25.2, npm/@babel/generator@7.25.5, npm/@babel/helper-compilation-targets@7.25.2, npm/@babel/helper-module-imports@7.24.7, npm/@babel/helper-module-transforms@7.25.2, npm/@babel/helper-plugin-utils@7.24.8, npm/@babel/helper-simple-access@7.24.7, npm/@babel/helper-string-parser@7.24.8, npm/@babel/helper-validator-identifier@7.24.7, npm/@babel/helper-validator-option@7.24.8, npm/@babel/helpers@7.25.0, npm/@babel/highlight@7.24.7, npm/@babel/parser@7.25.4, npm/@babel/template@7.25.0, npm/@babel/traverse@7.25.4, npm/@babel/types@7.25.4, npm/@types/lodash@4.17.7, npm/browserslist@4.23.3, npm/caniuse-lite@1.0.30001653, npm/electron-to-chromium@1.5.13, npm/jsesc@2.5.2, npm/picocolors@1.0.1, npm/postcss@8.4.41, npm/source-map-js@1.2.0

View full report↗︎

socket-security[bot] commented 4 hours ago

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package NoteSourceCI
Deprecated npm/glob@7.2.3
  • Reason: Glob versions prior to v9 are no longer supported
⚠︎
Deprecated npm/inflight@1.0.6
  • Reason: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
⚠︎
New author npm/wrappy@1.0.2 🚫
Network access npm/debug@2.6.9 🚫
Shell access npm/open@8.4.2 🚫
Network access npm/methods@1.1.2 🚫
Shell access npm/better-opn@3.0.2 🚫
Network access npm/raw-body@2.5.2 🚫
New author npm/encodeurl@2.0.0 🚫
Shell access npm/esbuild@0.21.5 🚫
Install scripts npm/esbuild@0.21.5 ⚠︎
Network access npm/esbuild@0.21.5 🚫
Network access npm/esbuild@0.21.5 🚫
New author npm/body-parser@1.20.3 🚫
Unstable ownership npm/body-parser@1.20.3 🚫
Network access npm/body-parser@1.20.3 🚫
New author npm/send@0.19.0 🚫
Network access npm/send@0.19.0 🚫
Unstable ownership npm/chromatic@11.12.5 🚫

View full report↗︎

Next steps

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.

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.

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 an install script?

Install scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.

Packages should not be running non-essential scripts during install and there are often solutions to problems people solve with install scripts that can be run at publish time instead.

What is unstable ownership?

A new collaborator has begun publishing package versions. Package stability and security risk may be elevated.

Try to reduce the amount of authors you depend on to reduce the risk to malicious actors gaining access to your supply chain. Packages should remove inactive collaborators with publishing rights from packages on npm.

Take a deeper look at the dependency

Take 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 package

If 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 risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/foo@1.0.0 or ignore all packages with @SocketSecurity ignore-all

  • @SocketSecurity ignore npm/glob@7.2.3
  • @SocketSecurity ignore npm/inflight@1.0.6
  • @SocketSecurity ignore npm/wrappy@1.0.2
  • @SocketSecurity ignore npm/debug@2.6.9
  • @SocketSecurity ignore npm/open@8.4.2
  • @SocketSecurity ignore npm/methods@1.1.2
  • @SocketSecurity ignore npm/better-opn@3.0.2
  • @SocketSecurity ignore npm/raw-body@2.5.2
  • @SocketSecurity ignore npm/encodeurl@2.0.0
  • @SocketSecurity ignore npm/esbuild@0.21.5
  • @SocketSecurity ignore npm/body-parser@1.20.3
  • @SocketSecurity ignore npm/send@0.19.0
  • @SocketSecurity ignore npm/chromatic@11.12.5