Skip to content

feat: add ESM entrypoint and TypeScript exports#146

Open
luzzwaix wants to merge 2 commits intoesatterwhite:mainfrom
luzzwaix:bounty-135-esm-typescript
Open

feat: add ESM entrypoint and TypeScript exports#146
luzzwaix wants to merge 2 commits intoesatterwhite:mainfrom
luzzwaix:bounty-135-esm-typescript

Conversation

@luzzwaix
Copy link
Copy Markdown

@luzzwaix luzzwaix commented May 3, 2026

@algora-pbc /claim #135

Closes #135.

Adds package-level ESM and TypeScript support while preserving CommonJS compatibility.

Verification:

  • npx tap --disable-coverage test/esm.js test/typescript.js
  • npm run lint
  • git diff --check
  • npm pack --dry-run

@luzzwaix luzzwaix force-pushed the bounty-135-esm-typescript branch 2 times, most recently from e114962 to 3bec3a4 Compare May 3, 2026 10:50
@luzzwaix luzzwaix force-pushed the bounty-135-esm-typescript branch from 3bec3a4 to 6652b79 Compare May 3, 2026 10:52
@esatterwhite
Copy link
Copy Markdown
Owner

I'll refer you to this comment
#144 (comment)

What problem are we actually trying to solve here?

@luzzwaix
Copy link
Copy Markdown
Author

luzzwaix commented May 3, 2026

I'll refer you to this comment #144 (comment)

What problem are we actually trying to solve here?

@algora-pbc /claim #135

Thanks, that makes sense. I narrowed the PR around the problem you described in the earlier comment.

The goal here is not to migrate the project to TypeScript or make ESM the primary runtime format. CommonJS remains the implementation and there is still no build step.

This now focuses on:

  • package exports so both require("seeli") and import seeli from "seeli" resolve through the same CommonJS entrypoint
  • TypeScript declarations for CommonJS and NodeNext/ESM consumers
  • a default alias on the CommonJS export for interop
  • tests proving CommonJS compatibility, default ESM import, and TypeScript NodeNext usage

I removed the separate ESM shim and kept the runtime surface closer to the existing package design.

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.

Migrate to ESM and Typescript support

2 participants