Skip to content

Commit 0000d5b

Browse files
committed
feat: upgrade to angular 9
BREAKING CHANGE: This versions runs on Angular 9
1 parent 69f727e commit 0000d5b

11 files changed

+3248
-1126
lines changed

angular.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"build": {
1414
"builder": "@angular-devkit/build-angular:browser",
1515
"options": {
16+
"aot": true,
1617
"outputPath": "dist/testing-library-app",
1718
"index": "src/index.html",
1819
"main": "src/main.ts",
@@ -24,6 +25,12 @@
2425
},
2526
"configurations": {
2627
"production": {
28+
"budgets": [
29+
{
30+
"type": "anyComponentStyle",
31+
"maximumWarning": "6kb"
32+
}
33+
],
2734
"fileReplacements": [
2835
{
2936
"replace": "src/environments/environment.ts",
@@ -82,7 +89,8 @@
8289
},
8390
"configurations": {
8491
"production": {
85-
"project": "projects/testing-library/ng-package.prod.json"
92+
"project": "projects/testing-library/ng-package.prod.json",
93+
"tsConfig": "projects/testing-library/tsconfig.lib.prod.json"
8694
}
8795
}
8896
},
@@ -109,7 +117,8 @@
109117
},
110118
"configurations": {
111119
"production": {
112-
"project": "projects/jest-utils/ng-package.prod.json"
120+
"project": "projects/jest-utils/ng-package.prod.json",
121+
"tsConfig": "projects/jest-utils/tsconfig.lib.prod.json"
113122
}
114123
}
115124
},

package.json

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -22,49 +22,45 @@
2222
"git add"
2323
]
2424
},
25-
"release": {
26-
"pkgRoot": "dist/@testing-library/angular"
27-
},
2825
"dependencies": {
29-
"@angular/animations": "^8.0.0",
30-
"@angular/cdk": "^8.1.4",
31-
"@angular/common": "^8.0.0",
32-
"@angular/compiler": "^8.0.0",
33-
"@angular/core": "^8.0.0",
34-
"@angular/forms": "^8.0.0",
35-
"@angular/material": "^8.1.4",
36-
"@angular/platform-browser": "^8.0.0",
37-
"@angular/platform-browser-dynamic": "^8.0.0",
38-
"@angular/router": "^8.0.0",
26+
"@angular/animations": "^9.0.0",
27+
"@angular/cdk": "^9.0.0",
28+
"@angular/common": "^9.0.0",
29+
"@angular/compiler": "^9.0.0",
30+
"@angular/core": "^9.0.0",
31+
"@angular/forms": "^9.0.0",
32+
"@angular/material": "^9.0.0",
33+
"@angular/platform-browser": "^9.0.0",
34+
"@angular/platform-browser-dynamic": "^9.0.0",
35+
"@angular/router": "^9.0.0",
3936
"@ngrx/store": "^8.0.0-rc.0",
4037
"@phenomnomnominal/tsquery": "^3.0.0",
4138
"@testing-library/dom": "^5.0.1",
4239
"core-js": "^3.1.3",
43-
"rxjs": "^6.5.2",
40+
"rxjs": "^6.5.4",
41+
"tslib": "^1.10.0",
4442
"tslint": "^5.16.0",
45-
"zone.js": "~0.9.1"
43+
"zone.js": "~0.10.2"
4644
},
4745
"devDependencies": {
48-
"@angular-devkit/build-angular": "~0.800.0",
49-
"@angular-devkit/build-ng-packagr": "~0.800.0",
50-
"@angular/cli": "~8.0.0",
51-
"@angular/compiler-cli": "^8.0.0",
52-
"@angular/language-service": "^8.0.0",
46+
"@angular-devkit/build-angular": "~0.900.1",
47+
"@angular-devkit/build-ng-packagr": "~0.900.1",
48+
"@angular/cli": "~9.0.1",
49+
"@angular/compiler-cli": "^9.0.0",
50+
"@angular/language-service": "^9.0.0",
5351
"@testing-library/jest-dom": "^4.1.0",
5452
"@types/jest": "~24.0.11",
55-
"@types/node": "~12.0.3",
56-
"codelyzer": "^5.0.1",
53+
"@types/node": "^12.11.1",
54+
"codelyzer": "^5.1.2",
5755
"husky": "^2.3.0",
5856
"jest": "^24.1.0",
5957
"jest-preset-angular": "^7.1.1",
6058
"lint-staged": "^8.1.7",
61-
"ng-packagr": "^5.2.0",
59+
"ng-packagr": "^9.0.0",
6260
"prettier": "^1.17.1",
6361
"rimraf": "^2.6.3",
6462
"semantic-release": "^15.13.12",
6563
"ts-node": "~8.2.0",
66-
"tsickle": "0.35.0",
67-
"tslib": "^1.9.0",
68-
"typescript": "~3.4.5"
64+
"typescript": "~3.7.5"
6965
}
7066
}

