diff --git a/.github/scripts/set-angular-version.js b/.github/scripts/set-angular-version.js new file mode 100644 index 0000000000..9bbc33200d --- /dev/null +++ b/.github/scripts/set-angular-version.js @@ -0,0 +1,33 @@ +const fs = require('fs'); + +const angularVersion = process.env.ANGULAR_VERSION; + +if (!angularVersion) { + throw new Error('ANGULAR_VERSION must be set'); +} + +const path = 'ct-angular/package.json'; +const pkg = JSON.parse(fs.readFileSync(path, 'utf8')); +const angularDeps = [ + '@angular/animations', + '@angular/common', + '@angular/compiler', + '@angular/core', + '@angular/forms', + '@angular/platform-browser', + '@angular/platform-browser-dynamic', + '@angular/router', +]; +const angularDevDeps = [ + '@angular-devkit/build-angular', + '@angular/cli', + '@angular/compiler-cli', +]; + +for (const name of angularDeps) + pkg.dependencies[name] = angularVersion; + +for (const name of angularDevDeps) + pkg.devDependencies[name] = angularVersion; + +fs.writeFileSync(path, JSON.stringify(pkg, null, 2) + '\n'); diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ef4fd34e62..8070a6a655 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,9 +8,19 @@ on: jobs: test: - name: Test + name: Test (Angular ${{ matrix.angular-major }}) timeout-minutes: 60 runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - angular-major: "20" + angular-version: "^20.3.11" + - angular-major: "21" + angular-version: "^21.0.0" + - angular-major: "22" + angular-version: "^22.0.0" steps: - name: PNPM Setup uses: pnpm/action-setup@v2 @@ -25,8 +35,13 @@ jobs: node-version: "22.21.1" cache: "pnpm" + - name: Set Angular test version + run: node .github/scripts/set-angular-version.js + env: + ANGULAR_VERSION: ${{ matrix.angular-version }} + - name: Install dependencies - run: pnpm install --frozen-lockfile + run: pnpm install --no-frozen-lockfile - name: Get Playwright version id: versions @@ -45,7 +60,7 @@ jobs: - uses: actions/upload-artifact@v6 if: always() with: - name: playwright-report + name: playwright-report-angular-${{ matrix.angular-version }} path: ./*/**/playwright-report/ retention-days: 30 diff --git a/playwright-ct-angular/package.json b/playwright-ct-angular/package.json index 2d5a11aa25..2dd76cbae8 100644 --- a/playwright-ct-angular/package.json +++ b/playwright-ct-angular/package.json @@ -55,9 +55,9 @@ "@playwright/experimental-ct-core": "1.59.1" }, "devDependencies": { - "@angular/compiler": "^20.3.11", - "@angular/core": "^20.3.11", - "@angular/platform-browser-dynamic": "^20.3.11", + "@angular/compiler": "^22.0.0", + "@angular/core": "^22.0.0", + "@angular/platform-browser-dynamic": "^22.0.0", "rxjs": "~7.8.2", "typescript": "~5.9.3", "@semantic-release/commit-analyzer": "13.0.1", @@ -69,9 +69,9 @@ "semantic-release": "25.0.3" }, "peerDependencies": { - "@angular/compiler": "^20.3.11", - "@angular/core": "^20.3.11", - "@angular/platform-browser-dynamic": "^20.3.11", + "@angular/compiler": ">=20.3.11 <23.0.0", + "@angular/core": ">=20.3.11 <23.0.0", + "@angular/platform-browser-dynamic": ">=20.3.11 <23.0.0", "typescript": ">=5.9.3" } -} \ No newline at end of file +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 218304aded..f7c6f52c27 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -70,14 +70,14 @@ importers: version: 1.59.1(@types/node@22.15.24)(jiti@2.4.2)(less@4.2.0)(sass@1.71.1)(terser@5.40.0) devDependencies: '@angular/compiler': - specifier: ^20.3.11 - version: 20.3.11 + specifier: ^22.0.0 + version: 22.0.1 '@angular/core': - specifier: ^20.3.11 - version: 20.3.11(@angular/compiler@20.3.11)(rxjs@7.8.2) + specifier: ^22.0.0 + version: 22.0.1(@angular/compiler@22.0.1)(rxjs@7.8.2) '@angular/platform-browser-dynamic': - specifier: ^20.3.11 - version: 20.3.11(@angular/common@20.3.11(@angular/core@20.3.11(@angular/compiler@20.3.11)(rxjs@7.8.2))(rxjs@7.8.2))(@angular/compiler@20.3.11)(@angular/core@20.3.11(@angular/compiler@20.3.11)(rxjs@7.8.2))(@angular/platform-browser@20.3.11(@angular/common@20.3.11(@angular/core@20.3.11(@angular/compiler@20.3.11)(rxjs@7.8.2))(rxjs@7.8.2))(@angular/core@20.3.11(@angular/compiler@20.3.11)(rxjs@7.8.2))) + specifier: ^22.0.0 + version: 22.0.1(@angular/common@22.0.1(@angular/core@22.0.1(@angular/compiler@22.0.1)(rxjs@7.8.2))(rxjs@7.8.2))(@angular/compiler@22.0.1)(@angular/core@22.0.1(@angular/compiler@22.0.1)(rxjs@7.8.2))(@angular/platform-browser@22.0.1(@angular/common@22.0.1(@angular/core@22.0.1(@angular/compiler@22.0.1)(rxjs@7.8.2))(rxjs@7.8.2))(@angular/core@22.0.1(@angular/compiler@22.0.1)(rxjs@7.8.2))) '@semantic-release/commit-analyzer': specifier: 13.0.1 version: 13.0.1(semantic-release@25.0.3(typescript@5.9.3)) @@ -227,11 +227,11 @@ packages: '@angular/core': 17.3.8 rxjs: ^6.5.3 || ^7.4.0 - '@angular/common@20.3.11': - resolution: {integrity: sha512-zQ8xlyUBS+UDAUKk7z/hhWdTtQU2oc/Dwo7jXpyrYlz9y2X1A6sAZpUigdYpbrBkIaNs3MplJevgMiCm3kmN8g==} - engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0} + '@angular/common@22.0.1': + resolution: {integrity: sha512-EczDHu+ziop3x2CSh9+hdkegTSjblYvuH0y4aZ8biqh+pGFRni24Qu9kZiV5VrBprIJG5NeiCEA2rT6fJ7w/Nw==} + engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0} peerDependencies: - '@angular/core': 20.3.11 + '@angular/core': 22.0.1 rxjs: ^6.5.3 || ^7.4.0 '@angular/compiler-cli@17.3.8': @@ -251,9 +251,9 @@ packages: '@angular/core': optional: true - '@angular/compiler@20.3.11': - resolution: {integrity: sha512-3O0iMPttD8a4QQQrjVfIjboiZZ17ErkZuqK8BXJBTn2rplpkq1m3kVhgsmzN2OANRR05GF9Ed1dTf8ycTrO1yg==} - engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0} + '@angular/compiler@22.0.1': + resolution: {integrity: sha512-J8lcmYXJCGZn1+CHx3LSgq6rtS5Efc1/Nafcd/v8VZN2NrsFIkIlTbnAIUxcwHwYxzZs4X5CGfX+5ZIB4X9rUw==} + engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0} '@angular/core@17.3.8': resolution: {integrity: sha512-+tUQ+B1yVvNbczzaWBCgJWWIgZ2z+GVJWu+UNOHHWzdqD8qpXjuIkDfnhyLNeGvvXgsqey4u6ApFf2SoFYLjuA==} @@ -262,13 +262,13 @@ packages: rxjs: ^6.5.3 || ^7.4.0 zone.js: ~0.14.0 - '@angular/core@20.3.11': - resolution: {integrity: sha512-tOXlxG0SI9Yy1b/ntGyBahfffDpFg7vAbAt+9riOb5ZZ8GYyyOzg78Lqa/lrdBVEG0PXdDjEa0MV93qCyqwYlg==} - engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0} + '@angular/core@22.0.1': + resolution: {integrity: sha512-Sk0fz+LR2q6QhJJtCV9ElN1GzoEX6lOB4difMqpOC0yRh/ue+9iKd+x3RRiL4p+dnAiRLQYAKqsXkYlqUm2SMg==} + engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0} peerDependencies: - '@angular/compiler': 20.3.11 + '@angular/compiler': 22.0.1 rxjs: ^6.5.3 || ^7.4.0 - zone.js: ~0.15.0 + zone.js: ~0.15.0 || ~0.16.0 peerDependenciesMeta: '@angular/compiler': optional: true @@ -293,14 +293,14 @@ packages: '@angular/core': 17.3.8 '@angular/platform-browser': 17.3.8 - '@angular/platform-browser-dynamic@20.3.11': - resolution: {integrity: sha512-VPvVJFCZkWKS/GTc+FRYf5M1vLjWNSTeA2yrlESs8+KbJQ9dK2qqBh0rhCfHA/YTgeowerR+bXSYIiaJo+aGxQ==} - engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0} + '@angular/platform-browser-dynamic@22.0.1': + resolution: {integrity: sha512-Z0h2gVNxPoJqzon7OlOhfScuMgPyW4qbJZAZCBMRYC8se+7YP1w81dw5dmqyeqf66pD+NwhkJXL1hOrYKK1m2g==} + engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0} peerDependencies: - '@angular/common': 20.3.11 - '@angular/compiler': 20.3.11 - '@angular/core': 20.3.11 - '@angular/platform-browser': 20.3.11 + '@angular/common': 22.0.1 + '@angular/compiler': 22.0.1 + '@angular/core': 22.0.1 + '@angular/platform-browser': 22.0.1 '@angular/platform-browser@17.3.8': resolution: {integrity: sha512-UMGSV3TdJqMtf2xvhbW6fx8TKJLOoHQgFxohhy3y8GvxHBu+PUyrwhovb7r03bs+muY6u4ygGCMm7Mt1TFVwfQ==} @@ -313,13 +313,13 @@ packages: '@angular/animations': optional: true - '@angular/platform-browser@20.3.11': - resolution: {integrity: sha512-hh+8O8m4QzYYlQr9WGew472P37GF1u64NF3HfHmUKJ0xSqqTOHfpni3utev8upJAFJXBKOUZETgeHu2JRcGavg==} - engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0} + '@angular/platform-browser@22.0.1': + resolution: {integrity: sha512-wbj/ddrMIOHKrONcFlDmHfJKUZq4dX8pzcxsLFTQ6sppUKtzWMrkxtCVkSPJLEzs6OG3OupRrc1yHbL/V+ffsw==} + engines: {node: ^22.22.3 || ^24.15.0 || >=26.0.0} peerDependencies: - '@angular/animations': 20.3.11 - '@angular/common': 20.3.11 - '@angular/core': 20.3.11 + '@angular/animations': 22.0.1 + '@angular/common': 22.0.1 + '@angular/core': 22.0.1 peerDependenciesMeta: '@angular/animations': optional: true @@ -5009,6 +5009,7 @@ packages: uuid@8.3.2: resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} + deprecated: uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028). hasBin: true validate-npm-package-license@3.0.4: @@ -5465,9 +5466,9 @@ snapshots: rxjs: 7.8.1 tslib: 2.6.2 - '@angular/common@20.3.11(@angular/core@20.3.11(@angular/compiler@20.3.11)(rxjs@7.8.2))(rxjs@7.8.2)': + '@angular/common@22.0.1(@angular/core@22.0.1(@angular/compiler@22.0.1)(rxjs@7.8.2))(rxjs@7.8.2)': dependencies: - '@angular/core': 20.3.11(@angular/compiler@20.3.11)(rxjs@7.8.2) + '@angular/core': 22.0.1(@angular/compiler@22.0.1)(rxjs@7.8.2) rxjs: 7.8.2 tslib: 2.6.2 @@ -5492,7 +5493,7 @@ snapshots: optionalDependencies: '@angular/core': 17.3.8(rxjs@7.8.1)(zone.js@0.14.5) - '@angular/compiler@20.3.11': + '@angular/compiler@22.0.1': dependencies: tslib: 2.6.2 @@ -5502,12 +5503,12 @@ snapshots: tslib: 2.6.2 zone.js: 0.14.5 - '@angular/core@20.3.11(@angular/compiler@20.3.11)(rxjs@7.8.2)': + '@angular/core@22.0.1(@angular/compiler@22.0.1)(rxjs@7.8.2)': dependencies: rxjs: 7.8.2 tslib: 2.6.2 optionalDependencies: - '@angular/compiler': 20.3.11 + '@angular/compiler': 22.0.1 '@angular/forms@17.3.8(@angular/common@17.3.8(@angular/core@17.3.8(rxjs@7.8.1)(zone.js@0.14.5))(rxjs@7.8.1))(@angular/core@17.3.8(rxjs@7.8.1)(zone.js@0.14.5))(@angular/platform-browser@17.3.8(@angular/animations@17.3.8(@angular/core@17.3.8(rxjs@7.8.1)(zone.js@0.14.5)))(@angular/common@17.3.8(@angular/core@17.3.8(rxjs@7.8.1)(zone.js@0.14.5))(rxjs@7.8.1))(@angular/core@17.3.8(rxjs@7.8.1)(zone.js@0.14.5)))(rxjs@7.8.1)': dependencies: @@ -5525,12 +5526,12 @@ snapshots: '@angular/platform-browser': 17.3.8(@angular/animations@17.3.8(@angular/core@17.3.8(rxjs@7.8.1)(zone.js@0.14.5)))(@angular/common@17.3.8(@angular/core@17.3.8(rxjs@7.8.1)(zone.js@0.14.5))(rxjs@7.8.1))(@angular/core@17.3.8(rxjs@7.8.1)(zone.js@0.14.5)) tslib: 2.6.2 - '@angular/platform-browser-dynamic@20.3.11(@angular/common@20.3.11(@angular/core@20.3.11(@angular/compiler@20.3.11)(rxjs@7.8.2))(rxjs@7.8.2))(@angular/compiler@20.3.11)(@angular/core@20.3.11(@angular/compiler@20.3.11)(rxjs@7.8.2))(@angular/platform-browser@20.3.11(@angular/common@20.3.11(@angular/core@20.3.11(@angular/compiler@20.3.11)(rxjs@7.8.2))(rxjs@7.8.2))(@angular/core@20.3.11(@angular/compiler@20.3.11)(rxjs@7.8.2)))': + '@angular/platform-browser-dynamic@22.0.1(@angular/common@22.0.1(@angular/core@22.0.1(@angular/compiler@22.0.1)(rxjs@7.8.2))(rxjs@7.8.2))(@angular/compiler@22.0.1)(@angular/core@22.0.1(@angular/compiler@22.0.1)(rxjs@7.8.2))(@angular/platform-browser@22.0.1(@angular/common@22.0.1(@angular/core@22.0.1(@angular/compiler@22.0.1)(rxjs@7.8.2))(rxjs@7.8.2))(@angular/core@22.0.1(@angular/compiler@22.0.1)(rxjs@7.8.2)))': dependencies: - '@angular/common': 20.3.11(@angular/core@20.3.11(@angular/compiler@20.3.11)(rxjs@7.8.2))(rxjs@7.8.2) - '@angular/compiler': 20.3.11 - '@angular/core': 20.3.11(@angular/compiler@20.3.11)(rxjs@7.8.2) - '@angular/platform-browser': 20.3.11(@angular/common@20.3.11(@angular/core@20.3.11(@angular/compiler@20.3.11)(rxjs@7.8.2))(rxjs@7.8.2))(@angular/core@20.3.11(@angular/compiler@20.3.11)(rxjs@7.8.2)) + '@angular/common': 22.0.1(@angular/core@22.0.1(@angular/compiler@22.0.1)(rxjs@7.8.2))(rxjs@7.8.2) + '@angular/compiler': 22.0.1 + '@angular/core': 22.0.1(@angular/compiler@22.0.1)(rxjs@7.8.2) + '@angular/platform-browser': 22.0.1(@angular/common@22.0.1(@angular/core@22.0.1(@angular/compiler@22.0.1)(rxjs@7.8.2))(rxjs@7.8.2))(@angular/core@22.0.1(@angular/compiler@22.0.1)(rxjs@7.8.2)) tslib: 2.6.2 '@angular/platform-browser@17.3.8(@angular/animations@17.3.8(@angular/core@17.3.8(rxjs@7.8.1)(zone.js@0.14.5)))(@angular/common@17.3.8(@angular/core@17.3.8(rxjs@7.8.1)(zone.js@0.14.5))(rxjs@7.8.1))(@angular/core@17.3.8(rxjs@7.8.1)(zone.js@0.14.5))': @@ -5541,10 +5542,10 @@ snapshots: optionalDependencies: '@angular/animations': 17.3.8(@angular/core@17.3.8(rxjs@7.8.1)(zone.js@0.14.5)) - '@angular/platform-browser@20.3.11(@angular/common@20.3.11(@angular/core@20.3.11(@angular/compiler@20.3.11)(rxjs@7.8.2))(rxjs@7.8.2))(@angular/core@20.3.11(@angular/compiler@20.3.11)(rxjs@7.8.2))': + '@angular/platform-browser@22.0.1(@angular/common@22.0.1(@angular/core@22.0.1(@angular/compiler@22.0.1)(rxjs@7.8.2))(rxjs@7.8.2))(@angular/core@22.0.1(@angular/compiler@22.0.1)(rxjs@7.8.2))': dependencies: - '@angular/common': 20.3.11(@angular/core@20.3.11(@angular/compiler@20.3.11)(rxjs@7.8.2))(rxjs@7.8.2) - '@angular/core': 20.3.11(@angular/compiler@20.3.11)(rxjs@7.8.2) + '@angular/common': 22.0.1(@angular/core@22.0.1(@angular/compiler@22.0.1)(rxjs@7.8.2))(rxjs@7.8.2) + '@angular/core': 22.0.1(@angular/compiler@22.0.1)(rxjs@7.8.2) tslib: 2.6.2 '@angular/router@17.3.8(@angular/common@17.3.8(@angular/core@17.3.8(rxjs@7.8.1)(zone.js@0.14.5))(rxjs@7.8.1))(@angular/core@17.3.8(rxjs@7.8.1)(zone.js@0.14.5))(@angular/platform-browser@17.3.8(@angular/animations@17.3.8(@angular/core@17.3.8(rxjs@7.8.1)(zone.js@0.14.5)))(@angular/common@17.3.8(@angular/core@17.3.8(rxjs@7.8.1)(zone.js@0.14.5))(rxjs@7.8.1))(@angular/core@17.3.8(rxjs@7.8.1)(zone.js@0.14.5)))(rxjs@7.8.1)':