RFC: feat(config): Use more conventional paths for config and data by wbinnssmith · Pull Request #5336 · yarnpkg/yarn
This implements: * Supporting user-defined environment variables adhering to the [XDG Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-0.6.html) to override yarn's defaults * Supporting equivalent environment variables on Windows such as %LOCALAPPDATA% * More conventional defaults for these locations according to the operating system. * Support for the user defined config dir in the `.yarnrc` lookup path * Storing global modules in a data-oriented location rather than a config location (seeing this is actually what motivated this PR) Concerns: * Existing Windows config locations will break. This probably need to be addressed with a migration path and/or a breaking change * A few notes included in comments (will highlight these with inline GH comments) * Unclear test status as master builds appears to fail on my laptop as well. Really interested in your feedback. I know [this has been attempted before](https://github.com/yarnpkg/yarn/pull/3674/files) -- cc @kelseasy -- and I'd really like to get this in!
Will Binns-Smith added 2 commits
February 8, 2018 00:59wbinnssmith pushed a commit to wbinnssmith/yarn that referenced this pull request
Feb 9, 2018Following from yarnpkg#5336, this makes the typical directories for XDG and Windows conventions the default. This RFC is really carried over from yarnpkg#5336, where we continued to use the existing locations inside ~/.config and punted on migrating users to these new locations. A suggestion from the prior PR include moving the contents of the existing directories (should they exist), leaving a symlink in place. I really like this approach, however there will be a cost to checking to see if these directories exist and leaving symlinks behind in a synchronous way to maintain compatibility with how we expose constants synchronously from a module. Please chime in!
ttamj
mentioned this pull request
wbinnssmith pushed a commit to wbinnssmith/yarn that referenced this pull request
Feb 3, 2019Following from yarnpkg#5336, this makes the typical directories for XDG and Windows conventions the default. This RFC is really carried over from yarnpkg#5336, where we continued to use the existing locations inside ~/.config and punted on migrating users to these new locations. A suggestion from the prior PR include moving the contents of the existing directories (should they exist), leaving a symlink in place. I really like this approach, however there will be a cost to checking to see if these directories exist and leaving symlinks behind in a synchronous way to maintain compatibility with how we expose constants synchronously from a module. Please chime in!
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