Skip to content
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

CLI: Rename --webpack-stats-json to --stats-json as it works in Vite #26128

Merged
merged 3 commits into from
Feb 23, 2024

Conversation

tmeasday
Copy link
Member

@tmeasday tmeasday commented Feb 21, 2024

What I did

  • Added a new flag --stats-json and made it behave identically to --webpack-stats-json
  • Removed --webpack-stats-json from the docs
  • I didn't deprecate it in code, as we'll likely deprecate both in the future and it's simpler this way.
  • Also added an tracked error if you pass --stats-json to Vite in dev mode (where it doesn't work).

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>

Copy link

socket-security bot commented Feb 21, 2024

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

Package New capabilities Transitives Size Publisher
npm/@0no-co/[email protected] None 0 153 kB philpl
npm/@aashutoshrathi/[email protected] None 0 10.9 kB aashutoshrathi
npm/@analogjs/[email protected] environment Transitive: eval, filesystem, network, shell, unsafe +135 93.3 MB brandonroberts
npm/@angular-devkit/[email protected] Transitive: eval, network +1 426 kB google-wombot
npm/@angular-devkit/[email protected] environment, filesystem, network, shell, unsafe Transitive: eval +134 93.2 MB google-wombot
npm/@angular-devkit/[email protected] eval, network 0 260 kB google-wombot
npm/@angular/[email protected] None +1 25.4 MB google-wombot
npm/@angular/[email protected] environment, filesystem, network, shell, unsafe +2 10 MB google-wombot
npm/@angular/[email protected] None +1 34.9 MB google-wombot
npm/@angular/[email protected] Transitive: environment, filesystem, unsafe +31 42.8 MB google-wombot
npm/@angular/[email protected] None +1 33.2 MB google-wombot
npm/@angular/[email protected] None 0 23.7 MB google-wombot
npm/@angular/[email protected] None +4 39.3 MB google-wombot
npm/@angular/[email protected] None +5 46.9 MB google-wombot
npm/@angular/[email protected] None +3 37.3 MB google-wombot
npm/@aw-web-design/[email protected] shell 0 50.5 kB the-code-monkey
npm/@babel/[email protected] Transitive: environment +3 118 kB nicolo-ribaudo
npm/@babel/[email protected] environment, filesystem, unsafe +26 7.33 MB nicolo-ribaudo
npm/@babel/[email protected] environment, filesystem, unsafe +33 13.8 MB nicolo-ribaudo
npm/@babel/[email protected] None 0 1.89 MB nicolo-ribaudo
npm/@babel/[email protected] Transitive: environment, filesystem, unsafe +28 7.35 MB nicolo-ribaudo
npm/@babel/[email protected] Transitive: environment, filesystem, unsafe +28 7.35 MB nicolo-ribaudo
npm/@babel/[email protected] Transitive: environment, filesystem, unsafe +28 7.35 MB nicolo-ribaudo
npm/@babel/[email protected] Transitive: environment, filesystem, unsafe +34 7.65 MB nicolo-ribaudo
npm/@babel/[email protected] Transitive: environment, filesystem, unsafe +29 7.36 MB nicolo-ribaudo
npm/@babel/[email protected] Transitive: environment, filesystem, unsafe +29 7.35 MB nicolo-ribaudo
npm/@babel/[email protected] Transitive: environment, filesystem, unsafe +30 7.48 MB nicolo-ribaudo
npm/@babel/[email protected] Transitive: environment, filesystem, unsafe +28 7.35 MB nicolo-ribaudo
npm/@babel/[email protected] Transitive: environment, filesystem, unsafe +28 7.35 MB nicolo-ribaudo
npm/@babel/[email protected] unsafe Transitive: environment, filesystem +28 7.38 MB nicolo-ribaudo
npm/@babel/[email protected] environment Transitive: filesystem, unsafe +108 8.92 MB nicolo-ribaudo
npm/@babel/[email protected] Transitive: environment, filesystem, unsafe +34 7.47 MB nicolo-ribaudo
npm/@babel/[email protected] Transitive: environment, filesystem, unsafe +38 7.85 MB nicolo-ribaudo
npm/@babel/[email protected] None 0 329 kB nicolo-ribaudo
npm/@babel/[email protected] None 0 249 kB nicolo-ribaudo
npm/@babel/[email protected] Transitive: environment +17 5.54 MB nicolo-ribaudo
npm/@babel/[email protected] environment +2 2.49 MB nicolo-ribaudo
npm/@chromaui/[email protected] environment, network Transitive: eval, filesystem, unsafe +60 38.6 MB tmeasday
npm/@cspotcode/[email protected] filesystem +3 295 kB cspotcode
npm/@devtools-ds/[email protected] None +8 988 kB tylerkrupicka
npm/@digitak/[email protected] filesystem, shell +1 60.9 kB gin-quin
npm/@discoveryjs/[email protected] None 0 81.1 kB lahmatiy
npm/@emotion/[email protected] environment +4 189 kB emotion-release-bot
npm/@emotion/[email protected] environment +1 33.4 kB emotion-release-bot
npm/@emotion/[email protected] environment +16 4.37 MB emotion-release-bot
npm/@emotion/[email protected] environment +18 4.57 MB emotion-release-bot
npm/@emotion/[email protected] environment 0 7.38 kB emotion-release-bot
npm/@emotion/[email protected] environment 0 6.08 kB emotion-release-bot
npm/@esbuild/[email protected] None 0 11.5 MB evanw
npm/@esbuild/[email protected] None 0 9.83 MB evanw
npm/@esbuild/[email protected] None 0 11.5 MB evanw
npm/@esbuild/[email protected] None 0 9.76 MB evanw
npm/@esbuild/[email protected] None 0 10.2 MB evanw
npm/@esbuild/[email protected] None 0 8.85 MB evanw
npm/@esbuild/[email protected] None 0 9.61 MB evanw
npm/@esbuild/[email protected] None 0 9.18 MB evanw
npm/@esbuild/[email protected] None 0 8.85 MB evanw
npm/@esbuild/[email protected] None 0 9.14 MB evanw
npm/@esbuild/[email protected] None 0 9.37 MB evanw
npm/@esbuild/[email protected] None 0 10.4 MB evanw
npm/@esbuild/[email protected] None 0 9.18 MB evanw
npm/@esbuild/[email protected] None 0 9.11 MB evanw
npm/@esbuild/[email protected] None 0 10 MB evanw
npm/@esbuild/[email protected] None 0 9.6 MB evanw
npm/@esbuild/[email protected] None 0 9.59 MB evanw
npm/@esbuild/[email protected] None 0 9.62 MB evanw
npm/@esbuild/[email protected] None 0 9.59 MB evanw
npm/@esbuild/[email protected] None 0 8.98 MB evanw
npm/@esbuild/[email protected] None 0 9.45 MB evanw
npm/@esbuild/[email protected] None 0 9.81 MB evanw
npm/@eslint-community/[email protected] None 0 379 kB eslint-community-bot
npm/@eslint-community/[email protected] None 0 431 kB eslint-community-bot
npm/@eslint/[email protected] filesystem, unsafe Transitive: eval +4 1.77 MB eslintbot
npm/@eslint/[email protected] None 0 13.9 kB eslintbot
npm/@fal-works/[email protected] None 0 19.5 kB fal-works
npm/@gar/[email protected] None 0 4.2 kB gar
npm/@gitbeaker/[email protected] None +1 2.21 MB jdalrymple
npm/@gitbeaker/[email protected] None +2 2.27 MB jdalrymple
npm/@gitbeaker/[email protected] None 0 51.3 kB jdalrymple
npm/@google-cloud/[email protected] environment, filesystem +5 952 kB google-wombot
npm/@google-cloud/[email protected] environment +2 194 kB google-wombot
npm/@google-cloud/[email protected] None 0 48.7 kB google-wombot
npm/@google-cloud/[email protected] None 0 30.9 kB google-wombot
npm/@google-cloud/[email protected] None 0 35.3 kB google-wombot
npm/@hapi/[email protected] None +2 103 kB devinivy
npm/@hapi/[email protected] None +1 59.8 kB hueniverse
npm/@hapi/[email protected] None +1 59.8 kB hueniverse
npm/@hapi/[email protected] None +1 79.8 kB devinivy
npm/@hapi/[email protected] None +2 85.3 kB hueniverse
npm/@hapi/[email protected] None 0 7.26 kB devinivy
npm/@hapi/[email protected] None +2 106 kB cjihrig
npm/@hapi/[email protected] None +2 89.2 kB devinivy
npm/@hapi/[email protected] None +6 358 kB cjihrig
npm/@hapi/[email protected] None +2 87.1 kB hueniverse
npm/@hapi/[email protected] None +2 85.9 kB hueniverse
npm/@hapi/[email protected] None 0 2.88 kB hueniverse
npm/@hapi/[email protected] network Transitive: filesystem +28 809 kB devinivy
npm/@hapi/[email protected] None +4 310 kB cjihrig
npm/@hapi/[email protected] None 0 51.5 kB devinivy
npm/@hapi/[email protected] filesystem +6 343 kB devinivy
npm/@hapi/[email protected] None +5 120 kB hueniverse
npm/@hapi/[email protected] None +1 61.5 kB devinivy
npm/@hapi/[email protected] None +2 64.5 kB hueniverse
npm/@hapi/[email protected] None +6 122 kB devinivy
npm/@hapi/[email protected] None +4 308 kB devinivy
npm/@hapi/[email protected] network +3 288 kB devinivy
npm/@hapi/[email protected] None +3 102 kB devinivy
npm/@hapi/[email protected] None +9 368 kB devinivy
npm/@hapi/[email protected] filesystem Transitive: network +10 185 kB devinivy
npm/@hapi/[email protected] None 0 7.87 kB nargonath
npm/@hapi/[email protected] None +1 62.2 kB devinivy
npm/@hapi/[email protected] None +2 275 kB devinivy
npm/@hapi/[email protected] None +1 57.2 kB hueniverse
npm/@hapi/[email protected] network +3 125 kB devinivy
npm/@humanwhocodes/[email protected] None +1 109 kB nzakas
npm/@humanwhocodes/[email protected] unsafe 0 21.2 kB nzakas
npm/@humanwhocodes/[email protected] None 0 49.1 kB nzakas
npm/@humanwhocodes/[email protected] None 0 53.3 kB nzakas
npm/@hypnosphi/[email protected] environment 0 13.7 kB hypnosphi
npm/@isaacs/[email protected] None 0 27.8 kB isaacs
npm/@jest/[email protected] Transitive: eval +10 4.67 MB simenb
npm/@jest/[email protected] None +2 481 kB simenb
npm/@joshwooding/[email protected] None +2 475 kB joshwooding
npm/@jridgewell/[email protected] None 0 55.2 kB jridgewell
npm/@jridgewell/[email protected] None +2 265 kB jridgewell
npm/@juggle/[email protected] None 0 73.7 kB trem
npm/@mdx-js/[email protected] None 0 162 kB wooorm
npm/@mdx-js/[email protected] None 0 13.8 kB wooorm
npm/@ndelangen/[email protected] network 0 586 kB ndelangen
npm/@nodelib/[email protected] Transitive: filesystem +2 60.4 kB mrmlnc
npm/@npmcli/[email protected] environment, filesystem +6 630 kB gar
npm/@npmcli/[email protected] filesystem 0 26.5 kB lukekarrys
npm/@npmcli/[email protected] Transitive: environment +2 446 kB npm-cli-ops
npm/@npmcli/[email protected] filesystem Transitive: environment +1 27.8 kB gar
npm/@npmcli/[email protected] None 0 2.38 kB lukekarrys
npm/@nrwl/[email protected] Transitive: environment, filesystem, shell, unsafe +2 250 kB nrwl-jason
npm/@nrwl/[email protected] None 0 5.53 kB nrwl-jason
npm/@nrwl/[email protected] Transitive: environment, filesystem, shell, unsafe +4 457 kB nrwl-jason
npm/@nx/[email protected] environment, filesystem, shell, unsafe +2 250 kB nrwl-jason
npm/@nx/[email protected] None 0 7.21 MB nrwl-jason
npm/@nx/[email protected] None 0 7.66 MB nrwl-jason
npm/@nx/[email protected] None 0 9.66 MB nrwl-jason
npm/@nx/[email protected] None 0 9.36 MB nrwl-jason
npm/@nx/[email protected] None 0 9.85 MB nrwl-jason
npm/@nx/[email protected] None 0 9.8 MB nrwl-jason
npm/@nx/[email protected] None 0 9.74 MB nrwl-jason
npm/@nx/[email protected] None 0 9.7 MB nrwl-jason
npm/@nx/[email protected] None 0 5.64 MB nrwl-jason
npm/@nx/[email protected] None 0 6.42 MB nrwl-jason
npm/@octokit/[email protected] None +2 2.34 MB octokitbot
npm/@octokit/[email protected] Transitive: network +7 2.63 MB octokitbot
npm/@octokit/[email protected] None +2 2.43 MB octokitbot
npm/@octokit/[email protected] Transitive: network +5 2.55 MB octokitbot
npm/@octokit/[email protected] None 0 2.09 MB octokitbot
npm/@octokit/[email protected] Transitive: network +8 2.83 MB octokitbot
npm/@octokit/[email protected] Transitive: network +8 2.64 MB gr2m
npm/@octokit/[email protected] Transitive: network +8 4.01 MB octokitbot
npm/@octokit/[email protected] None +2 2.33 MB octokitbot
npm/@octokit/[email protected] network +4 2.51 MB octokitbot
npm/@octokit/[email protected] Transitive: network +11 4.24 MB octokitbot
npm/@octokit/[email protected] None +1 2.31 MB octokitbot
npm/@pkgjs/[email protected] None 0 74.2 kB oss-bot
npm/@pkgr/[email protected] None 0 8.54 kB jounqin
npm/@pmmmwh/[email protected] environment, filesystem +2 231 kB pmmmwh
npm/@popperjs/[email protected] None 0 1.46 MB fezvrasta
npm/@radix-ui/[email protected] None +11 683 kB benoitgrelard
npm/@radix-ui/[email protected] None +2 287 kB benoitgrelard
npm/@rollup/[email protected] None 0 57.1 kB shellscape
npm/@rollup/[email protected] None 0 1.63 MB lukastaegert
npm/@rollup/[email protected] None 0 2.49 MB lukastaegert
npm/@rollup/[email protected] None 0 2.41 MB lukastaegert
npm/@rollup/[email protected] None 0 2.58 MB lukastaegert
npm/@rollup/[email protected] None 0 2.43 MB lukastaegert
npm/@rollup/[email protected] None 0 2.47 MB lukastaegert
npm/@rollup/[email protected] None 0 2.37 MB lukastaegert
npm/@rollup/[email protected] None 0 2.54 MB lukastaegert
npm/@rollup/[email protected] None 0 2.73 MB lukastaegert
npm/@rollup/[email protected] None 0 2.73 MB lukastaegert
npm/@rollup/[email protected] None 0 2.93 MB lukastaegert
npm/@rollup/[email protected] None 0 2.64 MB lukastaegert
npm/@rollup/[email protected] None 0 3.44 MB lukastaegert
npm/@sideway/[email protected] None +1 107 kB marsup
npm/@sideway/[email protected] None 0 16.9 kB marsup
npm/@sideway/[email protected] None 0 3.64 kB hueniverse
npm/@sinclair/[email protected] None 0 442 kB sinclair
npm/@sindresorhus/[email protected] environment Transitive: shell +4 78.4 kB sindresorhus
npm/@sindresorhus/[email protected] None 0 57.5 kB sindresorhus
npm/@storybook/[email protected] Transitive: environment, eval, filesystem, unsafe +76 17.7 MB yannbf
npm/@storybook/[email protected] environment Transitive: filesystem, unsafe +16 22 MB ndelangen
npm/@storybook/[email protected] None 0 9.18 MB shilman
npm/@storybook/[email protected] None 0 1.16 MB ndelangen
npm/@storybook/[email protected] None 0 67 kB shilman
npm/@stroncium/[email protected] filesystem 0 51.4 kB stroncium
npm/@sveltejs/[email protected] Transitive: environment, filesystem, network, shell +41 253 MB svelte-admin
npm/@szmarczak/[email protected] None 0 10.8 kB szmarczak
npm/@vue/[email protected] Transitive: environment, eval, filesystem +12 11.2 MB yyx990803
npm/[email protected] None +8 3.38 MB conduitry, rich_harris, svelte-admin
npm/[email protected] None +1 82.1 kB wooorm

🚮 Removed packages: npm/@testing-library/[email protected], npm/@testing-library/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@typescript-eslint/[email protected], npm/@typescript-eslint/[email protected], npm/@vitejs/[email protected], npm/@vitest/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected]

