Skip to content

Commit 6d75549

Browse files
authored
chore!: upgrade to angular 17 and nx 17.2 (#203)
## PR Checklist Please check if your PR fulfills the following requirements: - [x] The commit message follows our guidelines: CONTRIBUTING.md#commit - [ ] Tests for the changes have been added (for bug fixes / features) - [ ] 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 [ ] Feature [ ] Code style update (formatting, local variables) [x] Refactoring (no functional changes, no api changes) [x] Build related changes [ ] CI related changes [x] Documentation content changes [ ] Other... Please describe: ``` ## What is the current behavior? Lumberjack supports up to Angular 16 ## What is the new behavior? The project is updated to Angular 17 and Nx 17.2 ## Does this PR introduce a breaking change? ``` [x] Yes [ ] No ``` BREAKING CHANGES: - Changes support from Angular version 16 to 17
1 parent a392180 commit 6d75549

36 files changed

+2460
-2292
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,5 @@ migrations.json
4747
# Generated Docusaurus files
4848
.docusaurus/
4949
.cache-loader/
50+
51+
.nx/cache

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@
88

99
# Generated files
1010
packages/**/CHANGELOG.md
11+
12+
/.nx/cache

decorate-angular-cli.js

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

e2e/docs/lumberjack-docs-app-e2e/project.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,8 @@
2424
}
2525
},
2626
"lint": {
27-
"executor": "@nx/linter:eslint",
27+
"executor": "@nx/eslint:lint",
2828
"outputs": ["{options.outputFile}"],
29-
"options": {
30-
"lintFilePatterns": ["e2e/docs/lumberjack-docs-app-e2e/**/*.{js,ts}"]
31-
},
3229
"configurations": {
3330
"report": {
3431
"format": "json",

e2e/examples/lumberjack-app-e2e/project.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,8 @@
2424
}
2525
},
2626
"lint": {
27-
"executor": "@nx/linter:eslint",
27+
"executor": "@nx/eslint:lint",
2828
"outputs": ["{options.outputFile}"],
29-
"options": {
30-
"lintFilePatterns": ["e2e/examples/lumberjack-app-e2e/**/*.{js,ts}"]
31-
},
3229
"configurations": {
3330
"report": {
3431
"format": "json",

nx.json

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,8 @@
44
"defaultBase": "main"
55
},
66
"cli": {
7-
"defaultCollection": "@nx/angular",
87
"packageManager": "yarn"
98
},
10-
"tasksRunnerOptions": {
11-
"default": {
12-
"runner": "nx-cloud",
13-
"options": {
14-
"cacheableOperations": ["build", "build-package", "lint", "test", "e2e"],
15-
"accessToken": "M2I0MTZlMmMtYmQ5ZC00ZDg1LWFjOTQtZjU5ZGFkYWM3YjM2fHJlYWQ="
16-
}
17-
}
18-
},
199
"generators": {
2010
"@nx/angular:application": {
2111
"style": "scss",
@@ -40,16 +30,32 @@
4030
"dependencies": true
4131
}
4232
],
43-
"inputs": ["production", "^production"]
33+
"inputs": ["production", "^production"],
34+
"cache": true
4435
},
4536
"e2e": {
46-
"inputs": ["default", "^production"]
47-
},
48-
"test": {
49-
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"]
37+
"inputs": ["default", "^production"],
38+
"cache": true
5039
},
5140
"lint": {
52-
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"]
41+
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"],
42+
"cache": true
43+
},
44+
"build-package": {
45+
"cache": true
46+
},
47+
"@nx/jest:jest": {
48+
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"],
49+
"cache": true,
50+
"options": {
51+
"passWithNoTests": true
52+
},
53+
"configurations": {
54+
"ci": {
55+
"ci": true,
56+
"codeCoverage": true
57+
}
58+
}
5359
}
5460
},
5561
"workspaceLayout": {
@@ -68,5 +74,6 @@
6874
"!{projectRoot}/src/test-setup.[jt]s"
6975
],
7076
"projectSpecificFiles": []
71-
}
77+
},
78+
"nxCloudAccessToken": "M2I0MTZlMmMtYmQ5ZC00ZDg1LWFjOTQtZjU5ZGFkYWM3YjM2fHJlYWQ="
7279
}

