masochist
masochist copied to clipboard
Prepare for npm config breakage
npm commands have started printing warnings.
eg. npm config list says (edited excerpt):
npm warn Unknown user config "content-repo" (masochist:content-repo). This will stop working in the next major version of npm.
; "user" config from $HOME/.npmrc
masochist:content-repo = "./content"
; node bin location = $HOME/n/bin/node
; node version = v22.13.1
; npm version = 11.2.0
I'm using this trick — referencing $npm_package_config_content_repo in the package.json — to allow me to set a different path to the content repo in local dev and in prod:
https://github.com/wincent/masochist/blob/9466a1a7ba8eb1e3e333a6378165f793c6f4a167/package.json#L20-L24
To be fair, I am using yarn, so I may be isolated from this, but wanted to get this into an issue just in case.