Skip to content

Commit 5acc9da

Browse files
ShaneKOS-jacobbell
andauthored
feat(many): upgrade to Ionic Framework v9 (#1885)
* feat(many): migrate react-vite, vue-vite, and angular starters to Ionic v9 (#1880) * feat(react-vite): migrate starters to react router 6 * feat(vue-vite): migrate starters to ionic v9 and vue router 5 * feat(angular): migrate starters to ionic v9, angular 22, zoneless signals, and vitest * ci: bump test matrix to node 22 for angular 22 starters * fix(angular): capitalize sidemenu folder route so page title renders Inbox not inbox in the same way the other test apps do it * feat(angular): update lazy and standalone import paths (#1881) * feat(many): target @ionic/* ^9.0.0 and finalize starters for the v9 release * refactor(angular): drop redundant provideZonelessChangeDetection from both Angular starters --------- Co-authored-by: OS-jacobbell <228905018+OS-jacobbell@users.noreply.github.com>
1 parent d657419 commit 5acc9da

108 files changed

Lines changed: 399 additions & 765 deletions

File tree

Some content is hidden

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

.github/workflows/main.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ jobs:
5656

5757
- uses: actions/setup-node@v4
5858
with:
59-
node-version: 20
59+
# Angular 22 starters require Node ^22.22.3 || ^24.15.0 || >=26.0.0.
60+
# All other current/legacy starters in this matrix run on Node 22 too.
61+
node-version: 22
6062
cache: npm
6163
cache-dependency-path: |
6264
build/${{ matrix.framework }}/ionic.starter.json

angular-standalone/base/.eslintrc.json

Lines changed: 0 additions & 46 deletions
This file was deleted.
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
{
2+
// Keeps VS Code from suggesting Ionic components off the entry points this app
3+
// does not use. Patterns are matched against resolved .d.ts paths, not import
4+
// specifiers, so they name @ionic/angular's actual type files. Never use a bare
5+
// "@ionic/angular" here: it matches the whole package and blocks every Ionic
6+
// auto-import (ionic-team/starters#1873).
27
"typescript.preferences.autoImportFileExcludePatterns": [
3-
"@ionic/angular/common",
4-
"@ionic/angular/directives",
5-
"@ionic/angular/index.d.ts",
6-
"@ionic/angular/providers"
8+
"@ionic/angular/types/ionic-angular-lazy.d.ts",
9+
"@ionic/angular/types/ionic-angular-common.d.ts"
710
]
811
}

angular-standalone/base/angular.json

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,14 @@
1616
"prefix": "app",
1717
"architect": {
1818
"build": {
19-
"builder": "@angular-devkit/build-angular:application",
19+
"builder": "@angular/build:application",
2020
"options": {
2121
"outputPath": {
2222
"base": "www",
2323
"browser": ""
2424
},
2525
"index": "src/index.html",
26-
"polyfills": [
27-
"src/polyfills.ts"
28-
],
26+
"polyfills": [],
2927
"tsConfig": "tsconfig.app.json",
3028
"inlineStyleLanguage": "scss",
3129
"assets": [
@@ -74,7 +72,7 @@
7472
"defaultConfiguration": "production"
7573
},
7674
"serve": {
77-
"builder": "@angular-devkit/build-angular:dev-server",
75+
"builder": "@angular/build:dev-server",
7876
"configurations": {
7977
"production": {
8078
"buildTarget": "app:build:production"
@@ -89,32 +87,20 @@
8987
"defaultConfiguration": "development"
9088
},
9189
"extract-i18n": {
92-
"builder": "@angular-devkit/build-angular:extract-i18n",
90+
"builder": "@angular/build:extract-i18n",
9391
"options": {
9492
"buildTarget": "app:build"
9593
}
9694
},
9795
"test": {
98-
"builder": "@angular-devkit/build-angular:karma",
96+
"builder": "@angular/build:unit-test",
9997
"options": {
100-
"main": "src/test.ts",
101-
"polyfills": "src/polyfills.ts",
10298
"tsConfig": "tsconfig.spec.json",
103-
"karmaConfig": "karma.conf.js",
104-
"inlineStyleLanguage": "scss",
105-
"assets": [
106-
{
107-
"glob": "**/*",
108-
"input": "src/assets",
109-
"output": "assets"
110-
}
111-
],
112-
"styles": ["src/global.scss", "src/theme/variables.scss"],
113-
"scripts": []
99+
"buildTarget": "::development",
100+
"setupFiles": ["src/test-setup.ts"]
114101
},
115102
"configurations": {
116103
"ci": {
117-
"progress": false,
118104
"watch": false
119105
}
120106
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// @ts-check
2+
const tseslint = require("typescript-eslint");
3+
const angular = require("angular-eslint");
4+
5+
module.exports = tseslint.config(
6+
{
7+
files: ["**/*.ts"],
8+
ignores: ["projects/**/*"],
9+
extends: [...angular.configs.tsRecommended],
10+
processor: angular.processInlineTemplates,
11+
rules: {
12+
"@angular-eslint/component-class-suffix": [
13+
"error",
14+
{ suffixes: ["Page", "Component"] },
15+
],
16+
"@angular-eslint/component-selector": [
17+
"error",
18+
{ type: "element", prefix: "app", style: "kebab-case" },
19+
],
20+
"@angular-eslint/directive-selector": [
21+
"error",
22+
{ type: "attribute", prefix: "app", style: "camelCase" },
23+
],
24+
},
25+
},
26+
{
27+
files: ["**/*.html"],
28+
extends: [...angular.configs.templateRecommended],
29+
rules: {},
30+
}
31+
);

angular-standalone/base/karma.conf.js

Lines changed: 0 additions & 44 deletions
This file was deleted.

angular-standalone/base/package.json

Lines changed: 19 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -13,45 +13,28 @@
1313
},
1414
"private": true,
1515
"dependencies": {
16-
"@angular/animations": "20.3.25",
17-
"@angular/common": "20.3.25",
18-
"@angular/compiler": "20.3.25",
19-
"@angular/core": "20.3.25",
20-
"@angular/forms": "20.3.25",
21-
"@angular/platform-browser": "20.3.25",
22-
"@angular/platform-browser-dynamic": "20.3.25",
23-
"@angular/router": "20.3.25",
24-
"@ionic/angular": "^8.0.0",
25-
"ionicons": "^7.0.0",
16+
"@angular/common": "22.0.1",
17+
"@angular/compiler": "22.0.1",
18+
"@angular/core": "22.0.1",
19+
"@angular/forms": "22.0.1",
20+
"@angular/platform-browser": "22.0.1",
21+
"@angular/router": "22.0.1",
22+
"@ionic/angular": "^9.0.0",
23+
"ionicons": "^8.1.0",
2624
"rxjs": "~7.8.0",
27-
"tslib": "^2.3.0",
28-
"zone.js": "~0.15.0"
25+
"tslib": "^2.3.0"
2926
},
3027
"devDependencies": {
31-
"@angular-devkit/build-angular": "20.3.28",
32-
"@angular-eslint/builder": "20.7.0",
33-
"@angular-eslint/eslint-plugin": "20.7.0",
34-
"@angular-eslint/eslint-plugin-template": "20.7.0",
35-
"@angular-eslint/schematics": "20.7.0",
36-
"@angular-eslint/template-parser": "20.7.0",
37-
"@angular/cli": "20.3.28",
38-
"@angular/compiler-cli": "20.3.25",
39-
"@angular/language-service": "20.3.25",
40-
"@ionic/angular-toolkit": "^12.0.0",
41-
"@types/jasmine": "~5.1.0",
42-
"@typescript-eslint/eslint-plugin": "^8.18.0",
43-
"@typescript-eslint/parser": "^8.18.0",
28+
"@angular/build": "22.0.1",
29+
"@angular/cli": "22.0.1",
30+
"@angular/compiler-cli": "22.0.1",
31+
"@angular/language-service": "22.0.1",
32+
"@ionic/angular-toolkit": "^12.3.0",
33+
"angular-eslint": "22.0.0",
4434
"eslint": "^9.16.0",
45-
"eslint-plugin-import": "^2.29.1",
46-
"eslint-plugin-jsdoc": "^48.2.1",
47-
"eslint-plugin-prefer-arrow": "1.2.2",
48-
"jasmine-core": "~5.1.0",
49-
"jasmine-spec-reporter": "~5.0.0",
50-
"karma": "~6.4.0",
51-
"karma-chrome-launcher": "~3.2.0",
52-
"karma-coverage": "~2.2.0",
53-
"karma-jasmine": "~5.1.0",
54-
"karma-jasmine-html-reporter": "~2.1.0",
55-
"typescript": "~5.9.0"
35+
"jsdom": "^26.0.0",
36+
"typescript": "~6.0.0",
37+
"typescript-eslint": "^8.61.0",
38+
"vitest": "^4.0.8"
5639
}
5740
}

angular-standalone/base/src/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component } from '@angular/core';
2-
import { IonApp } from '@ionic/angular/standalone';
2+
import { IonApp } from '@ionic/angular';
33

44
@Component({
55
selector: 'app-root',
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { bootstrapApplication } from '@angular/platform-browser';
2-
import { RouteReuseStrategy, provideRouter, withPreloading, PreloadAllModules } from '@angular/router';
3-
import { IonicRouteStrategy, provideIonicAngular } from '@ionic/angular/standalone';
2+
import { RouteReuseStrategy, provideRouter, withComponentInputBinding, withPreloading, PreloadAllModules } from '@angular/router';
3+
import { IonicRouteStrategy, provideIonicAngular } from '@ionic/angular';
44

55
import { routes } from './app/app.routes';
66
import { AppComponent } from './app/app.component';
@@ -9,6 +9,6 @@ bootstrapApplication(AppComponent, {
99
providers: [
1010
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
1111
provideIonicAngular(),
12-
provideRouter(routes, withPreloading(PreloadAllModules)),
12+
provideRouter(routes, withPreloading(PreloadAllModules), withComponentInputBinding()),
1313
],
1414
});

angular-standalone/base/src/polyfills.ts

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)