Skip to content

chore(js-client): bump npm dependencies#92

Open
claude[bot] wants to merge 15 commits into
mainfrom
chore/js-client-npm-dependencies-bump
Open

chore(js-client): bump npm dependencies#92
claude[bot] wants to merge 15 commits into
mainfrom
chore/js-client-npm-dependencies-bump

Conversation

@claude

@claude claude Bot commented Jul 4, 2026

Copy link
Copy Markdown

Requested by Łukasz Komoszyński · Slack thread

Dependency-maintenance pass on the js-client/ package (the Nx + Lerna workspace that publishes @leancodepl/pipe).

Before: eslint 8 legacy .eslintrc, Node 20, Nx 19 + jest 29, @leancodepl/* on 7.x, @microsoft/signalr 8.

After: shared flat-config ESLint 9 (matching js_corelibrary), Node 24, Nx 23 + jest 30, @leancodepl/* on 10.5.2, @microsoft/signalr 10. Lint and build are green on Node 24; the only failing test is an egress-blocked live integration test (details below).

Only the js-client/ package is touched.

What changed

Nx 19.5.2 → 23.0.1 + jest 29 → 30

  • Ran the Nx migration; nx, @nx/eslint, @nx/eslint-plugin, @nx/jest, @nx/js, @nx/rollup, @nx/workspace all 19.5.2 → 23.0.1.
  • Peer fixes Nx 23 requires: @swc/cli 0.3.14 → 0.8.1, and rollup added (^4.62.2) because @nx/rollup@23 declares rollup a peer instead of bundling it (build failed with Cannot find module 'rollup' until added).
  • Migration edits: both jest.config.ts files converted from ESM (import / export default) to CommonJS (require / module.exports), keeping the @leancodepl ESM transformIgnorePatterns; nx.json lint/production inputs repointed from .eslintrc.json to eslint.config.mjs; packages/pipe/project.json tags reordered.
  • The Nx 23 bump unblocked jest → 30.4.2 — the old @nx/jest@19 clearMocksOnScope is not a function error is gone since @nx/jest@23 is jest-30-compatible. Related: jest-environment-jsdom → 30.4.1, @types/jest → 30.0.0, jest-util 30.4.1 added, @swc/jest → 0.2.39.

ESLint 8 → 9 flat-config migration

Migrated to ESLint 9 flat config, matching leancodepl/js_corelibrary.

  • New eslint.config.mjs at the workspace root spreading @nx/eslint-plugin flat/base + flat/typescript + flat/javascript, plus @leancodepl/eslint-config's base + imports only (SignalR/rxjs library — no React/a11y). Thin packages/pipe/eslint.config.mjs re-exports it.
  • Legacy .eslintrc.base.json, packages/pipe/.eslintrc.json, and .eslintignore deleted.
  • eslint 8.57.0 → ^9.39.4; unified typescript-eslint 8.62.1 added, replacing the separate @typescript-eslint/parser + @typescript-eslint/eslint-plugin (7.17.0, removed); eslint-plugin-prettier (5.2.1) removed; eslint-config-prettier 9.1.0 → 10.1.8; prettier resolved via @leancodepl/prettier-config.
  • Config quirk worth noting: @nx/dependency-checks lives in a dedicated **/*.json block (jsonc parser) with @typescript-eslint/naming-convention disabled there — the shared @leancodepl base applies type-aware naming-convention globally, which crashes under the JSON parser on package.json.
  • Prettier reformatting from the new config touched packages/pipe/src/lib/pipe.ts (indentation and import order only, no logic change).