package.json

Lines changed: 36 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"license": "MIT",
55
"private": true,
66
"scripts": {
7-
"postinstall": "node ./decorate-angular-cli.js",
87
"build": "nx run-many --target=build --all",
98
"ci": "yarn lint && yarn test && yarn build && yarn e2e",
109
"clean": "rimraf dist coverage reports",
@@ -27,15 +26,14 @@
2726
"yarn": "1.22.21"
2827
},
2928
"dependencies": {
30-
"@angular/animations": "16.2.12",
31-
"@angular/common": "16.2.12",
32-
"@angular/compiler": "16.2.12",
33-
"@angular/core": "16.2.12",
34-
"@angular/forms": "16.2.12",
35-
"@angular/platform-browser": "16.2.12",
36-
"@angular/platform-browser-dynamic": "16.2.12",
37-
"@angular/router": "16.2.12",
38-
"@nx/angular": "16.7.0",
29+
"@angular/animations": "17.0.9",
30+
"@angular/common": "17.0.9",
31+
"@angular/compiler": "17.0.9",
32+
"@angular/core": "17.0.9",
33+
"@angular/forms": "17.0.9",
34+
"@angular/platform-browser": "17.0.9",
35+
"@angular/platform-browser-dynamic": "17.0.9",
36+
"@angular/router": "17.0.9",
3937
"@docusaurus/core": "2.4.1",
4038
"@docusaurus/preset-classic": "2.4.1",
4139
"@mdx-js/react": "^1.6.22",
@@ -45,40 +43,40 @@
4543
"react-dom": "^18.2.0",
4644
"rxjs": "7.8.1",
4745
"tslib": "2.4.1",
48-
"zone.js": "0.12.0"
46+
"zone.js": "0.14.3"
4947
},
5048
"devDependencies": {
51-
"@angular-devkit/build-angular": "16.2.11",
52-
"@angular-devkit/core": "16.2.11",
53-
"@angular-devkit/schematics": "16.2.11",
54-
"@angular-eslint/eslint-plugin": "16.0.1",
55-
"@angular-eslint/eslint-plugin-template": "16.0.1",
56-
"@angular-eslint/template-parser": "16.0.1",
57-
"@angular/cli": "~16.2.0",
58-
"@angular/compiler-cli": "16.2.12",
59-
"@angular/language-service": "16.2.12",
49+
"@angular-devkit/build-angular": "17.0.10",
50+
"@angular-devkit/core": "17.0.10",
51+
"@angular-devkit/schematics": "17.0.10",
52+
"@angular-eslint/eslint-plugin": "17.0.1",
53+
"@angular-eslint/eslint-plugin-template": "17.0.1",
54+
"@angular-eslint/template-parser": "17.0.1",
55+
"@angular/cli": "~17.0.0",
56+
"@angular/compiler-cli": "17.0.9",
57+
"@angular/language-service": "17.0.9",
6058
"@commitlint/cli": "17.3.0",
6159
"@commitlint/config-conventional": "17.3.0",
6260
"@docusaurus/module-type-aliases": "2.4.1",
6361
"@jscutlery/semver": "3.0.0",
64-
"@nx/cypress": "16.7.0",
65-
"@nx/devkit": "16.7.0",
66-
"@nx/eslint-plugin": "16.7.0",
67-
"@nx/jest": "16.7.0",
68-
"@nx/linter": "16.7.0",
69-
"@nx/workspace": "16.7.0",
62+
"@nx/angular": "17.2.0",
63+
"@nx/cypress": "17.2.0",
64+
"@nx/devkit": "17.2.0",
65+
"@nx/eslint-plugin": "17.2.0",
66+
"@nx/jest": "17.2.0",
67+
"@nx/workspace": "17.2.0",
7068
"@nx-plus/docusaurus": "^15.0.0-rc.0",
71-
"@schematics/angular": "16.2.11",
69+
"@schematics/angular": "17.0.10",
7270
"@tsconfig/docusaurus": "^1.0.6",
7371
"@types/copy": "0.3.2",
7472
"@types/jest": "29.4.4",
75-
"@types/node": "18.11.13",
76-
"@typescript-eslint/eslint-plugin": "5.62.0",
77-
"@typescript-eslint/parser": "5.62.0",
73+
"@types/node": "18.16.9",
74+
"@typescript-eslint/eslint-plugin": "6.19.1",
75+
"@typescript-eslint/parser": "6.19.1",
7876
"copy": "0.3.2",
79-
"cypress": "12.17.4",
80-
"eslint": "8.46.0",
81-
"eslint-config-prettier": "8.1.0",
77+
"cypress": "^13.0.0",
78+
"eslint": "8.48.0",
79+
"eslint-config-prettier": "9.1.0",
8280
"eslint-plugin-cypress": "2.15.1",
8381
"eslint-plugin-etc": "2.0.2",
8482
"eslint-plugin-ordered-imports": "0.6.0",
@@ -88,11 +86,10 @@
8886
"husky": "8.0.2",
8987
"jest": "29.4.3",
9088
"jest-environment-jsdom": "29.4.3",
91-
"jest-preset-angular": "13.1.1",
92-
"ng-packagr": "16.2.3",
89+
"jest-preset-angular": "13.1.6",
90+
"ng-packagr": "17.0.3",
9391
"ngx-deploy-npm": "8.0.0",
94-
"nx": "16.7.0",
95-
"nx-cloud": "16.5.2",
92+
"nx": "17.2.0",
9693
"postcss": "8.4.18",
9794
"postcss-import": "14.1.0",
9895
"postcss-preset-env": "7.5.0",
@@ -102,6 +99,7 @@
10299
"rimraf": "3.0.2",
103100
"ts-jest": "29.1.0",
104101
"ts-node": "10.9.1",
105-
"typescript": "~5.1.3"
102+
"typescript": "5.2.2",
103+
"@nx/eslint": "17.2.0"
106104
}
107105
}

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+
| 17.x | 17.x |
1011
| 16.x | 16.x |
1112
| 15.x | 15.x |
1213
| 14.x | 14.x |

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export class MyComponent implements OnInit {
131131
// (...)
132132
ngOnInit(): void {
133133
this.#lumberjack.log({
134-
level: LumberjackLevel.Info,
134+
level: 'info',
135135
message: 'Hello, World!',
136136
scope: 'MyComponent',
137137
createdAt: this.#time.getUnixEpochTicks(),
@@ -158,7 +158,7 @@ export class MyComponent implements OnInit {
158158
}
159159
```
160160

161-
> Each log level has its associated shorthand version: `LumberjackLevel.Info` is `logInfo`, `LumberjackLevel.Debug` is `logDebug`, etc.
161+
> Each log level has its associated shorthand version: `'info'` is `logInfo`, `'debug'` is `logDebug`, etc.
162162
163163
### LumberjackModule and provideLumberjack
164164

packages/examples/lumberjack-app/project.json

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,26 +56,23 @@
5656
],
5757
"configurations": {
5858
"production": {
59-
"browserTarget": "examples-lumberjack-app:build:production"
59+
"buildTarget": "examples-lumberjack-app:build:production"
6060
},
6161
"development": {
62-
"browserTarget": "examples-lumberjack-app:build:development"
62+
"buildTarget": "examples-lumberjack-app:build:development"
6363
}
6464
},
6565
"defaultConfiguration": "development"
6666
},
6767
"extract-i18n": {
6868
"executor": "@angular-devkit/build-angular:extract-i18n",
6969
"options": {
70-
"browserTarget": "examples-lumberjack-app:build"
70+
"buildTarget": "examples-lumberjack-app:build"
7171
}
7272
},
7373
"lint": {
74-
"executor": "@nx/linter:eslint",
74+
"executor": "@nx/eslint:lint",
7575
"outputs": ["{options.outputFile}"],
76-
"options": {
77-
"lintFilePatterns": ["packages/examples/lumberjack-app/**/*.ts", "packages/examples/lumberjack-app/**/*.html"]
78-
},
7976
"configurations": {
8077
"report": {
8178
"format": "json",
@@ -89,7 +86,6 @@
8986
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
9087
"options": {
9188
"jestConfig": "packages/examples/lumberjack-app/jest.config.ts",
92-
"passWithNoTests": true,
9389
"reporters": ["default", "github-actions"]
9490
},
9591
"configurations": {

0 commit comments

Comments
 (0)