Tracking Upgraded NPM packages that break a build
When using TeamCity to build a web site that manages dependencies via NPM, I would like to be able to use a semver in the verison numbers within package.json so that I do not get too far behind on keeping my dependencies updated. However, sometimes things get updated that cause issues that break the build. Currently when this happens, there is not a good way for me to see what package or packages may have updated since the last build that may have broken it, so it takes a long time to find the issue, then hard-code the desired version in the packages.json, and rebuild.
Is there any easy way to determine what dependencies may have been updated from one build to the next?
Is there another good way to manage this, other than fixing my version numbers and needing to manually update and test them every so often?
Please sign in to leave a comment.
Well, here is a start.... I added a command line build step with the following lines:
npm ls --depth=0 > package_versions.txt
cat package_versions.txt
I then added a line to the Artifacts Path field of the General Settings:
%svn.project.folder%/package_versions.txt => package_versions.txt
At least this way I can easily find the versions via the build log and can download the package_versions.txt files from 2 builds and manually compare them with something like winmerge.
Hi Glenn,
The only integration with npm that I'm aware of is through a third party plugin. If you are using it, I would suggest directing your questions or requests about it to their developer. Other than that, you'll need to resort to scripting, as you already pointed out.