yarnpkg/yarn

impossible to update package without pulling in updates of all dependencies

开放

#5,475 创建于 2018年3月7日

 (9 条评论) (15 个反应) (1 位负责人)JavaScript (2,731 个派生)batch import
cat-buggood first issuehelp wantedtriaged

仓库指标

星标
 (41,514 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Do you want to request a feature or report a bug? bug

What is the current behavior?

  1. there's a package.json, where "<packagename>": "~4.6.0", dependency is defined
  2. there's an entry in yarn.lock, which has the following lines:
"<packagename>@~4.6.0":
  version "4.6.73"
  resolved "https://<repository-url>/<packagename>-4.6.73.tgz#376e31e5ee9f7c6bb2c89d3921bfe7b24b6a75cf"
  dependencies:
    bootstrap-sass "^3.3.7"
    ember-bootstrap "^1.0.0"
    ember-bootstrap-datetimepicker "^1.1.0"
    ember-cli-babel "^5.1.7"
    ember-cli-htmlbars "^1.3.4"
    ember-cli-moment-shim "^3.5.0"
    ember-cli-string-helpers "^1.5.0"
    ember-component-css "^0.3.7"
    ember-config-service "^0.1.5"
    ember-font-awesome "^3.1.0"
    ember-moment "^7.4.1"
    ember-power-select "^1.10.4"
    ember-sticky-element "0.1.3"
    ember-truth-helpers "^2.0.0"
    eonasdan-bootstrap-datetimepicker "^4.17.47"
  1. there's a new version of <packagename> in repository (4.6.74)
  2. the only thing that is changed in the new version of <packagename> is package.json file (with version bumped). Just one number, no other changes at all.

There is no way to update <packagename> from 4.6.73 to 4.6.74 without updating all its dependencies

What is the expected behavior? With yarn 1.3.2 we could run yarn add <packagename>@~4.6.0 --force and the package would be updated correctly, in 1.5.1 this doesn't do anything. There's no other way of doing update like that (yarn update pulls updates for other dependencies which is unacceptable).

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

yarn versions v1.5.1
{ yarn: '1.5.1',
  http_parser: '2.7.0',
  node: '6.10.2',
  v8: '5.1.281.98',
  uv: '1.9.1',
  zlib: '1.2.11',
  ares: '1.10.1-DEV',
  icu: '58.2',
  modules: '48',
  openssl: '1.0.2k' }

贡献者指南