-
-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Better adhere to XDG specification #180
Comments
I agree. Should be “data”, not “cache”. |
I can create a PR for this, do you have a recommended way to do it? The simplest is probably passing in the new configPath to configstore. |
This would be a welcome addition. I think
{
"optOut": false,
"lastUpdateCheck": 1634843835359,
"update": {
"latest": "8.1.0",
"current": "6.14.11",
"type": "major",
"name": "npm"
}
} There's a node library that abstracts away most of the logic: https://www.npmjs.com/package/xdg-basedir Happy to submit a PR for this if there's still support for it. import {xdgData, xdgConfig, xdgDataDirectories} from 'xdg-basedir';
console.log(xdgData);
//=> '/home/sindresorhus/.local/share'
console.log(xdgConfig);
//=> '/home/sindresorhus/.config'
console.log(xdgDataDirectories);
//=> ['/home/sindresorhus/.local/share', '/usr/local/share/', '/usr/share/'] |
Spec for reference
Currently, any package that uses
update-notifier
results in anupdate-notifier-<package>.json
being put in$XDG_CONFIG_HOME
.As someone who symlinks my
$XDG_CONFIG_HOME
into my dotfiles repository, this leads to undesired behavior. These are not files that I want in my dotfiles, nor do I think they would be useful to keep in sync across multiple devices. I believe the data stored here would be more appropriate in$XDG_DATA_HOME
or$XDG_CACHE_HOME
The text was updated successfully, but these errors were encountered: