Skip to content

build: update to Angular 18 #451

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,18 @@
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nx/typescript"],
"rules": {}
"rules": {
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
"rules": {
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
}
},
{
"files": ["*.ts"],
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- name: install
run: npm install
run: npm install --force
- name: build
run: npm run build -- --skip-nx-cache
- name: test
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ You may also be interested in installing `jest-dom` so you can use

| Angular | Angular Testing Library |
| ------- | ----------------------- |
| 18.x | 16.x, 15.x, 14.x, 13.x |
| 17.x | 16.x, 15.x, 14.x, 13.x |
| 16.x | 14.x, 13.x |
| >= 15.1 | 14.x, 13.x |
Expand Down
7 changes: 3 additions & 4 deletions apps/example-app-karma/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"projectType": "application",
"sourceRoot": "apps/example-app-karma/src",
"prefix": "app",
"tags": [],
"generators": {},
"targets": {
"build": {
Expand Down Expand Up @@ -52,8 +53,7 @@
"defaultConfiguration": "development"
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"]
"executor": "@nx/eslint:lint"
},
"test": {
"executor": "@angular-devkit/build-angular:karma",
Expand All @@ -63,6 +63,5 @@
"karmaConfig": "apps/example-app-karma/karma.conf.js"
}
}
},
"tags": []
}
}
7 changes: 3 additions & 4 deletions apps/example-app/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"projectType": "application",
"sourceRoot": "apps/example-app/src",
"prefix": "app",
"tags": [],
"generators": {},
"targets": {
"build": {
Expand Down Expand Up @@ -59,8 +60,7 @@
}
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"]
"executor": "@nx/eslint:lint"
},
"test": {
"executor": "@nx/jest:jest",
Expand All @@ -70,6 +70,5 @@
},
"outputs": ["{workspaceRoot}/coverage/"]
}
},
"tags": []
}
}
70 changes: 0 additions & 70 deletions decorate-angular-cli.js

This file was deleted.

