Skip to content

Commit 9780db0

Browse files
authored
feat(core)!: update to angular 21 (#221)
## PR Checklist Please check if your PR fulfills the following requirements: - [x] The commit message follows our guidelines: CONTRIBUTING.md#commit - [x] Tests for the changes have been added (for bug fixes / features) - [x] Docs have been added / updated (for bug fixes / features) ## PR Type What kind of change does this PR introduce? <!-- Please check the one that applies to this PR using "x". --> ``` [ ] Bugfix [x] Feature [ ] Code style update (formatting, local variables) [ ] Refactoring (no functional changes, no api changes) [ ] Build related changes [ ] CI related changes [ ] Documentation content changes [ ] Other... Please describe: ``` ## What is the current behavior? We are supporting Angular 20 Closes: #220 ## What is the new behavior? - Updated to Nx and Angular 21 - Add support Angular 21 in Lumberjack ## Does this PR introduce a breaking change? ``` [x] Yes [ ] No ``` Only Angular >=21 < 22 is accepted by Lumberjack
1 parent 6286fdd commit 9780db0

31 files changed

Lines changed: 7352 additions & 5906 deletions

.github/actions/setup/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ runs:
3232

3333
- uses: pnpm/action-setup@v2
3434
with:
35-
version: 9.5
35+
version: 10
3636

3737
- name: Use Node.js
3838
uses: actions/setup-node@v4

.github/workflows/ci.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ jobs:
3737

3838
- uses: pnpm/action-setup@v2
3939
with:
40-
version: 9.5
40+
version: 10
4141
# Cache node_modules
4242
- uses: actions/setup-node@v4
4343
with:
44-
node-version: 20
44+
node-version: 22
4545
# Connect your workspace on nx.app and uncomment this to enable task distribution.
4646
# The "--stop-agents-after" is optional, but allows idle agents to shut down once the "build" targets have been requested
47-
- run: pnpm dlx nx-cloud start-ci-run --distribute-on="4 linux-medium-js"
47+
# - run: pnpm dlx nx-cloud start-ci-run --distribute-on="4 linux-medium-js"
4848

4949
- uses: nrwl/nx-set-shas@v4
5050

@@ -58,35 +58,36 @@ jobs:
5858
uses: actions/cache@v4
5959
with:
6060
path: ~/.npm
61-
key: ${{ runner.os }}-node-${{ github.ref }}-${{ hashFiles('**/pnpm-lock.yaml') }}
61+
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}
6262
restore-keys: |
63-
${{ runner.os }}-node-${{ github.ref }}-${{ hashFiles('**/pnpm-lock.yaml') }}
63+
${{ runner.os }}-node-
6464
6565
# we use the exact restore key to avoid Cypress binary snowballing
6666
# https://glebbahmutov.com/blog/do-not-let-cypress-cache-snowball/
6767
- name: Cache Cypress binary
6868
uses: actions/cache@v4
6969
with:
7070
path: ~/.cache/Cypress
71-
key: cypress-${{ runner.os }}-cypress-${{ github.ref }}-${{ hashFiles('**/pnpm-lock.yaml') }}
71+
key: cypress-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
7272
restore-keys: |
73-
cypress-${{ runner.os }}-cypress-${{ github.ref }}-${{ hashFiles('**/pnpm-lock.yaml') }}
73+
cypress-${{ runner.os }}-
7474
7575
# Cache local node_modules to pass to testing jobs
7676
- name: Cache local node_modules
7777
uses: actions/cache@v4
7878
with:
7979
path: node_modules
80-
key: ${{ runner.os }}-node-modules-${{ github.ref }}-${{ hashFiles('**/pnpm-lock.yaml') }}
80+
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/pnpm-lock.yaml') }}
8181
restore-keys: |
82-
${{ runner.os }}-node-modules-${{ github.ref }}-
82+
${{ runner.os }}-node-modules-
8383
8484
- name: install dependencies and verify Cypress
8585
env:
8686
# make sure every Cypress install prints minimal information
8787
CI: 1
8888
run: |
8989
pnpm install --frozen-lockfile
90+
pnpm exec cypress install
9091
pnpm exec cypress cache path
9192
pnpm exec cypress cache list
9293
pnpm exec cypress verify
@@ -95,7 +96,7 @@ jobs:
9596
- name: Run NX Commands
9697
run: |
9798
pnpm exec nx-cloud record -- nx format:check
98-
pnpm exec nx affected -t lint test:ci build e2e-ci
99+
pnpm exec nx affected -t lint test:ci build e2e
99100
100101
sonarcloud:
101102
name: SonarCloud

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ jobs:
2020

