Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
ee50c9a
chore(angular): raise peer dependency floors to Angular 21
ObviousApp Sep 3, 2026
9f9b1c1
feat(autoblock): block @angular/core < 21 with migration anchor
ObviousApp Sep 3, 2026
ba961b6
refactor(angular): treat standalone default as constant
ObviousApp Sep 3, 2026
1ad2081
docs(migration): document Angular 21 floor
ObviousApp Sep 3, 2026
15a9c40
chore(peers): sync yarn.lock with angular 21 peer ranges
ObviousApp Sep 3, 2026
73fe63c
Apply suggestion from @valentinpalkovic
valentinpalkovic Sep 3, 2026
772a8f1
Apply suggestion from @valentinpalkovic
valentinpalkovic Sep 3, 2026
5a412da
Apply suggestion from @valentinpalkovic
valentinpalkovic Sep 3, 2026
8b70bf9
Apply suggestion from @valentinpalkovic
valentinpalkovic Sep 3, 2026
026e109
Apply suggestion from @valentinpalkovic
valentinpalkovic Sep 3, 2026
028e13c
test(autoblock): align blocker title assertion
ObviousApp Sep 3, 2026
5c1f9c0
fix(peers): keep rxjs ^6.5.3 arm to match Angular 21's own peer range
ObviousApp Sep 3, 2026
5a58ccd
chore(deps): align @storybook/angular devDependencies with the Angula…
ObviousApp Sep 4, 2026
63aef38
chore(deps): pin angular devDependencies to the supported minimum (v21)
ObviousApp Sep 4, 2026
b6239ed
refactor(angular): collapse builders' zoneless defaults to the 21 floor
ObviousApp Sep 4, 2026
6b6097c
chore(deps): bump @analogjs/vite-plugin-angular to ^2.5.2
ObviousApp Sep 4, 2026
627ed84
fix(ci): dedupe yarn.lock to satisfy the build dedupe gate
ObviousApp Sep 4, 2026
b22750c
docs(MIGRATION): consolidate item title format
ObviousApp Sep 5, 2026
37ea520
fix(autoblock): point blocker link at the renamed MIGRATION anchor
ObviousApp Sep 5, 2026
f7725f5
refactor(angular): fold standalone fallback into the declaration
ObviousApp Sep 7, 2026
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
20 changes: 18 additions & 2 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