15 changes: 7 additions & 8 deletions nx.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"affected": {
"defaultBase": "main"
},
"workspaceLayout": {
"appsDir": "apps",
"libsDir": "projects"
Expand Down Expand Up @@ -71,10 +68,6 @@
"inputs": ["default", "^production"],
"cache": true
},
"lint": {
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"],
"cache": true
},
"@nx/jest:jest": {
"inputs": ["default", "^production"],
"cache": true,
Expand All @@ -87,6 +80,10 @@
"codeCoverage": true
}
}
},
"@nx/eslint:lint": {
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"],
"cache": true
}
},
"namedInputs": {
Expand All @@ -104,5 +101,7 @@
]
},
"nxCloudAccessToken": "M2Q4YjlkNjMtMzY1NC00ZjkwLTk1ZjgtZjg5Y2VkMzFjM2FifHJlYWQtd3JpdGU=",
"parallel": 3
"parallel": 3,
"useInferencePlugins": false,
"defaultBase": "main"
}
76 changes: 38 additions & 38 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"scripts": {
"ng": "nx",
"nx": "nx",
"postinstall": "node ./decorate-angular-cli.js && ngcc --properties es2020 browser module main",
"start": "nx serve",
"prebuild": "rimraf dist",
"build": "nx run-many --target=build --projects=testing-library",
Expand All @@ -28,53 +27,54 @@
"prepare": "git config core.hookspath .githooks"
},
"dependencies": {
"@angular/animations": "17.3.2",
"@angular/cdk": "17.3.2",
"@angular/common": "17.3.2",
"@angular/compiler": "17.3.2",
"@angular/core": "17.3.2",
"@angular/material": "17.3.2",
"@angular/platform-browser": "17.3.2",
"@angular/platform-browser-dynamic": "17.3.2",
"@angular/router": "17.3.2",
"@ngrx/store": "17.1.0",
"@nx/angular": "17.2.8",
"@angular/animations": "18.0.0",
"@angular/cdk": "18.0.0",
"@angular/common": "18.0.0",
"@angular/compiler": "18.0.0",
"@angular/core": "18.0.0",
"@angular/material": "18.0.0",
"@angular/platform-browser": "18.0.0",
"@angular/platform-browser-dynamic": "18.0.0",
"@angular/router": "18.0.0",
"@ngrx/store": "18.0.0-beta.1",
"@nx/angular": "19.1.0",
"@testing-library/dom": "^10.0.0",
"rxjs": "7.8.0",
"tslib": "~2.3.1",
"zone.js": "0.14.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "17.3.2",
"@angular-devkit/core": "17.3.2",
"@angular-devkit/schematics": "17.3.2",
"@angular-eslint/builder": "17.0.1",
"@angular-eslint/eslint-plugin": "17.0.1",
"@angular-eslint/eslint-plugin-template": "17.0.1",
"@angular-eslint/schematics": "17.0.1",
"@angular-eslint/template-parser": "17.0.1",
"@angular/cli": "~17.3.2",
"@angular/compiler-cli": "17.3.2",
"@angular/forms": "17.3.2",
"@angular/language-service": "17.3.2",
"@nx/eslint": "17.2.8",
"@nx/eslint-plugin": "17.2.8",
"@nx/jest": "17.2.8",
"@nx/node": "17.2.8",
"@nx/plugin": "17.2.8",
"@nx/workspace": "17.2.8",
"@schematics/angular": "17.3.2",
"@angular-devkit/build-angular": "18.0.1",
"@angular-devkit/core": "18.0.1",
"@angular-devkit/schematics": "18.0.1",
"@angular-eslint/builder": "17.3.0",
"@angular-eslint/eslint-plugin": "17.3.0",
"@angular-eslint/eslint-plugin-template": "17.3.0",
"@angular-eslint/schematics": "17.5.1",
"@angular-eslint/template-parser": "17.3.0",
"@angular/cli": "~18.0.0",
"@angular/compiler-cli": "18.0.0",
"@angular/forms": "18.0.0",
"@angular/language-service": "18.0.0",
"@nx/eslint": "19.1.0",
"@nx/eslint-plugin": "19.1.0",
"@nx/jest": "19.1.0",
"@nx/node": "19.1.0",
"@nx/plugin": "19.1.0",
"@nx/workspace": "19.1.0",
"@schematics/angular": "18.0.1",
"@testing-library/jasmine-dom": "^1.2.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/user-event": "^14.4.3",
"@types/jasmine": "4.3.1",
"@types/jest": "29.5.1",
"@types/node": "18.16.9",
"@types/testing-library__jasmine-dom": "^1.3.0",
"@typescript-eslint/eslint-plugin": "6.9.1",
"@typescript-eslint/parser": "6.9.1",
"@typescript-eslint/eslint-plugin": "7.3.0",
"@typescript-eslint/parser": "7.3.0",
"autoprefixer": "^10.4.0",
"cpy-cli": "^3.1.1",
"eslint": "8.48.0",
"eslint": "8.57.0",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-import": "~2.25.4",
"eslint-plugin-jasmine": "~4.1.3",
Expand All @@ -85,16 +85,16 @@
"jasmine-spec-reporter": "7.0.0",
"jest": "29.7.0",
"jest-environment-jsdom": "29.5.0",
"jest-preset-angular": "14.0.3",
"jest-preset-angular": "14.1.0",
"karma": "6.4.0",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage": "^2.2.1",
"karma-jasmine": "5.1.0",
"karma-jasmine-html-reporter": "2.0.0",
"lint-staged": "^12.1.6",
"ng-mocks": "^14.11.0",
"ng-packagr": "17.3.0",
"nx": "17.2.8",
"ng-packagr": "18.0.0",
"nx": "19.1.0",
"postcss": "^8.4.5",
"postcss-import": "14.1.0",
"postcss-preset-env": "7.5.0",
Expand All @@ -104,6 +104,6 @@
"semantic-release": "^18.0.0",
"ts-jest": "29.1.0",
"ts-node": "10.9.1",
"typescript": "5.2.2"
"typescript": "5.4.5"
}
}
7 changes: 3 additions & 4 deletions projects/testing-library/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"projectType": "library",
"sourceRoot": "projects/testing-library/src",
"prefix": "lib",
"tags": [],
"targets": {
"build-package": {
"executor": "@nx/angular:package",
Expand All @@ -22,8 +23,7 @@
"defaultConfiguration": "production"
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"]
"executor": "@nx/eslint:lint"
},
"build": {
"executor": "nx:run-commands",
Expand All @@ -50,6 +50,5 @@
},
"outputs": ["{workspaceRoot}/coverage/projects/testing-library"]
}
},
"tags": []
}
}