Skip to content

fix: use moduleResolution "node16" across all tsconfigs for TypeScript 6.0 compatibility#145

Merged
corpo-iwillspeak merged 3 commits intomainfrom
dependabot/npm_and_yarn/dev-dependencies-e77dd3745e
Apr 7, 2026
Merged

fix: use moduleResolution "node16" across all tsconfigs for TypeScript 6.0 compatibility#145
corpo-iwillspeak merged 3 commits intomainfrom
dependabot/npm_and_yarn/dev-dependencies-e77dd3745e

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot bot commented on behalf of github Mar 26, 2026

Fixes the TypeScript 6.0 build failure caused by the deprecated moduleResolution: "node" (node10) setting, using the semantically correct "node16" resolution mode recommended for published Node.js packages.

Changes Made

  • tsconfig.release.json: Changed moduleResolution from "node" to "node16" (with matching module: "node16"). This is the correct choice for a published npm package consumed directly by Node.js, rather than "bundler" which is designed for bundler workflows.
  • tsconfig.json: Updated module from "preserve" and moduleResolution from "bundler" to "node16" for consistency across all packages.
  • Test files: Added explicit .js extensions to relative imports in 5 test files to satisfy the stricter ESM import requirements enforced by node16 moduleResolution (TS2834/TS2835).
  • Samples: samples/hash-server/tsconfig.json and samples/e2e-testcases/tsconfig.json already use "nodenext" (the forward-looking equivalent) and required no changes.

@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Mar 26, 2026
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/dev-dependencies-e77dd3745e branch from 7a37f7c to b0c17d6 Compare April 7, 2026 13:05
…ith 15 updates

