Skip to content

Commit 5e5a1f9

Browse files
christopherthielenmergify[bot]
authored andcommitted
chore: Support Angular v9 and v10
1 parent 25414be commit 5e5a1f9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1508
-1666
lines changed

downstream_projects.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"packageDir": "./dist",
33
"projects": {
4-
"angular8": "./test-angular-versions/v8",
54
"angular9": "./test-angular-versions/v9",
6-
"typescript3.4": "./test-typescript-versions/typescript3.4",
7-
"typescript3.5": "./test-typescript-versions/typescript3.5",
5+
"angular10": "./test-angular-versions/v10",
86
"typescript3.6": "./test-typescript-versions/typescript3.6",
97
"typescript3.7": "./test-typescript-versions/typescript3.7",
8+
"typescript3.8": "./test-typescript-versions/typescript3.8",
9+
"typescript3.9": "./test-typescript-versions/typescript3.9",
1010
"sample-app-angular": "https://github.com/ui-router/sample-app-angular.git"
1111
}
1212
}

package.json

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -43,41 +43,40 @@
4343
"license": "MIT",
4444
"distDir": "dist",
4545
"peerDependencies": {
46-
"@angular/common": "^8.0.0 || ^9.0.0 || ^9.0.0-next",
47-
"@angular/core": "^8.0.0 || ^9.0.0 || ^9.0.0-next",
48-
"@uirouter/core": "^6.0.1",
46+
"@angular/common": "^9.0.0 || ^10.0.0",
47+
"@angular/core": "^9.0.0 || ^10.0.0",
48+
"@uirouter/core": "^6.0.5",
4949
"@uirouter/rx": "^0.6.0"
5050
},
5151
"devDependencies": {
52-
"@angular/common": "^8.2.5",
53-
"@angular/compiler": "^8.2.14",
54-
"@angular/compiler-cli": "^8.2.5",
55-
"@angular/core": "^8.2.14",
56-
"@angular/platform-browser": "^8.2.5",
57-
"@angular/platform-browser-dynamic": "^8.2.5",
52+
"@angular/animations": "9.1.12",
53+
"@angular/common": "^9.1.12",
54+
"@angular/compiler": "^9.1.12",
55+
"@angular/compiler-cli": "9.1.12",
56+
"@angular/core": "^9.1.12",
57+
"@angular/platform-browser": "^9.1.12",
58+
"@angular/platform-browser-dynamic": "^9.1.12",
5859
"@types/jest": "^26.0.4",
5960
"@types/jquery": "^3.3.33",
60-
"@uirouter/core": "^6.0.1",
61-
"@uirouter/publish-scripts": "2.3.46",
61+
"@uirouter/core": "^6.0.5",
62+
"@uirouter/publish-scripts": "2.4.3",
6263
"@uirouter/rx": "^0.6.0",
64+
"bufferutil": "4.0.1",
65+
"canvas": "2.6.1",
6366
"husky": "^4.2.3",
64-
"jest": "25.x",
65-
"jest-preset-angular": "8.2.0",
66-
"ng-packagr": "=5.5.1",
67+
"jest": "26.1.0",
68+
"jest-preset-angular": "8.2.1",
69+
"ng-packagr": "9.1.5",
6770
"prettier": "^2.0.5",
6871
"pretty-quick": "^2.0.1",
6972
"rxjs": "^6.5.4",
7073
"rxjs-compat": "^6.5.4",
71-
"tslib": "1.13.0",
7274
"tslint": "^6.1.0",
73-
"typedoc": "0.16.x",
75+
"typedoc": "0.17.8",
7476
"typedoc-plugin-ui-router": "^3.0.1",
75-
"typescript": "3.5.3",
76-
"zone.js": "0.9.1"
77-
},
78-
"resolutions": {
79-
"ts-jest": "25.x",
80-
"typedoc": "0.16.x"
77+
"typescript": "~3.8.3",
78+
"utf-8-validate": "5.0.2",
79+
"zone.js": "0.10.3"
8180
},
8281
"ngPackage": {
8382
"lib": {

test-angular-versions/v8/README.md renamed to test-angular-versions/v10/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# V8
1+
# V9
22

3-
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.0.0.
3+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.0.4.
44

55
## Development server
66

test-angular-versions/v8/angular.json renamed to test-angular-versions/v10/angular.json

Lines changed: 24 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -3,50 +3,24 @@
33
"version": 1,
44
"newProjectRoot": "projects",
55
"projects": {
6-
"v8": {
6+
"v9": {
77
"projectType": "application",
8-
"schematics": {
9-
"@schematics/angular:class": {
10-
"skipTests": true
11-
},
12-
"@schematics/angular:component": {
13-
"skipTests": true
14-
},
15-
"@schematics/angular:directive": {
16-
"skipTests": true
17-
},
18-
"@schematics/angular:guard": {
19-
"skipTests": true
20-
},
21-
"@schematics/angular:module": {
22-
"skipTests": true
23-
},
24-
"@schematics/angular:pipe": {
25-
"skipTests": true
26-
},
27-
"@schematics/angular:service": {
28-
"skipTests": true
29-
}
30-
},
8+
"schematics": {},
319
"root": "",
3210
"sourceRoot": "src",
3311
"prefix": "app",
3412
"architect": {
3513
"build": {
3614
"builder": "@angular-devkit/build-angular:browser",
3715
"options": {
38-
"outputPath": "dist/v8",
16+
"outputPath": "dist/v9",
3917
"index": "src/index.html",
4018
"main": "src/main.ts",
4119
"polyfills": "src/polyfills.ts",
4220
"tsConfig": "tsconfig.app.json",
43-
"assets": [
44-
"src/favicon.ico",
45-
"src/assets"
46-
],
47-
"styles": [
48-
"src/styles.css"
49-
],
21+
"aot": true,
22+
"assets": ["src/favicon.ico", "src/assets"],
23+
"styles": ["src/styles.css"],
5024
"scripts": []
5125
},
5226
"configurations": {
@@ -62,7 +36,6 @@
6236
"sourceMap": false,
6337
"extractCss": true,
6438
"namedChunks": false,
65-
"aot": true,
6639
"extractLicenses": true,
6740
"vendorChunk": false,
6841
"buildOptimizer": true,
@@ -71,6 +44,11 @@
7144
"type": "initial",
7245
"maximumWarning": "2mb",
7346
"maximumError": "5mb"
47+
},
48+
{
49+
"type": "anyComponentStyle",
50+
"maximumWarning": "6kb",
51+
"maximumError": "10kb"
7452
}
7553
]
7654
}
@@ -79,18 +57,18 @@
7957
"serve": {
8058
"builder": "@angular-devkit/build-angular:dev-server",
8159
"options": {
82-
"browserTarget": "v8:build"
60+
"browserTarget": "v9:build"
8361
},
8462
"configurations": {
8563
"production": {
86-
"browserTarget": "v8:build:production"
64+
"browserTarget": "v9:build:production"
8765
}
8866
}
8967
},
9068
"extract-i18n": {
9169
"builder": "@angular-devkit/build-angular:extract-i18n",
9270
"options": {
93-
"browserTarget": "v8:build"
71+
"browserTarget": "v9:build"
9472
}
9573
},
9674
"test": {
@@ -100,42 +78,32 @@
10078
"polyfills": "src/polyfills.ts",
10179
"tsConfig": "tsconfig.spec.json",
10280
"karmaConfig": "karma.conf.js",
103-
"assets": [
104-
"src/favicon.ico",
105-
"src/assets"
106-
],
107-
"styles": [
108-
"src/styles.css"
109-
],
81+
"assets": ["src/favicon.ico", "src/assets"],
82+
"styles": ["src/styles.css"],
11083
"scripts": []
11184
}
11285
},
11386
"lint": {
11487
"builder": "@angular-devkit/build-angular:tslint",
11588
"options": {
116-
"tsConfig": [
117-
"tsconfig.app.json",
118-
"tsconfig.spec.json",
119-
"e2e/tsconfig.json"
120-
],
121-
"exclude": [
122-
"**/node_modules/**"
123-
]
89+
"tsConfig": ["tsconfig.app.json", "tsconfig.spec.json", "e2e/tsconfig.json"],
90+
"exclude": ["**/node_modules/**"]
12491
}
12592
},
12693
"e2e": {
12794
"builder": "@angular-devkit/build-angular:protractor",
12895
"options": {
12996
"protractorConfig": "e2e/protractor.conf.js",
130-
"devServerTarget": "v8:serve"
97+
"devServerTarget": "v9:serve"
13198
},
13299
"configurations": {
133100
"production": {
134-
"devServerTarget": "v8:serve:production"
101+
"devServerTarget": "v9:serve:production"
135102
}
136103
}
137104
}
138105
}
139-
}},
140-
"defaultProject": "v8"
141-
}
106+
}
107+
},
108+
"defaultProject": "v9"
109+
}
File renamed without changes.

test-angular-versions/v8/cypress/integration/sample_app_spec.js renamed to test-angular-versions/v10/cypress/integration/sample_app_spec.js

Lines changed: 13 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
describe('Angular v8 app', () => {
1+
describe('Angular v9 app', () => {
22
beforeEach(() => {
33
window.sessionStorage.clear();
44
});
@@ -23,69 +23,45 @@ describe('Angular v8 app', () => {
2323

2424
it('renders home', () => {
2525
cy.visit('/home');
26-
cy.get('a')
27-
.contains('home')
28-
.should('have.class', 'active');
29-
cy.get('a')
30-
.contains('about')
31-
.should('not.have.class', 'active');
26+
cy.get('a').contains('home').should('have.class', 'active');
27+
cy.get('a').contains('about').should('not.have.class', 'active');
3228
cy.get('#default').contains('home works');
3329
});
3430

3531
it('renders about', () => {
3632
cy.visit('/home');
3733
cy.visit('/about');
38-
cy.get('a')
39-
.contains('home')
40-
.should('not.have.class', 'active');
41-
cy.get('a')
42-
.contains('about')
43-
.should('have.class', 'active');
34+
cy.get('a').contains('home').should('not.have.class', 'active');
35+
cy.get('a').contains('about').should('have.class', 'active');
4436
cy.get('#default').contains('about works');
4537
});
4638

4739
it('loads lazy routes', () => {
4840
cy.visit('/home');
4941
cy.visit('/lazy');
50-
cy.get('a')
51-
.contains('home')
52-
.should('not.have.class', 'active');
53-
cy.get('a')
54-
.contains('lazy')
55-
.should('have.class', 'active');
42+
cy.get('a').contains('home').should('not.have.class', 'active');
43+
cy.get('a').contains('lazy').should('have.class', 'active');
5644
cy.get('#default').contains('lazy works');
5745
});
5846

5947
it('routes to lazy routes', () => {
6048
cy.visit('/lazy');
61-
cy.get('a')
62-
.contains('home')
63-
.should('not.have.class', 'active');
64-
cy.get('a')
65-
.contains('lazy')
66-
.should('have.class', 'active');
49+
cy.get('a').contains('home').should('not.have.class', 'active');
50+
cy.get('a').contains('lazy').should('have.class', 'active');
6751
cy.get('#default').contains('lazy works');
6852
});
6953

7054
it('routes to lazy child routes', () => {
7155
cy.visit('/lazy/child');
72-
cy.get('a')
73-
.contains('home')
74-
.should('not.have.class', 'active');
75-
cy.get('a')
76-
.contains('lazy.child')
77-
.should('have.class', 'active');
56+
cy.get('a').contains('home').should('not.have.class', 'active');
57+
cy.get('a').contains('lazy.child').should('have.class', 'active');
7858
cy.get('#default').contains('lazy.child works');
7959
});
8060

8161
it('targets named views', () => {
8262
cy.visit('/lazy/child/viewtarget');
83-
cy.get('a')
84-
.contains('home')
85-
.should('not.have.class', 'active');
86-
cy.get('a')
87-
.contains('lazy.child')
88-
.should('have.class', 'active');
63+
cy.get('a').contains('home').should('not.have.class', 'active');
64+
cy.get('a').contains('lazy.child').should('have.class', 'active');
8965
cy.get('#default').contains('lazy.child works');
9066
cy.get('#header').contains('lazy.child.viewtarget works');
9167
cy.get('#footer').contains('lazy.child.viewtarget works');

test-angular-versions/v8/karma.conf.js renamed to test-angular-versions/v10/karma.conf.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ module.exports = function (config) {
1010
require('karma-chrome-launcher'),
1111
require('karma-jasmine-html-reporter'),
1212
require('karma-coverage-istanbul-reporter'),
13-
require('@angular-devkit/build-angular/plugins/karma')
13+
require('@angular-devkit/build-angular/plugins/karma'),
1414
],
1515
client: {
16-
clearContext: false // leave Jasmine Spec Runner output visible in browser
16+
clearContext: false, // leave Jasmine Spec Runner output visible in browser
1717
},
1818
coverageIstanbulReporter: {
19-
dir: require('path').join(__dirname, './coverage/v8'),
19+
dir: require('path').join(__dirname, './coverage/v9'),
2020
reports: ['html', 'lcovonly', 'text-summary'],
21-
fixWebpackSourcePaths: true
21+
fixWebpackSourcePaths: true,
2222
},
2323
reporters: ['progress', 'kjhtml'],
2424
port: 9876,
@@ -27,6 +27,6 @@ module.exports = function (config) {
2727
autoWatch: true,
2828
browsers: ['Chrome'],
2929
singleRun: false,
30-
restartOnFileChange: true
30+
restartOnFileChange: true,
3131
});
3232
};

0 commit comments

Comments
 (0)