-
Notifications
You must be signed in to change notification settings - Fork 0
[codex] fix sdk ESM imports for Node #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -1,11 +1,23 @@ | ||||||||
| { | ||||||||
| "name": "@absurd-sqlite/sdk", | ||||||||
| "version": "0.3.0-alpha.1", | ||||||||
| "version": "0.3.0-alpha.2", | ||||||||
| "description": "TypeScript SDK for Absurd-SQLite - SQLite-based durable task execution", | ||||||||
| "type": "module", | ||||||||
| "main": "dist/index.js", | ||||||||
| "exports": { | ||||||||
| ".": { | ||||||||
| "types": "./dist/index.d.ts", | ||||||||
| "import": "./dist/index.js", | ||||||||
| "require": "./dist/cjs/index.js" | ||||||||
| } | ||||||||
| }, | ||||||||
| "types": "dist/index.d.ts", | ||||||||
| "files": [ | ||||||||
| "dist", | ||||||||
| "README.md" | ||||||||
|
||||||||
| "README.md" | |
| "README.md", | |
| "LICENSE" |
Copilot
AI
Apr 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rm -rf dist (and the shell redirection/quoting used to write dist/cjs/package.json) is POSIX-shell specific and will fail under Windows’ default npm script shell. If this package is expected to build cross-platform, switch to a Node-based clean/write step (e.g., fs.rmSync / fs.writeFileSync) or a cross-platform tool like rimraf.
| "build": "rm -rf dist && tsc --project tsconfig.build.json && tsc --project tsconfig.cjs.json && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json", | |
| "build": "node -e \"require(\\\"fs\\\").rmSync(\\\"dist\\\", { recursive: true, force: true })\" && tsc --project tsconfig.build.json && tsc --project tsconfig.cjs.json && node -e \"const fs = require(\\\"fs\\\"); fs.mkdirSync(\\\"dist/cjs\\\", { recursive: true }); fs.writeFileSync(\\\"dist/cjs/package.json\\\", JSON.stringify({ type: \\\"commonjs\\\" }));\"", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The runtime behavior change (adding
type: module+ anexportsmap to fix Node ESM loading) isn’t currently covered by automated tests. Consider adding a smoke test that builds (or uses prebuilt fixtures) and spawns a realnodeprocess toimport('@absurd-sqlite/sdk')(and optionallyrequire(...)) to prevent regressions in published entrypoints.