Introducing Package Diff

Visit the original version of this article on Medium.

I recently worked on a tool at my employer, Intrinsic. This tool is a web service called Package Diff. It's purpose: display a diff between two versions of the same npm package. This is actually the first hosted service we've released—our core product is a Node.js package which can be installed in a typical application.

A more complete version of this press release is available here: Introducing Package Diff. Just in case you're lazy the following is an excerpt from the press release:

GitHub is a great tool to view modifications to code repositories. It is the de facto source code repository for the Open Source community. Likewise, npm is a great package repository for distributing JavaScript modules, and is also the repository of choice for the Node.js community. That said, neither GitHub nor any code repository provides a perfect 1:1 relationship with between code commits and npm package releases.

By convention, running npm version will create a git tag with a format like v1.0.0, but again, there isn’t a strict enforcement that git tag is the snapshot of code which is released to npm. In fact, it often isn’t, as an author may create a version, modify their README in a follow-up commit, before finally running npm publish. There are even prepublish scripts and .npmignore files which ensure differences between the source code repository and package contents.

Thomas Hunter II Avatar

Thomas is the author of Advanced Microservices and is a prolific public speaker with a passion for reducing complex problems into simple language and diagrams. His career includes working at Fortune 50's in the Midwest, co-founding a successful startup, and everything in between.