2121
- uses: pnpm/action-setup@v2
2222
with:
23-
version: 9.5
23+
version: 10
2424

2525
- uses: actions/setup-node@v4
2626
with:
27-
node-version: 20
27+
node-version: 22
2828
cache: 'pnpm'
2929
registry-url: 'https://registry.npmjs.org'
3030

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20
1+
22
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": "../../../tsconfig.base.json",
33
"compilerOptions": {
4-
"module": "commonjs",
4+
"module": "preserve",
55
"sourceMap": false,
66
"outDir": "../../../dist/out-tsc",
77
"allowJs": true,
@@ -11,7 +11,9 @@
1111
"noImplicitOverride": true,
1212
"noPropertyAccessFromIndexSignature": true,
1313
"noImplicitReturns": true,
14-
"noFallthroughCasesInSwitch": true
14+
"noFallthroughCasesInSwitch": true,
15+
"moduleResolution": "bundler",
16+
"lib": ["dom", "es2022"]
1517
},
1618
"include": ["src/**/*.ts", "src/**/*.js", "cypress.config.ts"]
1719
}

jest.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { getJestProjectsAsync } from '@nx/jest';
1+
const { getJestProjectsAsync } = require('@nx/jest');
22

3-
export default async () => ({
3+
module.exports = async () => ({
44
projects: await getJestProjectsAsync(),
55
});

nx.json

Lines changed: 58 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,59 @@
1515
"unitTestRunner": "jest"
1616
},
1717
"@nx/angular:component": {
18-
"style": "scss"
18+
"style": "scss",
19+
"type": "component"
20+
},
21+
"@schematics/angular:component": {
22+
"type": "component"
23+
},
24+
"@nx/angular:directive": {
25+
"type": "directive"
26+
},
27+
"@schematics/angular:directive": {
28+
"type": "directive"
29+
},
30+
"@nx/angular:service": {
31+
"type": "service"
32+
},
33+
"@schematics/angular:service": {
34+
"type": "service"
35+
},
36+
"@nx/angular:scam": {
37+
"type": "component"
38+
},
39+
"@nx/angular:scam-directive": {
40+
"type": "directive"
41+
},
42+
"@nx/angular:guard": {
43+
"typeSeparator": "."
44+
},
45+
"@schematics/angular:guard": {
46+
"typeSeparator": "."
47+
},
48+
"@nx/angular:interceptor": {
49+
"typeSeparator": "."
50+
},
51+
"@schematics/angular:interceptor": {
52+
"typeSeparator": "."
53+
},
54+
"@nx/angular:module": {
55+
"typeSeparator": "."
56+
},
57+
"@schematics/angular:module": {
58+
"typeSeparator": "."
59+
},
60+
"@nx/angular:pipe": {
61+
"typeSeparator": "."
62+
},
63+
"@schematics/angular:pipe": {
64+
"typeSeparator": "."
65+
},
66+
"@nx/angular:resolver": {
67+
"typeSeparator": "."
68+
},
69+
"@schematics/angular:resolver": {
70+
"typeSeparator": "."
1971
}
2072
},
2173
"defaultProject": "examples-lumberjack-app",
@@ -111,14 +163,11 @@
111163
}
112164
}
113165
],
114-
"nxCloudAccessToken": "OTNjMDE5MjItZjQ3Mi00NTM0LTgxNjYtODBjY2EyMTgzYzhlfHJlYWQtd3JpdGU=",
115166
"defaultBase": "main",
116167
"release": {
117-
"releaseTagPattern": "v{version}",
118168
"projects": ["ngworker-lumberjack"],
119169
"projectsRelationship": "independent",
120170
"version": {
121-
"useLegacyVersioning": false,
122171
"preVersionCommand": "pnpm exec nx run-many -t build",
123172
"conventionalCommits": true
124173
},
@@ -133,6 +182,10 @@
133182
},
134183
"workspaceChangelog": false,
135184
"commitMessageFormat": "conventional"
185+
},
186+
"releaseTag": {
187+
"pattern": "v{version}"
136188
}
137-
}
189+
},
190+
"nxCloudId": "67453b3bcfbda5adf9827c70"
138191
}

