Skip to content

fix(NodeNext): add package entrypoints - #143

Open
ceddybi wants to merge 1 commit into
masterfrom
codex-nodenext-entrypoints
Open

fix(NodeNext): add package entrypoints#143
ceddybi wants to merge 1 commit into
masterfrom
codex-nodenext-entrypoints

Conversation

@ceddybi

@ceddybi ceddybi commented Jun 29, 2026

Copy link
Copy Markdown
Member

Summary

  • Add package exports for the root module, domain subpaths, existing dist deep imports, and register helpers.
  • Add typesVersions mappings so subpath type resolution still works for consumers that do not read export-condition types.
  • Update the NodeNext consumer fixture to import through published package entrypoints instead of relative dist paths.

Tests run

  • yarn test:types:nodenext
  • yarn lint
  • git diff --check
  • ESM/CJS package entrypoint smoke checks
  • npm pack --dry-run

Risks / follow-ups

  • This keeps the package on the current CommonJS build output; it does not introduce a dual ESM build.
  • Strict NodeNext default-import ergonomics remain a separate CommonJS interop concern; this PR focuses on named exports and subpath entrypoints.

@ceddybi ceddybi changed the title [codex] add NodeNext package entrypoints fix(NodeNext): add package entrypoints Jun 30, 2026
@ceddybi
ceddybi marked this pull request as ready for review June 30, 2026 16:05

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

馃挕 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1794af08e9

鈩癸笍 About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 馃憤.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread package.json
Comment on lines +159 to +163
"./dist/*": {
"types": "./dist/*.d.ts",
"import": "./dist/*.js",
"require": "./dist/*.js",
"default": "./dist/*.js"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve dist directory deep imports

When consumers still import a directory-style dist subpath such as require('@stoqey/ibkr/dist/account'), this wildcard substitutes account into ./dist/*.js, so Node now resolves /dist/account.js and throws MODULE_NOT_FOUND instead of falling through to /dist/account/index.js; adding an exports map disables the previous package subpath directory resolution. Since the change explicitly aims to keep existing dist deep imports working, add explicit ./dist/account, ./dist/connection, etc. index entries (and ./dist if needed) rather than relying only on the file wildcard.

Useful? React with 馃憤聽/ 馃憥.

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.

1 participant