Skip to content

Linked packages in package-lock.json do not parse #3

@joshbode

Description

@joshbode

Thank you for this tool - it is very useful to me :)

Linked local packages in package-lock.json cause an error due to missing version field:

$ git diff

Note: Could not parse /var/folders/8b/xjb2221d1c307gt0k8z_8tjr0000gn/T/git-blob-DRaJ5G/package-lock.json: missing field `version` at line 9604 column 5
Note: Could not parse package-lock.json: missing field `version` at line 9639 column 5

The links are created via the workspaces option in package.json:

{
  ...
  "workspaces": [
    "extensions/*"
  ],
  ...
}

The entries in the lock-file look like this:

    "node_modules/some-local-package": {
      "resolved": "extensions/some-local-package",
      "link": true
    },

I don't believe that version is expected here, since all the information is carried on the package.json in the referenced directory (which does have a version).

Version: lockdiff 2.0.2

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