Skip to content

chore: Update dependencies to latest - #45

Merged
Ho-s merged 7 commits into
mainfrom
chore/dependency-updates
Aug 19, 2026
Merged

chore: Update dependencies to latest#45
Ho-s merged 7 commits into
mainfrom
chore/dependency-updates

Conversation

@Ho-s

@Ho-s Ho-s commented Aug 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • Update all outdated dependencies to the latest possible version
  • Remove deprecated and unused packages
  • Upgrade TypeORM to 1.1.0 and ESLint to 10

Changes

  • Bump 38 packages within their current major
  • Bump uuid 14, class-validator 0.15, globals 17, @types/supertest 7, @swc/cli 0.8
  • Upgrade ESLint to 10 and rewrite eslint.config.mjs on the flat presets, dropping FlatCompat, @eslint/eslintrc and @eslint/js
  • Remove apollo-server-core, apollo-server-express and @types/uuid, all deprecated and unused
  • Declare dotenv, which ormconfig.ts imported without it being in package.json, and pass quiet: true to silence the dotenv 17 banner
  • Upgrade TypeORM to 1.1.0 and raise target to es2023
  • Register a quote_ident stub for pg-mem, which TypeORM 1.1 needs for loadTables()
  • Rename --testPathPattern to --testPathPatterns in the test scripts, which jest 30.4 requires
  • Refresh yarn.lock

Not upgraded

  • typescript 7 — ts-jest peers <7, @typescript-eslint peers <6.1.0
  • graphql 17 — every @apollo/server 5.x peers on ^16.11.0
  • graphql-upload 18 — requires graphql ^17
  • @types/node 26 — kept on the Node 24 runtime

Ho-s added 7 commits August 19, 2026 14:01
Update 38 packages to the latest version within their current major
line. No major upgrades are included here.

Four packages are deliberately held at their current major because a
peer dependency blocks the upgrade:

- typescript 5.9.3: ts-jest@29 requires <7 and @typescript-eslint@8
  (including canary) requires <6.1.0. No TS 7 compatible release exists.
- graphql 16: every @apollo/server 5.x release peers on ^16.11.0 and
  no v6 has shipped. Bumped to 16.14.2 instead.
- graphql-upload 17: v18 requires graphql ^17, blocked by the above.
  Bumped to 17.1.0 instead.
- @types/node 24: kept aligned with the Node 24 runtime.

Two follow-on fixes were required:

- jest 30.4 turns the --testPathPattern to --testPathPatterns rename
  into a hard error, so the test:unit and test:integration scripts
  would no longer run. Renamed the flag in both.
- prettier 3.9 changes how union types are laid out, reformatting
  src/common/graphql/utils/types.ts. Formatting only, no behavior
  change.
Upgrade five packages across a major boundary. Each was checked against
its actual usage in this repo and needs no code change.

- uuid 13 -> 14: drops Node 18, requires a global crypto and TS 5.4.3+.
  All three are already satisfied. Only v4 is imported.
- class-validator 0.14 -> 0.15: the sole breaking change makes the
  IsIBAN options argument mandatory, and IsIBAN is not used here.
- globals 16 -> 17: consumed only by the ESLint config.
- @types/supertest 6 -> 7: realigns the types with supertest 7, which
  ships no types of its own.
- @swc/cli 0.7 -> 0.8: never invoked by any script; builds go through
  the Nest swc builder, which uses @swc/core.

Build, lint, unit and integration tests all pass unchanged.
Bump eslint 9.39.1 to 10.8.1. @typescript-eslint 8.67 already peers on
eslint ^10, and eslint-plugin-prettier and eslint-config-prettier both
accept it, so no plugin changes were needed.

Rewrite eslint.config.mjs to use the flat presets directly instead of
wrapping the old eslintrc-style configs in FlatCompat:

- plugin:@typescript-eslint/recommended becomes the plugin's own
  configs['flat/recommended']
- plugin:prettier/recommended becomes eslint-plugin-prettier/recommended,
  which already merges eslint-config-prettier
- ecmaVersion 5, which was wrong for this codebase, becomes latest

Verified equivalent by diffing `eslint --print-config` before and after:
all 410 resolved rules are byte-identical, with the same 24 active.

This drops the last uses of @eslint/eslintrc and @eslint/js, so both are
removed. @eslint/js was only ever passed to the FlatCompat constructor
and never contributed a rule to the resolved config.
Remove three dependencies that are not used:

- apollo-server-core and apollo-server-express, both Apollo Server v3,
  which is end of life. Nothing imports them; the GraphQL layer runs on
  @apollo/server v5 with @as-integrations/express5. Also correct the
  stale package list in README.md that still named apollo-server-express.
- @types/uuid, a stub that is now wrong anyway. It only publishes up to
  v11 while uuid is at 14, and uuid has shipped its own types since v13.

Declare dotenv explicitly. src/common/config/ormconfig.ts imports it but
package.json never listed it, so it resolved to whatever another package
happened to hoist, which was 16.6.1 from an unrelated ^16.4.5 range
rather than the 17.4.1 that @nestjs/config depends on.

Pinning it to ^17.4.1 promotes dotenv 17 to the top level, and dotenv 17
logs a banner to stdout on every config() call, so pass quiet: true to
keep the CLI and app startup output clean.
Bump typeorm 0.3.27 to 1.1.0. @nestjs/typeorm was already moved to
11.0.3 earlier on this branch, which peers on typeorm ^1.0.0-dev.

Raise the TypeScript target from es2017 to es2023, the minimum TypeORM
1.0 requires. tsconfig.json is the only place a target is pinned, so
this also drives the swc builder and ts-jest.

Register a quote_ident stub for pg-mem in the integration test setup and
in the generator template that mirrors it. TypeORM 1.x builds the table
comment lookup in loadTables() as

  obj_description((quote_ident(schema) || '.' || quote_ident(table))::regclass)

rather than passing a pre-quoted literal, and pg-mem implements no
quote_ident, so synchronize() failed for every test in the suite.

No application code needed changing. The removed 0.3 APIs are unused
here, the entity has no relations so the LEFT to INNER JOIN change does
not apply, and the find options already use the object form. Build,
lint, unit and integration tests pass.

Two nullish-where issues found while verifying this upgrade are left for
a follow-up branch: a pre-existing crash in processWhere, which is not
caused by the upgrade, and undefined id claims reaching the repository
from the JWT strategies.
Re-resolve the transitive tree within the existing semver ranges.
package.json is unchanged.

- @ungap/structured-clone 1.3.0 -> 1.3.3, clearing the CWE-502 advisory
  on 1.3.0. jest-worker already allowed ^1.3.0; the lockfile was simply
  pinned to the old version.
- Deduplicates the tree from 1146 to 1090 resolved packages.

Deprecated transitive packages drop from 7 to 6. The rest come from
jest, @nestjs/cli, @nestjs/graphql and @nestjs/apollo, all of which are
already at their latest versions, so they need an upstream fix.

@types/node stays hoisted at 24.13.3 as intended; the 26.2.0 copies are
nested under jest internals and graphql-upload and do not affect this
project's compilation.
@Ho-s
Ho-s merged commit 79acda5 into main Aug 19, 2026
1 check passed
@Ho-s
Ho-s deleted the chore/dependency-updates branch August 19, 2026 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant