fix(app): align backend nest runtime#214
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 55a7180730
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7984ecace1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 30eccbd240
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9cfbf46cd5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
ec4a3cb to
791156b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 856c8fc60d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (Array.isArray(error.response?.message)) { | ||
| return error.response.message as Array<ValidationErrorShape> |
There was a problem hiding this comment.
Preserve raw validation errors before mapping
For controllers using new ValidationPipe({ transform: true }), Nest 10's default validation errorFormat is list, so BadRequestException.response.message is a string[]. This new local interceptor treats that array as ValidationErrorShape[], so errors.reduce(mapErrors, {}) maps strings and returns an undefined field instead of the failing property names. Fresh evidence after the earlier thread: the new local interceptor still reads error.response.message here without any exceptionFactory/errorFormat change in the controllers; preserve/group the raw ValidationError[] or handle string messages before reducing.
Useful? React with 👍 / 👎.
| "@nestjs/platform-express": "10.4.22", | ||
| "@nestjs/terminus": "8.0.6", | ||
| "@protos/catalog": "0.1.1", | ||
| "class-transformer": "0.3.1", |
There was a problem hiding this comment.
Use a Nest 10-compatible class-transformer
These service controllers now run on Nest 10 and use new ValidationPipe({ transform: true }); Nest 10's validation pipe calls classTransformer.plainToInstance, which is not available in the pinned class-transformer@0.3.1. With this manifest, the first validated gRPC request throws plainToInstance is not a function before reaching the handler, so bump the transformer dependency in the validation-enabled services to a version that provides that API.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 791156b6d8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "@nestjs/core": "8.4.2", | ||
| "@nestjs/microservices": "8.4.2", | ||
| "@nestjs/terminus": "8.0.6", | ||
| "@nestjs/common": "11.1.27", |
There was a problem hiding this comment.
Bump RxJS with the Nest 11 services
With these Nest packages at 11.1.27, this service still provides rxjs@6.5.3 (line 23, with the same pattern in the other backend service manifests). The new lockfile peers @nestjs/common/core/microservices@11 on rxjs: ^7.1.0, and .pnp.cjs virtualizes this service's Nest packages against rxjs@6.5.3; Nest uses RxJS 7 APIs such as lastValueFrom, so these services can fail at startup or request handling with lastValueFrom is not a function. Bump the service rxjs dependency to 7.x along with the Nest major.
Useful? React with 👍 / 👎.
| "@nestjs/common": "11.1.27", | ||
| "@nestjs/core": "11.1.27", | ||
| "@nestjs/microservices": "11.1.27", | ||
| "@nestjs/terminus": "11.1.1", |
There was a problem hiding this comment.
Rework catalog health routes for Terminus 11
Upgrading Terminus here makes the existing catalog/service/src/health/terminus-options.service.ts configuration incompatible: @nestjs/terminus@11's TerminusModuleOptions no longer consumes an endpoints array, while this service still relies on TerminusModule.forRootAsync() returning /health/alive and /health/ready. If the build transpiles past the type mismatch, those readiness/liveness routes are silently not registered, so catalog deployments that probe those URLs will get 404s; migrate them to the current HealthCheckService/controller pattern with this bump.
Useful? React with 👍 / 👎.
| "@nestjs/graphql": "12.2.2", | ||
| "@nestjs/microservices": "10.4.22", | ||
| "@nestjs/platform-express": "10.4.22", | ||
| "@nestjs/apollo": "13.2.1", |
There was a problem hiding this comment.
Add the Apollo Express 5 runtime
This bump moves the gateways to @nestjs/apollo 13 while public-gateway/app/src/module.ts and the private gateway still boot GraphQLModule.forRoot(... ApolloDriver ...); however the manifests leave @as-integrations/express5 absent and keep @apollo/server at 4.13.0. In the generated PnP graph, @nestjs/apollo resolves @as-integrations/express5 to null, so with @nestjs/platform-express 11/Express 5 the Apollo driver aborts gateway startup when it tries to load the Express 5 integration; add that package and align Apollo Server to the v5 line.
Useful? React with 👍 / 👎.
| "@node-ts/ddd-types": "0.2.0", | ||
| "pg": "8.5.1", | ||
| "typeorm": "0.3.3" | ||
| "typeorm": "1.0.0" |
There was a problem hiding this comment.
Migrate removed TypeORM connection APIs
Bumping this workspace to TypeORM 1.0.0 breaks persistence code that still imports the removed Connection/ConnectionOptions exports; fresh evidence in this revision includes catalog/persistence/src/repositories/CategoryEntityRepository.ts, plus the portfolio and mailer DB config files. TypeORM 1 replaces these with DataSource/DataSourceOptions, so these packages fail to compile or load before repository providers can be injected; migrate the repository constructors and config types before applying the 1.0 bump.
Useful? React with 👍 / 👎.
| "@nestjs/apollo": "13.2.1", | ||
| "@nestjs/common": "11.1.27", | ||
| "@nestjs/core": "11.1.27", | ||
| "@nestjs/graphql": "13.4.2", |
There was a problem hiding this comment.
Upgrade the dataloader GraphQL adapter
The public/private gateways still install @atls/nestjs-dataloader@0.0.14 and register its DataLoaderInterceptor globally, while public collaboration/portfolio resolvers also use its @Loader decorator. That package's lockfile peers are pinned to Nest common/core 10 and @nestjs/graphql 12, but this line moves the runtime to GraphQL 13/Nest 11, leaving those GraphQL field resolvers on an adapter virtualized with unsupported peer majors; update the dataloader adapter to a release that supports the new Nest/GraphQL stack.
Useful? React with 👍 / 👎.
Таска
Как проверять
До фикса
catalog/*,collaboration/*,files/*,hits/*,identity/*,mailer/*,portfolio/*,search/*Действие: проверить package manifests и PnP lock после перехода gateway/protos на Nest 10
Ожидаемый результат: До фикса: backend packages всё ещё пинят
@nestjs/common,@nestjs/core,@nestjs/microservices,@nestjs/testing,@nestjs/platform-express8.x и часть service entrypoints держитrxjs 6.5.3После фикса
catalog/*,collaboration/*,files/*,hits/*,identity/*,mailer/*,portfolio/*,search/*Действие: проверить package manifests,
yarn.lock,.pnp.cjsи собрать backend entrypoints штатными Yarn/Raijin scriptsОжидаемый результат: После фикса: базовый Nest runtime выровнен на
10.4.22, servicerxjsвыровнен на7.8.2,yarn install --immutableпроходит, backend entrypoint builds проходятПруфы
yarn install --immutable