Skip to content

Bump the JavaScript SDK to TypeScript 6: two tsconfig keys, and the TS5107 that hides 63 errors behind 1 #328

Closed

Description

@scttfrdmn

Follow-up to #314, which is closed: its steps 1-3 (the nonexistent identifiers, the strictness errors, and a tsc gate in CI) landed in #327, and step 5 (grouping typedoc, closing #308) is done. Step 4 — the toolchain bump itself — is not, and with #314 closed it was tracked nowhere.

The bump is now nearly free, because #327 fixed the 48 source errors that used to sit behind it. What remains is two tsconfig.json keys.

Measured, not predicted

Scratch copy of sdks/javascript at #327's source, [email protected], [email protected], jest/@types/jest@30:

tsconfig tsc --noEmit
as committed 1 error — TS5107 on moduleResolution: "node"
+ "ignoreDeprecations": "6.0" 63 errors
+ "types": ["node"] 0 errors

The first row is the interesting one, and the reason this is worth writing down: TS5107 is a config-level error, so tsc exits before typechecking any source. "1 error" reads like a nearly-clean bump; the real count behind it is 63. A partial fix here would look like a regression rather than progress.

The 63 are all @types/node failing to resolve — Cannot find name 'process', 'console', 'child_process'. TypeScript 6 no longer auto-includes it. Bumping @types/node (18 → 24) does not help; the package is typesVersions-only, with no exports. "types": ["node"] takes it to zero.

Note moduleResolution cannot move alone: setting it to Node16 or NodeNext without module is TS5110 ("Option 'module' must be set to 'Node16'"). Moving both works and also gives 0 errors, but triggers a ts-jest TS151002 warning on every suite ("hybrid module kind is only supported in isolatedModules: true"), so keeping module: commonjs with ignoreDeprecations is the quieter option. moduleResolution: "bundler" does not work — 63 errors, same cause.

The ceiling is still TypeScript 6

Re-verified against the registry today, not carried over from #314:

package latest peer on typescript
ts-jest 29.4.12 >=4.3 <7
typedoc 0.28.20 5.0.x … 5.9.x || 6.0.x

ts-jest has no release peering <8, so TypeScript 7 is unreachable at any grouping — which is why #308 was closed rather than retried.

Proposed change

sdks/javascript/package.json: typescript ^5.0.0 → ^6.0.0, typedoc ^0.24.0 → ^0.28.20, jest ^29.5.0 → ^30.0.0, @types/jest ^29.5.0 → ^30.0.0. Leave ts-jest at ^29.1.0 (its 29.4.12 already peers <7, so it admits 6).

sdks/javascript/tsconfig.json: add "ignoreDeprecations": "6.0" and "types": ["node"].

Regenerate package-lock.json in the same commit, since sdk-metrics installs with npm ci.

Verification

npm run build (emits dist/), npm test (65 tests, 4 suites), npm run lint. All three are gated in CI as of #327, so unlike every previous attempt at this bump, a break shows up on the PR. Confirmed on the scratch copy: 0 errors, 65 passing, dist/*.js emitted.

One caveat worth checking at implementation time rather than assuming: typedoc 0.24 → 0.28 is four minors and npm run docs is not gated in CI. Either run it once by hand as part of the bump, or add it as a fifth step.

Activity

  1. added
    type: technical-debt
    priority: medium
    area: build
    effort: small
    area: sdk
    on Aug 3, 2026
  2. scttfrdmn commented on Aug 4, 2026

    @scttfrdmn
    OwnerAuthor

    Adding a measured constraint that changes this issue's scope slightly: the manifest range needs correcting as part of this work, not just the version bumped.

    Dependabot's #331 (the typescript-toolchain group) proposes typescript: ^7.0.2, and that set does not install:

    npm error Found: [email protected]
    npm error Could not resolve dependency:
    npm error peer typescript@">=4.3 <7" from [email protected]
    

    Two independent peers cap it below 7:

    TypeScript 6 is the ceiling, and it resolves cleanly with the rest of the group — verified in a scratch directory: [email protected] deduped under both [email protected] and [email protected], with [email protected].

    So this issue's deliverable is three things, not two:

    1. "ignoreDeprecations": "6.0" and "types": ["node"] in sdks/javascript/tsconfig.json — already recorded here, and the reason the error count reads as 1-then-63 is that moduleResolution: "node" raises TS5107, a config-level error, so tsc exits before typechecking any source.
    2. The package bumps.
    3. "typescript": "^6" in package.json, not ^5.0.0 and not ^7. Without this, Dependabot will keep proposing ^7 and every such PR will be unmergeable for a reason that has nothing to do with this project's code.

    Note the eslint 10 flat-config migration (#335, closing #309) has landed the linter side of this toolchain independently, so #328 no longer has to coordinate with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: buildarea: sdkeffort: smallpriority: mediumtype: technical-debt

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions