From 7c94f74e2eb52ea8557a4379af50b5cea6bbfc89 Mon Sep 17 00:00:00 2001 From: David Requeno Date: Wed, 8 Apr 2026 20:11:27 -0600 Subject: [PATCH] Task/upgrade to Nx 22.6 (#6700) * Upgrade Nx to 22.6.4 and Angular toolchain to 21.2.x * Apply Angular control-flow migration in holdings-table component * Replace package.json require in API prod environment to satisfy Nx module boundaries * Add Nx 22.6 workspace updates (.gitignore and analytics flag) --- .gitignore | 3 + apps/api/src/environments/environment.prod.ts | 2 +- .../holdings-table.component.ts | 2 - nx.json | 3 +- package.json | 70 +++++++++---------- 5 files changed, 41 insertions(+), 39 deletions(-) diff --git a/.gitignore b/.gitignore index e753d3bf7..cc4bd9d30 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,6 @@ testem.log # System Files .DS_Store Thumbs.db + +.claude/worktrees +.claude/settings.local.json \ No newline at end of file diff --git a/apps/api/src/environments/environment.prod.ts b/apps/api/src/environments/environment.prod.ts index 6d4cbb4bf..90397fa89 100644 --- a/apps/api/src/environments/environment.prod.ts +++ b/apps/api/src/environments/environment.prod.ts @@ -3,5 +3,5 @@ import { DEFAULT_HOST, DEFAULT_PORT } from '@ghostfolio/common/config'; export const environment = { production: true, rootUrl: `http://${DEFAULT_HOST}:${DEFAULT_PORT}`, - version: `${require('../../../../package.json').version}` + version: process.env.npm_package_version ?? 'dev' }; diff --git a/libs/ui/src/lib/holdings-table/holdings-table.component.ts b/libs/ui/src/lib/holdings-table/holdings-table.component.ts index cc1a248e8..5b5a2bcfe 100644 --- a/libs/ui/src/lib/holdings-table/holdings-table.component.ts +++ b/libs/ui/src/lib/holdings-table/holdings-table.component.ts @@ -4,7 +4,6 @@ import { PortfolioPosition } from '@ghostfolio/common/interfaces'; -import { CommonModule } from '@angular/common'; import { CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, @@ -30,7 +29,6 @@ import { GfValueComponent } from '../value/value.component'; @Component({ changeDetection: ChangeDetectionStrategy.OnPush, imports: [ - CommonModule, GfEntityLogoComponent, GfValueComponent, MatButtonModule, diff --git a/nx.json b/nx.json index 9b6540fdb..1f45f532a 100644 --- a/nx.json +++ b/nx.json @@ -125,5 +125,6 @@ ] }, "parallel": 1, - "defaultBase": "origin/main" + "defaultBase": "origin/main", + "analytics": false } diff --git a/package.json b/package.json index 686065630..64dd13886 100644 --- a/package.json +++ b/package.json @@ -55,17 +55,17 @@ "workspace-generator": "nx workspace-generator" }, "dependencies": { - "@angular/animations": "21.1.1", - "@angular/cdk": "21.1.1", - "@angular/common": "21.1.1", - "@angular/compiler": "21.1.1", - "@angular/core": "21.1.1", - "@angular/forms": "21.1.1", - "@angular/material": "21.1.1", - "@angular/platform-browser": "21.1.1", - "@angular/platform-browser-dynamic": "21.1.1", - "@angular/router": "21.1.1", - "@angular/service-worker": "21.1.1", + "@angular/animations": "21.2.7", + "@angular/cdk": "21.2.5", + "@angular/common": "21.2.7", + "@angular/compiler": "21.2.7", + "@angular/core": "21.2.7", + "@angular/forms": "21.2.7", + "@angular/material": "21.2.5", + "@angular/platform-browser": "21.2.7", + "@angular/platform-browser-dynamic": "21.2.7", + "@angular/router": "21.2.7", + "@angular/service-worker": "21.2.7", "@bull-board/api": "6.20.3", "@bull-board/express": "6.20.3", "@bull-board/nestjs": "6.20.3", @@ -139,35 +139,35 @@ "tablemark": "4.1.0", "twitter-api-v2": "1.29.0", "yahoo-finance2": "3.13.2", - "zone.js": "0.16.0" + "zone.js": "0.16.1" }, "devDependencies": { - "@angular-devkit/build-angular": "21.1.1", - "@angular-devkit/core": "21.1.1", - "@angular-devkit/schematics": "21.1.1", - "@angular-eslint/eslint-plugin": "21.1.0", - "@angular-eslint/eslint-plugin-template": "21.1.0", - "@angular-eslint/template-parser": "21.1.0", - "@angular/cli": "21.1.1", - "@angular/compiler-cli": "21.1.1", - "@angular/language-service": "21.1.1", - "@angular/localize": "21.1.1", - "@angular/pwa": "21.1.1", + "@angular-devkit/build-angular": "21.2.6", + "@angular-devkit/core": "21.2.6", + "@angular-devkit/schematics": "21.2.6", + "@angular-eslint/eslint-plugin": "21.2.0", + "@angular-eslint/eslint-plugin-template": "21.2.0", + "@angular-eslint/template-parser": "21.2.0", + "@angular/cli": "21.2.6", + "@angular/compiler-cli": "21.2.7", + "@angular/language-service": "21.2.7", + "@angular/localize": "21.2.7", + "@angular/pwa": "21.2.6", "@eslint/eslintrc": "3.3.1", "@eslint/js": "9.35.0", "@nestjs/schematics": "11.0.9", "@nestjs/testing": "11.1.14", - "@nx/angular": "22.5.3", - "@nx/eslint-plugin": "22.5.3", - "@nx/jest": "22.5.3", - "@nx/js": "22.5.3", - "@nx/module-federation": "22.5.3", - "@nx/nest": "22.5.3", - "@nx/node": "22.5.3", - "@nx/storybook": "22.5.3", - "@nx/web": "22.5.3", - "@nx/workspace": "22.5.3", - "@schematics/angular": "21.1.1", + "@nx/angular": "22.6.4", + "@nx/eslint-plugin": "22.6.4", + "@nx/jest": "22.6.4", + "@nx/js": "22.6.4", + "@nx/module-federation": "22.6.4", + "@nx/nest": "22.6.4", + "@nx/node": "22.6.4", + "@nx/storybook": "22.6.4", + "@nx/web": "22.6.4", + "@nx/workspace": "22.6.4", + "@schematics/angular": "21.2.6", "@storybook/addon-docs": "10.1.10", "@storybook/angular": "10.1.10", "@trivago/prettier-plugin-sort-imports": "6.0.2", @@ -192,7 +192,7 @@ "jest": "30.2.0", "jest-environment-jsdom": "30.2.0", "jest-preset-angular": "16.0.0", - "nx": "22.5.3", + "nx": "22.6.4", "prettier": "3.8.1", "prettier-plugin-organize-attributes": "1.0.0", "prisma": "6.19.3",