Skip to content

Commit 7f13f64

Browse files
build!: require Angular 22 and compile with TypeScript 6 (#3801)
Angular 22 removed ComponentFactoryResolver, which screen tracking used to read a routed component's selector. reflectComponentType(component)?.selector replaces it in both screen-tracking services, and ɵscreenViewEvent loses its resolver parameter. That replacement and the new screen-tracking spec come from #3741. Angular 22 requires TypeScript 6, which defaults strict on, drops downlevelIteration, deprecates baseUrl and moduleResolution node, and reports unresolvable side-effect imports. The build script now compiles under strict. The library keeps strict off for a separate migration. baseUrl goes, with tsconfig-paths 4 resolving the path mappings for the node specs. src/test.ts goes too: the Karma builder injects its own entry file and never ran it. It also carries the two prefer-optional-chain rewrites from #3797, which @typescript-eslint 8.71 requires. Both keep behavior. BREAKING CHANGE: @angular/fire 22 requires Angular 22, TypeScript 6.0 and Node 22.22.3, 24.15.0 or 26. Angular 21 applications stay on @angular/fire 21. Fixes #3696 Refs #3737 Co-authored-by: Ethan Sarif-Kattan <ethaneus99@gmail.com>
1 parent f020821 commit 7f13f64

17 files changed

Lines changed: 11575 additions & 12112 deletions

‎.github/workflows/test.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Setup node
3131
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
3232
with:
33-
node-version: '20'
33+
node-version: '>=22.22.3 <23'
3434
check-latest: false
3535
- name: Install deps
3636
run: npm ci
@@ -49,7 +49,7 @@ jobs:
4949
strategy:
5050
matrix:
5151
os: [ ubuntu-latest, macos-latest, windows-latest ]
52-
node: ["20", "22", "24"]
52+
node: [">=22.22.3 <23", ">=24.15.0 <25", "26"]
5353
fail-fast: false
5454
name: Test Node ${{ matrix.node }} (${{ matrix.os }})
5555
steps:
@@ -95,7 +95,7 @@ jobs:
9595
- name: Setup node
9696
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
9797
with:
98-
node-version: 20
98+
node-version: '>=22.22.3 <23'
9999
check-latest: false
100100
- name: Setup java
101101
uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0
@@ -118,7 +118,7 @@ jobs:
118118
strategy:
119119
matrix:
120120
os: [ ubuntu-latest, macos-latest, windows-latest ]
121-
node: ["20"]
121+
node: [">=22.22.3 <23"]
122122
fail-fast: false
123123
steps:
124124
- name: Checkout
@@ -182,7 +182,7 @@ jobs:
182182
- name: Setup node
183183
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
184184
with:
185-
node-version: '20'
185+
node-version: '>=22.22.3 <23'
186186
registry-url: 'https://wombat-dressing-room.appspot.com/'
187187
check-latest: false
188188
- name: 'Download Artifacts'

‎eslint.config.js‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ const tsParser = require('@typescript-eslint/parser');
22
const js = require('@eslint/js');
33
const globals = require('globals');
44
const ts = require('@typescript-eslint/eslint-plugin');
5-
const ng = require('@angular-eslint/eslint-plugin');
5+
const angular = require('angular-eslint');
66
const esImport = require('eslint-plugin-import');
77

88
module.exports = [
99
{
1010
files: ['**/*.ts'],
1111
plugins: {
1212
'@typescript-eslint': ts,
13-
'@angular-eslint': ng,
13+
'@angular-eslint': angular.tsPlugin,
1414
import: esImport,
1515
},
1616
languageOptions: {
@@ -26,7 +26,8 @@ module.exports = [
2626
...js.configs.recommended.rules,
2727
...ts.configs['recommended-requiring-type-checking'].rules,
2828
...ts.configs['stylistic-type-checked'].rules,
29-
...ng.configs.recommended.rules,
29+
// Merged across every tsRecommended entry, so an upstream split or reorder drops no rule.
30+
...Object.assign({}, ...angular.configs.tsRecommended.map(config => config.rules)),
3031
...esImport.configs.errors.rules,
3132
// eslint/js rules
3233
'no-undef': 'off',

0 commit comments

Comments
 (0)