Bumps the dev-dependencies group with 14 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) | `9.36.0` | `10.0.1` |
| [@types/brotli](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/brotli) | `1.3.4` | `1.3.5` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `25.2.3` | `25.5.0` |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `8.55.0` | `8.57.2` |
| [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8) | `4.0.18` | `4.1.2` |
| [@vitest/eslint-plugin](https://github.com/vitest-dev/eslint-plugin-vitest) | `1.6.7` | `1.6.13` |
| [eslint](https://github.com/eslint/eslint) | `9.39.2` | `10.1.0` |
| [globals](https://github.com/sindresorhus/globals) | `17.3.0` | `17.4.0` |
| [rimraf](https://github.com/isaacs/rimraf) | `6.1.2` | `6.1.3` |
| [ts-api-utils](https://github.com/JoshuaKGoldberg/ts-api-utils) | `2.4.0` | `2.5.0` |
| [ts-proto](https://github.com/stephenh/ts-proto) | `2.11.2` | `2.11.6` |
| [typedoc](https://github.com/TypeStrong/TypeDoc) | `0.28.16` | `0.28.18` |
| [typescript](https://github.com/microsoft/TypeScript) | `5.9.3` | `6.0.2` |
| [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) | `8.55.0` | `8.57.2` |



Updates `@eslint/js` from 9.36.0 to 10.0.1
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/commits/v10.0.1/packages/js)

Updates `@types/brotli` from 1.3.4 to 1.3.5
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/brotli)

Updates `@types/node` from 25.2.3 to 25.5.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `@typescript-eslint/parser` from 8.55.0 to 8.57.2
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.57.2/packages/parser)

Updates `@vitest/coverage-v8` from 4.0.18 to 4.1.2
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.2/packages/coverage-v8)

Updates `@vitest/eslint-plugin` from 1.6.7 to 1.6.13
- [Release notes](https://github.com/vitest-dev/eslint-plugin-vitest/releases)
- [Commits](vitest-dev/eslint-plugin-vitest@v1.6.7...v1.6.13)

Updates `eslint` from 9.39.2 to 10.1.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](eslint/eslint@v9.39.2...v10.1.0)

Updates `globals` from 17.3.0 to 17.4.0
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](sindresorhus/globals@v17.3.0...v17.4.0)

Updates `rimraf` from 6.1.2 to 6.1.3
- [Changelog](https://github.com/isaacs/rimraf/blob/main/CHANGELOG.md)
- [Commits](isaacs/rimraf@v6.1.2...v6.1.3)

Updates `ts-api-utils` from 2.4.0 to 2.5.0
- [Release notes](https://github.com/JoshuaKGoldberg/ts-api-utils/releases)
- [Changelog](https://github.com/JoshuaKGoldberg/ts-api-utils/blob/main/CHANGELOG.md)
- [Commits](JoshuaKGoldberg/ts-api-utils@v2.4.0...v2.5.0)

Updates `ts-proto` from 2.11.2 to 2.11.6
- [Release notes](https://github.com/stephenh/ts-proto/releases)
- [Changelog](https://github.com/stephenh/ts-proto/blob/main/CHANGELOG.md)
- [Commits](stephenh/ts-proto@v2.11.2...v2.11.6)

Updates `typedoc` from 0.28.16 to 0.28.18
- [Release notes](https://github.com/TypeStrong/TypeDoc/releases)
- [Changelog](https://github.com/TypeStrong/typedoc/blob/master/CHANGELOG.md)
- [Commits](TypeStrong/typedoc@v0.28.16...v0.28.18)

Updates `typescript` from 5.9.3 to 6.0.2
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Commits](microsoft/TypeScript@v5.9.3...v6.0.2)

Updates `typescript-eslint` from 8.55.0 to 8.57.2
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.57.2/packages/typescript-eslint)

Updates `vitest` from 4.0.18 to 4.1.2
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.2/packages/vitest)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-version: 10.0.1
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: dev-dependencies
- dependency-name: "@types/brotli"
  dependency-version: 1.3.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-dependencies
- dependency-name: "@types/node"
  dependency-version: 25.5.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-dependencies
- dependency-name: "@typescript-eslint/parser"
  dependency-version: 8.57.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-dependencies
- dependency-name: "@vitest/coverage-v8"
  dependency-version: 4.1.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-dependencies
- dependency-name: "@vitest/eslint-plugin"
  dependency-version: 1.6.13
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-dependencies
- dependency-name: eslint
  dependency-version: 10.1.0
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: dev-dependencies
- dependency-name: globals
  dependency-version: 17.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-dependencies
- dependency-name: rimraf
  dependency-version: 6.1.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-dependencies
- dependency-name: ts-api-utils
  dependency-version: 2.5.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-dependencies
- dependency-name: ts-proto
  dependency-version: 2.11.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-dependencies
- dependency-name: typedoc
  dependency-version: 0.28.18
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev-dependencies
- dependency-name: typescript
  dependency-version: 6.0.2
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: dev-dependencies
- dependency-name: typescript-eslint
  dependency-version: 8.57.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-dependencies
- dependency-name: vitest
  dependency-version: 4.1.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/dev-dependencies-e77dd3745e branch from b0c17d6 to f338af2 Compare April 7, 2026 13:08
@anna-singleton-resolver
Copy link
Copy Markdown
Contributor

@copilot have a go at fixing the build

… TypeScript 6.0 compatibility

Agent-Logs-Url: https://github.com/crispthinking/athena-nodejs-client/sessions/3403a7a5-c38c-4621-a5f3-db20ee3fd51a

Co-authored-by: anna-singleton-resolver <199753965+anna-singleton-resolver@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 7, 2026

@copilot have a go at fixing the build

Fixed in cb54a50. The build was failing because TypeScript 6.0 (part of this dependency bump) deprecated moduleResolution=node10. Updated tsconfig.release.json to use moduleResolution: "bundler" instead, which is the non-deprecated equivalent and matches what the base tsconfig.json already uses.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • node-precompiled-binaries.grpc.io
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/athena-nodejs-client/athena-nodejs-client/node_modules/.bin/node-pre-gyp install (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@corpo-iwillspeak
Copy link
Copy Markdown
Contributor

@claude[agent] review the module resolution change in this PR.

What alternatives are there. What is your recommendation here.

@Claude
Copy link
Copy Markdown

Claude AI commented Apr 7, 2026

@claude[agent] review the module resolution change in this PR.

What alternatives are there. What is your recommendation here.

Module Resolution Analysis

Change Made: moduleResolution: "node"moduleResolution: "bundler" in tsconfig.release.json (commit cb54a50)

Context

  • Package type: ESM ("type": "module" in package.json)
  • Target: ES2022 with module: "es2022"
  • Import style: Explicit .js extensions (e.g., from './generated/athena/models.js')
  • Trigger: TypeScript 6.0 deprecated moduleResolution: "node" (TS5107 error)

Alternatives

  1. moduleResolution: "bundler" (current choice)

    • ✅ Allows .js extensions in imports for .ts files
    • ✅ ESM-first resolution (matches module: "preserve" or "es2022")
    • ✅ Non-deprecated in TS 6.0
    • ⚠️ Designed for bundler workflows (assumes bundler handles resolution)
  2. moduleResolution: "node16" or "nodenext"

    • ✅ Official Node.js ESM resolution
    • ✅ Enforces correct ESM semantics
    • ✅ Future-proof for Node.js evolution
    • ❌ Stricter about package.json exports/imports
    • ❌ May require exports field in package.json
  3. moduleResolution: "node10" (deprecated)

    • ❌ Deprecated in TS 6.0 (current issue)

Recommendation

For this library: Switch to moduleResolution: "node16" or "nodenext"

Rationale:

  1. This is a published npm package (@crispthinking/athena-classifier-sdk), not a bundled application
  2. Consumers install and use it directly in Node.js environments
  3. "bundler" makes assumptions about build tooling that may not match actual usage
  4. "node16"/"nodenext" provides correct Node.js ESM semantics (Node 22.11+ required per engines)
  5. The code already uses proper .js extensions, so it should be compatible

Suggested change:

"moduleResolution": "node16"  // or "nodenext"

Both node16 and nodenext are currently equivalent; nodenext will track future Node.js evolution.

The current "bundler" setting works but is semantically incorrect for a library package consumed directly by Node.js. It may mask resolution issues that would surface in consumer projects.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • node-precompiled-binaries.grpc.io
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/athena-nodejs-client/athena-nodejs-client/node_modules/.bin/node-pre-gyp install x86-64.so.2 conf�� get --global git committer.name (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@Claude Claude AI changed the title chore(deps-dev): bump the dev-dependencies group across 1 directory with 15 updates Addressing PR comments Apr 7, 2026
@Claude Claude AI requested a review from corpo-iwillspeak April 7, 2026 14:55
@corpo-iwillspeak
Copy link
Copy Markdown
Contributor

@copilot follow the suggestion from Claude in #145 (comment)

…port extensions

Agent-Logs-Url: https://github.com/crispthinking/athena-nodejs-client/sessions/ebaf0ec9-2680-42e5-a1d6-74cb30a25511

Co-authored-by: corpo-iwillspeak <265613520+corpo-iwillspeak@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 7, 2026

@copilot follow the suggestion from Claude in #145 (comment)

Done in d32e7e0. Applied moduleResolution: "node16" (with matching module: "node16") across all packages:

  • tsconfig.release.json — changed from "bundler" (and module: "es2022") to "node16"
  • tsconfig.json (root) — changed from "bundler" (and module: "preserve") to "node16"
  • samples/hash-server/tsconfig.json and samples/e2e-testcases/tsconfig.json — already using "nodenext", no change needed

Also fixed 5 test files to add explicit .js extensions on relative imports, which node16 moduleResolution requires (TS2834/TS2835).

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • node-precompiled-binaries.grpc.io
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/athena-nodejs-client/athena-nodejs-client/node_modules/.bin/node-pre-gyp install (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title Addressing PR comments fix: use moduleResolution "node16" across all tsconfigs for TypeScript 6.0 compatibility Apr 7, 2026
@corpo-iwillspeak corpo-iwillspeak enabled auto-merge (squash) April 7, 2026 15:27
@corpo-iwillspeak corpo-iwillspeak merged commit fe79ae9 into main Apr 7, 2026
8 of 10 checks passed
@corpo-iwillspeak corpo-iwillspeak deleted the dependabot/npm_and_yarn/dev-dependencies-e77dd3745e branch April 7, 2026 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants