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
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,17 @@ A Prettier plugin for formatting [JSONV](https://github.com/CLDMV/jsonv) files.

## ✨ What's New

### Latest: v1.1.0 (September 2026)
### Latest: v1.1.4 (October 2026)

- **Formatting is now lossless** — every version through v1.0.6 could silently corrupt a `.jsonv` file on format: unquoted keys collapsed to `"[object Object]"`, comments were dropped, and numbers were rewritten from their evaluated value (`1_000_000` → `1000000`, `0xFF` → `255`). The printer is rewritten around `@cldmv/jsonv` 1.1.0's `parseToAst()` so keys, numbers, strings and comments are all printed from their source text, with round-trip tests over the full jsonv fixture corpus. Requires `@cldmv/jsonv` 1.1.0 or later (#26, fixes #25).
- **Trailing commas now follow Prettier's `trailingComma` option** — `"all"` (Prettier's default) and `"es5"` add a comma after the last entry of a multi-line object or array, `"none"` never does, matching Prettier's own JavaScript behavior instead of silently ignoring the setting (#31, fixes #27).
- **Typed plugin** — the published declarations now export a real `JsonvPlugin` type that satisfies Prettier's `Plugin` directly, checked by a new `test:types` build step (#32, fixes #5).
- [View full v1.1.0 Changelog](https://github.com/CLDMV/jsonv-prettier-plugin-jsonv/blob/master/docs/changelog/v1/v1.1.0.md)
- **Header tooling on fix-headers 2.2.0** — the `@cldmv/fix-headers` dev dependency moves to 2.2.0, so `@Last modified by` follows content edits only, and `@cldmv/configs` moves to 1.2.4, which turns off the forced author updates. The header pass was re-run and every file already matched, so nothing was restamped. No plugin code, published file or runtime dependency changed (#51, #54).
- [View full v1.1.4 Changelog](https://github.com/CLDMV/jsonv-prettier-plugin-jsonv/blob/master/docs/changelog/v1/v1.1.4.md)

### Recent Releases

- **v1.0.6** (September 2026) — GPG signing wired into the hotfix redirector, and the dev toolchain re-aligned on vitest 5.0.0 (#20, #23) ([Changelog](https://github.com/CLDMV/jsonv-prettier-plugin-jsonv/blob/master/docs/changelog/v1/v1.0.6.md))
- **v1.0.5** (September 2026) — hotfix: vitest and @vitest/coverage-v8 bumped to 5.0.0 for a path-traversal advisory in the dev toolchain (#22) ([Changelog](https://github.com/CLDMV/jsonv-prettier-plugin-jsonv/blob/master/docs/changelog/v1/v1.0.5.md))
- **v1.0.4** (September 2026) — dependency and CI-tooling updates, including `@cldmv/jsonv` to 1.0.2 (#9, #14, #15) ([Changelog](https://github.com/CLDMV/jsonv-prettier-plugin-jsonv/blob/master/docs/changelog/v1/v1.0.4.md))
- **v1.0.3** (August 2026) — CI concurrency fix so release-relevant runs are never superseded (#7, #8) ([Changelog](https://github.com/CLDMV/jsonv-prettier-plugin-jsonv/blob/master/docs/changelog/v1/v1.0.3.md))
- **v1.1.3** (October 2026) — the CI `✅ Required PR Check` mirror job runs on every path instead of being skipped on in-repo PRs (#49) ([Changelog](https://github.com/CLDMV/jsonv-prettier-plugin-jsonv/blob/master/docs/changelog/v1/v1.1.3.md))
- **v1.1.2** (October 2026) — dev-dependency bumps, including `@cldmv/vitest-runner` 1.5.1 and `@cldmv/jsonv` 1.1.1 in development (#46, #47) ([Changelog](https://github.com/CLDMV/jsonv-prettier-plugin-jsonv/blob/master/docs/changelog/v1/v1.1.2.md))
- **v1.1.1** (October 2026) — uniform file headers from the shared CLDMV fix-headers config, and a skipped PR run no longer satisfies Required PR Check (#44, #45) ([Changelog](https://github.com/CLDMV/jsonv-prettier-plugin-jsonv/blob/master/docs/changelog/v1/v1.1.1.md))
- **v1.1.0** (September 2026) — lossless printing from `@cldmv/jsonv`'s source AST (fixing key, comment and number corruption), `trailingComma` support and a typed plugin (#26, #31, #32) ([Changelog](https://github.com/CLDMV/jsonv-prettier-plugin-jsonv/blob/master/docs/changelog/v1/v1.1.0.md))

📚 **For complete version history, see [docs/changelog/](https://github.com/CLDMV/jsonv-prettier-plugin-jsonv/tree/master/docs/changelog/) and the [GitHub Releases](https://github.com/CLDMV/jsonv-prettier-plugin-jsonv/releases).**

Expand Down
33 changes: 33 additions & 0 deletions docs/changelog/v1/v1.1.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# @cldmv/prettier-plugin-jsonv v1.1.1 Changelog

**Release Date**: October 2026
**Release Type**: Patch

---

## Overview

A maintenance release with no change to the plugin's behavior. Every source, test, config and workflow file now carries the uniform CLDMV file header, maintained by `@cldmv/fix-headers` from the shared `@cldmv/configs` config, and the CI `✅ Required PR Check` mirror can no longer be satisfied by a skipped run. The only edits to `src/index.mjs` are to its header comment.

---

## 🔧 CI & tooling

### Uniform file headers from the shared CLDMV config ([#44](https://github.com/CLDMV/jsonv-prettier-plugin-jsonv/pull/44))

A new `fix:headers` script runs `@cldmv/fix-headers` against `.configs/fix-headers.json`, which extends `@cldmv/configs/fix-headers.json` and excludes `tests/fixtures/` (the fixtures are byte-exact and must not gain a header). The first run stamped every file: files that had no header (the tests, the ESLint and vitest configs, the pre-commit installer) gained one, existing header dates were rewritten in ISO 8601 form (`2026-04-25T16:34:42-07:00`), and every header gained an empty comment line inside its opening and closing.

### A skipped PR run no longer satisfies Required PR Check ([#45](https://github.com/CLDMV/jsonv-prettier-plugin-jsonv/pull/45))

On an in-repo feature PR, the `pull_request` run skips the `required-check` mirror job because the push run on the head branch owns the status. GitHub still posts a check run for a skipped job and treats a skipped required check as passing, so the skipped job, named `✅ Required PR Check`, could green-light the ruleset (and auto-merge) before the push run's real mirror existed. The job name is now an expression that evaluates to `✅ Required PR Check` only on the paths that own the status.

## 🔧 Dependencies

- `vitest` and `@vitest/coverage-v8` 5.0.1 → 5.0.2 within the patch group ([#41](https://github.com/CLDMV/jsonv-prettier-plugin-jsonv/pull/41), dev-only).
- **NEW** dev dependencies: `@cldmv/configs` `^1.2.0` and `@cldmv/fix-headers` `^2.1.1`, for the header tooling ([#44](https://github.com/CLDMV/jsonv-prettier-plugin-jsonv/pull/44)).

---

## Upgrade notes

- No runtime changes — drop-in for v1.1.0.
23 changes: 23 additions & 0 deletions docs/changelog/v1/v1.1.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# @cldmv/prettier-plugin-jsonv v1.1.2 Changelog

**Release Date**: October 2026
**Release Type**: Patch

---

## Overview

A dev-dependency release. No runtime code changed; the published `types/src/index.d.mts.map` source map is regenerated because the header added to `src/index.mjs` in [v1.1.1](./v1.1.1.md) shifted its line numbers. The declarations themselves are unchanged.

---

## 🔧 Dependencies

- `@cldmv/vitest-runner` 1.2.0 → 1.5.1 within the minor group ([#47](https://github.com/CLDMV/jsonv-prettier-plugin-jsonv/pull/47), dev-only).
- `@cldmv/jsonv` 1.1.0 → 1.1.1 and `@cldmv/eslint-plugin-jsonv` 1.0.12 → 1.0.13 within the patch group ([#46](https://github.com/CLDMV/jsonv-prettier-plugin-jsonv/pull/46)). Both are resolved dev-dependency versions; the `@cldmv/jsonv` peer range stays `^1.1.0`.

---

## Upgrade notes

- No runtime changes — drop-in for v1.1.1.
24 changes: 24 additions & 0 deletions docs/changelog/v1/v1.1.3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# @cldmv/prettier-plugin-jsonv v1.1.3 Changelog

**Release Date**: October 2026
**Release Type**: Patch

---

## Overview

A CI-only release: the `✅ Required PR Check` mirror job now runs on every path instead of being skipped on in-repo feature PRs. No plugin code or dependency changed.

---

## 🔧 CI & tooling

### Run the in-repo PR mirror job instead of skipping it ([#49](https://github.com/CLDMV/jsonv-prettier-plugin-jsonv/pull/49))

The fix in [v1.1.1](./v1.1.1.md) gave the mirror job a conditional name so a skipped run would not report under the required name, but GitHub does not evaluate the `name:` of a skipped job, so the skipped run showed up under the raw expression text. The job now always runs (`if: always()`), so its name is always evaluated: on the paths that own the status it reports as `✅ Required PR Check` and mirrors the test matrix's result, and on an in-repo feature PR's `pull_request` run it reports as `⏭️ Required PR Check (reported by the push run)` and exits as a no-op.

---

## Upgrade notes

- No runtime changes — drop-in for v1.1.2.
32 changes: 32 additions & 0 deletions docs/changelog/v1/v1.1.4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# @cldmv/prettier-plugin-jsonv v1.1.4 Changelog

**Release Date**: October 2026
**Release Type**: Patch
**Branch**: `release/1.1.4`

---

## Overview

A dev-dependency release: `@cldmv/fix-headers` moves to 2.2.0 and `@cldmv/configs` to 1.2.4. The header pass was re-run for 2.1.4, and every header already matched what that version writes, so no file was restamped; the 2.2.0 and 1.2.4 bumps changed only `package.json` and the lockfile. No plugin code, published file or runtime dependency changed.

---

## 📚 Documentation

- **NEW:** [docs/changelog/v1/v1.1.4.md](./v1.1.4.md) — this changelog, plus backfilled changelog files for [v1.1.1](./v1.1.1.md), [v1.1.2](./v1.1.2.md) and [v1.1.3](./v1.1.3.md).
- README **✨ What's New** updated for v1.1.4.

## 🔧 Dependencies

Both changes are to development dependencies. The runtime `peerDependencies` and the published package are unchanged.

- `@cldmv/fix-headers` `^2.1.1` → `^2.2.0` ([#51](https://github.com/CLDMV/jsonv-prettier-plugin-jsonv/pull/51) took it to `^2.1.4`, [#54](https://github.com/CLDMV/jsonv-prettier-plugin-jsonv/pull/54) to `^2.2.0`). Version 2.1.4 no longer writes a JavaScript comment into JSON or Markdown files, processes every repeated `--input`, and never walks dependency folders such as `node_modules`. Version 2.2.0 makes the `@Last modified by` header tag follow content edits only, so a header-only rewrite keeps the recorded editor instead of replacing it. It requires Node.js `>=22.12.0`, the same floor as the rest of the development toolchain.
- `@cldmv/configs` `^1.2.0` → `^1.2.4` ([#54](https://github.com/CLDMV/jsonv-prettier-plugin-jsonv/pull/54)). It provides the shared `fix-headers` configuration that `.configs/fix-headers.json` extends. Version 1.2.4 turns off `forceAuthorUpdate` and `forceLastModifiedAuthorUpdate` (both were on in 1.2.0), so the shared configuration no longer overwrites the recorded author or last editor.
- Despite its title, [#51](https://github.com/CLDMV/jsonv-prettier-plugin-jsonv/pull/51) (`restamp file headers`) changed only `package.json` and the lockfile. Neither it nor [#54](https://github.com/CLDMV/jsonv-prettier-plugin-jsonv/pull/54) restamped any header.

---

## Upgrade notes

- No runtime changes — drop-in for v1.1.3.
20 changes: 10 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cldmv/prettier-plugin-jsonv",
"version": "1.1.3",
"version": "1.1.4",
"description": "Prettier plugin for @cldmv/jsonv files",
"type": "module",
"main": "./dist/index.mjs",
Expand Down Expand Up @@ -45,9 +45,9 @@
"prettier": "^3.0.0"
},
"devDependencies": {
"@cldmv/configs": "^1.2.0",
"@cldmv/configs": "^1.2.4",
"@cldmv/eslint-plugin-jsonv": "^1.0.12",
"@cldmv/fix-headers": "^2.1.1",
"@cldmv/fix-headers": "^2.2.0",
"@cldmv/jsonv": "^1.1.0",
"@cldmv/vitest-runner": "^1.2.0",
"@eslint/css": "^2.0.0",
Expand Down
Loading