Skip to content

Dependants put links in lockfile #89

Description

@AndrewFerr

Problem

When another npm/Yarn project pulls in @vector-im/matrix-wysiwyg as a dependency, its lockfile ends up with a dependency on a link file belonging to @vector-im/matrix-wysiwyg-wasm.

This is irritating when the link is a machine-dependent cache path, which can change when updating the lockfile on a different OS than it was last updated on. (Example)

Steps to reproduce

  • Initialize a new npm/yarn project
  • npm i @vector-im/matrix-wysiwyg or yarn add @vector-im/matrix-wysiwyg

Result:
If using npm, package-lock.json will contain:

    "node_modules/@vector-im/matrix-wysiwyg": {
      ...
      "dependencies": {
        "@vector-im/matrix-wysiwyg-wasm": "link:../../bindings/wysiwyg-wasm"
      },
      ...
    },

If using yarn v1.x, yarn.lock will contain:

"@vector-im/matrix-wysiwyg@^2.40.0":
  ...
  dependencies:
    "@vector-im/matrix-wysiwyg-wasm" "link:../../.cache/yarn/v6/npm-@vector-im-matrix-wysiwyg-2.40.0-53c9ca5ea907d91e4515da64f20a82e5586b882c-integrity/node_modules/bindings/wysiwyg-wasm"

If using yarn >v1, yarn.lock will contain:

"@vector-im/matrix-wysiwyg-wasm@link:../../bindings/wysiwyg-wasm::locator=%40vector-im%2Fmatrix-wysiwyg%40npm%3A2.40.0":
  version: 0.0.0-use.local
  resolution: "@vector-im/matrix-wysiwyg-wasm@link:../../bindings/wysiwyg-wasm::locator=%40vector-im%2Fmatrix-wysiwyg%40npm%3A2.40.0"
  languageName: node
  linkType: soft

"@vector-im/matrix-wysiwyg@npm:^2.40.0":
   ...
  dependencies:
    "@vector-im/matrix-wysiwyg-wasm": "link:../../bindings/wysiwyg-wasm"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions