Skip to content

Commit

Permalink
breaking: upgrade to ng 13
Browse files Browse the repository at this point in the history
  • Loading branch information
mrohmer committed Feb 8, 2022
1 parent e3b112f commit d431147
Show file tree
Hide file tree
Showing 12 changed files with 3,484 additions and 4,866 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ speed-measure-plugin*.json
.history/*

# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage
Expand Down
2 changes: 2 additions & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--*.ignore-optional true
--*.registry "https://registry.npmjs.org/"
37 changes: 9 additions & 28 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,20 @@
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.scss"
],
"scripts": []
"scripts": [],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
Expand Down Expand Up @@ -63,7 +68,8 @@
}
]
}
}
},
"defaultConfiguration": ""
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
Expand Down Expand Up @@ -99,19 +105,6 @@
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"tsconfig.app.json",
"tsconfig.spec.json",
"e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
Expand Down Expand Up @@ -151,18 +144,6 @@
"tsConfig": "projects/rohmer/ng-portal/tsconfig.spec.json",
"karmaConfig": "projects/rohmer/ng-portal/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/rohmer/ng-portal/tsconfig.lib.json",
"projects/rohmer/ng-portal/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}
Expand Down
36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,37 +25,37 @@
},
"private": true,
"dependencies": {
"@angular/animations": "~11.1.0",
"@angular/cdk": "^11.1.0",
"@angular/common": "~11.1.0",
"@angular/compiler": "~11.1.0",
"@angular/core": "~11.1.0",
"@angular/forms": "~11.1.0",
"@angular/platform-browser": "~11.1.0",
"@angular/platform-browser-dynamic": "~11.1.0",
"@angular/router": "~11.1.0",
"@angular/animations": "~13.2.1",
"@angular/cdk": "^13.2.1",
"@angular/common": "~13.2.1",
"@angular/compiler": "~13.2.1",
"@angular/core": "~13.2.1",
"@angular/forms": "~13.2.1",
"@angular/platform-browser": "~13.2.1",
"@angular/platform-browser-dynamic": "~13.2.1",
"@angular/router": "~13.2.1",
"rxjs": "~6.6.0",
"tslib": "^2.0.0",
"zone.js": "~0.11.3"
"tslib": "^2.3.1",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1101.1",
"@angular/cli": "~11.1.1",
"@angular/compiler-cli": "~11.1.0",
"@angular-devkit/build-angular": "~13.2.2",
"@angular/cli": "~13.2.2",
"@angular/compiler-cli": "~13.2.1",
"@types/jasmine": "~3.6.0",
"@types/node": "^12.11.1",
"codelyzer": "^6.0.0",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.2.0",
"karma": "~6.3.15",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"ng-packagr": "^11.0.0",
"ng-packagr": "^13.2.1",
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~4.1.2"
"typescript": "~4.5.5"
}
}
}
2 changes: 1 addition & 1 deletion projects/rohmer/ng-portal/ng-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"lib": {
"entryFile": "src/public-api.ts"
},
"whitelistedNonPeerDependencies": [
"allowedNonPeerDependencies": [
"@angular/cdk"
]
}
8 changes: 4 additions & 4 deletions projects/rohmer/ng-portal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
"url": "https://github.com/mrohmer/ng-portal.git"
},
"peerDependencies": {
"@angular/common": "^11.1.0",
"@angular/core": "^11.1.0"
"@angular/common": "^13.2.1",
"@angular/core": "^13.2.1"
},
"dependencies": {
"tslib": "^2.0.0",
"@angular/cdk": "^11.1.0"
"tslib": "^2.3.1",
"@angular/cdk": "^13.2.1"
},
"publishConfig": {
"access": "public",
Expand Down
8 changes: 5 additions & 3 deletions projects/rohmer/ng-portal/src/test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files

import 'zone.js/dist/zone';
import 'zone.js/dist/zone-testing';
import 'zone.js';
import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
Expand All @@ -18,7 +18,9 @@ declare const require: {
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false }
}
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
Expand Down
2 changes: 1 addition & 1 deletion projects/rohmer/ng-portal/tsconfig.lib.prod.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
"compilationMode": "partial"
}
}
2 changes: 1 addition & 1 deletion src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ export const environment = {
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
14 changes: 1 addition & 13 deletions src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,6 @@
* BROWSER POLYFILLS
*/

/**
* IE11 requires the following for NgClass support on SVG elements
*/
// import 'classlist.js'; // Run `npm install --save classlist.js`.

/**
* Web Animations `@angular/platform-browser/animations`
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
*/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.

/**
* By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags
Expand Down Expand Up @@ -57,7 +45,7 @@
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
import 'zone.js'; // Included with Angular CLI.


/***************************************************************************************************
Expand Down
6 changes: 4 additions & 2 deletions src/test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files

import 'zone.js/dist/zone-testing';
import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
Expand All @@ -17,7 +17,9 @@ declare const require: {
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false }
}
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
Expand Down
Loading

0 comments on commit d431147

Please sign in to comment.