Rewrite in TypeScript; update build process - #6
Merged
Conversation
nwalters512
commented
Nov 14, 2024
| "jest": "^29.7.0", | ||
| "rollup": "^4.26.0", | ||
| "typescript": "^5.6.3" | ||
| "typescript": "^5.7.1-rc" |
Contributor
Author
There was a problem hiding this comment.
The 5.7 release candidate was necessary to gain support for rewriteRelativeImportExtensions, see https://devblogs.microsoft.com/typescript/announcing-typescript-5-7-rc/
| "url": "https://github.com/orchidjs/unicode-variants.git" | ||
| }, | ||
| "type": "module", | ||
| "main": "dist/cjs/index.js", |
Contributor
Author
There was a problem hiding this comment.
Change: main now points to dist/cjs instead of dist/umd. The UMD build should be reserved for browser use.
| * > npm run bench | ||
| */ | ||
| import * as D from './lib/index.mjs'; | ||
| import * as D from './dist/esm/index.js'; |
Contributor
Author
There was a problem hiding this comment.
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR rewrites
lib/to use native TypeScript instead of JSDoc comments. It also switches to buildingdist/{cjs,esm}withtscdirectly so that the types can be correctly generated (see #2). The UMD builds are still done with Rollup sincetsccan't natively produce a UMD bundle.Closes #2.