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

Release: Patch 8.2.4 #28610

Merged
merged 4 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 8.2.4

- CLI: Add diagnostic when the `storybook` package is missing - [#28604](https://github.com/storybookjs/storybook/pull/28604), thanks @kasperpeulen!
- CLI: Make a few automigrations run on all version upgrades - [#28601](https://github.com/storybookjs/storybook/pull/28601), thanks @yannbf!
- CPC: Direct dependencies on shim packages in renderers - [#28599](https://github.com/storybookjs/storybook/pull/28599), thanks @ndelangen!

## 8.2.3

- Bug: Fix invalid docs links in Configure.mdx template page - [#28560](https://github.com/storybookjs/storybook/pull/28560), thanks @kylegach!
Expand Down
4 changes: 4 additions & 0 deletions code/frameworks/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,12 @@
},
"dependencies": {
"@storybook/builder-webpack5": "workspace:*",
"@storybook/components": "workspace:^",
"@storybook/core-webpack": "workspace:*",
"@storybook/global": "^5.0.0",
"@storybook/manager-api": "workspace:^",
"@storybook/preview-api": "workspace:^",
"@storybook/theming": "workspace:^",
"@types/node": "^18.0.0",
"@types/react": "^18.0.37",
"@types/react-dom": "^18.0.11",
Expand Down
2 changes: 1 addition & 1 deletion code/lib/cli/src/automigrate/fixes/addon-postcss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface AddonPostcssRunOptions {
export const addonPostCSS: Fix<AddonPostcssRunOptions> = {
id: 'addon-postcss',

versionRange: ['<7', '>=7'],
versionRange: ['*', '*'],

promptType: 'notification',

Expand Down
2 changes: 1 addition & 1 deletion code/lib/cli/src/automigrate/fixes/addons-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface AddonsAPIRunOptions {
export const addonsAPI: Fix<AddonsAPIRunOptions> = {
id: 'addons-api',

versionRange: ['<8', '>=8'],
versionRange: ['*', '*'],

promptType: 'notification',

Expand Down
22 changes: 1 addition & 21 deletions code/lib/cli/src/automigrate/fixes/sb-binary.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,12 @@ const checkStorybookBinary = async ({

describe('storybook-binary fix', () => {
describe('sb >= 7.0', () => {
it('should no-op in NX projects', async () => {
it('should add storybook dependency if not present', async () => {
const packageManager = {
getPackageVersion: (packageName) => {
switch (packageName) {
case '@storybook/react':
return Promise.resolve('7.0.0');
case '@nrwl/storybook':
return Promise.resolve('15.7.1');
default:
return null;
}
},
retrievePackageJson: () => Promise.resolve({}),
} as Partial<JsPackageManager>;

await expect(
checkStorybookBinary({
packageManager,
})
).resolves.toBeFalsy();
});

it('should add storybook dependency if not present', async () => {
const packageManager = {
getPackageVersion: (packageName) => {
switch (packageName) {
case '@storybook/react':
return Promise.resolve('7.0.0-alpha.0');
default:
Expand Down
8 changes: 1 addition & 7 deletions code/lib/cli/src/automigrate/fixes/sb-binary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,14 @@ const logger = console;
export const sbBinary: Fix<SbBinaryRunOptions> = {
id: 'storybook-binary',

versionRange: ['<7', '>=7'],
versionRange: ['*', '*'],

async check({ packageManager, storybookVersion }) {
const packageJson = await packageManager.retrievePackageJson();

const nrwlStorybookVersion = await packageManager.getPackageVersion('@nrwl/storybook');
const sbBinaryVersion = await packageManager.getPackageVersion('sb');
const storybookBinaryVersion = await packageManager.getPackageVersion('storybook');

// Nx provides their own binary, so we don't need to do anything
if (nrwlStorybookVersion) {
return null;
}

const hasSbBinary = !!sbBinaryVersion;
const hasStorybookBinary = !!storybookBinaryVersion;

Expand Down
2 changes: 1 addition & 1 deletion code/lib/cli/src/automigrate/fixes/sb-scripts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const getStorybookScripts = (allScripts: NonNullable<PackageJson['scripts
export const sbScripts: Fix<SbScriptsRunOptions> = {
id: 'sb-scripts',

versionRange: ['<7', '>=7'],
versionRange: ['*', '*'],

async check({ packageManager, storybookVersion }) {
const packageJson = await packageManager.retrievePackageJson();
Expand Down
2 changes: 1 addition & 1 deletion code/lib/cli/src/automigrate/fixes/wrap-require.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ interface WrapRequireRunOptions {
export const wrapRequire: Fix<WrapRequireRunOptions> = {
id: 'wrap-require',

versionRange: ['<7.2.0-rc.0', '>=7.2.0-rc.0'],
versionRange: ['*', '*'],

async check({ packageManager, storybookVersion, mainConfigPath }) {
const isStorybookInMonorepo = await packageManager.isStorybookInMonorepo();
Expand Down
9 changes: 9 additions & 0 deletions code/lib/cli/src/doctor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,15 @@ export const doctor = async ({

const allDependencies = (await packageManager.getAllDependencies()) as Record<string, string>;

if (!('storybook' in allDependencies)) {
logDiagnostic(
`Package ${chalk.cyan('storybook')} not found`,
dedent`
The ${chalk.cyan('storybook')} package was not found in your package.json.
Installing ${chalk.cyan('storybook')} as a direct dev dependency in your package.json is required.
`
);
}
const incompatibleStorybookPackagesList = await getIncompatibleStorybookPackages({
currentStorybookVersion: storybookVersion,
});
Expand Down
3 changes: 2 additions & 1 deletion code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -278,5 +278,6 @@
"Dependency Upgrades"
]
]
}
},
"deferredNextVersion": "8.2.4"
}
4 changes: 4 additions & 0 deletions code/renderers/html/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@
"prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/components": "workspace:^",
"@storybook/global": "^5.0.0",
"@storybook/manager-api": "workspace:^",
"@storybook/preview-api": "workspace:^",
"@storybook/theming": "workspace:^",
"ts-dedent": "^2.0.0"
},
"devDependencies": {
Expand Down
4 changes: 4 additions & 0 deletions code/renderers/preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@
"prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/components": "workspace:^",
"@storybook/global": "^5.0.0",
"@storybook/manager-api": "workspace:^",
"@storybook/preview-api": "workspace:^",
"@storybook/theming": "workspace:^",
"ts-dedent": "^2.0.0"
},
"devDependencies": {
Expand Down
4 changes: 4 additions & 0 deletions code/renderers/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,12 @@
"prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/components": "workspace:^",
"@storybook/global": "^5.0.0",
"@storybook/manager-api": "workspace:^",
"@storybook/preview-api": "workspace:^",
"@storybook/react-dom-shim": "workspace:*",
"@storybook/theming": "workspace:^",
"@types/escodegen": "^0.0.6",
"@types/estree": "^0.0.51",
"@types/node": "^18.0.0",
Expand Down
4 changes: 4 additions & 0 deletions code/renderers/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,12 @@
"prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/components": "workspace:^",
"@storybook/csf": "0.1.11",
"@storybook/global": "^5.0.0",
"@storybook/manager-api": "workspace:^",
"@storybook/preview-api": "workspace:^",
"@storybook/theming": "workspace:^",
"@types/fs-extra": "^11.0.1",
"fs-extra": "^11.1.0",
"ts-dedent": "^2.0.0",
Expand Down
4 changes: 4 additions & 0 deletions code/renderers/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@
"prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/components": "workspace:^",
"@storybook/global": "^5.0.0",
"@storybook/manager-api": "workspace:^",
"@storybook/preview-api": "workspace:^",
"@storybook/theming": "workspace:^",
"sveltedoc-parser": "^4.2.1",
"ts-dedent": "^2.0.0",
"type-fest": "~2.19"
Expand Down
4 changes: 4 additions & 0 deletions code/renderers/vue3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@
"prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/components": "workspace:^",
"@storybook/global": "^5.0.0",
"@storybook/manager-api": "workspace:^",
"@storybook/preview-api": "workspace:^",
"@storybook/theming": "workspace:^",
"@vue/compiler-core": "^3.0.0",
"lodash": "^4.17.21",
"ts-dedent": "^2.0.0",
Expand Down
4 changes: 4 additions & 0 deletions code/renderers/web-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@
"prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/bundle.ts"
},
"dependencies": {
"@storybook/components": "workspace:^",
"@storybook/global": "^5.0.0",
"@storybook/manager-api": "workspace:^",
"@storybook/preview-api": "workspace:^",
"@storybook/theming": "workspace:^",
"tiny-invariant": "^1.3.1",
"ts-dedent": "^2.0.0"
},
Expand Down
Loading