Skip to content

Bun creates .npmrc even when bunfig.toml already exists #134

@JarekToro

Description

@JarekToro

Currently, when using Bun as the package manager, the JSR CLI creates an .npmrc file for registry configuration on Bun v1.1.18+ (which supports npmrc), even if a bunfig.toml file already exists in the project.
This behavior doesn't respect existing Bun-specific configuration and can cause confusion in projects that prefer to use bunfig.toml for all Bun-related settings.
Expected behavior:
If a bunfig.toml file already exists in the project, it should be used for JSR registry configuration regardless of the Bun version, instead of creating a new .npmrc file.

Current behavior:
Bun v1.1.17 and lower: Creates/uses bunfig.toml (no npmrc support)
Bun v1.1.18+: Creates/uses .npmrc even if bunfig.toml exists

Proposed solution:
Check for existing bunfig.toml first and use it if present, regardless of Bun version support for .npmrc.

PR incoming

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