From db9e2b2047aef2dbad9492f0c6eec5fe922a8590 Mon Sep 17 00:00:00 2001 From: lukascivil Date: Fri, 24 Apr 2026 12:00:54 -0300 Subject: [PATCH 1/6] chore: add playground --- .github/workflows/release-and-publish.yml | 1 + CLAUDE.md | 2 +- nx.json | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-and-publish.yml b/.github/workflows/release-and-publish.yml index 02df485..ebf4045 100644 --- a/.github/workflows/release-and-publish.yml +++ b/.github/workflows/release-and-publish.yml @@ -16,6 +16,7 @@ on: nx release decides which packages need a bump from conventional commits and runs the steps for the monorepo: - json-difference: published to npm and browser bundle deployed to S3 - json-difference-cli: published to npm + - playground: versioned/tagged/changelogged only (private, not published to npm) default: false required: false diff --git a/CLAUDE.md b/CLAUDE.md index 7d03c27..563e71d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -104,7 +104,7 @@ Changing a project's tags in `project.json` changes who can import it — update # Release flow -Each publishable lib (`json-difference`, `json-difference-cli`) versions **independently** via the built-in `nx release` (config in `nx.json` → `release`). Driven by **conventional commits**: `feat` → minor, `fix`/`docs`/`chore`/`refactor` → patch, `BREAKING CHANGE` → major (custom mapping in `release.conventionalCommits.types`). Tag pattern is `{projectName}-{version}` (no leading `v`). `release.version.preVersionCommand` runs `nx run-many -t build` first. `nx release` handles version + CHANGELOG.md + git commit/tag/push + GitHub release + npm publish in one shot. +`json-difference`, `json-difference-cli`, and `playground` each version **independently** via the built-in `nx release` (config in `nx.json` → `release`). Driven by **conventional commits**: `feat` → minor, `fix`/`docs`/`chore`/`refactor` → patch, `BREAKING CHANGE` → major (custom mapping in `release.conventionalCommits.types`). Tag pattern is `{projectName}-{version}` (no leading `v`). `release.version.preVersionCommand` runs `nx run-many -t build` first. `nx release` handles version + CHANGELOG.md + git commit/tag/push + GitHub release + npm publish in one shot. `playground` is marked `"private": true` in its `package.json`, so it gets versioned/tagged/changelogged but is skipped by `npm publish`. Run via `yarn release` (= `yarn nx release`); `yarn release:dry-run` previews. Do not hand-edit versions; do not amend published commits. CI workflows live in `.github/workflows/` (`ci.yml`, `cd.yml`, `release-and-publish.yml`). diff --git a/nx.json b/nx.json index 3968c67..27ed421 100644 --- a/nx.json +++ b/nx.json @@ -26,7 +26,7 @@ "packageManager": "yarn", "analytics": false, "release": { - "projects": ["json-difference", "json-difference-cli"], + "projects": ["json-difference", "json-difference-cli", "playground"], "projectsRelationship": "independent", "releaseTagPattern": "{projectName}-{version}", "version": { From 98c0522949fd554f499e154708faf46e4547e44f Mon Sep 17 00:00:00 2001 From: lukascivil Date: Fri, 24 Apr 2026 12:37:25 -0300 Subject: [PATCH 2/6] chore: adjust build --- libs/json-difference/project.json | 6 ++++-- libs/json-difference/vite.config.mts | 3 +-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/libs/json-difference/project.json b/libs/json-difference/project.json index eb02ea3..7b1b8cc 100644 --- a/libs/json-difference/project.json +++ b/libs/json-difference/project.json @@ -7,7 +7,8 @@ "executor": "@nx/vite:build", "outputs": ["{options.outputPath}"], "options": { - "outputPath": "{projectRoot}/dist" + "outputPath": "{projectRoot}/dist", + "generatePackageJson": false } }, "build-browser": { @@ -15,7 +16,8 @@ "outputs": ["{options.outputPath}"], "options": { "outputPath": "{projectRoot}/dist.browser", - "configFile": "{projectRoot}/vite.config.browser.mts" + "configFile": "{projectRoot}/vite.config.browser.mts", + "generatePackageJson": false } }, "build-to-s3": { diff --git a/libs/json-difference/vite.config.mts b/libs/json-difference/vite.config.mts index 2ed0796..999e3ae 100644 --- a/libs/json-difference/vite.config.mts +++ b/libs/json-difference/vite.config.mts @@ -3,14 +3,13 @@ import { defineConfig } from 'vite' import dts from 'vite-plugin-dts' import * as path from 'path' -import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin' import { nxCopyAssetsPlugin } from '@nx/vite/plugins/nx-copy-assets.plugin' export default defineConfig({ root: import.meta.dirname, cacheDir: '../../node_modules/.vite/libs/json-difference', + resolve: { tsconfigPaths: true }, plugins: [ - nxViteTsPaths(), nxCopyAssetsPlugin(['*.md']), dts({ entryRoot: 'src', tsconfigPath: path.join(import.meta.dirname, 'tsconfig.lib.json'), pathsToAliases: false }) ], From e3e306f39c69ce36cd7a9c6c6f2641803987600a Mon Sep 17 00:00:00 2001 From: lukascivil Date: Fri, 24 Apr 2026 13:00:28 -0300 Subject: [PATCH 3/6] =?UTF-8?q?chore:=20add=20-=20name:=20Deploy=20Playgro?= =?UTF-8?q?und=20to=20Github=20Pages=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 12 ------------ .github/workflows/release-and-publish.yml | 13 +++++++++++-- package.json | 2 +- yarn.lock | 10 +++++----- 4 files changed, 17 insertions(+), 20 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index ad151ec..41c313a 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -37,15 +37,3 @@ jobs: uses: codecov/codecov-action@v6 with: token: ${{ secrets.CODECOV_TOKEN }} - - - name: Build - run: | - yarn nx run-many --target=build --projects=playground - - - name: Deploy Playground to Github Pages 🚀 - uses: JamesIves/github-pages-deploy-action@v4 - with: - branch: chore/gh-pages - target-folder: . - folder: apps/playground/dist - token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-and-publish.yml b/.github/workflows/release-and-publish.yml index ebf4045..5274b01 100644 --- a/.github/workflows/release-and-publish.yml +++ b/.github/workflows/release-and-publish.yml @@ -11,12 +11,12 @@ on: dry_run: type: boolean description: | - Dry run: preview versioning/publish without tagging, publishing, or deploying to S3. + Dry run: preview versioning/publish without tagging, publishing, or deploying. nx release decides which packages need a bump from conventional commits and runs the steps for the monorepo: - json-difference: published to npm and browser bundle deployed to S3 - json-difference-cli: published to npm - - playground: versioned/tagged/changelogged only (private, not published to npm) + - playground: versioned/tagged/changelogged (private, not published to npm) and deployed to GitHub Pages default: false required: false @@ -88,3 +88,12 @@ jobs: env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + + - name: Deploy Playground to Github Pages 🚀 + if: github.event.inputs.dry_run != 'true' + uses: JamesIves/github-pages-deploy-action@v4 + with: + branch: chore/gh-pages + target-folder: . + folder: apps/playground/dist + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index 505e79c..fdf9010 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "eslint-plugin-react-refresh": "^0.5.2", "framer-motion": "^12.38.0", "jest": "^30.3.0", - "json-difference": "1.16.1", + "json-difference": "^1.16.2", "jsonc-eslint-parser": "^3.1.0", "lucide-react": "^1.8.0", "monaco-editor": "^0.55.1", diff --git a/yarn.lock b/yarn.lock index fbb2a45..d9e378a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10329,10 +10329,10 @@ __metadata: languageName: node linkType: hard -"json-difference@npm:1.16.1": - version: 1.16.1 - resolution: "json-difference@npm:1.16.1" - checksum: 10/52b2564afdfdae4abc0bbd380c8555426e55c46a1ce362e6d7a4865a6a8575cb6b9b27b7184dfdb991a85fbf513fb2f253de5615ad777b22cf17e5828357f754 +"json-difference@npm:^1.16.2": + version: 1.16.2 + resolution: "json-difference@npm:1.16.2" + checksum: 10/5fbd64efdbfd917cc9120ba8352cd1e5d685471156502df7c909d4848884f321f2b1695542cc57121a84e4e74e6acc4e5714aed35a6b6986ce7e4837139e9a01 languageName: node linkType: hard @@ -12456,7 +12456,7 @@ __metadata: eslint-plugin-react-refresh: "npm:^0.5.2" framer-motion: "npm:^12.38.0" jest: "npm:^30.3.0" - json-difference: "npm:1.16.1" + json-difference: "npm:^1.16.2" jsonc-eslint-parser: "npm:^3.1.0" lucide-react: "npm:^1.8.0" monaco-editor: "npm:^0.55.1" From e2280894efdfa121ae0c1410d452cfdff616a9e0 Mon Sep 17 00:00:00 2001 From: lukascivil Date: Fri, 24 Apr 2026 13:03:07 -0300 Subject: [PATCH 4/6] Update cd.yml --- .github/workflows/cd.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 41c313a..6a5c3d5 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -24,6 +24,10 @@ jobs: - name: Install dependencies run: yarn install --immutable + - name: Build + run: | + yarn nx run-many --target=build + - name: Lint run: yarn nx run-many --target=lint From 04ccf5e690ed403a995a85d394b1588ff958abda Mon Sep 17 00:00:00 2001 From: lukascivil Date: Fri, 24 Apr 2026 13:31:09 -0300 Subject: [PATCH 5/6] chore: add mcp-json-diff to release --- .github/workflows/release-and-publish.yml | 1 + CLAUDE.md | 2 +- apps/playground/package.json | 2 +- nx.json | 2 +- package.json | 2 +- tools/mcp-json-diff/package.json | 2 +- 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-and-publish.yml b/.github/workflows/release-and-publish.yml index 5274b01..8f2e05f 100644 --- a/.github/workflows/release-and-publish.yml +++ b/.github/workflows/release-and-publish.yml @@ -17,6 +17,7 @@ on: - json-difference: published to npm and browser bundle deployed to S3 - json-difference-cli: published to npm - playground: versioned/tagged/changelogged (private, not published to npm) and deployed to GitHub Pages + - mcp-json-diff: versioned/tagged/changelogged (private, not published to npm); in-repo json-difference dep kept in sync default: false required: false diff --git a/CLAUDE.md b/CLAUDE.md index 563e71d..fe31235 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -104,7 +104,7 @@ Changing a project's tags in `project.json` changes who can import it — update # Release flow -`json-difference`, `json-difference-cli`, and `playground` each version **independently** via the built-in `nx release` (config in `nx.json` → `release`). Driven by **conventional commits**: `feat` → minor, `fix`/`docs`/`chore`/`refactor` → patch, `BREAKING CHANGE` → major (custom mapping in `release.conventionalCommits.types`). Tag pattern is `{projectName}-{version}` (no leading `v`). `release.version.preVersionCommand` runs `nx run-many -t build` first. `nx release` handles version + CHANGELOG.md + git commit/tag/push + GitHub release + npm publish in one shot. `playground` is marked `"private": true` in its `package.json`, so it gets versioned/tagged/changelogged but is skipped by `npm publish`. +`json-difference`, `json-difference-cli`, `playground`, and `mcp-json-diff` each version **independently** via the built-in `nx release` (config in `nx.json` → `release`). Driven by **conventional commits**: `feat` → minor, `fix`/`docs`/`chore`/`refactor` → patch, `BREAKING CHANGE` → major (custom mapping in `release.conventionalCommits.types`). Tag pattern is `{projectName}-{version}` (no leading `v`). `release.version.preVersionCommand` runs `nx run-many -t build` first. `nx release` handles version + CHANGELOG.md + git commit/tag/push + GitHub release + npm publish in one shot. Since all projects in `release.projects` participate, nx release also syncs in-repo `json-difference` dependency versions across `json-difference-cli` and `mcp-json-diff`'s `package.json` whenever the library bumps. `playground` and `mcp-json-diff` are marked `"private": true`, so they get versioned/tagged/changelogged but are skipped by `npm publish`. Run via `yarn release` (= `yarn nx release`); `yarn release:dry-run` previews. Do not hand-edit versions; do not amend published commits. CI workflows live in `.github/workflows/` (`ci.yml`, `cd.yml`, `release-and-publish.yml`). diff --git a/apps/playground/package.json b/apps/playground/package.json index 321e62e..27db8ca 100644 --- a/apps/playground/package.json +++ b/apps/playground/package.json @@ -8,7 +8,7 @@ "react": "^19.2.5", "lucide-react": "^1.8.0", "@chakra-ui/react": "^3.35.0", - "json-difference": "1.16.1", + "json-difference": "1.16.2", "react-dom": "^19.2.5", "react-monaco-editor": "^0.59.0" }, diff --git a/nx.json b/nx.json index 27ed421..fb0783d 100644 --- a/nx.json +++ b/nx.json @@ -26,7 +26,7 @@ "packageManager": "yarn", "analytics": false, "release": { - "projects": ["json-difference", "json-difference-cli", "playground"], + "projects": ["json-difference", "json-difference-cli", "playground", "mcp-json-diff"], "projectsRelationship": "independent", "releaseTagPattern": "{projectName}-{version}", "version": { diff --git a/package.json b/package.json index fdf9010..4518ce6 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "eslint-plugin-react-refresh": "^0.5.2", "framer-motion": "^12.38.0", "jest": "^30.3.0", - "json-difference": "^1.16.2", + "json-difference": "1.16.2", "jsonc-eslint-parser": "^3.1.0", "lucide-react": "^1.8.0", "monaco-editor": "^0.55.1", diff --git a/tools/mcp-json-diff/package.json b/tools/mcp-json-diff/package.json index 2dcb241..e3d238a 100644 --- a/tools/mcp-json-diff/package.json +++ b/tools/mcp-json-diff/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "@modelcontextprotocol/sdk": "^1.29.0", - "json-difference": "1.16.1", + "json-difference": "1.16.2", "zod": "^3.23.0" } } From 032640939a73132abe402b7b3c7dbb52aa5ad263 Mon Sep 17 00:00:00 2001 From: lukascivil Date: Fri, 24 Apr 2026 13:40:10 -0300 Subject: [PATCH 6/6] Update yarn.lock --- yarn.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yarn.lock b/yarn.lock index d9e378a..ed0b138 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10329,7 +10329,7 @@ __metadata: languageName: node linkType: hard -"json-difference@npm:^1.16.2": +"json-difference@npm:1.16.2": version: 1.16.2 resolution: "json-difference@npm:1.16.2" checksum: 10/5fbd64efdbfd917cc9120ba8352cd1e5d685471156502df7c909d4848884f321f2b1695542cc57121a84e4e74e6acc4e5714aed35a6b6986ce7e4837139e9a01 @@ -12456,7 +12456,7 @@ __metadata: eslint-plugin-react-refresh: "npm:^0.5.2" framer-motion: "npm:^12.38.0" jest: "npm:^30.3.0" - json-difference: "npm:^1.16.2" + json-difference: "npm:1.16.2" jsonc-eslint-parser: "npm:^3.1.0" lucide-react: "npm:^1.8.0" monaco-editor: "npm:^0.55.1"