Skip to content

Commit

Permalink
Update Angular to v13
Browse files Browse the repository at this point in the history
  • Loading branch information
quangtuan9237 committed Apr 20, 2022
1 parent ffc3f51 commit 9ee1246
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 62 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ speed-measure-plugin.json
!.vscode/extensions.json

# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage
Expand Down
33 changes: 0 additions & 33 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,6 @@
"tsConfig": "projects/lib/tsconfig.spec.json",
"karmaConfig": "projects/lib/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/lib/tsconfig.lib.json",
"projects/lib/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
Expand Down Expand Up @@ -137,18 +125,6 @@
"projects/example/src/assets"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/example/tsconfig.app.json",
"projects/example/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
Expand All @@ -168,15 +144,6 @@
"devServerTarget": "example:serve:production"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "projects/example-e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
]
}
}
}
}
Expand Down
29 changes: 14 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
},
"private": true,
"dependencies": {
"@angular-devkit/build-angular": "~12.2.17",
"@angular/animations": "~12.2.16",
"@angular/common": "~12.2.16",
"@angular/compiler": "~12.2.16",
"@angular/core": "~12.2.16",
"@angular/forms": "~12.2.16",
"@angular/platform-browser": "~12.2.16",
"@angular/platform-browser-dynamic": "~12.2.16",
"@angular/router": "~12.2.16",
"@angular-devkit/build-angular": "~13.3.3",
"@angular/animations": "~13.3.3",
"@angular/common": "~13.3.3",
"@angular/compiler": "~13.3.3",
"@angular/core": "~13.3.3",
"@angular/forms": "~13.3.3",
"@angular/platform-browser": "~13.3.3",
"@angular/platform-browser-dynamic": "~13.3.3",
"@angular/router": "~13.3.3",
"core-js": "^3.6.5",
"fibers": "^4.0.2",
"highlight.js": "^9.18.1",
Expand All @@ -38,10 +38,9 @@
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/core": "^13.3.3",
"@angular/cli": "^12.2.17",
"@angular/compiler-cli": "~12.2.16",
"@angular/language-service": "~12.2.16",
"@angular/cli": "^13.3.3",
"@angular/compiler-cli": "~13.3.3",
"@angular/language-service": "~13.3.3",
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "^2.0.8",
"@types/node": "^12.11.1",
Expand All @@ -54,10 +53,10 @@
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"ng-packagr": "^12.2.7",
"ng-packagr": "^13.3.1",
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~4.3.5"
"typescript": "~4.6.3"
}
}
10 changes: 0 additions & 10 deletions projects/example/src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,9 @@
// import 'core-js/es6/weak-map';
// import 'core-js/es6/set';

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

/** IE10 and IE11 requires the following for the Reflect API. */
// import 'core-js/es6/reflect';

/**
* 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
4 changes: 3 additions & 1 deletion projects/example/src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ declare const require: any;
// 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/lib/ng-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"lib": {
"entryFile": "src/public_api.ts"
},
"whitelistedNonPeerDependencies": ["ng-lazyload-image"]
"allowedNonPeerDependencies": ["ng-lazyload-image"]
}
4 changes: 3 additions & 1 deletion projects/lib/src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ declare const require: any;
// 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/lib/tsconfig.lib.prod.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
"compilationMode": "partial"
}
}

0 comments on commit 9ee1246

Please sign in to comment.