Skip to content

Commit

Permalink
Merge pull request #28610 from storybookjs/version-patch-from-8.2.3
Browse files Browse the repository at this point in the history
Release: Patch 8.2.4
  • Loading branch information
shilman committed Jul 16, 2024
2 parents 7067b33 + de22531 commit 4c5a2a1
Show file tree
Hide file tree
Showing 27 changed files with 1,427 additions and 316 deletions.
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

0 comments on commit 4c5a2a1

Please sign in to comment.