View full report↗︎

Copy link

socket-security bot commented Feb 21, 2024

🚨 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 NoteSource
Uses eval npm/[email protected]
Uses eval npm/[email protected]
Install scripts npm/[email protected]
  • Install script: postinstall
  • Source: node -e "try{require('./postinstall')}catch(e){}"
New author npm/[email protected]
Uses eval npm/[email protected]
New author npm/@babel/[email protected]
New author npm/@babel/[email protected]
New author npm/@babel/[email protected]
Shell access npm/@aw-web-design/[email protected]
New author npm/@hapi/[email protected]
New author npm/@sideway/[email protected]
Shell access npm/[email protected]
Uses eval npm/@sinonjs/[email protected]
New author npm/@npmcli/[email protected]
New author npm/@npmcli/[email protected]
New author npm/[email protected]
Shell access npm/@npmcli/[email protected]
New author npm/@npmcli/[email protected]
Shell access npm/[email protected]
New author npm/@one-ini/[email protected]
New author npm/@npmcli/[email protected]
New author npm/@hapi/[email protected]
New author npm/@hapi/[email protected]
New author npm/@hapi/[email protected]
New author npm/@hapi/[email protected]
New author npm/@hapi/[email protected]
New author npm/@hapi/[email protected]
New author npm/@hapi/[email protected]
New author npm/@hapi/[email protected]
New author npm/@hapi/[email protected]
New author npm/@hapi/[email protected]
New author npm/@hapi/[email protected]
New author npm/@hapi/[email protected]
Shell access npm/[email protected]
Uses eval npm/[email protected]
Uses eval npm/[email protected]
Shell access npm/[email protected]
Shell access npm/@nx/[email protected]
Uses eval npm/@vue/[email protected]
Shell access npm/@digitak/[email protected]
Uses eval npm/@angular-devkit/[email protected]
Shell access npm/@angular-devkit/[email protected]
Shell access npm/@angular/[email protected]
Uses eval npm/@angular-devkit/[email protected]
Uses eval npm/@ngtools/[email protected]
New author npm/@storybook/[email protected]
Shell access npm/[email protected]
Uses eval npm/[email protected]
Uses eval npm/[email protected]
Uses eval npm/[email protected]
Uses eval npm/@angular-devkit/[email protected]
New author npm/@sideway/[email protected]
Uses eval npm/@storybook/[email protected]
Uses eval npm/@storybook/[email protected]

View full report↗︎

Next steps

What is eval?

Package uses eval() which is a dangerous function. This prevents the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.

Avoid packages that use eval, since this could potentially execute any code.

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 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.

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/[email protected] or ignore all packages with @SocketSecurity ignore-all

@shilman shilman changed the title Core: rename --webpack-stats-json to --stats-json as it now works in Vite Core: Rename --webpack-stats-json to --stats-json as it works in Vite Feb 23, 2024
@shilman shilman changed the title Core: Rename --webpack-stats-json to --stats-json as it works in Vite CLI: Rename --webpack-stats-json to --stats-json as it works in Vite Feb 23, 2024
@shilman shilman added cli maintenance User-facing maintenance tasks and removed core feature request labels Feb 23, 2024
@shilman shilman merged commit 995abe0 into next Feb 23, 2024
62 of 75 checks passed
@shilman shilman deleted the tom/add-stats-json-flag branch February 23, 2024 23:44
@github-actions github-actions bot mentioned this pull request Feb 23, 2024
30 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants