Repository navigation
fix: resolve package exports in Node 24 presets (PLATENG-1517) - #51
Merged
Merged
Conversation
The base preset sets moduleResolution "node" (node10), which ignores package.json "exports". Packages that publish types or subpaths only through exports, such as @jupiterone/notification-client v4, fail to type-check under it. Node16 module and resolution follow Node's own rules and still emit CommonJS for packages without "type": "module". Only the node24 presets change, so node14-node20 consumers keep their current resolution. Co-Authored-By: Ryan McAfee - AI <ryan.mcafee+ai@jupiterone.com>
f53b6aa moved yargs to 18, which is ESM-only and drops the singleton API the bins call (yargs.option). Every bin crashed at startup with "yargs_1.default.option is not a function", and on Node 18 (still in engines) the CommonJS bundle cannot require yargs at all. The code and @types/yargs target yargs 17. Co-Authored-By: Ryan McAfee - AI <ryan.mcafee+ai@jupiterone.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
ryanmcafee
enabled auto-merge
November 19, 2026 16:22
gastonyelmini
approved these changes
Nov 19, 2026
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.
The base preset's
moduleResolution: "node"(node10) ignores packageexports, so packages that publish types or subpaths only through exports (e.g.@jupiterone/notification-clientv4) fail to type-check. Thetypescript-node24presets now useNode16module/resolution, matching Node's runtime rules while still emitting CommonJS. Older presets are untouched; no repo consumes the node24 preset yet.Also restores yargs 17: the 18 bump left every bin crashing at startup (
yargs_1.default.option is not a function).Releases 20.2.0. Part of PLATENG-1517.