Skip to content

chore: modernize toolchain#64

Merged
QuentinRoy merged 3 commits intomasterfrom
modernize
Mar 29, 2026
Merged

chore: modernize toolchain#64
QuentinRoy merged 3 commits intomasterfrom
modernize

Conversation

@QuentinRoy
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 29, 2026 13:32
@QuentinRoy QuentinRoy merged commit 6e8683c into master Mar 29, 2026
4 checks passed
Copy link
Copy Markdown

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

Modernizes the project’s tooling and release pipeline by migrating to a TypeScript-based build, adopting pnpm + Biome + Vitest, and replacing Travis with GitHub Actions + Changesets.

Changes:

  • Replace the old Babel/ESM+CJS setup with a TypeScript dist/ build and ESM package exports.
  • Migrate tests from Ava to Vitest and add coverage configuration.
  • Introduce Biome, Changesets, pnpm lockfile, Husky hooks, and GitHub Actions CI/release workflows.

Reviewed changes

Copilot reviewed 18 out of 22 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
package.json Switch to pnpm tooling, ESM exports, TS build scripts, Biome/Vitest/Changesets/Husky integration.
pnpm-lock.yaml Adds the pnpm lockfile for the new dependency graph.
src/index.ts TypeScript implementation of the merge-patch logic and exports.
test/index.test.ts Vitest-based test suite replacing Ava tests.
vitest.config.ts Vitest coverage configuration (v8 provider).
tsconfig.json / tsconfig.build.json TypeScript compiler configuration for dev + build.
biome.json Biome lint/format configuration.
.github/workflows/ci.yml CI workflow running checks on Node matrix.
.github/workflows/release.yml Changesets-driven release workflow on master.
.husky/pre-commit / .husky/commit-msg Git hooks for staged checks and commitlint.
README.md Updates docs for ESM usage, pnpm, and new distribution path.
.travis.yml, .babelrc, .eslintrc.yaml, .eslintignore, test/index.js, esm/index.js Removes legacy CI, Babel/ESLint, and old test/build artifacts.
.gitignore Updates ignored build artifacts to dist/.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +6 to +15
"type": "module",
"main": "./dist/index.mjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs"
}
},
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

Switching to "type": "module" and an exports map with only an import condition makes the package ESM-only; require('tiny-merge-patch') will break for existing CommonJS consumers. If CommonJS support is still desired, add a CJS build and a require export condition; otherwise this should be treated as a breaking change (e.g., major version bump + release notes).

Copilot uses AI. Check for mistakes.
"precommit": "npm run git-hook",
"commitmsg": "commitlint -e $GIT_PARAMS"
"clean": "rimraf dist coverage",
"build": "pnpm run clean && tsc -p tsconfig.build.json && mv dist/index.js dist/index.mjs",
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

The build script uses mv, which is not cross-platform and will fail on Windows shells. Consider either (a) publishing dist/index.js directly and pointing main/exports at it, or (b) replacing mv with a Node-based rename step (or a cross-platform helper) so pnpm run build works everywhere.

Copilot uses AI. Check for mistakes.

strategy:
matrix:
node-version: [20, 22]
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

The toolchain in the lockfile (e.g., Vite) declares an engine requirement of node: ^20.19.0 || >=22.12.0. Using node-version: 20 can resolve to an earlier 20.x (depending on what's current), which may fail engine checks. Pin the matrix to 20.19.0 (or 20.19) or drop Node 20 from CI.

Suggested change
node-version: [20, 22]
node-version: [20.19.0, 22]

Copilot uses AI. Check for mistakes.

- uses: actions/setup-node@v4
with:
node-version: 22
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

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

The lockfile engine constraints for the toolchain (e.g., Vite) require node: ^20.19.0 || >=22.12.0. To avoid future breakage when node-version: 22 resolves to an older 22.x, consider pinning to 22.12.0 (or 22.12) explicitly.

Suggested change
node-version: 22
node-version: 22.12.0

Copilot uses AI. Check for mistakes.
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