Conversation
- Set type: module - Update tsconfig: target es2022, module nodenext - Output to dist/ instead of lib/ - Add exports field, engines >= 20.19.0 - Migrate Jest to Vitest - Remove esModuleInterop - Migrate biome config BREAKING CHANGE: This package is now ESM-only.
There was a problem hiding this comment.
Pull request overview
This PR converts the package to be ESM-only and modernizes the build/test/publish setup accordingly (TypeScript nodenext, dist/ output, Vitest, Node engine constraints, and an npm publish workflow).
Changes:
- Switch TypeScript output to
dist/and update TS module settings for ESM (nodenext, ES2022). - Replace Jest with Vitest and update the test file/imports for ESM.
- Add Node engine constraint and introduce a tag-based npm publish GitHub Actions workflow.
Reviewed changes
Copilot reviewed 4 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
tsconfig.json |
Updates TS target/module settings and changes compiler output dir to dist/. |
src/index.spec.ts |
Migrates test from Jest APIs to Vitest and updates ESM import path. |
package.json |
Marks package as ESM (type: module), updates entrypoints/exports to dist/, switches scripts to Vitest, adds Node engine constraint. |
biome.json |
Updates Biome schema version reference. |
.gitignore |
Ignores dist/ instead of lib/. |
.github/workflows/publish.yml |
Adds npm publish workflow triggered by version tags. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
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.
BREAKING CHANGE: This package is now ESM-only.