package.json

Lines changed: 44 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,25 @@
1717
"test": "nx run-many --target=test"
1818
},
1919
"engines": {
20-
"node": "20",
20+
"node": ">=22",
2121
"npm": "Use PNPM CLI instead of npm",
2222
"yarn": "Use PNPM CLI instead of yarn",
23-
"pnpm": "9.5.0"
23+
"pnpm": ">=10"
2424
},
2525
"volta": {
26-
"node": "20",
27-
"pnpm": "9.5.0"
26+
"node": "22",
27+
"pnpm": ">=10"
2828
},
29-
"packageManager": "pnpm@9.5.0",
29+
"packageManager": "pnpm@10.11.1",
3030
"dependencies": {
31-
"@angular/animations": "20.0.3",
32-
"@angular/common": "20.0.3",
33-
"@angular/compiler": "20.0.3",
34-
"@angular/core": "20.0.3",
35-
"@angular/forms": "20.0.3",
36-
"@angular/platform-browser": "20.0.3",
37-
"@angular/platform-browser-dynamic": "20.0.3",
38-
"@angular/router": "20.0.3",
31+
"@angular/animations": "21.0.9",
32+
"@angular/common": "21.0.9",
33+
"@angular/compiler": "21.0.9",
34+
"@angular/core": "21.0.9",
35+
"@angular/forms": "21.0.9",
36+
"@angular/platform-browser": "21.0.9",
37+
"@angular/platform-browser-dynamic": "21.0.9",
38+
"@angular/router": "21.0.9",
3939
"@docusaurus/core": "3.3.2",
4040
"@docusaurus/preset-classic": "3.3.2",
4141
"@mdx-js/react": "^3.0.1",
@@ -46,45 +46,45 @@
4646
"react-dom": "^18.2.0",
4747
"rxjs": "7.8.1",
4848
"tslib": "2.4.1",
49-
"zone.js": "0.14.6"
49+
"zone.js": "0.16.0"
5050
},
5151
"devDependencies": {
52-
"@angular-devkit/build-angular": "20.0.2",
53-
"@angular-devkit/core": "20.0.2",
54-
"@angular-devkit/schematics": "20.0.2",
55-
"@angular-eslint/eslint-plugin": "20.0.0",
56-
"@angular-eslint/eslint-plugin-template": "20.0.0",
57-
"@angular-eslint/template-parser": "20.0.0",
58-
"@angular/cli": "20.0.2",
59-
"@angular/compiler-cli": "20.0.3",
60-
"@angular/language-service": "20.0.3",
52+
"@angular-devkit/build-angular": "21.0.6",
53+
"@angular-devkit/core": "21.0.6",
54+
"@angular-devkit/schematics": "21.0.6",
55+
"@angular-eslint/eslint-plugin": "21.1.0",
56+
"@angular-eslint/eslint-plugin-template": "21.1.0",
57+
"@angular-eslint/template-parser": "21.1.0",
58+
"@angular/cli": "21.0.6",
59+
"@angular/compiler-cli": "21.0.9",
60+
"@angular/language-service": "21.0.9",
6161
"@commitlint/cli": "19.0.1",
6262
"@commitlint/config-conventional": "19.0.0",
6363
"@docusaurus/module-type-aliases": "3.3.2",
6464
"@docusaurus/types": "3.0.0",
65-
"@nx/angular": "21.1.3",
66-
"@nx/cypress": "21.1.3",
67-
"@nx/devkit": "21.1.3",
68-
"@nx/eslint": "21.1.3",
69-
"@nx/eslint-plugin": "21.1.3",
70-
"@nx/jest": "21.1.3",
71-
"@nx/js": "21.1.3",
72-
"@nx/web": "21.1.3",
73-
"@nx/workspace": "21.1.3",
74-
"@schematics/angular": "20.0.2",
65+
"@nx/angular": "22.3.3",
66+
"@nx/cypress": "22.3.3",
67+
"@nx/devkit": "22.3.3",
68+
"@nx/eslint": "22.3.3",
69+
"@nx/eslint-plugin": "22.3.3",
70+
"@nx/jest": "22.3.3",
71+
"@nx/js": "22.3.3",
72+
"@nx/web": "22.3.3",
73+
"@nx/workspace": "22.3.3",
74+
"@schematics/angular": "21.0.6",
7575
"@swc-node/register": "1.9.2",
7676
"@swc/core": "1.5.7",
7777
"@swc/helpers": "0.5.12",
7878
"@tsconfig/docusaurus": "^1.0.7",
7979
"@types/copy": "0.3.2",
80-
"@types/jest": "29.5.14",
81-
"@types/node": "18.16.9",
80+
"@types/jest": "30.0.0",
81+
"@types/node": "22.16.0",
8282
"@typescript-eslint/eslint-plugin": "7.18.0",
8383
"@typescript-eslint/parser": "7.18.0",
8484
"@typescript-eslint/utils": "7.18.0",
8585
"autoprefixer": "^10.4.0",
8686
"copy": "0.3.2",
87-
"cypress": "14.4.1",
87+
"cypress": "15.9.0",
8888
"eslint": "8.57.0",
8989
"eslint-config-prettier": "10.1.5",
9090
"eslint-plugin-cypress": "2.15.1",
@@ -94,20 +94,21 @@
9494
"eslint-plugin-sonarjs": "0.17.0",
9595
"glob": "8.0.3",
9696
"husky": "8.0.2",
97-
"jest": "29.7.0",
98-
"jest-environment-jsdom": "29.7.0",
99-
"jest-preset-angular": "14.4.2",
100-
"ng-packagr": "19.2.2",
101-
"nx": "21.1.3",
97+
"jest": "30.0.5",
98+
"jest-environment-jsdom": "30.0.5",
99+
"jest-preset-angular": "16.0.0",
100+
"ng-packagr": "21.0.1",
101+
"nx": "22.3.3",
102102
"postcss": "8.4.18",
103103
"postcss-import": "14.1.0",
104104
"postcss-preset-env": "7.5.0",
105105
"postcss-url": "10.1.3",
106106
"prettier": "2.8.1",
107107
"replace-in-file": "6.3.5",
108108
"rimraf": "3.0.2",
109-
"ts-jest": "29.1.0",
109+
"ts-jest": "29.4.6",
110110
"ts-node": "10.9.1",
111-
"typescript": "5.8.3"
111+
"typescript": "5.9.3",
112+
"jest-util": "30.0.5"
112113
}
113114
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
title: 'Announcing Lumberjack v21: Angular 21'
3+
description: Lumberjack v21 is here and it brings compatibility with Angular 21.
4+
slug: announcing-lumberjack-v21
5+
authors:
6+
- name: Nacho Vazquez
7+
title: NgWorker and core maintainer of Lumberjack
8+
url: https://github.com/NachoVazquez
9+
image_url: https://github.com/NachoVazquez.png
10+
tags: [announcement, lumberjack, v21]
11+
image: https://pub-2294738bc2c249ff8040505bf960c018.r2.dev/logo.svg
12+
hide_table_of_contents: false
13+
---
14+
15+
Lumberjack v21 is out, bringing compatibility with Angular 21.
16+
17+
## Angular 21
18+
19+
With the new version of Angular out, we are happy to announce that Lumberjack is compatible with Angular 21.
20+
21+
## What's New
22+
23+
- Updated peer dependencies to Angular 21
24+
- Updated to Nx 22.3.3
25+
- Updated to Node.js 22 (required by Angular 21)
26+
- Updated to pnpm 10
27+
28+
## Wrapping Up
29+
30+
This was a short one; update your dependencies and enjoy the new version of Lumberjack.

packages/docs/lumberjack-docs-app/docs/compatibility.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Refer to the following table to determine which version of Lumberjack is compati
77

88
| Angular version | Lumberjack version |
99
| --------------- | ------------------ |
10+
| 21.x | 21.x |
1011
| 20.x | 20.x |
1112
| 19.x | 19.x |
1213
| 18.x | 18.x |

0 commit comments

Comments
 (0)