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: Refactor to add autoblockers #25934

Merged
merged 31 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
923deb7
refactor cli to add autoblockers
ndelangen Feb 6, 2024
aeac067
add tests & fix some review comments
ndelangen Feb 7, 2024
1c3aa9b
fix migrate command that calls the changed runFixes fn
ndelangen Feb 7, 2024
da51fee
cleanup
ndelangen Feb 7, 2024
8af5a52
cleanup
ndelangen Feb 7, 2024
d4ca826
remove the types from jsdoc
ndelangen Feb 7, 2024
ab58f40
the best i can make it.. #bikeshedding
ndelangen Feb 7, 2024
668c3a8
expand scope of autoblock for react-script to also block vue2
ndelangen Feb 8, 2024
2bfea5f
add a step in between commander & calling the automigrate function so…
ndelangen Feb 8, 2024
332b8da
fix incorrect logic on detecting stories.mdx
ndelangen Feb 8, 2024
c20c3d8
make it say 8.0.0
ndelangen Feb 8, 2024
9ca5d50
check for the INSTALLED version, not the latest
ndelangen Feb 8, 2024
b12052c
add a automigration for a old vite version and another one for ensur…
ndelangen Feb 8, 2024
30bed62
add migration note, and early return
ndelangen Feb 8, 2024
274049b
Merge branch 'next' into norbert/upgrade-auto-blockers
ndelangen Feb 8, 2024
cf4bdb5
Merge branch 'next' into norbert/upgrade-auto-blockers
ndelangen Feb 8, 2024
3b20982
use getFrameworkPackageName
ndelangen Feb 9, 2024
a57d58b
Merge branch 'next' into norbert/upgrade-auto-blockers
ndelangen Feb 9, 2024
b8e1a75
performed some manual testing and found some issues
ndelangen Feb 9, 2024
fb144f2
fix review comment
ndelangen Feb 12, 2024
bd369e5
Merge branch 'next' into norbert/upgrade-auto-blockers
ndelangen Feb 12, 2024
68e6cb0
add more autoblockers for dependencies & add a --force flag to skip a…
ndelangen Feb 12, 2024
369704b
move nodeversion check to autoblock
ndelangen Feb 12, 2024
0003c40
remove from list
ndelangen Feb 12, 2024
6344a4a
Apply suggestions from code review
ndelangen Feb 12, 2024
a4d4087
apply https://github.com/storybookjs/storybook/pull/25934#discussion_…
ndelangen Feb 12, 2024
243a60d
add back the removed renderer mapping
ndelangen Feb 13, 2024
d79043f
Update code/lib/cli/src/autoblock/block-stories-mdx.ts
ndelangen Feb 13, 2024
2aec740
fixes
ndelangen Feb 13, 2024
6164216
Merge branch 'norbert/upgrade-auto-blockers' of https://github.com/st…
ndelangen Feb 13, 2024
016ac00
Merge branch 'next' into norbert/upgrade-auto-blockers
ndelangen Feb 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions code/lib/cli/src/autoblock/block-dependencies-versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ const minimalVersionsMap = {
nextjs: '13.5.0',
ndelangen marked this conversation as resolved.
Show resolved Hide resolved
preact: '10.0.0',
svelte: '4.0.0',
vite: '4.0.0',
vue: '3.0.0',
webpack: '5.0.0',
};

type Result = {
Expand Down
25 changes: 25 additions & 0 deletions code/lib/cli/src/autoblock/block-node-version.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { createBlocker } from './types';
import { dedent } from 'ts-dedent';
import { lt } from 'semver';

export const blocker = createBlocker({
ndelangen marked this conversation as resolved.
Show resolved Hide resolved
id: 'minimumNode16',
async check() {
const nodeVersion = process.version;
if (lt(nodeVersion, '16.0.0')) {
ndelangen marked this conversation as resolved.
Show resolved Hide resolved
return { nodeVersion };
}
return false;
ndelangen marked this conversation as resolved.
Show resolved Hide resolved
},
message(options, data) {
return `Please use NodeJS v16 or higher.`;
},
log(options, data) {
return dedent`
We've detected you're using NodeJS v${data.nodeVersion}.
Storybook needs at least NodeJS 16.

https://nodejs.org/en/download
`;
},
ndelangen marked this conversation as resolved.
Show resolved Hide resolved
});
49 changes: 0 additions & 49 deletions code/lib/cli/src/automigrate/fixes/nodejs-requirement.test.ts

This file was deleted.

44 changes: 0 additions & 44 deletions code/lib/cli/src/automigrate/fixes/nodejs-requirement.ts

This file was deleted.

Loading