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

Maintenance: Move @types/node to devDeps consistently #30163

Merged
merged 5 commits into from
Jan 3, 2025

Conversation

ndelangen
Copy link
Member

@ndelangen ndelangen commented Jan 2, 2025

Closes #28835 (comment)

What I did

  • I moved all our @types/node into devDependencies section, so we do not expose this to users.

AFAICT users shouldn't be required to install this.

For many packages @types/node was already a devDependency, so this change is also making this consistent.

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

Considering this PR touches the angular-framework's package.json, I tested this locally:

  • storybook started fine.
  • yarn install yields some missing peerDeps, but @types/node isn't listed.

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-storybook/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>

name before after diff z %
createSize 0 B 0 B 0 B - -
generateSize 77.8 MB 77.8 MB 0 B 1.65 0%
initSize 133 MB 131 MB -2.37 MB -1.07 -1.8%
diffSize 55.3 MB 53 MB -2.37 MB -1.07 -4.5%
buildSize 7.19 MB 7.19 MB 0 B -0.87 0%
buildSbAddonsSize 1.85 MB 1.85 MB 0 B -0.88 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.87 MB 1.87 MB 0 B 0.63 0%
buildSbPreviewSize 0 B 0 B 0 B - -
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.91 MB 3.91 MB 0 B -0.87 0%
buildPreviewSize 3.28 MB 3.28 MB 0 B - 0%
testBuildSize 0 B 0 B 0 B - -
testBuildSbAddonsSize 0 B 0 B 0 B - -
testBuildSbCommonSize 0 B 0 B 0 B - -
testBuildSbManagerSize 0 B 0 B 0 B - -
testBuildSbPreviewSize 0 B 0 B 0 B - -
testBuildStaticSize 0 B 0 B 0 B - -
testBuildPrebuildSize 0 B 0 B 0 B - -
testBuildPreviewSize 0 B 0 B 0 B - -
name before after diff z %
createTime 18s 23.1s 5s 2.1 🔺21.9%
generateTime 20.8s 21s 156ms 0.59 0.7%
initTime 14.7s 15s 260ms 0.71 1.7%
buildTime 9.5s 7.4s -2s -96ms -1.54 🔰-28.2%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 5.1s 5.6s 543ms 0.5 9.5%
devManagerResponsive 3.8s 4.4s 619ms 1.22 13.9%
devManagerHeaderVisible 695ms 594ms -101ms -0.39 -17%
devManagerIndexVisible 723ms 629ms -94ms -0.33 -14.9%
devStoryVisibleUncached 1.8s 2.1s 263ms 1.08 12.2%
devStoryVisible 724ms 628ms -96ms -0.44 -15.3%
devAutodocsVisible 669ms 522ms -147ms -0.57 -28.2%
devMDXVisible 572ms 689ms 117ms 1.08 17%
buildManagerHeaderVisible 679ms 717ms 38ms 0.7 5.3%
buildManagerIndexVisible 792ms 801ms 9ms 0.56 1.1%
buildStoryVisible 669ms 686ms 17ms 0.65 2.5%
buildAutodocsVisible 528ms 554ms 26ms 0.62 4.7%
buildMDXVisible 517ms 496ms -21ms 0.01 -4.2%

Greptile Summary

Moves @types/node from dependencies to devDependencies across multiple Storybook packages to ensure consistent dependency management and prevent exposing type definitions to end users.

  • Moves @types/node to devDependencies in 17+ package.json files for better dependency hygiene
  • Updates @types/node version to ^22.0.0 in experimental-nextjs-vite package
  • Incorrectly moves @types/node to peerDependencies in renderers/react package, contradicting PR goal
  • Moves jiti from devDependencies to dependencies in scripts/package.json for proper script execution
  • Shows minor performance improvements in initialization (-10.6% time, -1.8% size) with slight increases in dev preview responsiveness

