Skip to content

Commit

Permalink
xdg: update npm prefix
Browse files Browse the repository at this point in the history
and cleanup some stale values

* `update-notifier` was dropped in v7: npm/cli@d062b2c
* `devdir` no longer defaults to ~/.node-gyp: nodejs/node-gyp@8a83972
* Some tools try to respect npm's cache dir but only read `npm_config_cache`
  • Loading branch information
branchvincent committed Jul 10, 2024
1 parent 3ab8d10 commit 961dd26
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
11 changes: 3 additions & 8 deletions .config/fish/conf.d/__xdg.fish
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,9 @@ set -gx LESSHISTFILE /dev/null

# node
set -gx NODE_REPL_HISTORY /dev/null
set -gx NO_UPDATE_NOTIFIER 1 # used by npm: https://github.com/yeoman/update-notifier/issues/180
set -gx NPM_CONFIG_CACHE $XDG_CACHE_HOME/npm
set -gx NPM_CONFIG_DEVDIR $XDG_DATA_HOME/node-gyp
set -gx NPM_CONFIG_INIT_MODULE $XDG_CONFIG_HOME/npm/config/npm-init.js
set -gx NPM_CONFIG_PREFIX $XDG_DATA_HOME/npm
set -gx NPM_CONFIG_USERCONFIG $XDG_CONFIG_HOME/npm/npmrc
set -p XDG_BIN_DIRS $NPM_CONFIG_PREFIX/bin
__maybe_mkdir $NPM_CONFIG_PREFIX/lib
set -gx npm_config_cache $XDG_CACHE_HOME/npm
set -gx npm_config_prefix ~/.local
set -gx npm_config_userconfig $XDG_CONFIG_HOME/npm/npmrc

# pip
set -gx PIP_CACHE_DIR $XDG_CACHE_HOME/pip
Expand Down
2 changes: 1 addition & 1 deletion .config/npm/npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ audit=false
fund=false
update-notifier=false
# pragma: allowlist nextline secret
//registry.npmjs.org/:_authToken='${NPM_TOKEN}'
//registry.npmjs.org/:_authToken=${NPM_TOKEN}

0 comments on commit 961dd26

Please sign in to comment.