Skip to content

Commit 65f27e7

Browse files
wawyedRafael  Fernandez Serra
and
Rafael Fernandez Serra
authored
feat: upgrade to angular 15 (#911)
* upgrade to angular 15 * remove unsupported command * add npmrc with scripts-prepend-node-path=true * change typescript version * remove codelyzer * ignore ajx dependency check * update caniuse browser list * migrate to cypress 10.3 * update to angular-hybrid 15 * update to angular-hybrid 15 --------- Co-authored-by: Rafael Fernandez Serra <[email protected]>
1 parent e6d632d commit 65f27e7

File tree

10 files changed

+1349
-1527
lines changed

10 files changed

+1349
-1527
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ jobs:
2424
- uses: actions/checkout@v2
2525
- name: Configure
2626
run: |
27-
npm config set scripts-prepend-node-path auto
2827
git config --global user.email [email protected]
2928
git config --global user.name uirouter_github_actions
3029
- name: Install Dependencies

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
scripts-prepend-node-path=true

cypress.config.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { defineConfig } from 'cypress'
2+
3+
export default defineConfig({
4+
video: false,
5+
e2e: {
6+
supportFile: false,
7+
setupNodeEvents(on, config) {},
8+
baseUrl: 'http://localhost:4000',
9+
},
10+
})

cypress.json

Lines changed: 0 additions & 4 deletions
This file was deleted.
File renamed without changes.

package.json

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,29 @@
1111
"e2e": "run-p -r start cypress",
1212
"cypress": "wait-on tcp:4000 && cypress run"
1313
},
14+
"checkPeerDependencies": {
15+
"ignore": [
16+
"ajv"
17+
]
18+
},
1419
"license": "MIT",
1520
"dependencies": {
16-
"@angular/animations": "14.2.2",
17-
"@angular/common": "14.2.2",
18-
"@angular/compiler": "14.2.2",
19-
"@angular/core": "14.2.2",
20-
"@angular/forms": "14.2.2",
21-
"@angular/platform-browser": "14.2.2",
22-
"@angular/platform-browser-dynamic": "14.2.2",
23-
"@angular/router": "14.2.2",
24-
"@angular/upgrade": "14.2.2",
25-
"@uirouter/angular": "10.0.0",
26-
"@uirouter/angular-hybrid": "^14.0.0",
21+
"@angular/animations": "15.2.3",
22+
"@angular/common": "15.2.3",
23+
"@angular/compiler": "15.2.3",
24+
"@angular/core": "15.2.3",
25+
"@angular/forms": "15.2.3",
26+
"@angular/platform-browser": "15.2.3",
27+
"@angular/platform-browser-dynamic": "15.2.3",
28+
"@angular/router": "15.2.3",
29+
"@angular/upgrade": "15.2.3",
30+
"@uirouter/angular": "11.0.0",
31+
"@uirouter/angular-hybrid": "^15.0.1",
2732
"@uirouter/angularjs": "1.0.30",
28-
"@uirouter/core": "6.0.8",
33+
"@uirouter/core": "6.1.0",
2934
"@uirouter/rx": "1.0.0",
3035
"@uirouter/visualizer": "^7.2.1",
31-
"angular": "1.8.2",
36+
"angular": "1.8.3",
3237
"core-js": "^2.4.1",
3338
"postcss": "8.4.4",
3439
"rxjs": "^7.4.0",
@@ -37,16 +42,15 @@
3742
"zone.js": "~0.11.4"
3843
},
3944
"devDependencies": {
40-
"@angular-devkit/build-angular": "14.2.3",
41-
"@angular/cli": "14.2.3",
42-
"@angular/compiler-cli": "14.2.2",
43-
"@angular/language-service": "14.2.2",
45+
"@angular-devkit/build-angular": "15.2.4",
46+
"@angular/cli": "15.2.4",
47+
"@angular/compiler-cli": "15.2.3",
48+
"@angular/language-service": "15.2.3",
4449
"@types/angular": "^1.8.3",
4550
"@types/jasmine": "~3.10.2",
4651
"@types/jasminewd2": "~2.0.10",
4752
"@types/node": "^16.11.11",
48-
"codelyzer": "^6.0.2",
49-
"cypress": "9.1.0",
53+
"cypress": "10.3.0",
5054
"jasmine-core": "~3.10.1",
5155
"jasmine-spec-reporter": "~7.0.0",
5256
"karma": "~6.3.9",
@@ -57,7 +61,7 @@
5761
"npm-run-all": "4.1.5",
5862
"protractor": "~7.0.0",
5963
"shx": "0.3.3",
60-
"ts-node": "~10.4.0",
64+
"ts-node": "~10.9.1",
6165
"tslint": "~6.1.0",
6266
"typescript": "~4.8.3",
6367
"wait-on": "6.0.0"

src/test.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,10 @@ import {
77
platformBrowserDynamicTesting
88
} from '@angular/platform-browser-dynamic/testing';
99

10-
declare const require: any;
11-
1210
// First, initialize the Angular testing environment.
1311
getTestBed().initTestEnvironment(
1412
BrowserDynamicTestingModule,
1513
platformBrowserDynamicTesting(), {
1614
teardown: { destroyAfterEach: false }
1715
}
1816
);
19-
// Then we find all the tests.
20-
const context = require.context('./', true, /\.spec\.ts$/);
21-
// And load the modules.
22-
context.keys().map(context);

tsconfig.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"declaration": false,
99
"moduleResolution": "node",
1010
"experimentalDecorators": true,
11-
"target": "es2020",
11+
"target": "ES2022",
1212
"typeRoots": [
1313
"node_modules/@types"
1414
],
@@ -17,6 +17,7 @@
1717
"dom"
1818
],
1919
"module": "es2020",
20-
"baseUrl": "./"
20+
"baseUrl": "./",
21+
"useDefineForClassFields": false
2122
}
2223
}

tslint.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{
2-
"rulesDirectory": [
3-
"node_modules/codelyzer"
4-
],
2+
"rulesDirectory": [],
53
"rules": {
64
"arrow-return-shorthand": true,
75
"callable-types": true,

0 commit comments

Comments
 (0)