From eea24706199a631514472296b41c1368e8b3c482 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leosvel=20P=C3=A9rez=20Espinosa?= Date: Fri, 3 Jun 2022 15:23:09 +0100 Subject: [PATCH] feat(angular): support angular v14.0.0 (#10559) --- package.json | 34 +- packages/angular/migrations.json | 72 ++-- packages/angular/package.json | 4 +- .../karma/files/karma.conf.js__tmpl__ | 1 + .../angular/src/generators/karma/karma.ts | 8 +- .../update-14-2-0/update-angular-cli.spec.ts | 4 +- .../update-14-2-0/update-angular-cli.ts | 6 +- .../update-router-initial-navigation.spec.ts | 311 ++++++++++++++++++ .../update-router-initial-navigation.ts | 140 ++++++++ packages/angular/src/utils/versions.ts | 6 +- packages/jest/migrations.json | 9 + packages/linter/src/utils/versions.ts | 2 +- .../src/utilities/migration.ts | 4 +- packages/nx/src/utils/versions.ts | 2 +- packages/storybook/migrations.json | 4 +- packages/workspace/src/utils/versions.ts | 2 +- yarn.lock | 193 ++++++----- 17 files changed, 649 insertions(+), 153 deletions(-) create mode 100644 packages/angular/src/migrations/update-14-2-0/update-router-initial-navigation.spec.ts create mode 100644 packages/angular/src/migrations/update-14-2-0/update-router-initial-navigation.ts diff --git a/package.json b/package.json index ce037363c26ab..ddba648b78a36 100644 --- a/package.json +++ b/package.json @@ -25,24 +25,24 @@ "prepare": "is-ci || husky install" }, "devDependencies": { - "@angular-devkit/architect": "~0.1400.0-rc.3", - "@angular-devkit/build-angular": "~14.0.0-rc.3", - "@angular-devkit/core": "~14.0.0-rc.3", - "@angular-devkit/schematics": "~14.0.0-rc.3", + "@angular-devkit/architect": "~0.1400.0", + "@angular-devkit/build-angular": "~14.0.0", + "@angular-devkit/core": "~14.0.0", + "@angular-devkit/schematics": "~14.0.0", "@angular-eslint/eslint-plugin": "~13.2.1", "@angular-eslint/eslint-plugin-template": "~13.2.1", "@angular-eslint/template-parser": "~13.2.1", - "@angular/cli": "~14.0.0-rc.3", - "@angular/common": "~14.0.0-rc.3", - "@angular/compiler": "~14.0.0-rc.3", - "@angular/compiler-cli": "~14.0.0-rc.3", - "@angular/core": "~14.0.0-rc.3", - "@angular/forms": "~14.0.0-rc.3", - "@angular/platform-browser": "~14.0.0-rc.3", - "@angular/platform-browser-dynamic": "~14.0.0-rc.3", - "@angular/router": "~14.0.0-rc.3", - "@angular/service-worker": "~14.0.0-rc.3", - "@angular/upgrade": "~14.0.0-rc.3", + "@angular/cli": "~14.0.0", + "@angular/common": "~14.0.0", + "@angular/compiler": "~14.0.0", + "@angular/compiler-cli": "~14.0.0", + "@angular/core": "~14.0.0", + "@angular/forms": "~14.0.0", + "@angular/platform-browser": "~14.0.0", + "@angular/platform-browser-dynamic": "~14.0.0", + "@angular/router": "~14.0.0", + "@angular/service-worker": "~14.0.0", + "@angular/upgrade": "~14.0.0", "@babel/helper-create-regexp-features-plugin": "^7.14.5", "@cypress/webpack-preprocessor": "^5.9.1", "@nestjs/common": "^8.0.0", @@ -74,7 +74,7 @@ "@rollup/plugin-image": "^2.1.0", "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-node-resolve": "^13.0.4", - "@schematics/angular": "~14.0.0-rc.3", + "@schematics/angular": "~14.0.0", "@storybook/addon-essentials": "~6.5.4", "@storybook/addon-knobs": "~6.3.0", "@storybook/angular": "~6.5.4", @@ -185,7 +185,7 @@ "mini-css-extract-plugin": "~2.4.7", "minimatch": "3.0.5", "next-sitemap": "^1.6.108", - "ng-packagr": "~14.0.0-rc.0", + "ng-packagr": "~14.0.0", "ngrx-store-freeze": "0.2.4", "node-fetch": "^2.6.7", "nx": "14.2.0-beta.2", diff --git a/packages/angular/migrations.json b/packages/angular/migrations.json index c87e394b2e2b1..63d8172d50ddf 100644 --- a/packages/angular/migrations.json +++ b/packages/angular/migrations.json @@ -142,6 +142,12 @@ "version": "14.2.0-beta.0", "description": "Update TypeScript compilation target to 'ES2020'.", "factory": "./src/migrations/update-14-2-0/update-tsconfig-target" + }, + "update-router-initial-navigation": { + "cli": "nx", + "version": "14.2.0-beta.6", + "description": "Update `initialNavigation: 'enabled'` to `initialNavigation: 'enabledBlocking'`.", + "factory": "./src/migrations/update-14-2-0/update-router-initial-navigation" } }, "packageJsonUpdates": { @@ -1119,99 +1125,99 @@ } } }, - "14.2.0-beta.4": { - "version": "14.2.0-beta.4", + "14.2.0": { + "version": "14.2.0-beta.6", "packages": { "@angular-devkit/architect": { - "version": "~0.1400.0-rc.3", + "version": "~0.1400.0", "alwaysAddToPackageJson": false }, "@angular-devkit/build-angular": { - "version": "~14.0.0-rc.3", + "version": "~14.0.0", "alwaysAddToPackageJson": false }, "@angular-devkit/build-webpack": { - "version": "~0.1400.0-rc.3", + "version": "~0.1400.0", "alwaysAddToPackageJson": false }, "@angular-devkit/core": { - "version": "~14.0.0-rc.3", + "version": "~14.0.0", "alwaysAddToPackageJson": false }, "@angular-devkit/schematics": { - "version": "~14.0.0-rc.3", + "version": "~14.0.0", "alwaysAddToPackageJson": false }, "@angular/core": { - "version": "~14.0.0-rc.3", + "version": "~14.0.0", "alwaysAddToPackageJson": true }, "@angular/common": { - "version": "~14.0.0-rc.3", + "version": "~14.0.0", "alwaysAddToPackageJson": false }, "@angular/forms": { - "version": "~14.0.0-rc.3", + "version": "~14.0.0", "alwaysAddToPackageJson": false }, "@angular/elements": { - "version": "~14.0.0-rc.3", + "version": "~14.0.0", "alwaysAddToPackageJson": false }, "@angular/compiler": { - "version": "~14.0.0-rc.3", + "version": "~14.0.0", "alwaysAddToPackageJson": false }, "@angular/compiler-cli": { - "version": "~14.0.0-rc.3", + "version": "~14.0.0", "alwaysAddToPackageJson": false }, "@angular/localize": { - "version": "~14.0.0-rc.3", + "version": "~14.0.0", "alwaysAddToPackageJson": false }, "@angular/platform-browser": { - "version": "~14.0.0-rc.3", + "version": "~14.0.0", "alwaysAddToPackageJson": false }, "@angular/platform-browser-dynamic": { - "version": "~14.0.0-rc.3", + "version": "~14.0.0", "alwaysAddToPackageJson": false }, "@angular/platform-server": { - "version": "~14.0.0-rc.3", + "version": "~14.0.0", "alwaysAddToPackageJson": false }, "@angular/router": { - "version": "~14.0.0-rc.3", + "version": "~14.0.0", "alwaysAddToPackageJson": false }, "@angular/upgrade": { - "version": "~14.0.0-rc.3", + "version": "~14.0.0", "alwaysAddToPackageJson": false }, "@angular/language-service": { - "version": "~14.0.0-rc.3", + "version": "~14.0.0", "alwaysAddToPackageJson": false }, "@angular/animations": { - "version": "~14.0.0-rc.3", + "version": "~14.0.0", "alwaysAddToPackageJson": false }, "@angular/service-worker": { - "version": "~14.0.0-rc.3", + "version": "~14.0.0", "alwaysAddToPackageJson": false }, "@angular/material": { - "version": "~14.0.0-rc.2", + "version": "~14.0.0", "alwaysAddToPackageJson": false }, "@angular/cdk": { - "version": "~14.0.0-rc.2", + "version": "~14.0.0", "alwaysAddToPackageJson": false }, "ng-packagr": { - "version": "~14.0.0-rc.0", + "version": "~14.0.0", "alwaysAddToPackageJson": false }, "@angular-eslint/eslint-plugin": { @@ -1257,6 +1263,22 @@ "jest-preset-angular": { "version": "~11.1.2", "alwaysAddToPackageJson": false + }, + "karma-jasmine": { + "version": "~5.0.0", + "alwaysAddToPackageJson": false + }, + "jasmine-core": { + "version": "~4.1.0", + "alwaysAddToPackageJson": false + }, + "jasmine-spec-reporter": { + "version": "~7.0.0", + "alwaysAddToPackageJson": false + }, + "@types/jasmine": { + "version": "~4.0.0", + "alwaysAddToPackageJson": false } } } diff --git a/packages/angular/package.json b/packages/angular/package.json index 42d1921cd9f0a..49fe79a0b672a 100644 --- a/packages/angular/package.json +++ b/packages/angular/package.json @@ -37,7 +37,7 @@ "migrations": "./migrations.json" }, "dependencies": { - "@angular-devkit/schematics": "~14.0.0-rc.3", + "@angular-devkit/schematics": "~14.0.0", "@nrwl/cypress": "file:../cypress", "@nrwl/devkit": "file:../devkit", "@nrwl/jest": "file:../jest", @@ -45,7 +45,7 @@ "@nrwl/storybook": "file:../storybook", "@nrwl/workspace": "file:../workspace", "@phenomnomnominal/tsquery": "4.1.1", - "@schematics/angular": "~14.0.0-rc.3", + "@schematics/angular": "~14.0.0", "chalk": "4.1.0", "chokidar": "^3.5.1", "http-server": "^14.1.0", diff --git a/packages/angular/src/generators/karma/files/karma.conf.js__tmpl__ b/packages/angular/src/generators/karma/files/karma.conf.js__tmpl__ index aacbcbb5fd758..00eb1796e681c 100644 --- a/packages/angular/src/generators/karma/files/karma.conf.js__tmpl__ +++ b/packages/angular/src/generators/karma/files/karma.conf.js__tmpl__ @@ -39,5 +39,6 @@ module.exports = () => { autoWatch: true, browsers: ['Chrome'], singleRun: true, + restartOnFileChange: true }; }; diff --git a/packages/angular/src/generators/karma/karma.ts b/packages/angular/src/generators/karma/karma.ts index 28e991ea35ec7..b4628bac4c991 100644 --- a/packages/angular/src/generators/karma/karma.ts +++ b/packages/angular/src/generators/karma/karma.ts @@ -26,11 +26,11 @@ export function karmaGenerator(tree: Tree, options: GeneratorOptions) { karma: '~6.3.0', 'karma-chrome-launcher': '~3.1.0', 'karma-coverage': '~2.2.0', - 'karma-jasmine': '~4.0.0', + 'karma-jasmine': '~5.0.0', 'karma-jasmine-html-reporter': '~1.7.0', - 'jasmine-core': '~3.10.0', - 'jasmine-spec-reporter': '~5.0.0', - '@types/jasmine': '~3.5.0', + 'jasmine-core': '~4.1.0', + 'jasmine-spec-reporter': '~7.0.0', + '@types/jasmine': '~4.0.0', '@types/node': '16.11.7', } ); diff --git a/packages/angular/src/migrations/update-14-2-0/update-angular-cli.spec.ts b/packages/angular/src/migrations/update-14-2-0/update-angular-cli.spec.ts index 1df5873cd0af1..cd6aa9a5a21b4 100644 --- a/packages/angular/src/migrations/update-14-2-0/update-angular-cli.spec.ts +++ b/packages/angular/src/migrations/update-14-2-0/update-angular-cli.spec.ts @@ -17,7 +17,7 @@ describe('update-angular-cli migration', () => { await updateAngularCli(tree); const { devDependencies } = readJson(tree, 'package.json'); - expect(devDependencies['@angular/cli']).toEqual('~14.0.0-rc.3'); + expect(devDependencies['@angular/cli']).toEqual('~14.0.0'); }); it('should update @angular/cli version when defined as a dependency', async () => { @@ -28,7 +28,7 @@ describe('update-angular-cli migration', () => { await updateAngularCli(tree); const { dependencies } = readJson(tree, 'package.json'); - expect(dependencies['@angular/cli']).toEqual('~14.0.0-rc.3'); + expect(dependencies['@angular/cli']).toEqual('~14.0.0'); }); it('should add @angular/cli to package.json when it is not set', async () => { diff --git a/packages/angular/src/migrations/update-14-2-0/update-angular-cli.ts b/packages/angular/src/migrations/update-14-2-0/update-angular-cli.ts index 22fd339f3dafd..3c014560eea70 100644 --- a/packages/angular/src/migrations/update-14-2-0/update-angular-cli.ts +++ b/packages/angular/src/migrations/update-14-2-0/update-angular-cli.ts @@ -1,14 +1,16 @@ import { formatFiles, Tree, updateJson } from '@nrwl/devkit'; +const angularCliVersion = '~14.0.0'; + export default async function (tree: Tree) { let shouldFormat = false; updateJson(tree, 'package.json', (json) => { if (json.devDependencies?.['@angular/cli']) { - json.devDependencies['@angular/cli'] = '~14.0.0-rc.3'; + json.devDependencies['@angular/cli'] = angularCliVersion; shouldFormat = true; } else if (json.dependencies?.['@angular/cli']) { - json.dependencies['@angular/cli'] = '~14.0.0-rc.3'; + json.dependencies['@angular/cli'] = angularCliVersion; shouldFormat = true; } diff --git a/packages/angular/src/migrations/update-14-2-0/update-router-initial-navigation.spec.ts b/packages/angular/src/migrations/update-14-2-0/update-router-initial-navigation.spec.ts new file mode 100644 index 0000000000000..de42100f787c2 --- /dev/null +++ b/packages/angular/src/migrations/update-14-2-0/update-router-initial-navigation.spec.ts @@ -0,0 +1,311 @@ +import { + addProjectConfiguration, + DependencyType, + ProjectGraph, + Tree, +} from '@nrwl/devkit'; +import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing'; +import updateRouterInitialNavigation from './update-router-initial-navigation'; + +let projectGraph: ProjectGraph; +jest.mock('@nrwl/devkit', () => ({ + ...jest.requireActual('@nrwl/devkit'), + createProjectGraphAsync: jest + .fn() + .mockImplementation(async () => projectGraph), +})); + +describe('update-router-initial-navigation migration', () => { + let tree: Tree; + + beforeEach(() => { + tree = createTreeWithEmptyWorkspace(2); + }); + + it('should update "initialNavigation" to "enabledBlocking"', async () => { + projectGraph = { + dependencies: { + app1: [ + { + type: DependencyType.static, + source: 'app1', + target: 'npm:@angular/router', + }, + ], + }, + nodes: {}, + }; + addProjectConfiguration(tree, 'app1', { + root: 'apps/app1', + sourceRoot: 'apps/app1/src', + }); + tree.write( + 'apps/app1/src/app/app.module.ts', + `import { NgModule } from '@angular/core'; + import { BrowserModule } from '@angular/platform-browser'; + import { AppComponent } from './app.component'; + import { NxWelcomeComponent } from './nx-welcome.component'; + import { RouterModule } from '@angular/router'; + + @NgModule({ + declarations: [AppComponent, NxWelcomeComponent], + imports: [ + BrowserModule, + RouterModule.forRoot([], { relativeLinkResolution: 'legacy', initialNavigation: 'enabled' }), + ], + bootstrap: [AppComponent], + }) + export class AppModule {}` + ); + + await updateRouterInitialNavigation(tree); + + expect(tree.read('apps/app1/src/app/app.module.ts', 'utf-8')) + .toMatchInlineSnapshot(` + "import { NgModule } from '@angular/core'; + import { BrowserModule } from '@angular/platform-browser'; + import { AppComponent } from './app.component'; + import { NxWelcomeComponent } from './nx-welcome.component'; + import { RouterModule } from '@angular/router'; + + @NgModule({ + declarations: [AppComponent, NxWelcomeComponent], + imports: [ + BrowserModule, + RouterModule.forRoot([], { relativeLinkResolution: 'legacy', initialNavigation: 'enabledBlocking' }), + ], + bootstrap: [AppComponent], + }) + export class AppModule {}" + `); + }); + + it('should do nothing when "initialNavigation" is not set to "enabled"', async () => { + projectGraph = { + dependencies: { + app1: [ + { + type: DependencyType.static, + source: 'app1', + target: 'npm:@angular/router', + }, + ], + }, + nodes: {}, + }; + addProjectConfiguration(tree, 'app1', { + root: 'apps/app1', + sourceRoot: 'apps/app1/src', + }); + const moduleContent = `import { NgModule } from '@angular/core'; + import { BrowserModule } from '@angular/platform-browser'; + import { AppComponent } from './app.component'; + import { NxWelcomeComponent } from './nx-welcome.component'; + import { RouterModule } from '@angular/router'; + + @NgModule({ + declarations: [AppComponent, NxWelcomeComponent], + imports: [ + BrowserModule, + RouterModule.forRoot([], { relativeLinkResolution: 'legacy', initialNavigation: 'enabledNonBlocking' }), + ], + bootstrap: [AppComponent], + }) + export class AppModule {}`; + tree.write('apps/app1/src/app/app.module.ts', moduleContent); + + await updateRouterInitialNavigation(tree); + + expect(tree.read('apps/app1/src/app/app.module.ts', 'utf-8')).toBe( + moduleContent + ); + }); + + it('should do nothing when "initialNavigation" is not set', async () => { + projectGraph = { + dependencies: { + app1: [ + { + type: DependencyType.static, + source: 'app1', + target: 'npm:@angular/router', + }, + ], + }, + nodes: {}, + }; + addProjectConfiguration(tree, 'app1', { + root: 'apps/app1', + sourceRoot: 'apps/app1/src', + }); + const moduleContent = `import { NgModule } from '@angular/core'; + import { BrowserModule } from '@angular/platform-browser'; + import { AppComponent } from './app.component'; + import { NxWelcomeComponent } from './nx-welcome.component'; + import { RouterModule } from '@angular/router'; + + @NgModule({ + declarations: [AppComponent, NxWelcomeComponent], + imports: [ + BrowserModule, + RouterModule.forRoot([], { relativeLinkResolution: 'legacy' }), + ], + bootstrap: [AppComponent], + }) + export class AppModule {}`; + tree.write('apps/app1/src/app/app.module.ts', moduleContent); + + await updateRouterInitialNavigation(tree); + + expect(tree.read('apps/app1/src/app/app.module.ts', 'utf-8')).toBe( + moduleContent + ); + }); + + it('should do nothing when not passing extra options to "RouterModule.forRoot" call', async () => { + projectGraph = { + dependencies: { + app1: [ + { + type: DependencyType.static, + source: 'app1', + target: 'npm:@angular/router', + }, + ], + }, + nodes: {}, + }; + addProjectConfiguration(tree, 'app1', { + root: 'apps/app1', + sourceRoot: 'apps/app1/src', + }); + const moduleContent = `import { NgModule } from '@angular/core'; + import { BrowserModule } from '@angular/platform-browser'; + import { AppComponent } from './app.component'; + import { NxWelcomeComponent } from './nx-welcome.component'; + import { RouterModule } from '@angular/router'; + + @NgModule({ + declarations: [AppComponent, NxWelcomeComponent], + imports: [BrowserModule, RouterModule.forRoot([])], + bootstrap: [AppComponent], + }) + export class AppModule {}`; + tree.write('apps/app1/src/app/app.module.ts', moduleContent); + + await updateRouterInitialNavigation(tree); + + expect(tree.read('apps/app1/src/app/app.module.ts', 'utf-8')).toBe( + moduleContent + ); + }); + + it('should no update "initialNavigation" when using a different module ".forRoot" call with similar API to "RouterModule.forRoot"', async () => { + projectGraph = { + dependencies: { + app1: [ + { + type: DependencyType.static, + source: 'app1', + target: 'npm:@angular/router', + }, + ], + }, + nodes: {}, + }; + addProjectConfiguration(tree, 'app1', { + root: 'apps/app1', + sourceRoot: 'apps/app1/src', + }); + const moduleContent = `import { NgModule } from '@angular/core'; + import { OtherModule } from '@foo/bar'; + import { FooComponent } from './foo.component'; + + @NgModule({ + declarations: [AppComponent, NxWelcomeComponent], + imports: [BrowserModule, OtherModule.forRoot([], { initialNavigation: 'enabled' })], + bootstrap: [AppComponent], + }) + export class FooModule {}`; + tree.write('apps/app1/src/app/app.module.ts', moduleContent); + + await updateRouterInitialNavigation(tree); + + expect(tree.read('apps/app1/src/app/app.module.ts', 'utf-8')).toBe( + moduleContent + ); + }); + + it('should do nothing when not using "@angular/router"', async () => { + projectGraph = { + dependencies: { + app1: [ + { + type: DependencyType.static, + source: 'app1', + target: 'npm:@angular/common', + }, + ], + }, + nodes: {}, + }; + addProjectConfiguration(tree, 'app1', { + root: 'apps/app1', + sourceRoot: 'apps/app1/src', + }); + const moduleContent = `import { NgModule } from '@angular/core'; + import { BrowserModule } from '@angular/platform-browser'; + import { AppComponent } from './app.component'; + import { NxWelcomeComponent } from './nx-welcome.component'; + + @NgModule({ + declarations: [AppComponent, NxWelcomeComponent], + imports: [BrowserModule], + bootstrap: [AppComponent], + }) + export class AppModule {}`; + tree.write('apps/app1/src/app/app.module.ts', moduleContent); + + await updateRouterInitialNavigation(tree); + + expect(tree.read('apps/app1/src/app/app.module.ts', 'utf-8')).toBe( + moduleContent + ); + }); + + it('should do nothing when using a "RouterModule.forChild" call', async () => { + projectGraph = { + dependencies: { + app1: [ + { + type: DependencyType.static, + source: 'app1', + target: 'npm:@angular/router', + }, + ], + }, + nodes: {}, + }; + addProjectConfiguration(tree, 'app1', { + root: 'apps/app1', + sourceRoot: 'apps/app1/src', + }); + const moduleContent = `import { NgModule } from '@angular/core'; + import { RouterModule } from '@angular/router'; + import { FooComponent } from './foo.component'; + + @NgModule({ + declarations: [FooComponent], + imports: [CommonModule, RouterModule.forChild([])], + exports: [FooComponent], + }) + export class FooModule {}`; + tree.write('apps/app1/src/app/foo/foo.module.ts', moduleContent); + + await updateRouterInitialNavigation(tree); + + expect(tree.read('apps/app1/src/app/foo/foo.module.ts', 'utf-8')).toBe( + moduleContent + ); + }); +}); diff --git a/packages/angular/src/migrations/update-14-2-0/update-router-initial-navigation.ts b/packages/angular/src/migrations/update-14-2-0/update-router-initial-navigation.ts new file mode 100644 index 0000000000000..44d7200edcfe9 --- /dev/null +++ b/packages/angular/src/migrations/update-14-2-0/update-router-initial-navigation.ts @@ -0,0 +1,140 @@ +import type { ProjectConfiguration, Tree } from '@nrwl/devkit'; +import { + createProjectGraphAsync, + formatFiles, + readProjectConfiguration, + visitNotIgnoredFiles, +} from '@nrwl/devkit'; +import { tsquery } from '@phenomnomnominal/tsquery'; +import type { + CallExpression, + ObjectLiteralExpression, + PropertyAssignment, + SourceFile, +} from 'typescript'; +import { + createPrinter, + EmitHint, + factory, + isIdentifier, + isObjectLiteralExpression, + isPropertyAssignment, + isStringLiteralLike, +} from 'typescript'; + +export default async function (tree: Tree) { + const printer = createPrinter(); + const projects = await getProjectsWithAngularRouter(tree); + + for (const project of projects) { + visitNotIgnoredFiles(tree, project.root, (filePath) => { + // we are only interested in .ts files + if (!filePath.endsWith('.ts')) { + return; + } + + const content = tree.read(filePath, 'utf-8'); + const ast = tsquery.ast(content); + const routerModuleForRootCall = getRouterModuleForRootCall(ast); + if (!routerModuleForRootCall) { + return; + } + + const initialNavigationAssignment = getInitialNavigationAssignment( + routerModuleForRootCall.arguments[1] as ObjectLiteralExpression + ); + if (!initialNavigationAssignment) { + return; + } + + const updatedInitialNavigationAssignment = printer.printNode( + EmitHint.Unspecified, + factory.updatePropertyAssignment( + initialNavigationAssignment, + initialNavigationAssignment.name, + factory.createIdentifier(`'enabledBlocking'`) + ), + initialNavigationAssignment.getSourceFile() + ); + const updatedContent = `${content.slice( + 0, + initialNavigationAssignment.getStart() + )}${updatedInitialNavigationAssignment}${content.slice( + initialNavigationAssignment.getEnd() + )}`; + + tree.write(filePath, updatedContent); + }); + } + + await formatFiles(tree); +} + +function getInitialNavigationAssignment( + extraOptionsLiteral: ObjectLiteralExpression +): PropertyAssignment | null { + for (const prop of extraOptionsLiteral.properties) { + if ( + isPropertyAssignment(prop) && + (isIdentifier(prop.name) || isStringLiteralLike(prop.name)) && + prop.name.text === 'initialNavigation' && + needsMigration(prop) + ) { + return prop; + } + } + + return null; +} + +async function getProjectsWithAngularRouter( + tree: Tree +): Promise { + const projectGraph = await createProjectGraphAsync(); + + return Object.entries(projectGraph.dependencies) + .filter(([, dep]) => + dep.some(({ target }) => target === 'npm:@angular/router') + ) + .map(([projectName]) => readProjectConfiguration(tree, projectName)); +} + +function getRouterModuleForRootCall( + sourceFile: SourceFile +): CallExpression | null { + // narrow down call expressions + const routerModuleForRootCalls = tsquery( + sourceFile, + 'CallExpression:has(PropertyAccessExpression:has(Identifier[name=RouterModule]):has(Identifier[name=forRoot]))', + { visitAllChildren: true } + ) as CallExpression[]; + + for (const node of routerModuleForRootCalls) { + if ( + isRouterModuleForRoot(node) && + node.arguments.length >= 2 && + isObjectLiteralExpression(node.arguments[1]) + ) { + return node; + } + } + + return null; +} + +function isRouterModuleForRoot(node: CallExpression): boolean { + // make sure is not an outer call expression (NgModule call) + const routerModuleForRootIdentifier = tsquery( + node.expression, + 'CallExpression > PropertyAccessExpression > Identifier[name=RouterModule] ~ Identifier[name=forRoot]', + { visitAllChildren: true } + )[0]; + + return !!routerModuleForRootIdentifier; +} + +function needsMigration(node: PropertyAssignment): boolean { + return ( + isStringLiteralLike(node.initializer) && node.initializer.text === 'enabled' + ); +} diff --git a/packages/angular/src/utils/versions.ts b/packages/angular/src/utils/versions.ts index 438aab3c862e7..d105651c2271e 100644 --- a/packages/angular/src/utils/versions.ts +++ b/packages/angular/src/utils/versions.ts @@ -1,7 +1,7 @@ export const nxVersion = require('../../package.json').version; -export const angularVersion = '~14.0.0-rc.3'; -export const angularDevkitVersion = '~14.0.0-rc.3'; -export const ngPackagrVersion = '~14.0.0-rc.0'; +export const angularVersion = '~14.0.0'; +export const angularDevkitVersion = '~14.0.0'; +export const ngPackagrVersion = '~14.0.0'; export const angularJsVersion = '1.7.9'; export const ngrxVersion = '~13.2.0'; export const rxjsVersion = '~7.4.0'; diff --git a/packages/jest/migrations.json b/packages/jest/migrations.json index 322b8c1869c92..7f835a5acb480 100644 --- a/packages/jest/migrations.json +++ b/packages/jest/migrations.json @@ -127,6 +127,15 @@ "alwaysAddToPackageJson": false } } + }, + "14.2.0": { + "version": "14.0.0-beta.6", + "packages": { + "ts-node": { + "version": "~10.8.0", + "alwaysAddToPackageJson": false + } + } } } } diff --git a/packages/linter/src/utils/versions.ts b/packages/linter/src/utils/versions.ts index b3bcf9fd0ffe6..63f03f77849c4 100644 --- a/packages/linter/src/utils/versions.ts +++ b/packages/linter/src/utils/versions.ts @@ -2,7 +2,7 @@ export const nxVersion = require('../../package.json').version; export const tslintVersion = '~6.1.0'; export const tslintToEslintConfigVersion = '^2.13.0'; -export const buildAngularVersion = '~14.0.0-rc.3'; +export const buildAngularVersion = '~14.0.0'; export const typescriptESLintVersion = '~5.24.0'; export const eslintVersion = '~8.15.0'; diff --git a/packages/make-angular-cli-faster/src/utilities/migration.ts b/packages/make-angular-cli-faster/src/utilities/migration.ts index ad064442abf7d..85766bbc1f4d3 100644 --- a/packages/make-angular-cli-faster/src/utilities/migration.ts +++ b/packages/make-angular-cli-faster/src/utilities/migration.ts @@ -20,8 +20,8 @@ const latestVersionWithOldFlag = '13.8.3'; // versions and the max version of the range if there's a bigger major version that // is already supported const nxAngularVersionMap: Record = { - 13: { range: '>= 13.2.0 < 14.2.0', max: '^13.10.0' }, - 14: { range: '>= 14.2.0-beta.4' }, + 13: { range: '>= 13.2.0 < 14.2.0', max: '~14.1.0' }, + 14: { range: '>= 14.2.0' }, }; // latest major version of Angular that is compatible with Nx, based on the map above const latestCompatibleAngularMajorVersion = Math.max( diff --git a/packages/nx/src/utils/versions.ts b/packages/nx/src/utils/versions.ts index b112abcc9a608..71d5ee23882ef 100644 --- a/packages/nx/src/utils/versions.ts +++ b/packages/nx/src/utils/versions.ts @@ -1,6 +1,6 @@ export const nxVersion = require('../../package.json').version; -export const angularCliVersion = '~14.0.0-rc.3'; +export const angularCliVersion = '~14.0.0'; export const typescriptVersion = '~4.7.2'; export const prettierVersion = '^2.5.1'; export const tslintVersion = '~6.1.0'; diff --git a/packages/storybook/migrations.json b/packages/storybook/migrations.json index 99ea047eb61b9..c293070a7cb93 100644 --- a/packages/storybook/migrations.json +++ b/packages/storybook/migrations.json @@ -82,8 +82,8 @@ } }, "packageJsonUpdates": { - "14.1.9": { - "version": "14.1.9-beta.1", + "14.2.0": { + "version": "14.2.0-beta.6", "packages": { "@storybook/core-server": { "version": "~6.5.4", diff --git a/packages/workspace/src/utils/versions.ts b/packages/workspace/src/utils/versions.ts index 2c35691605a8a..86ecc7d351591 100644 --- a/packages/workspace/src/utils/versions.ts +++ b/packages/workspace/src/utils/versions.ts @@ -1,6 +1,6 @@ export const nxVersion = require('../../package.json').version; -export const angularCliVersion = '~14.0.0-rc.3'; +export const angularCliVersion = '~14.0.0'; export const typescriptVersion = '~4.7.2'; export const prettierVersion = '^2.5.1'; export const tslintVersion = '~6.1.0'; diff --git a/yarn.lock b/yarn.lock index dbb376144c762..10b1a4262899f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -140,23 +140,23 @@ dependencies: "@jridgewell/trace-mapping" "^0.3.0" -"@angular-devkit/architect@0.1400.0-rc.3", "@angular-devkit/architect@~0.1400.0-rc.3": - version "0.1400.0-rc.3" - resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.1400.0-rc.3.tgz#54e328a203f98f243298b014bf4ce2abfde32a06" - integrity sha512-lv0HB50hyrKZDpImI3lk8BVzmD0zUIPARZ/2/wpS3ZCY5lpNSHZSGiN7SnMB9Y2h+RpbjTYeF7/5WLs0cXA6UA== +"@angular-devkit/architect@0.1400.0", "@angular-devkit/architect@~0.1400.0": + version "0.1400.0" + resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.1400.0.tgz#ad2d55ac898daead4bcb791499ab2b98b40803ed" + integrity sha512-INPO+r5CHElPdFLOrwUYShZqtr37/kTJegAoWpSNC8Zy8WgTlecvA+y5eHy0bNeXMjWbZ3YCZJ1jXYpJJNL1Kg== dependencies: - "@angular-devkit/core" "14.0.0-rc.3" + "@angular-devkit/core" "14.0.0" rxjs "6.6.7" -"@angular-devkit/build-angular@~14.0.0-rc.3": - version "14.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-14.0.0-rc.3.tgz#c168049a4e78b9ef6bed58521979aa5344983547" - integrity sha512-Blta5TUS548p8yxdR4pBYdEuzp7XkVxX38EhrFiPEAqgXyqDM8LwxCk8o9XwqLM9LtgqGd86x5RCx6YgTntUdw== +"@angular-devkit/build-angular@~14.0.0": + version "14.0.0" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-14.0.0.tgz#68825037c7f110a80a05c1c0c838ba98d6cf3fa7" + integrity sha512-SUFanOcIJ6XWBltQ7U038zGGhsT40h4I1Pqkf+qlPLGctARz8wfD3GPD1a0pRlrIH6J/f7Xbb7QrQvGfG4g/NQ== dependencies: "@ampproject/remapping" "2.2.0" - "@angular-devkit/architect" "0.1400.0-rc.3" - "@angular-devkit/build-webpack" "0.1400.0-rc.3" - "@angular-devkit/core" "14.0.0-rc.3" + "@angular-devkit/architect" "0.1400.0" + "@angular-devkit/build-webpack" "0.1400.0" + "@angular-devkit/core" "14.0.0" "@babel/core" "7.17.10" "@babel/generator" "7.17.10" "@babel/helper-annotate-as-pure" "7.16.7" @@ -167,7 +167,7 @@ "@babel/runtime" "7.17.9" "@babel/template" "7.16.7" "@discoveryjs/json-ext" "0.5.7" - "@ngtools/webpack" "14.0.0-rc.3" + "@ngtools/webpack" "14.0.0" ansi-colors "4.1.1" babel-loader "8.2.5" babel-plugin-istanbul "6.1.1" @@ -218,12 +218,12 @@ optionalDependencies: esbuild "0.14.38" -"@angular-devkit/build-webpack@0.1400.0-rc.3": - version "0.1400.0-rc.3" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.1400.0-rc.3.tgz#b862775a13b12eb0334afaa837f63d22aceaf909" - integrity sha512-AF+7lg4evuFGMYaU5S26zQm3bqRIjF2cA1HIwNFjwSLVBT/NC7+vZKY8HeyIXkeWid2LTiwgb+qZ/Qm1ei+1lg== +"@angular-devkit/build-webpack@0.1400.0": + version "0.1400.0" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.1400.0.tgz#c96bf0f658a86ac91fae5e431b2e1553c6da2420" + integrity sha512-aKbDjWAwHcscqLhxfmkHrkWvAJ3X8nQoIrAP/RbTQ1qRCv5nnqIHe8u5X/1ZCCYCyPJr1UeDTrQiRXCTN4jYvA== dependencies: - "@angular-devkit/architect" "0.1400.0-rc.3" + "@angular-devkit/architect" "0.1400.0" rxjs "6.6.7" "@angular-devkit/core@13.2.5": @@ -238,10 +238,10 @@ rxjs "6.6.7" source-map "0.7.3" -"@angular-devkit/core@14.0.0-rc.3", "@angular-devkit/core@~14.0.0-rc.3": - version "14.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-14.0.0-rc.3.tgz#65e3083451f859032942c4e037daf67095319bf0" - integrity sha512-J+oWWvhJM1bOzsvyyIPxg56L0VEas/OwB9Sa8VdpZL873H03qnAgRdREOCPWhb/G6NBAG+UOFWPl62iMPIF+xw== +"@angular-devkit/core@14.0.0", "@angular-devkit/core@~14.0.0": + version "14.0.0" + resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-14.0.0.tgz#33e56337257fdda3e429b36548820814d9fafbc2" + integrity sha512-xQXpNbIeBjnbY68OFkrpFm6v7xlmTLFk6zGPIkI4T/hrqT2kNmg0y1/FcN6yMBgCEC9WVWR8SHGaPWrc5VVZMw== dependencies: ajv "8.11.0" ajv-formats "2.1.1" @@ -260,12 +260,12 @@ ora "5.4.1" rxjs "6.6.7" -"@angular-devkit/schematics@14.0.0-rc.3", "@angular-devkit/schematics@~14.0.0-rc.3": - version "14.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-14.0.0-rc.3.tgz#e882a47590640430dc44f0f6486ef13a4a8c1f60" - integrity sha512-o51pPlrEU2cHhC+3ETghcjjhT8Fg3/79V/EkmfwaXL51Dilc2bGQhq4lfbDwyhDNnWpRwMecZeY73Rt6EyxUTQ== +"@angular-devkit/schematics@14.0.0", "@angular-devkit/schematics@~14.0.0": + version "14.0.0" + resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-14.0.0.tgz#b66c5fccd6ecadc90df24cb0f1e68979f3998f92" + integrity sha512-/ycPygU1XpdGrROdxHJUUFGwxCf5vRrcBQvVbZhB2s7+DfDAaZHyWEItDeGK04hqpeTFq4m0NUP6ylXZospWvQ== dependencies: - "@angular-devkit/core" "14.0.0-rc.3" + "@angular-devkit/core" "14.0.0" jsonc-parser "3.0.0" magic-string "0.26.1" ora "5.4.1" @@ -310,15 +310,15 @@ "@angular-eslint/bundled-angular-compiler" "13.2.1" "@typescript-eslint/experimental-utils" "5.17.0" -"@angular/cli@~14.0.0-rc.3": - version "14.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-14.0.0-rc.3.tgz#6e9bedf9e4793157a95176e184d30ff5d623413a" - integrity sha512-jWljFuRXWQG+QgikslmLX9aBsVf+8g372eHNV44PG4HuV11I4ZHAHkFWzyT5iNHAwpbP+VHQhsEMJqoud8ScmA== +"@angular/cli@~14.0.0": + version "14.0.0" + resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-14.0.0.tgz#ce761693bef18e8cf46eeebc01c85ea49f0a110f" + integrity sha512-dGIP0FdKnZ52VJZo83r+eQlCnUDVj08Dx3v3szD/IT/f7bhv7Ob6Bdae+c7CgM5yIt1DBIYe6xX8uZ/JIGtBoQ== dependencies: - "@angular-devkit/architect" "0.1400.0-rc.3" - "@angular-devkit/core" "14.0.0-rc.3" - "@angular-devkit/schematics" "14.0.0-rc.3" - "@schematics/angular" "14.0.0-rc.3" + "@angular-devkit/architect" "0.1400.0" + "@angular-devkit/core" "14.0.0" + "@angular-devkit/schematics" "14.0.0" + "@schematics/angular" "14.0.0" "@yarnpkg/lockfile" "1.1.0" ansi-colors "4.1.1" debug "4.3.4" @@ -336,17 +336,17 @@ uuid "8.3.2" yargs "17.4.1" -"@angular/common@~14.0.0-rc.3": - version "14.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@angular/common/-/common-14.0.0-rc.3.tgz#13005d5b0a5544ce9fa10fc3cc06a6a0d12ab1b0" - integrity sha512-VhlTD/dKtQELh7QPUbh2wHBRoORCtQ6ZnfXWZnx6O6iUYTFkGF1fkGJiL/1l8CDZKUdqm0gJyxqOHyui6lqshA== +"@angular/common@~14.0.0": + version "14.0.0" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-14.0.0.tgz#65245a5386819449a6ccc35cdb3f7ebd61a1d753" + integrity sha512-VYydSXelPlcAnWZs6SKkOxV+rNe8zOtHKLf9jBTYT5nP5P66+va4zITo1C9bs5tbK+mRssayf615+SIGEXyJFg== dependencies: tslib "^2.3.0" -"@angular/compiler-cli@~14.0.0-rc.3": - version "14.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-14.0.0-rc.3.tgz#8db34303160662138839f04a02852a68caac6da7" - integrity sha512-eSmOOXTVU/OOI1Q1hk9t9/WiSUEdrktkdVuO7yFRTweChSkXP5rlh1S9pt/OenxFiAbxIfL7ChYzqUJR0pB2ww== +"@angular/compiler-cli@~14.0.0": + version "14.0.0" + resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-14.0.0.tgz#8562151e16d26f3a2143ff0be86074f133bedd98" + integrity sha512-5T9AjguK4NsCjk4mdrSLV7BrifijKb79wFyDOQX5+p7GVRag47U6E6qQAKhsqZxLy7grrBX4fb0PFARL2OrkLQ== dependencies: "@babel/core" "^7.17.2" chokidar "^3.0.0" @@ -359,59 +359,59 @@ tslib "^2.3.0" yargs "^17.2.1" -"@angular/compiler@~14.0.0-rc.3": - version "14.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-14.0.0-rc.3.tgz#61519726bbd9c55541a918e9aba9aaffb1a23810" - integrity sha512-9Qy5eEiNNs0bxDol8sOpOFRhGZiN/feKw+9dhhVfPffeNNXzr9Em69HDbhQL00sXckA3+EaGYCrGfEDMrBpS8g== +"@angular/compiler@~14.0.0": + version "14.0.0" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-14.0.0.tgz#71e47e1a9bc1c0d599fd3636061bcca16a4df5c5" + integrity sha512-yWpru4coLOE2Ivn+1ltXPsaxai5MOUABPmYZfm47HN7vfVsxcTC44QDxGY73M9e18sngTIFi6qgr8vci1AT9lg== dependencies: tslib "^2.3.0" -"@angular/core@~14.0.0-rc.3": - version "14.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-14.0.0-rc.3.tgz#d9b257284b06b1abd547a5b24161349c7f1a9e1c" - integrity sha512-9cwKdnF4pxjLxvTdwUj7SCIePhMaNAB0Vk8V5Wjh400IDqwnJk+soELrCYSbHf3S2ABcRBzMfIqWgy8+Zu6LwA== +"@angular/core@~14.0.0": + version "14.0.0" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-14.0.0.tgz#74a3df2988f81eb7ca00b5961a3145dadfa05e92" + integrity sha512-Mj3r8iMlWfMbY+9DRUFZx1gKnA27Jwx3ff/VXeXBgfxaEKDYmlZSnliZSV6ssiHSUwn/U6yxDXFgcZL090zNBQ== dependencies: tslib "^2.3.0" -"@angular/forms@~14.0.0-rc.3": - version "14.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-14.0.0-rc.3.tgz#094290ba24c45a190677ee7724fbbfe68db06287" - integrity sha512-anZd7Kt1CVG/WR7eNYjLMYHd0K8IrQTZtcevzaSqFPAVUaMrE5jxjyrgra6JgqisnvnV+0HXxVMYyT3G0vnUlw== +"@angular/forms@~14.0.0": + version "14.0.0" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-14.0.0.tgz#70201bb66f20580fd25b744d109c5d15f4afc8b7" + integrity sha512-r2FHcJve+/rXU4wdCA50nwySGKB5/bxqpULOGeWs4FIdKcUoTnzHtqMsd7sUa7wOA40O4fBHAxKPDGPJPl5CEA== dependencies: tslib "^2.3.0" -"@angular/platform-browser-dynamic@~14.0.0-rc.3": - version "14.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-14.0.0-rc.3.tgz#1034bfed657f6bb8ce529319726b1879cb716ee0" - integrity sha512-+CGnEGx23qmaM+nd9IYEkviQFfs30GI03dU0Ac6p+MnpvNax7H5aD7hJwf4hhxD+nCr6pYIjMv9K9k6dzDf8yg== +"@angular/platform-browser-dynamic@~14.0.0": + version "14.0.0" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-14.0.0.tgz#2538558a3564fdad6b66fc252bef5e9976700d8a" + integrity sha512-gmLRgTNJi3qEEBfOJA8EcSX3qAmTQ7nBu+TQosiFIFaZG98oa7F5W/PXZx0zOC5ElsqPClvPdgtM6MC7cwSqXQ== dependencies: tslib "^2.3.0" -"@angular/platform-browser@~14.0.0-rc.3": - version "14.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-14.0.0-rc.3.tgz#474464716b966b1d8332a46f78b1539a6124f322" - integrity sha512-qwr7u9M+9teT3DitwFa0OiqFk3cwzlwQBjWogCsC/AagdX5G0cm6NxGh8smhyKdo0x+K9cJrYlCEwIjhoFUzFQ== +"@angular/platform-browser@~14.0.0": + version "14.0.0" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-14.0.0.tgz#174c80c02c13a2e4bef22791e2d9d626d7f418d1" + integrity sha512-zijIhUxu3nJxoI3mTWxs1d7dh9ovldI09diumlm/rOhj/46j4SvGn8swJvWr0eo/QipkdP+i2Q1lAlpmRfI+tQ== dependencies: tslib "^2.3.0" -"@angular/router@~14.0.0-rc.3": - version "14.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@angular/router/-/router-14.0.0-rc.3.tgz#eccb76ac8b3c035f175d1f6d302dba99ddb26e19" - integrity sha512-6c8JuNDCSxF6o70iE7mu0lxs+RPF9XL9elfgCuCYmu02ChF+y4vpyxBWVewfnPnSBzoFctnQ/5vDGSET7iJ7uQ== +"@angular/router@~14.0.0": + version "14.0.0" + resolved "https://registry.yarnpkg.com/@angular/router/-/router-14.0.0.tgz#f9d8735a8899b73b61c64243458e824c8abccbb3" + integrity sha512-8ctwkPkwAbBgxu0O3OfoUYgn7GmOM877Wi/CST/AXXHXMs9v2O2MWAV63ITAjwVD1p6/V+IhUNkiypvQW+0Afw== dependencies: tslib "^2.3.0" -"@angular/service-worker@~14.0.0-rc.3": - version "14.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-14.0.0-rc.3.tgz#f5f53c7e2a3fd178a0c2868bd9e54fda6eb78616" - integrity sha512-+LKZs9MCoowvgrtNlfhT2PpN/EJmcLa/+CJh7YYyjv/M7VsSHoUTrCunCeFgPo3FYBJAV4iKuUlE0hh4G8P49g== +"@angular/service-worker@~14.0.0": + version "14.0.0" + resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-14.0.0.tgz#fb89cdcc0e06db7d4a3b08d180d2d537dfe6602d" + integrity sha512-b2C/HPPpBQ/AIRnI8e17QMGsEBuqYS4MZLCxukWPjMOeYkoppGTbVnCqfqaJFS8Rdx9z8sDS0HLqhgi6rIyzlQ== dependencies: tslib "^2.3.0" -"@angular/upgrade@~14.0.0-rc.3": - version "14.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@angular/upgrade/-/upgrade-14.0.0-rc.3.tgz#7f4d71f1216748813430ff39c6fb47b3c64d3c28" - integrity sha512-fbi8qfD1nwUwxIJYu+KKNPX+Ij0CYlpo7Z4B+gRIlRqA0whdfhtNyBtqx0OneIiUOwp2rChAw4IHVwD/8kwcQg== +"@angular/upgrade@~14.0.0": + version "14.0.0" + resolved "https://registry.yarnpkg.com/@angular/upgrade/-/upgrade-14.0.0.tgz#a62b91c86b39225afdd2c3379d3d55e9f3131242" + integrity sha512-WEEZyU+2E5Z6APE+jMTUQIlcasvRfPKxRw7XX8kuM5B2xZFeOzEtMbLv095BqFVPtQa1P5K3x4DJC1n+4cttpw== dependencies: tslib "^2.3.0" @@ -3556,10 +3556,10 @@ dependencies: tslib "^2.0.0" -"@ngtools/webpack@14.0.0-rc.3": - version "14.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-14.0.0-rc.3.tgz#2ba0e2b3b5b75ef91e87fd3024840c3745ad44a0" - integrity sha512-1FnYsG44kjSTJmJNDD7UECUlTKnWox6eKDhescMDW3x0nz0Ijsqnj+VpVdtVwrzbSQZ41l1xFpQbbgU4nVCq9w== +"@ngtools/webpack@14.0.0": + version "14.0.0" + resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-14.0.0.tgz#13a37933f13a8aa587697b7db7be6f1f20a360c1" + integrity sha512-lUcJ5DiRCY+Xj01R38bDbAlELbO+0yT3n4zshBeiuzo/Lc+yQM2XhVe9stsI5I+SwH6YsCU9kp+jb7iaZh7L7w== "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -4295,13 +4295,13 @@ resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.0.8.tgz#be3e914e84eacf16dbebd311c0d0b44aa1174c64" integrity sha512-ZK5v4bJwgXldAUA8r3q9YKfCwOqoHTK/ZqRjSeRXQrBXWouoPnS4MQtgC4AXGiiBuUu5wxrRgTlv0ktmM4P1Aw== -"@schematics/angular@14.0.0-rc.3", "@schematics/angular@~14.0.0-rc.3": - version "14.0.0-rc.3" - resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-14.0.0-rc.3.tgz#c72d15c633e66c75d8f5260b355c3783567230e9" - integrity sha512-f9xqxIsuPeiQML7xdyo2pDLyJGAV6hlg9UUlHEV3TSv/LgyMYQ6G4T+RnklGrFmLV5BPCet2P8D8Dxv7wmgF5Q== +"@schematics/angular@14.0.0", "@schematics/angular@~14.0.0": + version "14.0.0" + resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-14.0.0.tgz#de6cb4c86586ed5b06adfd7a759cc9908e627787" + integrity sha512-Or9sFl0kGnB9uUs03/4eRtBS5S9WW+HeSe5rS5kFyMaXdydeshAjAVffAbYB6sDp57Qw0E4LvBC0mHzuZGYp/A== dependencies: - "@angular-devkit/core" "14.0.0-rc.3" - "@angular-devkit/schematics" "14.0.0-rc.3" + "@angular-devkit/core" "14.0.0" + "@angular-devkit/schematics" "14.0.0" jsonc-parser "3.0.0" "@sinonjs/commons@^1.7.0": @@ -17489,10 +17489,10 @@ next@12.1.5: "@next/swc-win32-ia32-msvc" "12.1.5" "@next/swc-win32-x64-msvc" "12.1.5" -ng-packagr@~14.0.0-rc.0: - version "14.0.0-rc.0" - resolved "https://registry.yarnpkg.com/ng-packagr/-/ng-packagr-14.0.0-rc.0.tgz#55162b3a5ff07c9fc1f095559d79f31a22b9bb9e" - integrity sha512-ileWhRK9Or+3/1bzdB7rw3ZCvMHUo5wbF3hgyLwwsX1bh1TdjLmuEAsSKj39keurBXcUi0mPoj1f4o8gYJXKqg== +ng-packagr@~14.0.0: + version "14.0.0" + resolved "https://registry.yarnpkg.com/ng-packagr/-/ng-packagr-14.0.0.tgz#ce54d2c065f188d8c6230c03d3e20c37de5adc5d" + integrity sha512-jHkpWm2yEpMPbY0Qz3sfDh+7uAfyskEMesEPA1aGQXxvwiIaCl+8RFRdPQxObYOj8Uv7ZJxoyUkqi8KqI5RV9g== dependencies: "@rollup/plugin-json" "^4.1.0" "@rollup/plugin-node-resolve" "^13.1.3" @@ -17517,7 +17517,7 @@ ng-packagr@~14.0.0-rc.0: rollup-plugin-sourcemaps "^0.6.3" rxjs "^7.5.5" sass "^1.49.9" - stylus "^0.57.0" + stylus "^0.58.0" optionalDependencies: esbuild "^0.14.29" @@ -22404,7 +22404,7 @@ stylus-loader@6.2.0, stylus-loader@^6.2.0: klona "^2.0.4" normalize-path "^3.0.0" -stylus@0.57.0, stylus@^0.57.0: +stylus@0.57.0: version "0.57.0" resolved "https://registry.yarnpkg.com/stylus/-/stylus-0.57.0.tgz#a46f04f426c19ceef54abb1a9d189fd4e886df41" integrity sha512-yOI6G8WYfr0q8v8rRvE91wbxFU+rJPo760Va4MF6K0I6BZjO4r+xSynkvyPBP9tV1CIEUeRsiidjIs2rzb1CnQ== @@ -22430,6 +22430,17 @@ stylus@^0.55.0: semver "^6.3.0" source-map "^0.7.3" +stylus@^0.58.0: + version "0.58.1" + resolved "https://registry.yarnpkg.com/stylus/-/stylus-0.58.1.tgz#7e425bb493c10dde94cf427a138d3eae875a3b44" + integrity sha512-AYiCHm5ogczdCPMfe9aeQa4NklB2gcf4D/IhzYPddJjTgPc+k4D/EVE0yfQbZD43MHP3lPy+8NZ9fcFxkrgs/w== + dependencies: + css "^3.0.0" + debug "^4.3.2" + glob "^7.1.6" + sax "~1.2.4" + source-map "^0.7.3" + supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"