Skip to content

Commit 2293f30

Browse files
boxmeinwawyed
authored andcommitted
feat: Angular 16 support (#589)
* preparation work for angular 16 support * update to @uirouter/[email protected] * Update to ui-router/angular@12 * Temporarily point to the Angular 16 update PR * update packages * update rxjs * change back to point to sample-app-angular-hybrid
1 parent f3b9a2b commit 2293f30

File tree

7 files changed

+1425
-1529
lines changed

7 files changed

+1425
-1529
lines changed

Diff for: downstream_projects.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"example": "./example",
3-
"sample-app-angular-hybrid": "https://github.com/ui-router/sample-app-angular-hybrid.git@fix_incorrect_core_version"
3+
"sample-app-angular-hybrid": "https://github.com/ui-router/sample-app-angular-hybrid.git"
44
}

Diff for: example/package.json

+13-13
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,25 @@
1414
]
1515
},
1616
"dependencies": {
17-
"@angular/animations": "^15.2.3",
18-
"@angular/common": "^15.2.3",
19-
"@angular/compiler": "^15.2.3",
20-
"@angular/core": "^15.2.3",
21-
"@angular/platform-browser": "^15.2.3",
22-
"@angular/platform-browser-dynamic": "^15.2.3",
23-
"@angular/upgrade": "^15.2.3",
17+
"@angular/animations": "^16.0.0",
18+
"@angular/common": "^16.0.0",
19+
"@angular/compiler": "^16.0.0",
20+
"@angular/core": "^16.0.0",
21+
"@angular/platform-browser": "^16.0.0",
22+
"@angular/platform-browser-dynamic": "^16.0.0",
23+
"@angular/upgrade": "^16.0.0",
2424
"@types/angular": "^1.6.39",
2525
"@types/jquery": "^3.2.16",
26-
"@uirouter/angular": "^11.0.0",
26+
"@uirouter/angular": "^12.0.0",
2727
"@uirouter/angular-hybrid": "latest",
2828
"@uirouter/angularjs": "1.0.30",
2929
"@uirouter/core": "6.1.0",
3030
"@uirouter/rx": "1.0.0",
3131
"angular": "1.8.3",
3232
"rxjs": "^7.4.0",
3333
"tslib": "1.13.0",
34-
"typescript": "4.8.4",
35-
"zone.js": "0.11.4"
34+
"typescript": "4.9.5",
35+
"zone.js": "0.13.0"
3636
},
3737
"overrides": {
3838
"@uirouter/core": "6.1.0"
@@ -43,8 +43,8 @@
4343
"devDependencies": {
4444
"@uirouter/cypress-runner": "^3.0.0",
4545
"ts-loader": "9.4.2",
46-
"webpack": "5.64.4",
47-
"webpack-cli": "^4.9.1",
48-
"webpack-dev-server": "4.6.0"
46+
"webpack": "^5.77.0",
47+
"webpack-cli": "^5.0.1",
48+
"webpack-dev-server": "^4.13.2"
4949
}
5050
}

Diff for: example/src/main.ts

-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ const nestedState: NgHybridStateDeclaration = {
9494
UIRouterUpgradeModule.forRoot({ states: [nestedState] }),
9595
],
9696
declarations: [Ng2Component],
97-
entryComponents: [Ng2Component],
9897
})
9998
export class RootModule {
10099
constructor(private upgrade: UpgradeModule) {}

Diff for: package.json

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@uirouter/angular-hybrid",
3-
"version": "15.0.2",
3+
"version": "16.0.0",
44
"scripts": {
55
"example": "cd example && npm i && npm start",
66
"clean": "shx rm -rf lib _bundles dist",
@@ -17,9 +17,9 @@
1717
]
1818
},
1919
"peerDependencies": {
20-
"@angular/core": "^14.0.0 || ^15.0.0",
21-
"@angular/upgrade": "^14.0.0 || ^15.0.0",
22-
"@uirouter/angular": "^11.0.0",
20+
"@angular/core": "^14.0.0 || ^15.0.0 || ^16.0.0",
21+
"@angular/upgrade": "^14.0.0 || ^15.0.0 || ^16.0.0",
22+
"@uirouter/angular": "^12.0.0",
2323
"@uirouter/angularjs": "^1.0.30",
2424
"@uirouter/core": "^6.1.0",
2525
"angular": "^1.5.0"
@@ -28,31 +28,31 @@
2828
"@uirouter/core": "^6.1.0"
2929
},
3030
"devDependencies": {
31-
"@angular/animations": "^15.2.3",
32-
"@angular/common": "^15.2.3",
33-
"@angular/compiler": "^15.2.3",
34-
"@angular/compiler-cli": "^15.2.3",
35-
"@angular/core": "^15.2.3",
36-
"@angular/platform-browser": "^15.2.3",
37-
"@angular/platform-browser-dynamic": "^15.2.3",
38-
"@angular/upgrade": "^15.2.3",
31+
"@angular/animations": "^16.0.0",
32+
"@angular/common": "^16.0.0",
33+
"@angular/compiler": "^16.0.0",
34+
"@angular/compiler-cli": "^16.0.0",
35+
"@angular/core": "^16.0.0",
36+
"@angular/platform-browser": "^16.0.0",
37+
"@angular/platform-browser-dynamic": "^16.0.0",
38+
"@angular/upgrade": "^16.0.0",
3939
"@types/angular": "^1.8.2",
4040
"@types/jquery": "^3.5.6",
41-
"@uirouter/angular": "11.0.0",
41+
"@uirouter/angular": "^12.0.0",
4242
"@uirouter/angularjs": "^1.0.30",
4343
"@uirouter/core": "^6.1.0",
4444
"@uirouter/publish-scripts": "^2.6.0",
4545
"@uirouter/rx": "^1.0.0",
4646
"angular": "^1.8.3",
4747
"husky": "^4.3.8",
48-
"ng-packagr": "^15.2.2",
48+
"ng-packagr": "^16.0.0",
4949
"prettier": "^2.3.2",
5050
"pretty-quick": "^2.0.1",
51-
"rxjs": "^6.6.7",
51+
"rxjs": "^7.4.0",
5252
"rxjs-compat": "^6.6.7",
5353
"shx": "^0.3.3",
54-
"typescript": "4.8.4",
55-
"zone.js": "0.11.4"
54+
"typescript": "4.9.5",
55+
"zone.js": "^0.13.0"
5656
},
5757
"distDir": "dist",
5858
"sideEffects": true,

Diff for: src/angular-hybrid.ts

-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ export function getParentUIViewInject(r: StateRegistry): ParentUIViewInject {
202202

203203
..._UIROUTER_SERVICE_PROVIDERS,
204204
],
205-
entryComponents: [UIViewNgUpgrade],
206205
exports: [UIViewNgUpgrade, UIRouterModule],
207206
})
208207
export class UIRouterUpgradeModule {

Diff for: tsconfig.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
},
2020
"angularCompilerOptions": {
2121
"skipTemplateCodegen": true,
22-
"strictMetadataEmit": true
22+
"strictMetadataEmit": true,
23+
"compilationMode": "partial"
2324
},
24-
"files": [ "src/index.ts" ]
25+
"files": ["src/index.ts"]
2526
}

0 commit comments

Comments
 (0)