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

Angular: Drop v14.x support #25101

Merged
merged 2 commits into from
Dec 4, 2023
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
8 changes: 8 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
- [New UI and props for Button and IconButton components](#new-ui-and-props-for-button-and-iconbutton-components)
- [Icons is deprecated](#icons-is-deprecated)
- [React-docgen component analysis by default](#react-docgen-component-analysis-by-default)
- [Framework-specific changes](#framework-specific-changes)
- [Angular: Drop support for Angular \< 15](#angular-drop-support-for-angular--15)
- [From version 7.5.0 to 7.6.0](#from-version-750-to-760)
- [CommonJS with Vite is deprecated](#commonjs-with-vite-is-deprecated)
- [Using implicit actions during rendering is deprecated](#using-implicit-actions-during-rendering-is-deprecated)
Expand Down Expand Up @@ -460,6 +462,12 @@ export default {

For more information see: https://storybook.js.org/docs/react/api/main-config-typescript#reactdocgen

### Framework-specific changes

#### Angular: Drop support for Angular \< 15

Starting in 8.0, we drop support for Angular < 15

## From version 7.5.0 to 7.6.0

#### CommonJS with Vite 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 @@ -65,18 +65,18 @@
"webpack": "5"
},
"devDependencies": {
"@angular-devkit/architect": "^0.1600.0-rc.4",
"@angular-devkit/build-angular": "^16.0.0-rc.4",
"@angular-devkit/core": "^16.0.0-rc.4",
"@angular/animations": "^16.0.0-rc.4",
"@angular/cli": "^16.0.0-rc.4",
"@angular/common": "^16.0.0-rc.4",
"@angular/compiler": "^16.0.0-rc.4",
"@angular/compiler-cli": "^16.0.0-rc.4",
"@angular/core": "^16.0.0-rc.4",
"@angular/forms": "^16.0.0-rc.4",
"@angular/platform-browser": "^16.0.0-rc.4",
"@angular/platform-browser-dynamic": "^16.0.0-rc.4",
"@angular-devkit/architect": "^0.1700.5",
"@angular-devkit/build-angular": "^17.0.5",
"@angular-devkit/core": "^17.0.5",
"@angular/animations": "^17.0.5",
"@angular/cli": "^17.0.5",
"@angular/common": "^17.0.5",
"@angular/compiler": "^17.0.5",
"@angular/compiler-cli": "^17.0.5",
"@angular/core": "^17.0.5",
"@angular/forms": "^17.0.5",
"@angular/platform-browser": "^17.0.5",
"@angular/platform-browser-dynamic": "^17.0.5",
"@types/cross-spawn": "^6.0.2",
"@types/tmp": "^0.2.3",
"cross-spawn": "^7.0.3",
Expand All @@ -86,20 +86,20 @@
"tmp": "^0.2.1",
"typescript": "^5.3.2",
"webpack": "5",
"zone.js": "^0.13.0"
"zone.js": "^0.14.2"
},
"peerDependencies": {
"@angular-devkit/architect": ">=0.1400.0 < 0.1800.0",
"@angular-devkit/build-angular": ">=14.1.0 < 18.0.0",
"@angular-devkit/core": ">=14.1.0 < 18.0.0",
"@angular/cli": ">=14.1.0 < 18.0.0",
"@angular/common": ">=14.1.0 < 18.0.0",
"@angular/compiler": ">=14.1.0 < 18.0.0",
"@angular/compiler-cli": ">=14.1.0 < 18.0.0",
"@angular/core": ">=14.1.0 < 18.0.0",
"@angular/forms": ">=14.1.0 < 18.0.0",
"@angular/platform-browser": ">=14.1.0 < 18.0.0",
"@angular/platform-browser-dynamic": ">=14.1.0 < 18.0.0",
"@angular-devkit/architect": ">=0.1500.0 < 0.1800.0",
"@angular-devkit/build-angular": ">=15.0.0 < 18.0.0",
"@angular-devkit/core": ">=15.0.0 < 18.0.0",
"@angular/cli": ">=15.0.0 < 18.0.0",
"@angular/common": ">=15.0.0 < 18.0.0",
"@angular/compiler": ">=15.0.0 < 18.0.0",
"@angular/compiler-cli": ">=15.0.0 < 18.0.0",
"@angular/core": ">=15.0.0 < 18.0.0",
"@angular/forms": ">=15.0.0 < 18.0.0",
"@angular/platform-browser": ">=15.0.0 < 18.0.0",
"@angular/platform-browser-dynamic": ">=15.0.0 < 18.0.0",
"@babel/core": "*",
"rxjs": "^6.0.0 || ^7.4.0",
"typescript": "^4.0.0 || ^5.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`is not Nx project angular builders Angular < 14.0.0 should throw an Error 1`] = `
"❌ Your project uses Angular < 14.0.0. Storybook 7.0 for Angular requires Angular 14.0.0 or higher.
Please upgrade your Angular version to at least version 14.0.0 to use Storybook 7.0 in your project."
exports[`is not Nx project angular builders Angular < 15.0.0 should throw an Error 1`] = `
"❌ Your project uses Angular < 15.0.0. Storybook 8.0 for Angular requires Angular 15.0.0 or higher.
Please upgrade your Angular version to at least version 15.0.0 to use Storybook 8.0 in your project."
`;
8 changes: 4 additions & 4 deletions code/lib/cli/src/automigrate/fixes/angular-builders.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ describe('is not Nx project', () => {
});
});

describe('Angular < 14.0.0', () => {
describe('Angular < 15.0.0', () => {
const packageManager = {
getPackageVersion: (packageName: string) => {
if (packageName === '@angular/core') {
return Promise.resolve('12.0.0');
return Promise.resolve('14.0.0');
}

return null;
Expand All @@ -86,11 +86,11 @@ describe('is not Nx project', () => {
});
});

describe('Angular >= 14.0.0', () => {
describe('Angular >= 16.0.0', () => {
const packageManager = {
getPackageVersion: (packageName) => {
if (packageName === '@angular/core') {
return Promise.resolve('15.0.0');
return Promise.resolve('16.0.0');
}

return null;
Expand Down
6 changes: 3 additions & 3 deletions code/lib/cli/src/automigrate/fixes/angular-builders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ export const angularBuilders: Fix<AngularBuildersRunOptions> = {
return null;
}

if (semver.lt(angularVersion, '14.0.0')) {
if (semver.lt(angularVersion, '15.0.0')) {
throw new Error(dedent`
❌ Your project uses Angular < 14.0.0. Storybook 7.0 for Angular requires Angular 14.0.0 or higher.
Please upgrade your Angular version to at least version 14.0.0 to use Storybook 7.0 in your project.
❌ Your project uses Angular < 15.0.0. Storybook 8.0 for Angular requires Angular 15.0.0 or higher.
Please upgrade your Angular version to at least version 15.0.0 to use Storybook 8.0 in your project.
`);
}

Expand Down
Loading