- [From version 10.x to 11.0.0](#from-version-10x-to-1100)
- [Vitest Addon: requires Vitest 4.0 or higher](#vitest-addon-requires-vitest-40-or-higher)
- [Dropped support for Vite 5 and Vite 6](#dropped-support-for-vite-5-and-vite-6)
- [Vite: requires Vite 7.0 or higher](#vite-requires-vite-70-or-higher)
- [Next.js: Require v15 and up](#nextjs-require-v15-and-up)
- [Angular: requires Angular 21 or higher](#angular-requires-angular-21-or-higher)

- [From version 10.5.x to 10.6.0](#from-version-105x-to-1060)
- [Vue 3: `vue-docgen-api` is deprecated](#vue-3-vue-docgen-api-is-deprecated)
Expand Down Expand Up @@ -541,7 +542,7 @@

The `@storybook/addon-vitest` addon requires **Vitest 4.0 or higher**. Setup now always installs `@vitest/browser-playwright`, generates configuration with the `test.projects` array, and no longer creates or updates `vitest.workspace.*` files. If your Vitest config still uses the deprecated `test.workspace` / `defineWorkspace` style, rename it to `test.projects` and re-run `npx storybook@latest add @storybook/addon-vitest` to merge your existing config.

### Dropped support for Vite 5 and Vite 6
### Vite: requires Vite 7.0 or higher

Storybook 11.0 drops support for Vite 5 and Vite 6. The minimum supported version is now Vite 7.0.0. This change affects all Vite-based frameworks and builders:

Expand Down Expand Up @@ -587,6 +588,21 @@ If you're using an older version of Next.js, you'll need to upgrade to Next.js 1

For help upgrading your Next.js application, see the [Next.js upgrade guide](https://nextjs.org/docs/app/building-your-application/upgrading).

### Angular: requires Angular 21 or higher
Comment thread
valentinpalkovic marked this conversation as resolved.

Storybook has dropped support for Angular versions 18-20. The minimum supported version is now Angular 21.

If you're using an older version of Angular, you'll need to upgrade to Angular 21 or newer to use the latest version of Storybook.

For help upgrading your Angular application, see the [Angular update guide](https://angular.dev/update-guide).

Key changes:

- All Angular packages in peerDependencies now require `>=21.0.0 < 23.0.0`
- `@angular-devkit/architect` now requires `>=0.2100.0 < 0.2300.0`
- The RxJS peer requirement accepts `^6.5.3 || ^7.4.0`, matching Angular 21's own range
- Standalone components are always treated as the default in `@storybook/angular`
Comment thread
valentinpalkovic marked this conversation as resolved.

## From version 10.5.x to 10.6.0

### Vue 3: `vue-docgen-api` is deprecated
Expand Down
48 changes: 24 additions & 24 deletions code/frameworks/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,39 +67,39 @@
"webpack": "5"
},
"devDependencies": {
"@analogjs/vite-plugin-angular": "^1.12.1",
"@angular-devkit/architect": "^0.1901.1",
"@angular-devkit/build-angular": "^19.1.1",
"@angular-devkit/core": "^19.1.1",
"@angular/animations": "^19.1.1",
"@angular/common": "^19.1.1",
"@angular/compiler": "^19.1.1",
"@angular/compiler-cli": "^19.1.1",
"@angular/core": "^19.1.1",
"@angular/forms": "^19.1.1",
"@angular/platform-browser": "^19.1.1",
"@angular/platform-browser-dynamic": "^19.1.1",
"@analogjs/vite-plugin-angular": "^2.5.2",
"@angular-devkit/architect": "^0.2100.0",
"@angular-devkit/build-angular": "^21.0.0",
"@angular-devkit/core": "^21.0.0",
"@angular/animations": "^21.0.0",
"@angular/common": "^21.0.0",
"@angular/compiler": "^21.0.0",
"@angular/compiler-cli": "^21.0.0",
"@angular/core": "^21.0.0",
"@angular/forms": "^21.0.0",
"@angular/platform-browser": "^21.0.0",
"@angular/platform-browser-dynamic": "^21.0.0",
"@storybook/angular-compodoc": "workspace:*",
"@storybook/core-webpack": "workspace:*",
"@types/node": "^22.19.1",
"empathic": "^2.0.0",
"rimraf": "^6.0.1",
"typescript": "^6.0.3",
"webpack": "5",
"zone.js": "^0.15.0"
"zone.js": "^0.16.0"
},
"peerDependencies": {
"@angular-devkit/architect": ">=0.1800.0 < 0.2300.0",
"@angular-devkit/build-angular": ">=18.0.0 < 23.0.0",
"@angular-devkit/core": ">=18.0.0 < 23.0.0",
"@angular/animations": ">=18.0.0 < 23.0.0",
"@angular/cli": ">=18.0.0 < 23.0.0",
"@angular/common": ">=18.0.0 < 23.0.0",
"@angular/compiler": ">=18.0.0 < 23.0.0",
"@angular/compiler-cli": ">=18.0.0 < 23.0.0",
"@angular/core": ">=18.0.0 < 23.0.0",
"@angular/platform-browser": ">=18.0.0 < 23.0.0",
"@angular/platform-browser-dynamic": ">=18.0.0 < 23.0.0",
"@angular-devkit/architect": ">=0.2100.0 < 0.2300.0",
"@angular-devkit/build-angular": ">=21.0.0 < 23.0.0",
"@angular-devkit/core": ">=21.0.0 < 23.0.0",
"@angular/animations": ">=21.0.0 < 23.0.0",
"@angular/cli": ">=21.0.0 < 23.0.0",
"@angular/common": ">=21.0.0 < 23.0.0",
"@angular/compiler": ">=21.0.0 < 23.0.0",
"@angular/compiler-cli": ">=21.0.0 < 23.0.0",
"@angular/core": ">=21.0.0 < 23.0.0",
Comment thread
valentinpalkovic marked this conversation as resolved.
"@angular/platform-browser": ">=21.0.0 < 23.0.0",
"@angular/platform-browser-dynamic": ">=21.0.0 < 23.0.0",
"rxjs": "^6.5.3 || ^7.4.0",
"storybook": "workspace:^",
"typescript": "^4.9.0 || ^5.0.0 || ^6.0.0",
Expand Down
4 changes: 2 additions & 2 deletions code/frameworks/angular/src/builders/build-storybook/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import * as pkg from 'empathic/package';
import { errorSummary, printErrorDetails } from '../utils/error-handler.ts';
import { runCompodoc } from '../utils/run-compodoc.ts';
import type { StandaloneOptions } from '../utils/standalone-options.ts';
import { VERSION } from '@angular/core';
import { Channel } from 'storybook/internal/channels';

addToGlobalContext('cliVersion', versions.storybook);
Expand Down Expand Up @@ -122,7 +121,8 @@ const commandBuilder: BuilderHandlerFn<StorybookBuilderOptions> = async (
previewUrl,
sourceMap = false,
preserveSymlinks = false,
experimentalZoneless = !!(VERSION.major && Number(VERSION.major) >= 21),
// Angular 21+ always supports zoneless; users still opt out via `experimentalZoneless: false`
experimentalZoneless = true,
} = options;

const packageJsonPath = pkg.up({ cwd: __dirname });
Expand Down
4 changes: 2 additions & 2 deletions code/frameworks/angular/src/builders/start-storybook/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import * as pkg from 'empathic/package';
import { errorSummary, printErrorDetails } from '../utils/error-handler.ts';
import { runCompodoc } from '../utils/run-compodoc.ts';
import type { StandaloneOptions } from '../utils/standalone-options.ts';
import { VERSION } from '@angular/core';
import { Channel } from 'storybook/internal/channels';

addToGlobalContext('cliVersion', versions.storybook);
Expand Down Expand Up @@ -146,7 +145,8 @@ const commandBuilder: BuilderHandlerFn<StorybookBuilderOptions> = (
previewUrl,
sourceMap = false,
preserveSymlinks = false,
experimentalZoneless = !!(VERSION.major && Number(VERSION.major) >= 21),
// Angular 21+ always supports zoneless; users still opt out via `experimentalZoneless: false`
experimentalZoneless = true,
} = options;

const packageJsonPath = pkg.up({ cwd: __dirname });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
Output,
Pipe,
ɵReflectionCapabilities as ReflectionCapabilities,
VERSION,
} from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { dedent } from 'ts-dedent';
Expand Down Expand Up @@ -172,19 +171,16 @@ export class PropertyExtractor implements NgModuleMetadata {

// Check if the hierarchically lowest Component or Directive decorator (the only relevant for importing dependencies) is standalone.

let isStandalone =
// Starting in Angular 19 the default (in case it's undefined) value for standalone is true
const isStandalone =
(isComponent || isDirective) &&
[...decorators]
([...decorators]
.reverse() // reflectionCapabilities returns decorators in a hierarchically top-down order
.find(
(d) =>
this.isDecoratorInstanceOf(d, 'Component') || this.isDecoratorInstanceOf(d, 'Directive')
)?.standalone;

//Starting in Angular 19 the default (in case it's undefined) value for standalone is true
if (isStandalone === undefined) {
isStandalone = !!(VERSION.major && Number(VERSION.major) >= 19);
}
)?.standalone ??
true);

return { isDeclarable, isStandalone };
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,44 @@ describe('dependenciesVersions blocker', () => {

expect(result).toBe(false);
});

test('@angular/core 20 is blocked with message and migration anchor', async () => {
const packageManager = createPackageManager({ '@angular/core': '20.0.0' });

const result = await blocker.check(createCheckOptions(packageManager));

expect(result).toEqual({
packageName: '@angular/core',
installedVersion: '20.0.0',
minimumVersion: '21.0.0',
});

if (!result) {
throw new Error('Expected @angular/core 20.0.0 to be blocked');
}

const logged = blocker.log(result);

expect(logged.title).toBe('Require Angular v21 and up');
expect(logged.message).toContain('Support for Angular < 21 has been removed.');
expect(logged.link).toBe(
'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#angular-requires-angular-21-or-higher'
);
});

test.each(['21.0.0', '22.1.0'])('@angular/core %s is not blocked', async (version) => {
const packageManager = createPackageManager({ '@angular/core': version });

const result = await blocker.check(createCheckOptions(packageManager));

expect(result).toBe(false);
});

test('missing @angular/core does not block', async () => {
const packageManager = createPackageManager({});

const result = await blocker.check(createCheckOptions(packageManager));

expect(result).toBe(false);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { createBlocker } from './types.ts';
import { findOutdatedPackage } from './utils.ts';

const minimalVersionsMap = {
'@angular/core': '18.0.0',
'@angular/core': '21.0.0',
'react-scripts': '5.0.0',
next: '15.0.0',
preact: '10.0.0',
Expand All @@ -24,12 +24,12 @@ export const blocker = createBlocker({
switch (data.packageName) {
case '@angular/core':
return {
title: 'Angular 18 support removed',
title: 'Require Angular v21 and up',
message: dedent`
Support for Angular < 18 has been removed.
Support for Angular < 21 has been removed.
Please see the migration guide for more information:
`,
link: 'https://angular.dev/update-guide',
link: 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#angular-requires-angular-21-or-higher',
};
case 'next':
return {
Expand Down
Loading