Skip to content

Conversation

@lvlte
Copy link

@lvlte lvlte commented Dec 16, 2025

This PR addresses #93 (at least in part: dual build ESM+CJS (ESM first) module, with d.ts emit, blocking TS issues fixed, see the commit messages for more details).

A few other things could be done here but need to be discussed :

  • the browser build currently doesn't inject anything into the global scope, so Im' not sure if we should fix that or just remove it now that all browsers are able to consume ESM modules
  • (dev) I didn't inspect ci, e2e and cov scripts (are they still all needed), and I'm not sure what to do with the outdated dependencies without your opinion

Don't hesitate to suggest things I should add or remove from this PR.

lvlte added 11 commits November 20, 2025 18:33
hi/lo props need to be definitely assigned in the constructor
Prevent returing undefined where the caller expects a Double
Narrow method arg type to what the implementation can actualy handle
throw if input type doesn't match
Use tsc for building compliant ESM/CJS modules with d.ts files
Add dev dependency @lvlte/tsconfig (base config for dual mod)
Add specific tsconfig for each module type (extends base)
Replace "build-esm" script by "build-mod" (dual build)
Put browser build in a dedicated folder
Also remove "esm" dev dependency (not needed anymore)
use esm module
add double-double for comparison
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.

1 participant