Skip to content

chore(js-client): upgrade to TypeScript 6#93

Draft
claude[bot] wants to merge 1 commit into
mainfrom
chore/js-client-typescript-6
Draft

chore(js-client): upgrade to TypeScript 6#93
claude[bot] wants to merge 1 commit into
mainfrom
chore/js-client-typescript-6

Conversation

@claude

@claude claude Bot commented Jul 14, 2026

Copy link
Copy Markdown

Requested by Łukasz Komoszyński · Slack thread

Upgrades the js-client/ package to TypeScript 6.0.3, done as a real tsconfig migration rather than by silencing the TS 6 deprecation errors.

Stacked on #92 (chore/js-client-npm-dependencies-bump). This PR's base is that branch, so its diff shows only the TypeScript-6-specific changes. Review/merge #92 first; GitHub will retarget this PR to main once #92 lands.

Why this is a separate PR

#92 briefly carried the typescript 5.9.3 → 6.0.3 bump using "ignoreDeprecations": "6.0" in tsconfig.base.json. That only mutes the errors and defers the real work. #92 has been reverted back to TypeScript 5.9.3 (dropping ignoreDeprecations), and the upgrade lives here instead, migrated properly.

What changed

  • typescript ^5.9.3^6.0.3. typescript-eslint@8.64.0 already supports it (peer typescript <6.1.0).
  • Dropped baseUrl. TS 6 turns the deprecated baseUrl into a hard build error (TS5101). It was only present to anchor the @leancodepl/pipe path mapping; TypeScript has resolved paths relative to the config file without baseUrl since 4.1, so the mapping is now a relative specifier:
    // tsconfig.base.json
    "paths": { "@leancodepl/pipe": ["./packages/pipe/src/index.ts"] }
    No source imports relied on baseUrl-relative bare specifiers, so nothing else needed rewriting.
  • moduleResolution "node""bundler". TS 6 also hard-errors on the deprecated "node" (aka node10) resolver. The pipe library is bundled through @nx/rollup + swc, so "bundler" is the correct fit — and it matches js_corelibrary's org-preferred tsconfig.base.json. module stays ESNext (compatible with bundler).
  • No ignoreDeprecations. The escape hatch is intentionally absent; tsc reports zero TS5101 deprecation errors under the migrated config.

Test status

Verified on Node 24.18 (.nvmrc): nx lint pipe and nx build pipe are green, and tsc -p packages/pipe/tsconfig.lib.json --noEmit reports no errors. Tests pass except the single live-backend integration test (packages/pipe/__tests__/pipe.spec.ts), which fails only because the sandbox blocks api.exampleapp.test.lncd.pl by egress policy (403) — the same environmental caveat as #92, not a code failure. It is expected to pass in CI.


Generated by Claude Code

Bump typescript ^5.9.3 -> ^6.0.3 with a proper tsconfig migration so the
workspace compiles cleanly under TS 6 without ignoreDeprecations:

- Remove the deprecated `baseUrl` and rebase the `@leancodepl/pipe` path
  map to a relative specifier (TS resolves `paths` without `baseUrl`
  since 4.1).
- Migrate `moduleResolution` from the deprecated `"node"` to `"bundler"`
  (the pipe lib is bundled via rollup/swc), matching js_corelibrary's
  org-preferred setting. `module` stays `ESNext`.

Verified on Node 24.18: nx lint / build / test are green (the live
integration test only 403s on the sandbox egress block) and tsc reports
no TS5101 deprecation errors, with no ignoreDeprecations escape hatch.

Stacked on chore/js-client-npm-dependencies-bump (#92).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ET2dL5CiUkuFR1ZGiUrUH
Base automatically changed from chore/js-client-npm-dependencies-bump to main July 14, 2026 14:11
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