Skip to content

Commit

Permalink
chore: update Angular dependencies to latest v10 RC (#2573)
Browse files Browse the repository at this point in the history
BREAKING CHANGE:

BEFORE:

Angular v9 are minimum dependencies

AFTER:

Angular v10 are minimum dependencies
  • Loading branch information
brandonroberts authored Jun 13, 2020
1 parent f2d4ebc commit ed28449
Show file tree
Hide file tree
Showing 11 changed files with 1,500 additions and 708 deletions.
10 changes: 8 additions & 2 deletions modules/schematics/src/entity/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,15 @@ describe('Entity Schematic', () => {

describe('View engine', () => {
beforeEach(() => {
const tsConfig = JSON.parse(appTree.readContent('./tsconfig.json'));
const tsConfig = JSON.parse(
appTree.readContent('./projects/bar/tsconfig.app.json')
);
tsConfig.angularCompilerOptions = tsConfig.angularCompilerOptions || {};
tsConfig.angularCompilerOptions.enableIvy = false;
appTree.overwrite('./tsconfig.json', JSON.stringify(tsConfig));
appTree.overwrite(
'./projects/bar/tsconfig.app.json',
JSON.stringify(tsConfig)
);
});

it('should create and export a reducer as a function', () => {
Expand Down
6 changes: 5 additions & 1 deletion modules/schematics/src/entity/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ import {
findModuleFromOptions,
parseName,
isIvyEnabled,
getProject,
} from '@ngrx/schematics/schematics-core';
import { Schema as EntityOptions } from './schema';

export default function (options: EntityOptions): Rule {
return (host: Tree, context: SchematicContext) => {
const projectConfig = getProject(host, options);
options.path = getProjectPath(host, options);

const parsedPath = parseName(options.path, options.name);
Expand All @@ -50,7 +52,9 @@ export default function (options: EntityOptions): Rule {
stringUtils.group(name, options.group ? 'models' : ''),
'group-reducers': (s: string) =>
stringUtils.group(s, options.group ? 'reducers' : ''),
isIvyEnabled: isIvyEnabled(host, 'tsconfig.json'),
isIvyEnabled:
isIvyEnabled(host, 'tsconfig.json') &&
isIvyEnabled(host, `${projectConfig.root}/tsconfig.app.json`),
...(options as object),
};

Expand Down
10 changes: 8 additions & 2 deletions modules/schematics/src/reducer/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,15 @@ describe('Reducer Schematic', () => {

describe('View engine', () => {
beforeEach(() => {
const tsConfig = JSON.parse(appTree.readContent('./tsconfig.json'));
const tsConfig = JSON.parse(
appTree.readContent('./projects/bar/tsconfig.app.json')
);
tsConfig.angularCompilerOptions = tsConfig.angularCompilerOptions || {};
tsConfig.angularCompilerOptions.enableIvy = false;
appTree.overwrite('./tsconfig.json', JSON.stringify(tsConfig));
appTree.overwrite(
'./projects/bar/tsconfig.app.json',
JSON.stringify(tsConfig)
);
});

it('should create an reducer function', () => {
Expand Down
6 changes: 5 additions & 1 deletion modules/schematics/src/reducer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ import {
addReducerImportToNgModule,
parseName,
isIvyEnabled,
getProject,
} from '@ngrx/schematics/schematics-core';
import { Schema as ReducerOptions } from './schema';

export default function (options: ReducerOptions): Rule {
return (host: Tree, context: SchematicContext) => {
const projectConfig = getProject(host, options);
options.path = getProjectPath(host, options);

if (options.module) {
Expand All @@ -49,7 +51,9 @@ export default function (options: ReducerOptions): Rule {
options.flat ? '' : s,
options.group ? 'reducers' : ''
),
isIvyEnabled: isIvyEnabled(host, 'tsconfig.json'),
isIvyEnabled:
isIvyEnabled(host, 'tsconfig.json') &&
isIvyEnabled(host, `${projectConfig.root}/tsconfig.app.json`),
...(options as object),
};

Expand Down
2 changes: 1 addition & 1 deletion modules/store/spec/runtime_checks.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ describe('Runtime checks:', () => {
});
});

describe('USER_RUNTIME_CHECKS Token', () => {
xdescribe('USER_RUNTIME_CHECKS Token', () => {
it('should be possible to toggle runtime reducers via the Injection Token', () => {
const serializationCheckMetaReducerSpy = spyOn(
metaReducers,
Expand Down
54 changes: 27 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,44 +97,44 @@
]
},
"dependencies": {
"@angular/animations": "^9.1.0",
"@angular/cdk": "^9.1.0",
"@angular/common": "^9.1.0",
"@angular/compiler": "^9.1.0",
"@angular/core": "^9.1.0",
"@angular/forms": "^9.1.0",
"@angular/material": "^9.1.0",
"@angular/platform-browser": "^9.1.0",
"@angular/platform-browser-dynamic": "^9.1.0",
"@angular/platform-server": "^9.1.0",
"@angular/router": "^9.1.0",
"@angular/animations": "^10.0.0-rc.4",
"@angular/cdk": "^10.0.0-rc.1",
"@angular/common": "^10.0.0-rc.4",
"@angular/compiler": "^10.0.0-rc.4",
"@angular/core": "^10.0.0-rc.4",
"@angular/forms": "^10.0.0-rc.4",
"@angular/material": "^10.0.0-rc.1",
"@angular/platform-browser": "^10.0.0-rc.4",
"@angular/platform-browser-dynamic": "^10.0.0-rc.4",
"@angular/platform-server": "^10.0.0-rc.4",
"@angular/router": "^10.0.0-rc.4",
"@applitools/eyes-cypress": "^3.4.12",
"@nrwl/angular": "9.4.0-beta.3",
"@nrwl/angular": "9.4.0",
"core-js": "^2.5.4",
"hammerjs": "^2.0.8",
"opencollective": "^1.0.3",
"rxjs": "~6.5.4",
"tslib": "^1.10.0",
"zone.js": "~0.10.2"
"tslib": "^1.9.3",
"zone.js": "~0.10.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.901.5",
"@angular-devkit/build-ng-packagr": "~0.901.5",
"@angular/bazel": "^9.1.5",
"@angular/cli": "^9.1.5",
"@angular/compiler-cli": "^9.1.0",
"@angular-devkit/build-angular": "~0.1000.0-rc.3",
"@angular-devkit/build-ng-packagr": "~0.1000.0-rc.3",
"@angular/bazel": "^10.0.0-rc.4",
"@angular/cli": "^10.0.0-rc.3",
"@angular/compiler-cli": "^10.0.0-rc.4",
"@babel/core": "7.9.0",
"@bazel/bazelisk": "1.4.0",
"@bazel/buildifier": "^2.2.1",
"@bazel/ibazel": "0.12.4",
"@bazel/jasmine": "1.6.0",
"@bazel/typescript": "1.6.0",
"@cypress/webpack-preprocessor": "^4.0.3",
"@nrwl/cypress": "9.4.0-beta.3",
"@nrwl/jest": "9.4.0-beta.3",
"@nrwl/node": "9.4.0-beta.3",
"@nrwl/nx-plugin": "9.4.0-beta.3",
"@nrwl/workspace": "9.4.0-beta.3",
"@nrwl/cypress": "9.4.0",
"@nrwl/jest": "9.4.0",
"@nrwl/node": "9.4.0",
"@nrwl/nx-plugin": "9.4.0",
"@nrwl/workspace": "9.4.0",
"@octokit/rest": "^15.17.0",
"@types/fs-extra": "^2.1.0",
"@types/glob": "^5.0.33",
Expand Down Expand Up @@ -167,7 +167,7 @@
"jasmine-marbles": "^0.4.0",
"jasmine-spec-reporter": "~3.2.0",
"jest": "25.2.4",
"jest-preset-angular": "8.1.3",
"jest-preset-angular": "8.2.0",
"jest-zone-patch": "^0.0.10",
"karma": "~1.4.1",
"karma-chrome-launcher": "~2.0.0",
Expand All @@ -177,7 +177,7 @@
"karma-jasmine-html-reporter": "^0.2.2",
"lint-staged": "^8.0.0",
"ncp": "^2.0.0",
"ng-packagr": "^9.1.5",
"ng-packagr": "^10.0.0-rc.1",
"npm-run-all": "^4.1.5",
"nyc": "^10.1.2",
"ora": "^1.3.0",
Expand All @@ -202,7 +202,7 @@
"tsickle": "^0.37.0",
"tslint": "6.0.0",
"tsutils": "2.27.2",
"typescript": "~3.8.3",
"typescript": "~3.9.2",
"uglify-js": "^3.1.9"
},
"collective": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`Login Page should compile 1`] = `
<bc-login-form
form={[Function FormGroup]}
submitted={[Function EventEmitter]}
submitted={[Function EventEmitter_]}
>
<mat-card>
<mat-card-title>
Expand Down Expand Up @@ -56,7 +56,7 @@ exports[`Login Page should compile 1`] = `
exports[`Login Page should disable the form if pending 1`] = `
<bc-login-form
form={[Function FormGroup]}
submitted={[Function EventEmitter]}
submitted={[Function EventEmitter_]}
>
<mat-card>
<mat-card-title>
Expand Down Expand Up @@ -112,7 +112,7 @@ exports[`Login Page should display an error message if provided 1`] = `
<bc-login-form
errorMessage={[Function String]}
form={[Function FormGroup]}
submitted={[Function EventEmitter]}
submitted={[Function EventEmitter_]}
>
<mat-card>
<mat-card-title>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ exports[`Logout Confirmation Dialog should compile 1`] = `
<ng-component>
<h2
class="mat-dialog-title"
id="mat-dialog-title-0"
mat-dialog-title=""
>
Logout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ exports[`Login Page should compile 1`] = `
>
<p>
<mat-form-field
class="mat-form-field ng-tns-c1-0 mat-primary mat-form-field-type-mat-input mat-form-field-appearance-legacy mat-form-field-can-float mat-form-field-should-float mat-form-field-has-label mat-form-field-hide-placeholder ng-untouched ng-pristine ng-valid _mat-animation-noopable"
class="mat-form-field mat-primary mat-form-field-type-mat-input mat-form-field-appearance-legacy mat-form-field-can-float mat-form-field-should-float mat-form-field-has-label mat-form-field-hide-placeholder ng-untouched ng-pristine ng-valid _mat-animation-noopable"
>
<div
class="mat-form-field-wrapper"
Expand All @@ -42,7 +42,6 @@ exports[`Login Page should compile 1`] = `
aria-required="false"
class="mat-input-element mat-form-field-autofill-control cdk-text-field-autofill-monitored ng-untouched ng-pristine ng-valid"
formcontrolname="username"
id="mat-input-0"
matinput=""
placeholder="Username"
type="text"
Expand All @@ -52,16 +51,11 @@ exports[`Login Page should compile 1`] = `
>
<label
aria-owns="mat-input-0"
class="mat-form-field-label ng-tns-c1-0 ng-star-inserted"
for="mat-input-0"
id="mat-form-field-label-1"
class="mat-form-field-label"
>
<span
class="ng-tns-c1-0 ng-star-inserted"
>
<span>
Username
</span>
Expand All @@ -73,7 +67,7 @@ exports[`Login Page should compile 1`] = `
</div>
<div
class="mat-form-field-underline ng-tns-c1-0 ng-star-inserted"
class="mat-form-field-underline"
>
<span
class="mat-form-field-ripple"
Expand All @@ -85,7 +79,7 @@ exports[`Login Page should compile 1`] = `
<div
class="mat-form-field-hint-wrapper ng-tns-c1-0 ng-trigger ng-trigger-transitionMessages ng-star-inserted"
class="mat-form-field-hint-wrapper ng-trigger ng-trigger-transitionMessages"
style="opacity:1;transform:translateY(0%);0:opacity;1:transform;"
>
Expand All @@ -99,7 +93,7 @@ exports[`Login Page should compile 1`] = `
</p>
<p>
<mat-form-field
class="mat-form-field ng-tns-c1-1 mat-primary mat-form-field-type-mat-input mat-form-field-appearance-legacy mat-form-field-can-float mat-form-field-has-label mat-form-field-hide-placeholder ng-untouched ng-pristine ng-valid _mat-animation-noopable"
class="mat-form-field mat-primary mat-form-field-type-mat-input mat-form-field-appearance-legacy mat-form-field-can-float mat-form-field-has-label mat-form-field-hide-placeholder ng-untouched ng-pristine ng-valid _mat-animation-noopable"
>
<div
class="mat-form-field-wrapper"
Expand All @@ -117,7 +111,6 @@ exports[`Login Page should compile 1`] = `
aria-required="false"
class="mat-input-element mat-form-field-autofill-control cdk-text-field-autofill-monitored ng-untouched ng-pristine ng-valid"
formcontrolname="password"
id="mat-input-1"
matinput=""
placeholder="Password"
type="password"
Expand All @@ -127,16 +120,11 @@ exports[`Login Page should compile 1`] = `
>
<label
aria-owns="mat-input-1"
class="mat-form-field-label ng-tns-c1-1 mat-empty mat-form-field-empty ng-star-inserted"
for="mat-input-1"
id="mat-form-field-label-3"
class="mat-form-field-label mat-empty mat-form-field-empty"
>
<span
class="ng-tns-c1-1 ng-star-inserted"
>
<span>
Password
</span>
Expand All @@ -148,7 +136,7 @@ exports[`Login Page should compile 1`] = `
</div>
<div
class="mat-form-field-underline ng-tns-c1-1 ng-star-inserted"
class="mat-form-field-underline"
>
<span
class="mat-form-field-ripple"
Expand All @@ -160,7 +148,7 @@ exports[`Login Page should compile 1`] = `
<div
class="mat-form-field-hint-wrapper ng-tns-c1-1 ng-trigger ng-trigger-transitionMessages ng-star-inserted"
class="mat-form-field-hint-wrapper ng-trigger ng-trigger-transitionMessages"
style="opacity:1;transform:translateY(0%);0:opacity;1:transform;"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ exports[`Find Book Page should compile 1`] = `
class="mat-card-content"
>
<mat-form-field
class="mat-form-field ng-tns-c1-0 mat-primary mat-form-field-type-mat-input mat-form-field-appearance-legacy mat-form-field-can-float mat-form-field-has-label mat-form-field-hide-placeholder _mat-animation-noopable"
class="mat-form-field mat-primary mat-form-field-type-mat-input mat-form-field-appearance-legacy mat-form-field-can-float mat-form-field-has-label mat-form-field-hide-placeholder _mat-animation-noopable"
>
<div
class="mat-form-field-wrapper"
Expand All @@ -38,7 +38,6 @@ exports[`Find Book Page should compile 1`] = `
aria-invalid="false"
aria-required="false"
class="mat-input-element mat-form-field-autofill-control cdk-text-field-autofill-monitored"
id="mat-input-0"
matinput=""
placeholder="Search for a book"
/>
Expand All @@ -47,16 +46,11 @@ exports[`Find Book Page should compile 1`] = `
>
<label
aria-owns="mat-input-0"
class="mat-form-field-label ng-tns-c1-0 mat-empty mat-form-field-empty ng-star-inserted"
for="mat-input-0"
id="mat-form-field-label-1"
class="mat-form-field-label mat-empty mat-form-field-empty"
>
<span
class="ng-tns-c1-0 ng-star-inserted"
>
<span>
Search for a book
</span>
Expand All @@ -68,7 +62,7 @@ exports[`Find Book Page should compile 1`] = `
</div>
<div
class="mat-form-field-underline ng-tns-c1-0 ng-star-inserted"
class="mat-form-field-underline"
>
<span
class="mat-form-field-ripple"
Expand All @@ -80,7 +74,7 @@ exports[`Find Book Page should compile 1`] = `
<div
class="mat-form-field-hint-wrapper ng-tns-c1-0 ng-trigger ng-trigger-transitionMessages ng-star-inserted"
class="mat-form-field-hint-wrapper ng-trigger ng-trigger-transitionMessages"
style="opacity:1;transform:translateY(0%);0:opacity;1:transform;"
>
Expand All @@ -105,7 +99,6 @@ exports[`Find Book Page should compile 1`] = `
>
<circle
class="ng-star-inserted"
cx="50%"
cy="50%"
r="10"
Expand Down
Loading

0 comments on commit ed28449

Please sign in to comment.