Skip to content

fix: resolve package exports in Node 24 presets (PLATENG-1517) - #51

Merged
ryanmcafee merged 2 commits into
mainfrom
fix/PLATENG-1517-node24-module-resolution
Nov 19, 2026
Merged

ryanmcafee merged 2 commits into
mainfrom
fix/PLATENG-1517-node24-module-resolution

Conversation

@ryanmcafee

@ryanmcafee ryanmcafee commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

The base preset's moduleResolution: "node" (node10) ignores package exports, so packages that publish types or subpaths only through exports (e.g. @jupiterone/notification-client v4) fail to type-check. The typescript-node24 presets now use Node16 module/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.

ryanmcafee and others added 2 commits November 19, 2026 10:20
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>
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedyargs@​18.0.0 ⏵ 17.7.39810010087100

View full report

@ryanmcafee
ryanmcafee enabled auto-merge November 19, 2026 16:22
@ryanmcafee
ryanmcafee merged commit fe9fedf into main Nov 19, 2026
8 checks passed
@ryanmcafee
ryanmcafee deleted the fix/PLATENG-1517-node24-module-resolution branch November 19, 2026 16:25
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.

2 participants