Safer, more predictable npm publishing with publish-diff Publishing JavaScript projects to the npm registry is an exercise that, while commonplace, is often opaque to developers and fraught with peril. The opacity comes from projects frequently publishing built files that are omitted from git source and the some subtle but important differences between git source and a final npm registry package.