feat: add extensions in .d.ts files for nodenext compat#945
Merged
Conversation
matus-tomlein
added a commit
to snowplow/snowplow-javascript-tracker
that referenced
this pull request
Jun 17, 2026
#1478) * fix(react-native-tracker): emit .d.ts files with .js extensions for nodenext Upgrade react-native-builder-bob from 0.30.3 to 0.42.1 so the emitted TypeScript declaration files include explicit .js extensions on relative import/export specifiers (e.g. export * from './types.js'). Previously the ESM .js output carried extensions (added by bob's Babel pipeline) but the .d.ts files came straight from tsc and were extensionless, breaking type resolution for consumers using TypeScript's moduleResolution: 'nodenext' / 'node16'. bob 0.42.0 added this rewriting via callstack/react-native-builder-bob#945, including handling for React Native platform-specific declarations (.ios.d.ts / .android.d.ts) and .mts/.cts. The bob 0.42 typescript target no longer accepts an `esm` option (it is inferred from the commonjs/module targets), so it is removed from the build config. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * chore(react-native-tracker): add rush change file for .d.ts extensions fix Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * ci: bump Node from 18 to 22 react-native-builder-bob 0.42.1 and its transitive dependencies (e.g. yargs-parser@22) require Node >= 20, which broke CI on Node 18. Node 18 is also EOL. Bump CI workflows and .nvmrc to Node 22 (active LTS) and raise rush.json nodeSupportedVersionRange floor to 20.19.0 (bob's minimum). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
matus-tomlein
added a commit
to snowplow/snowplow-javascript-tracker
that referenced
this pull request
Jun 17, 2026
#1478) * fix(react-native-tracker): emit .d.ts files with .js extensions for nodenext Upgrade react-native-builder-bob from 0.30.3 to 0.42.1 so the emitted TypeScript declaration files include explicit .js extensions on relative import/export specifiers (e.g. export * from './types.js'). Previously the ESM .js output carried extensions (added by bob's Babel pipeline) but the .d.ts files came straight from tsc and were extensionless, breaking type resolution for consumers using TypeScript's moduleResolution: 'nodenext' / 'node16'. bob 0.42.0 added this rewriting via callstack/react-native-builder-bob#945, including handling for React Native platform-specific declarations (.ios.d.ts / .android.d.ts) and .mts/.cts. The bob 0.42 typescript target no longer accepts an `esm` option (it is inferred from the commonjs/module targets), so it is removed from the build config. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * chore(react-native-tracker): add rush change file for .d.ts extensions fix Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * ci: bump Node from 18 to 22 react-native-builder-bob 0.42.1 and its transitive dependencies (e.g. yargs-parser@22) require Node >= 20, which broke CI on Node 18. Node 18 is also EOL. Bump CI workflows and .nvmrc to Node 22 (active LTS) and raise rush.json nodeSupportedVersionRange floor to 20.19.0 (bob's minimum). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
matus-tomlein
added a commit
to snowplow/snowplow-javascript-tracker
that referenced
this pull request
Jun 17, 2026
#1478) * fix(react-native-tracker): emit .d.ts files with .js extensions for nodenext Upgrade react-native-builder-bob from 0.30.3 to 0.42.1 so the emitted TypeScript declaration files include explicit .js extensions on relative import/export specifiers (e.g. export * from './types.js'). Previously the ESM .js output carried extensions (added by bob's Babel pipeline) but the .d.ts files came straight from tsc and were extensionless, breaking type resolution for consumers using TypeScript's moduleResolution: 'nodenext' / 'node16'. bob 0.42.0 added this rewriting via callstack/react-native-builder-bob#945, including handling for React Native platform-specific declarations (.ios.d.ts / .android.d.ts) and .mts/.cts. The bob 0.42 typescript target no longer accepts an `esm` option (it is inferred from the commonjs/module targets), so it is removed from the build config. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * chore(react-native-tracker): add rush change file for .d.ts extensions fix Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * ci: bump Node from 18 to 22 react-native-builder-bob 0.42.1 and its transitive dependencies (e.g. yargs-parser@22) require Node >= 20, which broke CI on Node 18. Node 18 is also EOL. Bump CI workflows and .nvmrc to Node 22 (active LTS) and raise rush.json nodeSupportedVersionRange floor to 20.19.0 (bob's minimum). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.