npm
npm
oh noez.
default npm settings
you probably want to delay the installation of newly published packages for a few days to lower the chances of attacks and block scripts from running during installation. Add this to ~/.npmrc:
min-release-age=7
ignore-scripts=trueoverride min-release-age
if, for whatever reason, you need to override the min-release-age configured in .npmrc you can do this:
npm_config_min_release_age=0 npm i -g @openai/codexfind outdated packages
global packages:
npm outdated -g --depth=0local packages:
npm updatewithin the folder/repository.
upgrade outdated packages
ever got back to a project you didn’t update for a year? well.
first, install a tool (globally) to find outdated packages:
npm install -g npm-check-updatescheck outdated packages:
ncuupdate package.json:
ncu -uactually update the packages:
npm installhave fun that nothing is working. Hope you’ve got some tests in place.