Skip to content

Support JSONC comments in config file - #36

Merged
theoephraim merged 2 commits into
mainfrom
feat/jsonc-config-support
Apr 22, 2026
Merged

theoephraim merged 2 commits into
mainfrom
feat/jsonc-config-support

Conversation

@theoephraim

Copy link
Copy Markdown
Member

Summary

  • Add a lightweight JSONC parser that strips // line comments, /* */ block comments, and trailing commas from .bumpy/_config.json
  • Extracted into its own module (src/utils/jsonc.ts) with tests covering comments, trailing commas, string preservation, and invalid input
  • Updated config docs with a tip about JSONC support

Adapted from tiny-jsonc.

Test plan

  • parseJsonc handles plain JSON
  • parseJsonc strips line and block comments
  • parseJsonc handles trailing commas
  • parseJsonc preserves comment-like content inside strings
  • parseJsonc throws on invalid input

🤖 Generated with Claude Code

Add jsonc-parser dependency and readJsonc utility so that
.bumpy/_config.json can contain // and /* */ comments.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bumpy-bot

bumpy-bot commented Apr 22, 2026 •

Copy link
Copy Markdown
Collaborator

bumpy-frog

The changes in this PR will be included in the next version bump.

patch Patch releases

  • @varlock/bumpy 1.1.0 → 1.1.1

Bump files in this PR

Click here if you want to add another bump file to this PR


This comment is maintained by bumpy.

@theoephraim
theoephraim force-pushed the feat/jsonc-config-support branch 2 times, most recently from 2fb8285 to bd741b2 Compare April 22, 2026 01:44
Add a lightweight JSONC parser (strips comments and trailing commas)
so that .bumpy/_config.json can contain // and block comments.
Adapted from https://github.com/fabiospampinato/tiny-jsonc

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@theoephraim
theoephraim force-pushed the feat/jsonc-config-support branch from bd741b2 to 1625ee8 Compare April 22, 2026 01:45
@theoephraim
theoephraim merged commit 455b25d into main Apr 22, 2026
2 checks passed
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