Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/types-package-json-module-marker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ox": patch
---

Added a `{"type":"module"}` marker to `_types/` so declaration files resolve as ESM under TypeScript `node16` (and `nodenext` before TypeScript 5.8); CommonJS consumers on `node16` should switch to `nodenext` or `bundler` resolution.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"build": "pnpm clean && pnpm build:cjs && pnpm build:esm && pnpm build:types",
"build:esm": "tsc --project ./tsconfig.build.json --outDir ./src/_esm && printf '{\"type\": \"module\",\"sideEffects\":false}' > ./src/_esm/package.json",
"build:cjs": "tsc --project ./tsconfig.build.json --module commonjs --moduleResolution node10 --outDir ./src/_cjs --removeComments --verbatimModuleSyntax false && printf '{\"type\":\"commonjs\"}' > ./src/_cjs/package.json",
"build:types": "tsc --project ./tsconfig.build.json --declarationDir ./src/_types --emitDeclarationOnly --declaration --declarationMap",
"build:types": "tsc --project ./tsconfig.build.json --declarationDir ./src/_types --emitDeclarationOnly --declaration --declarationMap && printf '{\"type\":\"module\"}' > ./src/_types/package.json",
"changeset:prepublish": "pnpm version:update && pnpm build && tsx scripts/prepublish.ts",
"changeset:publish": "pnpm changeset:prepublish && changeset publish",
"changeset:publish:v0": "pnpm changeset:prepublish && changeset publish --tag legacy-v0",
Expand Down
Loading