Skip to content

A universal lockfile format for all package managers #40

Open
@jonkoops

Description

@jonkoops

I hope this is the right place to bring forward such a proposal, but I am looking for a place to discuss a possible standardization of the lock file format for package managers in the JavaScript ecosystem. There are many package managers out there, all with their own lock file formats:

  • NPM — package-lock.json (JSON)
  • PNPM — pnpm-lock.yaml (YAML)
  • Yarn — yarn.lock (YAML)
  • Deno — deno.lock (JSON)
  • Bun — bun.lock (JSON)

Having this many different formats impacts portability for projects, essentially locking users into choosing a single package management solution and sticking with it. Moving between package managers is still possible, but could have unintended side effects, such as accidental upgrades of transitive dependencies.

Considering that all formats essentially serve the same purpose with only minor functional differences and is essentially a solved problem space, it seems like now would be a good time to unify efforts and come up with a common standard for lock files that could be implemented by all package managers.

There are some pre-existing efforts in other ecosystems that might serve as inspiration, for example Python recently adopted a new proposal to standardize a lock file format.

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