-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
misuses cache to install the git dependency at the wrong commit, seems to happen particularly when specifying git branch
If the current behavior is a bug, please provide the steps to reproduce.
sample repo: https://github.com/SEAPUNK/yarn-test-thing
yarn add SEAPUNK/yarn-test-thing- edit package.json's dependency from
SEAPUNK/yarn-test-thingtoSEAPUNK/yarn-test-thing#branch - edit the yarn.lock file to change the single dependency from what it is to
yarn-test-thing@seapunk/yarn-test-thing#branch:
version "0.0.1-something"
resolved "https://codeload.github.com/seapunk/yarn-test-thing/tar.gz/3ea9fe7984b9005f3cc62b14ee4018013ae0db0f"
i.e. what it will be when you run yarn upgrade
yarn install- inspect node_modules/yarn-test-thing, and see that the files BRANCH_ONE and BRANCH_TWO are not there
What is the expected behavior?
installs the right version at commit 3ea9fe7984b9005f3cc62b14ee4018013ae0db0f
Please mention your node.js, yarn and operating system version.
node.js 8.7.0
yarn 1.2.1
macos high sierra
this is particularly annoying when you have committed a commit to the git dependency branch, ran yarn upgrade, check in the new yarn lockfile to the repo you're working on, only for yarn to not install that "resolved" version in the lockfile when someone else checks the code out and runs yarn install