Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .babelrc

This file was deleted.

11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

21 changes: 0 additions & 21 deletions .eslintrc.yaml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI

on:
pull_request:
push:
branches:
- master

jobs:
test:
runs-on: ubuntu-latest

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.

steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 10.33.0

- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: pnpm

- run: pnpm install --frozen-lockfile
- run: pnpm run check
- run: pnpm run build
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release

on:
push:
branches:
- master

jobs:
release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: pnpm/action-setup@v4
with:
version: 10.33.0

- 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.
cache: pnpm
registry-url: https://registry.npmjs.org

- run: pnpm install --frozen-lockfile
- run: pnpm run check
- run: pnpm run build

- name: Create Release Pull Request or Publish
uses: changesets/action@v1
with:
version: pnpm run version-packages
publish: pnpm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
node_modules
coverage
cjs
.nyc_output
dist
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx --no -- commitlint --edit "$1"
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm run check:staged
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

40 changes: 32 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
Tiny Merge Patch
================

[![Build Status](https://travis-ci.org/QuentinRoy/tiny-merge-patch.svg?branch=master)](https://travis-ci.org/QuentinRoy/tiny-merge-patch)
[![codecov](https://img.shields.io/codecov/c/github/QuentinRoy/tiny-merge-patch.svg)](https://codecov.io/gh/QuentinRoy/tiny-merge-patch)
[![dependencies Status](https://david-dm.org/quentinroy/tiny-merge-patch/status.svg)](https://david-dm.org/quentinroy/tiny-merge-patch)
[![devDependencies Status](https://david-dm.org/quentinroy/tiny-merge-patch/dev-status.svg)](https://david-dm.org/quentinroy/tiny-merge-patch?type=dev)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
[![NPM version](https://img.shields.io/npm/v/tiny-merge-patch.svg)](https://www.npmjs.com/package/tiny-merge-patch)

Expand All @@ -27,20 +24,25 @@ Install the current version (and save it as a dependency):
npm install tiny-merge-patch --save
```

### pnpm

```sh
pnpm add tiny-merge-patch
```

## Import

### CommonJs with node
### ES modules

```js
// Fetch `apply` from the module.
const mergePatch = require('tiny-merge-patch').apply;
// `apply` is also the default export.
import mergePatch from 'tiny-merge-patch'
```

### ES modules in the browser

```js
// `apply` is also the default export.
import mergePatch from 'https://unpkg.com/tiny-merge-patch/esm/index.js'
import mergePatch from 'https://unpkg.com/tiny-merge-patch/dist/index.mjs'
```

## Usage
Expand Down Expand Up @@ -108,3 +110,25 @@ implement merge of merge patches that reliably preserves deletion.)
# License

[MIT](./LICENSE)

## Development

```sh
pnpm run check
pnpm run build
```

### Releases

```sh
# Create a release note entry
pnpm run changeset

# Apply version bumps from pending changesets
pnpm run version-packages

# Publish to npm
pnpm run release
```

CI and release automation run on GitHub Actions.
17 changes: 17 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://biomejs.dev/schemas/2.4.9/schema.json",
"files": {
"includes": ["**", "!coverage", "!dist", "!node_modules"]
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"lineWidth": 100
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
}
}
40 changes: 0 additions & 40 deletions esm/index.js

This file was deleted.

Loading
Loading