json5-manifest-sync 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project are documented in this file.
4
4
 
5
+ ## [0.2.2] - 2026-05-13
6
+
7
+ ### Changed
8
+
9
+ - Refined README wording so the npm package page explains sync behavior, blank-comment modes, and current limitations more clearly.
10
+ - Added npm package discoverability improvements, including package metadata fields and a top-of-page npm badge/link.
11
+
5
12
  ## [0.2.1] - 2026-05-06
6
13
 
7
14
  ### Changed
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # json5-manifest-sync
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/json5-manifest-sync)](https://www.npmjs.com/package/json5-manifest-sync)
4
+
3
5
  Keep a documented `package.json5` in sync with the real `package.json` used by Node and package managers, including `version` updates.
4
6
 
5
7
  ## Quick Start
@@ -32,6 +34,10 @@ npm run sync:json5
32
34
 
33
35
  At the same time, Node/npm/pnpm/yarn do not treat `package.json5` as a package manifest source. A JSON5 file can be great for human-readable documentation, but tooling still requires `package.json`.
34
36
 
37
+ This is also why the long-running Yarn Berry discussion about comment-friendly manifests is relevant here: [yarnpkg/berry#241](https://github.com/yarnpkg/berry/issues/241) describes the same underlying need, along with the ecosystem compatibility constraints that make a companion `package.json5` approach useful today.
38
+
39
+ There is also a long-running Stack Overflow discussion around the same practical question from the npm side: [How do I add comments to package.json for npm install?](https://stackoverflow.com/questions/14221579/how-do-i-add-comments-to-package-json-for-npm-install/79939348#79939348). It is a useful community reference for why teams keep reaching for comment-friendly manifest workflows even though `package.json` itself must remain strict JSON.
40
+
35
41
  > [!NOTE]
36
42
  > It would be great to see first-class support for JSON5-style manifests in npm/tooling over time, but today this project provides a practical bridge.
37
43
 
@@ -40,7 +46,7 @@ This tool solves that gap by letting you maintain both:
40
46
  - `package.json` as the canonical, machine-consumed manifest
41
47
  - `package.json5` as the human-documented companion file
42
48
 
43
- Then it synchronizes `package.json5` from `package.json` while preserving mapped `//` comments where possible.
49
+ It synchronizes `package.json5` from the canonical `package.json` while preserving mapped `//` comments where possible.
44
50
  When values like `version`, `scripts`, or dependency versions change in `package.json`, those updates are propagated into `package.json5`.
45
51
 
46
52
  ## What it does
@@ -49,19 +55,18 @@ When values like `version`, `scripts`, or dependency versions change in `package
49
55
  - Skips paths ignored by your root `.gitignore`
50
56
  - For each matching `package.json5`, rewrites values from canonical `package.json` (including `version`, scripts, dependencies, and other manifest fields)
51
57
  - Preserves/migrates mapped `//` comments for keys and supported array items
52
- - Supports three blank-comment modes: `preserve`, `fill`, and `remove`
58
+ - Supports three blank-comment modes: `preserve` to keep blanks, `fill` to generate them, and `remove` to strip them
53
59
  - Writes stable JSON5 formatting with trailing commas for cleaner diffs
54
60
 
55
61
  ### Current limitations
56
62
 
57
63
  - Per-item comment preservation is most reliable for arrays of strings.
58
- - Arrays of objects or numbers still serialize correctly, but item-level comments may be dropped.
59
- - Use `--blank-comments=preserve` to keep existing blank `//` lines without adding new ones.
60
- - Use `--blank-comments=fill` to add blank `//` placeholders where comments are omitted.
61
- - Use `--blank-comments=remove` to strip blank `//` lines from the output.
64
+ - Arrays of objects or numbers still serialize correctly, but item-level comments are less reliable and may be dropped during sync.
62
65
 
63
66
  Repository: https://github.com/BBaysinger/json5-manifest-sync
64
67
 
68
+ Package: https://www.npmjs.com/package/json5-manifest-sync
69
+
65
70
  ## Author
66
71
 
67
72
  Bradley Baysinger ([@BBaysinger](https://github.com/BBaysinger))
@@ -161,7 +166,7 @@ Example prompt:
161
166
  ```json
162
167
  {
163
168
  "dependencies": {
164
- "json5-manifest-sync": "^0.1.3"
169
+ "json5-manifest-sync": "^0.2.2"
165
170
  }
166
171
  }
167
172
  ```
package/package.json CHANGED
@@ -1,11 +1,19 @@
1
1
  {
2
2
  "name": "json5-manifest-sync",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Sync package.json5 files from canonical package.json while preserving key comments.",
5
5
  "author": {
6
6
  "name": "Bradley Baysinger",
7
7
  "url": "https://github.com/BBaysinger"
8
8
  },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/BBaysinger/json5-manifest-sync.git"
12
+ },
13
+ "homepage": "https://github.com/BBaysinger/json5-manifest-sync#readme",
14
+ "bugs": {
15
+ "url": "https://github.com/BBaysinger/json5-manifest-sync/issues"
16
+ },
9
17
  "type": "module",
10
18
  "main": "./dist/json5-manifest-sync.js",
11
19
  "types": "./dist/json5-manifest-sync.d.ts",