fix(cli): Use correct directory for upgrade-interactive#5272
Merged
arcanis merged 1 commit intoyarnpkg:masterfrom Jan 29, 2018
Merged
fix(cli): Use correct directory for upgrade-interactive#5272arcanis merged 1 commit intoyarnpkg:masterfrom
arcanis merged 1 commit intoyarnpkg:masterfrom
Conversation
TimvdLippe
approved these changes
Jan 28, 2018
Contributor
TimvdLippe
left a comment
There was a problem hiding this comment.
Cool, thanks for fixing my issue #4728 🎉
arcanis
approved these changes
Jan 29, 2018
Member
|
Thanks! |
agoldis
added a commit
to agoldis/yarn
that referenced
this pull request
Feb 2, 2018
…readdir_files * upstream/master: (34 commits) feat(upgrade, add): Separately log added/upgraded dependencies (yarnpkg#5227) feat(publish): Publish command uses publishConfig.access in package.json (yarnpkg#5290) fix(CLI): Use process exit instead of exitCode for node < 4 (yarnpkg#5291) feat(cli): error on missing workspace directory (yarnpkg#5206) (yarnpkg#5222) feat: better error when package is not found (yarnpkg#5213) Allow scoped package as alias source (yarnpkg#5229) fix(cli): Use correct directory for upgrade-interactive (yarnpkg#5272) nohoist baseline implementation (yarnpkg#4979) 1.4.1 1.4.0 Show current version, when new version is not supplied on "yarn publish" (yarnpkg#4947) fix(install): use node-gyp from homebrew npm (yarnpkg#4994) Fix transient symlinks overriding direct ones v2 (yarnpkg#5016) fix(auth): Fixes authentication conditions and logic with registries (yarnpkg#5216) chore(package): move devDeps to appropriate place (yarnpkg#5166) fix(resolution) Eliminate "missing peerDep" warning when dep exists at root level. (yarnpkg#5088) fix(cli): improve guessing of package names that contain a dot (yarnpkg#5102) (yarnpkg#5135) feat(cli): include notice with license when generating disclaimer (yarnpkg#5072) (yarnpkg#5111) feat(cli): group by license in licenses list (yarnpkg#5074) (yarnpkg#5110) feat(cli): improve error message when file resolver can't find file (yarnpkg#5134) (yarnpkg#5145) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
upgrade-interactivewas updating thepackage.jsonin the current directory (where Yarn was run) instead of where the upgrades were made. The most notable occurrence of this wasglobal upgrade-interactive, but it also happened by using the--cwdoption.When the location was not a workspace, it resolved to the current directory instead of using the previously configured one. Additionally,
config.cwdwas changed without being cleaned up, so it contained the last processed workspace, which affected anything that used it afterwards (e.g. symlinking binaries).Fixes #4728
Fixes #4952
Fixes #4922
Test plan
Install any package globally, then upgrade it interactively without being in the global directory. (or with
--cwd). The binary of the package that is being upgraded was symlinked again, but all other symlinks were removed.Before
After