Skip to content

Commit 851e6b4

Browse files
committed
fix(ci): verify Angular 20 through 22 with compatible fixtures
1 parent e2f5b27 commit 851e6b4

9 files changed

Lines changed: 5514 additions & 4870 deletions

File tree

‎.github/scripts/set-angular-version.js‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
const fs = require('fs');
22

33
const angularVersion = process.env.ANGULAR_VERSION;
4+
const typescriptVersion = process.env.TYPESCRIPT_VERSION;
45

5-
if (!angularVersion) {
6-
throw new Error('ANGULAR_VERSION must be set');
6+
if (!angularVersion || !typescriptVersion) {
7+
throw new Error('ANGULAR_VERSION and TYPESCRIPT_VERSION must be set');
78
}
89

910
const path = 'ct-angular/package.json';
@@ -19,6 +20,7 @@ const angularDeps = [
1920
'@angular/router',
2021
];
2122
const angularDevDeps = [
23+
'@angular/build',
2224
'@angular-devkit/build-angular',
2325
'@angular/cli',
2426
'@angular/compiler-cli',
@@ -30,4 +32,6 @@ for (const name of angularDeps)
3032
for (const name of angularDevDeps)
3133
pkg.devDependencies[name] = angularVersion;
3234

35+
pkg.devDependencies.typescript = typescriptVersion;
36+
3337
fs.writeFileSync(path, JSON.stringify(pkg, null, 2) + '\n');

‎.github/workflows/main.yml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@ jobs:
1717
include:
1818
- angular-major: "20"
1919
angular-version: "^20.3.11"
20+
typescript-version: "~5.9.3"
2021
- angular-major: "21"
2122
angular-version: "^21.0.0"
23+
typescript-version: "~5.9.3"
2224
- angular-major: "22"
2325
angular-version: "^22.0.0"
26+
typescript-version: "~6.0.2"
2427
steps:
2528
- name: PNPM Setup
2629
uses: pnpm/action-setup@v6
@@ -39,6 +42,7 @@ jobs:
3942
run: node .github/scripts/set-angular-version.js
4043
env:
4144
ANGULAR_VERSION: ${{ matrix.angular-version }}
45+
TYPESCRIPT_VERSION: ${{ matrix.typescript-version }}
4246

4347
- name: Install dependencies
4448
run: pnpm install --no-frozen-lockfile
@@ -60,7 +64,7 @@ jobs:
6064
- uses: actions/upload-artifact@v7
6165
if: always()
6266
with:
63-
name: playwright-report-angular-${{ matrix.angular-version }}
67+
name: playwright-report-angular-${{ matrix.angular-major }}
6468
path: ./*/**/playwright-report/
6569
retention-days: 30
6670

‎ct-angular/.browserslistrc‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
chrome 120
2+
firefox 120
3+
safari 17

‎ct-angular/package.json‎

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,25 @@
1111
"typecheck": "tsc --noEmit"
1212
},
1313
"dependencies": {
14-
"@analogjs/vite-plugin-angular": "1.17.0",
15-
"@angular/animations": "17.3.8",
16-
"@angular/common": "17.3.8",
17-
"@angular/compiler": "17.3.8",
18-
"@angular/core": "17.3.8",
19-
"@angular/forms": "17.3.8",
20-
"@angular/platform-browser": "17.3.8",
21-
"@angular/platform-browser-dynamic": "17.3.8",
22-
"@angular/router": "17.3.8",
14+
"@angular/animations": "^22.0.0",
15+
"@angular/common": "^22.0.0",
16+
"@angular/compiler": "^22.0.0",
17+
"@angular/core": "^22.0.0",
18+
"@angular/forms": "^22.0.0",
19+
"@angular/platform-browser": "^22.0.0",
20+
"@angular/platform-browser-dynamic": "^22.0.0",
21+
"@angular/router": "^22.0.0",
2322
"rxjs": "7.8.1",
2423
"tslib": "2.6.2",
25-
"zone.js": "0.14.5"
24+
"zone.js": "~0.15.1"
2625
},
2726
"devDependencies": {
2827
"@sand4rt/experimental-ct-angular": "workspace:*",
29-
"@angular-devkit/build-angular": "17.3.7",
30-
"@angular/cli": "17.3.7",
31-
"@angular/compiler-cli": "17.3.8",
32-
"typescript": "5.4.3"
28+
"@angular-devkit/build-angular": "^22.0.0",
29+
"@angular/cli": "^22.0.0",
30+
"@angular/compiler-cli": "^22.0.0",
31+
"typescript": "~6.0.2",
32+
"@analogjs/vite-plugin-angular": "2.8.0",
33+
"@angular/build": "^22.0.0"
3334
}
3435
}

‎ct-angular/tests/angular-router.spec.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { test, expect } from '@sand4rt/experimental-ct-angular';
2-
import type { HooksConfig } from 'playwright';
2+
import type { HooksConfig } from '../playwright';
33
import { AppComponent } from '@/app.component';
44

55
test('navigate to a page by clicking a link', async ({ page, mount }) => {

‎ct-angular/tests/hooks.spec.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect, test } from '@sand4rt/experimental-ct-angular';
2-
import type { HooksConfig } from 'playwright';
2+
import type { HooksConfig } from '../playwright';
33
import { InjectComponent } from '@/components/inject.component';
44

55
test('inject a token', async ({ mount }) => {

‎ct-angular/tests/styles.d.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
declare module '*.css';

‎ct-angular/tsconfig.json‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
{
33
"compileOnSave": false,
44
"compilerOptions": {
5-
"baseUrl": "./",
65
"outDir": "./dist/out-tsc",
76
"forceConsistentCasingInFileNames": true,
87
"strict": true,
@@ -13,9 +12,8 @@
1312
"sourceMap": true,
1413
"skipLibCheck": true,
1514
"declaration": false,
16-
"downlevelIteration": true,
1715
"experimentalDecorators": true,
18-
"moduleResolution": "node",
16+
"moduleResolution": "bundler",
1917
"importHelpers": true,
2018
"target": "ES2022",
2119
"module": "ES2022",

‎pnpm-lock.yaml‎

Lines changed: 5481 additions & 4848 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)