CLI: Upgrade jscodeshift to 17.3.0#34534
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughTwo Storybook packages update Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@code/lib/codemod/package.json`:
- Line 47: The package.json currently upgrades "jscodeshift" to "^17.3.0" but
leaves "@types/jscodeshift" pinned at "^0.11.10"; update the
"@types/jscodeshift" dependency to "^17.3.0" so the runtime and types match
(change the version string for the "@types/jscodeshift" entry), then run the
lockfile install to refresh package-lock/yarn.lock so type-checking uses the
matching DefinitelyTyped release.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 4363bdd2-1f68-4dc2-bb4e-69279f67cb7d
📒 Files selected for processing (2)
code/lib/cli-storybook/package.jsoncode/lib/codemod/package.json
Updates jscodeshift to latest version to resolve npm warnings about deprecated transitive dependencies (glob, rimraf, inflight) that were pulled in via temp package. Closes storybookjs#34438
e4e8100 to
2fed9af
Compare
The jscodeshift and @types/jscodeshift bumps in package.json need a matching lockfile so CI's immutable install resolves the new versions. This also drops the deprecated temp -> rimraf -> glob -> inflight chain. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2fed9af to
85ef40b
Compare
Package BenchmarksCommit: The following packages have significant changes to their size or dependencies:
|
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 203 | 183 | 🎉 -20 🎉 |
| Self size | 908 KB | 909 KB | 🚨 +144 B 🚨 |
| Dependency size | 87.71 MB | 87.64 MB | 🎉 -64 KB 🎉 |
| Bundle Size Analyzer | Link | Link |
@storybook/codemod
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 196 | 176 | 🎉 -20 🎉 |
| Self size | 32 KB | 32 KB | 🎉 -1 B 🎉 |
| Dependency size | 86.19 MB | 86.13 MB | 🎉 -64 KB 🎉 |
| Bundle Size Analyzer | Link | Link |
|
Maintainer update — I've brought this PR up to date so it's ready for review. Changes made on top of the original commits:
Verified locally (Node 22.22.1):
CI status: The checks that were genuinely failing on this PR — The remaining red checks (
For reference, #34883 (a Node.js version bump touching neither Once the |
What
Upgrades jscodeshift from ^0.15.1 to ^17.3.0 in code/lib/codemod and code/lib/cli-storybook.
Why
Old jscodeshift@0.15.1 pulls in deprecated transitive deps: temp→rimraf→glob→inflight. Latest jscodeshift@17.3.0 removed temp dependency, fixing all npm warnings.
Closes #34438
Manual testing
yarn installand confirm the deprecation warnings fortemp,rimraf,glob, andinflight(previously pulled in transitively viajscodeshift) no longer appear.yarn vitest run csf-2-to-3 upgrade-deprecated-types find-implicit-spies— all should pass (these exercise the jscodeshift transform API at runtime).jscodeshift.withParser):yarn vitest run addon-a11y-addon-test— should pass.npx storybook migrate csf-2-to-3 --glob "src/**/*.stories.js", and confirm the stories are transformed correctly and the jscodeshift CLI binary still resolves and runs.Summary by CodeRabbit