AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Npm updates12/8/2023 So in this case, let’s say I’m starting with node-fetch. With NCU, you can filter for a specific package by using the –filter or -f flag. Once you know how the updates will affect your code, update each major change in a separate commit. Before you update these, you should read the release note docs to see how the new version will affect your project. Update Major Versions.įinally, I update all major updates. Run npm i, ensure everything is still working, and commit the changes (so I can revert if necessary). Again, assuming the package maintainers are following semantic versioning, this shouldn’t break anything. Assuming the package maintainers are following semantic versioning, this shouldn’t break anything. Update Patches.įirst, I update all patches. Note: In semantic versioning, the number on the right stands for patches (bug fixes), the number in the middle stands for minor versions (new features added in a backwards compatible manner), and major versions (new features added in a breaking manner). NPU maintains semantic versioning policies, so you can quickly identify patches, minor updates, or major updates that need fixing. The existing version is on the left and the latest version is on the right. This will return a list of packages that need to be updated. Run NPM Check Updates.Ĭd to a directory with your project and run the following command. Note: Access the full docs for NPM Check Updates. (Alternatively, you can run it with NPX.) npm install -g npm-check-updates It’s often best to just install NPM check updates globally. NPM Check Updates is a CLI that will help you safely make those updates. When you come back to an old web dev project, it’s important to update your packages to get new features, bug fixes, and security patches.
0 Comments
Read More
Leave a Reply. |