Conversation
This package original designed for dual export with cjs entry. Keep it this way.
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
There was a problem hiding this comment.
Pull Request Overview
Revert npm/runtime package to CommonJS default while keeping dual-export support.
- Switch package.json "type" from "module" to "commonjs"
- Aim to maintain dual export (CJS entry) behavior via exports map
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| "node": "^20.19.0 || >=22.12.0" | ||
| }, | ||
| "type": "module", | ||
| "type": "commonjs", |
There was a problem hiding this comment.
Changing the package type from module to commonjs alters how Node treats .js files and can break ESM consumers that relied on the package being ESM by default; this should be treated as a breaking change. Please bump the package with a semver-major release and note the change in the changelog.
| "node": "^20.19.0 || >=22.12.0" | ||
| }, | ||
| "type": "module", | ||
| "type": "commonjs", |
There was a problem hiding this comment.
[nitpick] Update the package README/CHANGELOG to document that the package defaults to CommonJS and provide clear import/require examples for both ESM and CJS consumers. This helps users adapt to the change and reduces integration friction.
This package was originally designed for dual export with cjs entry. Keep it this way.