Skip to content
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

chore: migrate to nx 18 #745

Merged
merged 13 commits into from
Mar 29, 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
4 changes: 4 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Nx 18 enables using plugins to infer targets by default
# This is disabled for existing workspaces to maintain compatibility
# For more info, see: https://nx.dev/concepts/inferred-tasks
NX_ADD_PLUGINS=false
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
RELEASE_VERSION: ${{ github.sha }}
- name: Build
run: |
npx nx run-many -t build --all --parallel=3
npx nx run-many -t build --prod --all --parallel=3
docker build -t kordis-api:${{ github.sha }} -f ./apps/api/Dockerfile --build-arg NODE_VERSION=$(cat .nvmrc | tr -cd '[:digit:].') . &
docker build -t kordis-spa:${{ github.sha }} -f ./apps/spa/docker/Dockerfile . &
wait
Expand Down
3 changes: 2 additions & 1 deletion apps/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ ENV NODE_ENV=production
# Install dependencies separately for caching
COPY ./dist/apps/api/package.json ./dist/apps/api/package-lock.json ./

RUN npm --omit=dev ci
# Change to npm ci when https://github.com/nrwl/nx/issues/22386 is fixed
RUN npm install --omit=dev

COPY ./dist/apps/api ./

Expand Down
9 changes: 2 additions & 7 deletions apps/api/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@
"tsConfig": "apps/api/tsconfig.app.json",
"assets": ["apps/api/src/assets"],
"webpackConfig": "apps/api/webpack.config.js",
"generatePackageJson": true,
"isolatedConfig": true,
"babelUpwardRootMode": true
"isolatedConfig": true
},
"configurations": {
"production": {
"optimization": true,
"extractLicenses": true,
"generatePackageJson": true,
"inspect": false
}
}
Expand Down Expand Up @@ -67,10 +66,6 @@
"options": {
"jestConfig": "apps/api/jest.config.ts"
}
},
"docker-build": {
"dependsOn": ["build"],
"command": "docker build --build-arg NODE_VERSION=$(cat .nvmrc | tr -cd [:digit:].) -f apps/api/Dockerfile . -t api"
}
},
"tags": []
Expand Down
20 changes: 15 additions & 5 deletions migrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,21 @@
"migrations": [
{
"cli": "nx",
"version": "17.2.1-beta.0",
"description": "Add webpack.config.js file when webpackConfig is not defined",
"implementation": "./src/migrations/update-17-2-1/webpack-config-setup",
"package": "@nx/webpack",
"name": "update-17-2-1-webpack-config-setup"
"version": "18.2.0-beta.0",
"requires": {
"@angular/core": ">=17.3.0"
},
"description": "Update the @angular/cli package version to ~17.3.0.",
"factory": "./src/migrations/update-18-2-0/update-angular-cli",
"package": "@nx/angular",
"name": "update-angular-cli-version-17-3-0"
},
{
"version": "17.3.0",
"description": "Updates two-way bindings that have an invalid expression to use the longform expression instead.",
"factory": "./migrations/invalid-two-way-bindings/bundle",
"package": "@angular/core",
"name": "invalid-two-way-bindings"
}
]
}
16 changes: 0 additions & 16 deletions nest-cli.json

This file was deleted.

4 changes: 4 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
"codeCoverage": true
}
}
},
"@nx/eslint:lint": {
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"],
"cache": true
}
},
"namedInputs": {
Expand Down
Loading