@leancodepl/* and runtime bumps

  • @leancodepl/eslint-config and @leancodepl/prettier-config 7.5.0 → 10.5.2; @leancodepl/resolve-eslint-flat-config 10.5.2 added.
  • Runtime @leancodepl/utils >=7.0.0 → >=10.0.0 (now ESM). Because jest runs CommonJS, a naive bump breaks tests with Cannot use import statement outside a module; fixed by transformIgnorePatterns: ["node_modules/(?!(@leancodepl)/)"] in packages/pipe/jest.config.ts so @swc/jest transforms @leancodepl/* ESM to CJS.
  • Other bumps: lerna 8.1.7 → 9.0.7; @microsoft/signalr 8.0.7 → 10.0.0 (ships a patched ws, so npm audit --omit=dev reports 0 vulnerabilities); rxjs 7.8.1 → 7.8.2; lodash 4.17.21 → 4.18.1; tslib ^2.3.0 → ^2.8.1; @types/node 18.19.9 → 24.13.2 (kept Node-24-aligned); @swc/core 1.5.7 → 1.15.43; typescript 5.5.4 → 5.9.3; verdaccio ^5.0.4 → 6.7.4; plus prettier, ts-jest, @types/lodash, @swc-node/register, @swc/helpers.

Node 20 → 24

  • .nvmrc 20 → 24.13, which also cleanly satisfies the @leancodepl linting packages' engines.node >=22.
  • Published @leancodepl/pipe engines.node raised >=18 → >=22.

Test status

Verified on Node 24: lint (nx lint pipe) and build (nx build pipe) are green. Tests pass except the single live-backend integration test (packages/pipe/__tests__/pipe.spec.ts), which hits https://api.exampleapp.test.lncd.pl and fails only because the sandbox blocks that host by egress policy (403). This is an environmental limitation, not a code failure — the spec compiles, imports, and executes cleanly (no clearMocksOnScope error), and only the network call fails. It is expected to pass in CI where the backend is reachable.

Held / needs a maintainer decision

  • typescript 6 — held on 5.9.3. TS 6 turns the baseUrl deprecation into a hard build error (TS5101), and tsconfig.base.json uses baseUrl: "." for the @leancodepl/pipe path mapping. Adopting it needs a tsconfig migration (drop baseUrl + rebase paths, or add ignoreDeprecations). Deferred to its own PR.
  • eslint 10 — kept on 9.39.x to match js_corelibrary.
  • @types/node 26 — kept on 24.x to stay aligned with the Node 24 runtime; opt in if the toolchain moves to Node 26.

claude added 13 commits July 4, 2026 08:33
Run nx migrate to latest 20.x (20.8.4). Bump nx and @nx/* packages.
Align required optional peers of the Nx 20 toolchain:
- eslint-config-prettier 9.1.0 -> 10.1.8 (required by @nx/eslint-plugin@20)
- verdaccio ^5.0.4 -> 6.7.4 (required by @nx/js@20)
Apply nx.json migration (useLegacyCache). Out-of-scope packageJsonUpdates
from nx migrate (typescript, jest, @swc/cli, @types/jest) were reverted.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ET2dL5CiUkuFR1ZGiUrUH
Bump minor/patch versions of dev dependencies (excluding Nx-managed
packages: nx, @nx/*, @swc/*, @swc-node/*, rollup). Includes:
- @leancodepl/eslint-config & prettier-config 7.5.0 -> 7.8.2
- @typescript-eslint/* 7.17.0 -> 7.18.0
- typescript 5.5.4 -> 5.9.3
- prettier ^3.3.3 -> ^3.9.4
- eslint 8.57.0 -> 8.57.1, eslint-plugin-prettier 5.2.1 -> 5.5.6
- jest/jest-environment-jsdom ^29.4.1 -> ^29.7.0, ts-jest ^29.1.0 -> ^29.4.11
- lerna 8.1.7 -> 8.2.4, @types/* aligned within existing majors

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ET2dL5CiUkuFR1ZGiUrUH
Migrate the js-client workspace from legacy .eslintrc to ESLint 9 flat
config, matching the setup used by leancodepl/js_corelibrary.

- Replace .eslintrc.base.json / packages/pipe/.eslintrc.json / .eslintignore
  with eslint.config.mjs (root + per-package), built on @leancodepl/eslint-config.
- eslint 8 -> ^9.39.4; drop @typescript-eslint/parser + @typescript-eslint/eslint-plugin
  in favour of the unified typescript-eslint 8.62.1; drop eslint-plugin-prettier.
- Bump @leancodepl/eslint-config + @leancodepl/prettier-config 7.8.2 -> 10.5.2 and add
  @leancodepl/resolve-eslint-flat-config 10.5.2.
- Repoint nx.json lint inputs at eslint.config.mjs; simplify .prettierrc.js.
- Bump Node 20 -> 24.13 (.nvmrc) to satisfy the @leancodepl linting packages'
  engines (node >=22); CI reads node-version-file: js-client/.nvmrc.
- Apply the resulting lint --fix and prettier reformat.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ET2dL5CiUkuFR1ZGiUrUH
…nsform

@leancodepl/utils 10.5.2 (and its @leancodepl/api-date dependency) now ship
as ESM. Bump the runtime dependency of @leancodepl/pipe from >=7.0.0 to
>=10.0.0 and make it work under the CommonJS jest run.

- Add transformIgnorePatterns to packages/pipe/jest.config.ts so @swc/jest
  transforms the @leancodepl/* ESM packages to CJS instead of ignoring them
  (tiny-invariant resolves to its CJS build via require and needs no transform).
- Raise the published package engines to node >=22 to match @leancodepl/utils 10.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ET2dL5CiUkuFR1ZGiUrUH
Runtime minor bump. lint + build green on Node 24; only the egress-blocked
live-backend integration test fails (403 Host not in allowlist), unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ET2dL5CiUkuFR1ZGiUrUH
Runtime patch bump. lint + build green on Node 24; only the egress-blocked
integration test fails (403), unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ET2dL5CiUkuFR1ZGiUrUH
Runtime in-range bump. lint + build green on Node 24; only the egress-blocked
integration test fails (403), unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ET2dL5CiUkuFR1ZGiUrUH
Aligns the Node type definitions with the Node 24 toolchain (.nvmrc 24.13).
lint + build green on Node 24; only the egress-blocked integration test
fails (403), unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ET2dL5CiUkuFR1ZGiUrUH
Runtime major (8 -> 10). lint + build + compile/import all green on Node 24;
only the egress-blocked integration test fails (403). signalr 10 ships a
patched `ws`, so `npm audit --omit=dev` now reports 0 runtime vulnerabilities.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ET2dL5CiUkuFR1ZGiUrUH
Ran `nx migrate latest` (nx + all @nx/* 20.8.4 -> 23.0.1) and applied all 37
migrations, then removed migrations.json. Kept eslint on 9.39.x to match
js_corelibrary.

Nx 23 ships @nx/jest 23 (jest 30-compatible), which resolves the previously
blocking `clearMocksOnScope is not a function` error under @nx/jest 20.
The migrate therefore also lands:
- jest 29.7 -> 30.3.0, jest-environment-jsdom 30.0.5, @types/jest 30.0.0
  (+ pinned jest-util 30.0.5)
- @swc/jest 0.2.36 -> 0.2.39, @swc/core 1.5.7 -> 1.15.8,
  @swc/helpers 0.5.12 -> 0.5.23, @swc-node/register 1.9.2 -> 1.11.1

Two peer-dependency fixes needed by Nx 23 (were transitively provided by Nx 20):
- @swc/cli 0.3.14 -> 0.8.1 (@nx/js@23 peer: >=0.6.0 <0.9.0)
- add rollup ^4.62.2 (@nx/rollup@23 no longer bundles rollup; declares it a peer)

Migration edits: nx.json drops `useLegacyCache`; jest.config.ts files converted
to CommonJS require/module.exports (the @leancodepl ESM transformIgnorePatterns
fix is preserved); project.json `tags` reordered. lint + build green on Node 24;
jest 30 compiles, imports and executes the spec (no clearMocksOnScope error) --
only the egress-blocked live-backend integration test fails (403).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ET2dL5CiUkuFR1ZGiUrUH
Release/versioning tooling. Verified `lerna list` succeeds (finds
@leancodepl/pipe) and installs clean against nx 23. lint + build green on
Node 24; only the egress-blocked integration test fails (403).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ET2dL5CiUkuFR1ZGiUrUH
…il 30.4.1)

Latest within the jest 30 line that nx 23 unblocked. lint + build green on
Node 24; jest still runs cleanly (no clearMocksOnScope) -- only the
egress-blocked integration test fails (403).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ET2dL5CiUkuFR1ZGiUrUH
Latest patch within the 1.15 line nx 23 pinned. lint + build + jest all green
on Node 24; only the egress-blocked integration test fails (403).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ET2dL5CiUkuFR1ZGiUrUH
Comment thread js-client/packages/pipe/jest.config.ts
Comment thread js-client/.gitignore Outdated
Comment thread js-client/.prettierignore Outdated
Comment thread js-client/eslint.config.mjs
claude added 2 commits July 6, 2026 11:21
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ET2dL5CiUkuFR1ZGiUrUH
- add trailing newline to js-client/.gitignore and .prettierignore
  (nx migration appended entries without one)
- expand the eslint.config.mjs `**/*.json` block comment to explain it
  is required for @nx/dependency-checks to run on package.json; without
  it ESLint matches no config for package.json and silently skips it

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ET2dL5CiUkuFR1ZGiUrUH
@Komoszek Komoszek marked this pull request as ready for review July 6, 2026 14:57
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.

2 participants