-
Notifications
You must be signed in to change notification settings - Fork 2
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
Rewrite in TypeScript; update build process #6
Conversation
"jest": "^29.7.0", | ||
"rollup": "^4.26.0", | ||
"typescript": "^5.6.3" | ||
"typescript": "^5.7.1-rc" |
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 5.7 release candidate was necessary to gain support for rewriteRelativeImportExtensions
, see https://devblogs.microsoft.com/typescript/announcing-typescript-5-7-rc/
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/orchidjs/unicode-variants.git" | ||
}, | ||
"type": "module", | ||
"main": "dist/cjs/index.js", |
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.
Change: main
now points to dist/cjs
instead of dist/umd
. The UMD build should be reserved for browser use.
@@ -3,7 +3,7 @@ | |||
* Usage: | |||
* > npm run bench | |||
*/ | |||
import * as D from './lib/index.mjs'; | |||
import * as D from './dist/esm/index.js'; |
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.
This now requires one to run npm run build
first. I couldn't see a convenient way to have this file either be or directly import TypeScript.
This PR rewrites
lib/
to use native TypeScript instead of JSDoc comments. It also switches to buildingdist/{cjs,esm}
withtsc
directly so that the types can be correctly generated (see #2). The UMD builds are still done with Rollup sincetsc
can't natively produce a UMD bundle.Closes #2.