@ndelangen ndelangen added maintenance User-facing maintenance tasks ci:normal labels Jan 2, 2025
@ndelangen ndelangen self-assigned this Jan 2, 2025
Copy link

nx-cloud bot commented Jan 2, 2025

View your CI Pipeline Execution ↗ for commit 2183c2d.

Command Status Duration Result
nx run-many -t build --parallel=3 ✅ Succeeded 1m 38s View ↗

☁️ Nx Cloud last updated this comment at 2025-01-03 09:29:27 UTC

@storybook-pr-benchmarking
Copy link

storybook-pr-benchmarking bot commented Jan 2, 2025

Package Benchmarks

Commit: 2183c2d, ran on 3 January 2025 at 09:36:33 UTC

The following packages have significant changes to their size or dependencies:

@storybook/core

Before After Difference
Dependency count 53 53 0
Self size 21.45 MB 19.08 MB 🎉 -2.37 MB 🎉
Dependency size 14.43 MB 14.43 MB 0 B
Bundle Size Analyzer Link Link

storybook

Before After Difference
Dependency count 54 54 0
Self size 22 KB 22 KB 0 B
Dependency size 35.88 MB 33.51 MB 🎉 -2.37 MB 🎉
Bundle Size Analyzer Link Link

sb

Before After Difference
Dependency count 55 55 0
Self size 1 KB 1 KB 0 B
Dependency size 35.90 MB 33.53 MB 🎉 -2.37 MB 🎉
Bundle Size Analyzer Link Link

@storybook/cli

Before After Difference
Dependency count 396 396 0
Self size 496 KB 496 KB 0 B
Dependency size 77.79 MB 75.42 MB 🎉 -2.37 MB 🎉
Bundle Size Analyzer Link Link

@storybook/codemod

Before After Difference
Dependency count 276 276 0
Self size 612 KB 612 KB 0 B
Dependency size 67.69 MB 65.32 MB 🎉 -2.37 MB 🎉
Bundle Size Analyzer Link Link

@storybook/core-webpack

Before After Difference
Dependency count 3 1 🎉 -2 🎉
Self size 16 KB 16 KB 0 B
Dependency size 2.40 MB 28 KB 🎉 -2.37 MB 🎉
Bundle Size Analyzer Link Link

create-storybook

Before After Difference
Dependency count 112 112 0
Self size 1.11 MB 1.11 MB 0 B
Dependency size 45.01 MB 42.64 MB 🎉 -2.37 MB 🎉
Bundle Size Analyzer Link Link

@storybook/preset-preact-webpack

Before After Difference
Dependency count 4 2 🎉 -2 🎉
Self size 5 KB 5 KB 0 B
Dependency size 2.41 MB 44 KB 🎉 -2.37 MB 🎉
Bundle Size Analyzer Link Link

@storybook/preset-server-webpack

Before After Difference
Dependency count 20 18 🎉 -2 🎉
Self size 10 KB 10 KB 0 B
Dependency size 3.85 MB 1.48 MB 🎉 -2.37 MB 🎉
Bundle Size Analyzer Link Link

@storybook/preset-svelte-webpack

Before After Difference
Dependency count 103 101 🎉 -2 🎉
Self size 14 KB 14 KB 0 B
Dependency size 12.77 MB 10.40 MB 🎉 -2.37 MB 🎉
Bundle Size Analyzer Link Link

@ndelangen ndelangen marked this pull request as ready for review January 2, 2025 10:21
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

18 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

code/renderers/react/package.json Outdated Show resolved Hide resolved
@ndelangen ndelangen merged commit de65bec into next Jan 3, 2025
60 checks passed
@ndelangen ndelangen deleted the norbert/node-types-devdep-only branch January 3, 2025 09:50
@github-actions github-actions bot mentioned this pull request Jan 3, 2025
13 tasks
@yannbf yannbf mentioned this pull request Jan 7, 2025
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:normal maintenance User-facing maintenance tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants