mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-06 00:41:05 +08:00
Merge pull request #30617 from storybookjs/version-non-patch-from-8.6.0-beta.6
Release: Prerelease 8.6.0-beta.7
This commit is contained in:
commit
3f72d27a69
@ -1,3 +1,9 @@
|
||||
## 8.6.0-beta.7
|
||||
|
||||
- Angular: Fix @angular/platform-browser/animations never available - [#30618](https://github.com/storybookjs/storybook/pull/30618), thanks @valentinpalkovic!
|
||||
- Angular: Fix @angular/platform-browser/animations never available - [#30619](https://github.com/storybookjs/storybook/pull/30619), thanks @valentinpalkovic!
|
||||
- CLI: Fix peer dep issues for npm users during upgrade - [#30616](https://github.com/storybookjs/storybook/pull/30616), thanks @valentinpalkovic!
|
||||
|
||||
## 8.6.0-beta.6
|
||||
|
||||
- CLI: Fix printing of selected features - [#30605](https://github.com/storybookjs/storybook/pull/30605), thanks @ghengeveld!
|
||||
|
@ -41,7 +41,7 @@ export async function webpackFinal(baseConfig: webpack.Configuration, options: P
|
||||
);
|
||||
|
||||
try {
|
||||
await import('@angular/platform-browser/animations');
|
||||
require.resolve('@angular/animations');
|
||||
} catch (e) {
|
||||
webpackConfig.plugins.push(
|
||||
new WebpackIgnorePlugin({
|
||||
|
@ -254,36 +254,47 @@ export const doUpgrade = async ({
|
||||
// GitHub Issue: https://github.com/storybookjs/storybook/issues/30306
|
||||
// Solution: Remove all Storybook packages (except 'storybook') from the package.json and install them again
|
||||
if (packageManager.type === 'npm') {
|
||||
const getPackageName = (dep: string) => {
|
||||
const lastAtIndex = dep.lastIndexOf('@');
|
||||
return lastAtIndex > 0 ? dep.slice(0, lastAtIndex) : dep;
|
||||
};
|
||||
|
||||
// Remove all Storybook packages except 'storybook'
|
||||
await packageManager.removeDependencies(
|
||||
{
|
||||
skipInstall: false,
|
||||
},
|
||||
{ skipInstall: false },
|
||||
[...upgradedDependencies, ...upgradedDevDependencies]
|
||||
.map((dep) => {
|
||||
const lastAtIndex = dep.lastIndexOf('@');
|
||||
return lastAtIndex > 0 ? dep.slice(0, lastAtIndex) : dep;
|
||||
})
|
||||
// We don't want to remove the storybook package from the package.json
|
||||
// because third-party packages which we don't remove may depend on it via peer-dependency requirements
|
||||
.map(getPackageName)
|
||||
.filter((dep) => dep !== 'storybook')
|
||||
);
|
||||
|
||||
await packageManager.installDependencies();
|
||||
// Handle 'storybook' package separately to maintain peer dependencies
|
||||
const findStorybookPackage = (deps: string[]) =>
|
||||
deps.find((dep) => getPackageName(dep) === 'storybook');
|
||||
|
||||
const storybookDep = findStorybookPackage(upgradedDependencies);
|
||||
const storybookDevDep = findStorybookPackage(upgradedDevDependencies);
|
||||
|
||||
if (storybookDep) {
|
||||
await packageManager.addDependencies({ installAsDevDependencies: false }, [storybookDep]);
|
||||
}
|
||||
if (storybookDevDep) {
|
||||
await packageManager.addDependencies({ installAsDevDependencies: true }, [storybookDevDep]);
|
||||
}
|
||||
}
|
||||
|
||||
// Update all dependencies
|
||||
logger.info(`Updating dependencies in ${picocolors.cyan('package.json')}..`);
|
||||
if (upgradedDependencies.length > 0) {
|
||||
await packageManager.addDependencies(
|
||||
{ installAsDevDependencies: false, skipInstall: true, packageJson },
|
||||
upgradedDependencies
|
||||
);
|
||||
}
|
||||
if (upgradedDevDependencies.length > 0) {
|
||||
await packageManager.addDependencies(
|
||||
{ installAsDevDependencies: true, skipInstall: true, packageJson },
|
||||
upgradedDevDependencies
|
||||
);
|
||||
}
|
||||
const addDeps = async (deps: string[], isDev: boolean) => {
|
||||
if (deps.length > 0) {
|
||||
await packageManager.addDependencies(
|
||||
{ installAsDevDependencies: isDev, skipInstall: true, packageJson },
|
||||
deps
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
await addDeps(upgradedDependencies, false);
|
||||
await addDeps(upgradedDevDependencies, true);
|
||||
await packageManager.installDependencies();
|
||||
}
|
||||
|
||||
|
@ -303,5 +303,6 @@
|
||||
"Dependency Upgrades"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"deferredNextVersion": "8.6.0-beta.7"
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
{"version":"8.6.0-beta.6","info":{"plain":"- CLI: Fix printing of selected features - [#30605](https://github.com/storybookjs/storybook/pull/30605), thanks @ghengeveld!\n- CLI: Remove Storybook dependencies before adding re-adding them - [#30600](https://github.com/storybookjs/storybook/pull/30600), thanks @valentinpalkovic!"}}
|
||||
{"version":"8.6.0-beta.7","info":{"plain":"- Angular: Fix @angular/platform-browser/animations never available - [#30618](https://github.com/storybookjs/storybook/pull/30618), thanks @valentinpalkovic!\n- Angular: Fix @angular/platform-browser/animations never available - [#30619](https://github.com/storybookjs/storybook/pull/30619), thanks @valentinpalkovic!\n- CLI: Fix peer dep issues for npm users during upgrade - [#30616](https://github.com/storybookjs/storybook/pull/30616), thanks @valentinpalkovic!"}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user