Skip to content

Support Commands with JSONC in bun 1.2 package.json #252

Open
@austinm911

Description

@austinm911

Describe the bug

https://bun.sh/blog/bun-v1.2#jsonc-support-in-package-json

It appears running commands such as nr or nr dev with JSONC comments in a package.json does not work. It does work if you run commands with bun such as bun dev

You will see an error such as ✘ [ERROR] JSON does not support comments

@antfu/[email protected]

Reproduction

Add a comment to package.json in bun 1.2 and run nr

System Info

System:
    OS: macOS 15.2
    CPU: (10) arm64 Apple M1 Pro
    Memory: 177.06 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.12.2 - ~/.nvm/versions/node/v20.12.2/bin/node
    npm: 10.9.0 - ~/.nvm/versions/node/v20.12.2/bin/npm
    bun: 1.2.0 - /opt/homebrew/bin/bun
    Watchman: 2024.12.02.00 - /opt/homebrew/bin/watchman
  Browsers:
    Brave Browser: 131.1.73.105
    Chrome: 131.0.6778.265
    Safari: 18.2

Used Package Manager

bun

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Contributions

  • I am willing to submit a PR to fix this issue
  • I am willing to submit a PR with failing tests (actually just go ahead and do it, thanks!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions