-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a way to diff the new tarball content with previously published v…
…ersion This is intended to be used as part of our release process before publishing to NPM --dry-run is a useful step, but can be fairly noisy, yarn run v1.21.1 to go along the fake deploy and more clearly shows what would be added and deleted
- Loading branch information
1 parent
dc3ea68
commit 4379e8f
Showing
3 changed files
with
371 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
const packlist = require('npm-packlist') | ||
const npmContent = require('list-npm-contents'); | ||
|
||
npmContent('mapbox-gl').then(function(last_version_files) { | ||
packlist({ path: '.' }).then(function(new_version_files) { | ||
new_version_files = new_version_files.map(file => file.replace(/\/\/+/g, '/')); | ||
let diff_new = new_version_files.filter(x => !last_version_files.includes(x)); | ||
let diff_last = last_version_files.filter(x => !new_version_files.includes(x)); | ||
console.log(`${diff_new.length} files are about to be added in the new tarball`) | ||
diff_new.forEach(file => { | ||
console.log('+', file); | ||
}); | ||
console.log(`${diff_last.length} files are about to be deleted in the new tarball`) | ||
diff_last.forEach(file => { | ||
console.log('-', file); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.