Skip to content

Add package-lock.json schema #5738

@Vessel9817

Description

@Vessel9817

Description of the JSON schema.

Supporting information.

Schema documentation:

As legacy npm versions are generally unmaintained, lockfile versions used only by legacy npm versions should be treated as deprecated. Currently, this makes lockfile v3 the only supported version.

Schema will apply to:

  • package-lock.json
  • npm-shrinkwrap.json

To the best of my knowledge, there is no documentation for a standardized lockfile format prior to npm v5, besides it missing the lockfileVersion property. The best way to create documentation for these ancient lockfile versions would be to play around with npm v1 through v4.

Note that lockfiles include various properties from package.json that are undocumented except in package.json, so additionalProperties should definitely be true.

Sample lockfiles:

Are you making a PR for this?

Yes, I will create a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions