Skip to content

Lock files generated by yarn install and yarn generate-lock-entry are different #2340

@longseespace

Description

@longseespace

Yarn version
0.18.1

Do you want to request a feature or report a bug?
Bug (not sure)

What is the current behavior?
Given a same package.json, lock files generated by yarn install and yarn generate-lock-entry are different

If the current behavior is a bug, please provide the steps to reproduce.
package.json

{
  "name": "test-yarn-generate-lock-entry",
  "version": "1.0.0",
  "dependencies": {
    "bunyan": "1.8.3",
    "js-yaml": "3.7.0",
    "lodash": "4.16.4",
    "node-shell-parser": "0.2.1",
    "restify": "4.1.1",
    "ws": "1.1.1"
  }
}

yarn install produces:

# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


argparse@^1.0.7:
  version "1.0.9"
  resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86"
  dependencies:
    sprintf-js "~1.0.2"

asn1@0.1.11:
  version "0.1.11"
  resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.1.11.tgz#559be18376d08a4ec4dbe80877d27818639b2df7"

assert-plus@^0.1.5:
  version "0.1.5"
  resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.1.5.tgz#ee74009413002d84cec7219c6ac811812e723160"

assert-plus@^1.0.0:
  version "1.0.0"
  resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525"

backoff@^2.4.0:
  version "2.5.0"
  resolved "https://registry.yarnpkg.com/backoff/-/backoff-2.5.0.tgz#f616eda9d3e4b66b8ca7fca79f695722c5f8e26f"
  dependencies:
    precond "0.2"

...

yarn generate-lock-entry produces:

# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


test-yarn-generate-lock-entry@1.0.0:
  version "1.0.0"
  dependencies:
    bunyan "1.8.3"
    js-yaml "3.7.0"
    lodash "4.16.4"
    node-shell-parser "0.2.1"
    restify "4.1.1"
    ws "1.1.1"

What is the expected behavior?
yarn install and yarn generate-lock-entry produce the same yarn.lock file. Or provide documentation on how to produce the same yarn.lock file

Please mention your node.js, yarn and operating system version.

$ system_profiler SPSoftwareDataType
Software:

    System Software Overview:

      System Version: macOS 10.12.2 (16C68)
      Kernel Version: Darwin 16.3.0

$ uname -a
Darwin Yosemite.local 16.3.0 Darwin Kernel Version 16.3.0: Thu Nov 17 20:23:58 PST 2016; root:xnu-3789.31.2~1/RELEASE_X86_64 x86_64

$ node --version
v7.2.1

$ yarn --version
0.18.1

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