Skip to content

fix: publish root TypeScript declarations for CommonJS consumers#145

Open
bcornish1797 wants to merge 2 commits intoesatterwhite:mainfrom
bcornish1797:hermes/issue-135-types-entrypoint
Open

fix: publish root TypeScript declarations for CommonJS consumers#145
bcornish1797 wants to merge 2 commits intoesatterwhite:mainfrom
bcornish1797:hermes/issue-135-types-entrypoint

Conversation

@bcornish1797
Copy link
Copy Markdown

@algora-pbc /claim #135

This keeps the package CommonJS-first and avoids a build step, while making published typings usable from TypeScript NodeNext consumers.

What changed:

  • add a root index.d.ts so import seeli from "seeli" resolves declarations from the package entrypoint
  • publish that file via files and point package.json#types at it
  • align existing declaration signatures with runtime behavior, especially run() paths that can return undefined

Verification:

  • npm test
  • npm run lint (warnings only from generated .tap report files, no errors)
  • packed-package verification in a fresh consumer project:
    • npx tsc --pretty false with module=NodeNext
    • require("seeli")
    • import seeli from "seeli"

This follows the maintainer guidance from #135: CommonJS-first, no TypeScript build step, and focused on publishable type definitions rather than rewriting the runtime to TS/ESM.

@esatterwhite
Copy link
Copy Markdown
Owner

Thanks @bcornish1797 I'll try to get to this in the next day or so

@esatterwhite
Copy link
Copy Markdown
Owner

@bcornish1797 Can you rerun npm run lint:fix and recommit? That should fix the codacy quality issues

@bcornish1797
Copy link
Copy Markdown
Author

Done — I ran npm run lint:fix, committed the formatting-only change, and pushed it to the PR branch in cb3e363.\n\nI also re-ran lint and the test suite locally; both pass, so Codacy should have what it needs now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants