Skip to content

refactor!: ESM-only#794

Merged
fb55 merged 3 commits intomasterfrom
esm
Mar 17, 2026
Merged

refactor!: ESM-only#794
fb55 merged 3 commits intomasterfrom
esm

Conversation

@fb55
Copy link
Owner

@fb55 fb55 commented Mar 17, 2026

  • Set type: module
  • Update tsconfig: target es2022, module nodenext
  • Output to dist/ instead of lib/
  • Migrate Jest to Vitest
  • Add engines >= 20.19.0
  • Add publish workflow (npm)

BREAKING CHANGE: This package is now ESM-only.

fb55 added 2 commits March 17, 2026 09:29
- 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.
Copilot AI review requested due to automatic review settings March 17, 2026 09:58
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@fb55 fb55 merged commit 88bd9a7 into master Mar 17, 2026
11 checks passed
@fb55 fb55 deleted the esm branch March 17, 2026 11:55
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.

2 participants