projects/jest-utils/tsconfig.lib.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"lib": ["dom", "es2015"]
1717
},
1818
"angularCompilerOptions": {
19-
"annotateForClosureCompiler": true,
2019
"skipTemplateCodegen": true,
2120
"strictMetadataEmit": true,
2221
"fullTemplateTypeCheck": true,
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "./tsconfig.lib.json",
3+
"angularCompilerOptions": {
4+
"enableIvy": false
5+
}
6+
}

projects/testing-library/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
},
2323
"homepage": "https://github.com/testing-library/angular-testing-library#readme",
2424
"peerDependencies": {
25-
"@angular/common": "^8.0.0",
26-
"@angular/platform-browser": "^8.0.0",
27-
"@angular/animations": "^8.0.0",
28-
"@angular/router": "^8.0.0",
29-
"@angular/core": "^8.0.0"
25+
"@angular/common": "^9.0.0",
26+
"@angular/platform-browser": "^9.0.0",
27+
"@angular/animations": "^9.0.0",
28+
"@angular/router": "^9.0.0",
29+
"@angular/core": "^9.0.0"
3030
},
3131
"dependencies": {
3232
"@testing-library/dom": "^5.1.0",

projects/testing-library/tsconfig.lib.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
"lib": ["dom", "es2015", "es2018.promise"]
1616
},
1717
"angularCompilerOptions": {
18-
"annotateForClosureCompiler": true,
1918
"skipTemplateCodegen": true,
2019
"strictMetadataEmit": true,
2120
"fullTemplateTypeCheck": true,
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "./tsconfig.lib.json",
3+
"angularCompilerOptions": {
4+
"enableIvy": false
5+
}
6+
}

release.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
pkgRoot: 'dist/@testing-library/angular',
3+
branches: ['master', 'next'],
4+
};

src/app/app.module.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ import { WithNgRxStoreComponent, reducer } from './examples/06-with-ngrx-store';
2222
import { WithNgRxMockStoreComponent } from './examples/07-with-ngrx-mock-store';
2323
import { MasterComponent, DetailComponent, HiddenDetailComponent } from './examples/09-router';
2424

25+
function reducerItems() {
26+
return ['One', 'Two', 'Three'];
27+
}
28+
2529
@NgModule({
2630
declarations: [
2731
AppComponent,
@@ -51,9 +55,7 @@ import { MasterComponent, DetailComponent, HiddenDetailComponent } from './examp
5155
AppRoutingModule,
5256
StoreModule.forRoot({
5357
value: reducer,
54-
items: function() {
55-
return ['One', 'Two', 'Three'];
56-
},
58+
items: reducerItems,
5759
}),
5860
],
5961
bootstrap: [AppComponent],

src/tsconfig.app.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"extends": "../tsconfig.json",
33
"compilerOptions": {
44
"outDir": "../out-tsc/app",
5-
"types": []
5+
"types": [],
6+
"allowJs": true
67
},
7-
"exclude": ["**/test.ts", "**/*.spec.ts"]
8+
"files": ["main.ts", "polyfills.ts"]
89
}

0 commit comments

Comments
 (0)