Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

changed-log

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

changed-log - npm Package Compare versions

Comparing version 0.4.2 to 0.5.0

2

package.json
{
"name": "changed-log",
"version": "0.4.2",
"version": "0.5.0",
"description": "Returns all commit messages between 2 versions of an NPM module",

@@ -5,0 +5,0 @@ "main": "src/changed-log.js",

@@ -9,2 +9,3 @@ require('lazy-ass');

var gTags = Promise.promisify(reposApi.getTags);
var debug = require('debug')('tags');

@@ -48,7 +49,26 @@ function nameAndSha(tags) {

la(check.array(allTags), 'missing tags', allTags);
var fromTag = _.find(allTags, 'name', question.from);
la(fromTag, 'cannot find tag', question.from, 'all tags', allTags);
var toTag = _.find(allTags, 'name', question.to);
la(toTag, 'cannot to tag', question.to, 'all tags', allTags);
var fromTagIndex = _.findIndex(allTags, 'name', question.from);
la(fromTagIndex !== -1, 'cannot find tag', question.from, 'all tags', allTags);
var toTagIndex = _.findIndex(allTags, 'name', question.to);
la(toTagIndex !== -1, 'cannot to tag', question.to, 'all tags', allTags);
debug('from tag %s index %d to tag %s index %d',
question.from, fromTagIndex,
question.to, toTagIndex);
if (fromTagIndex < toTagIndex) {
debug('flipping the tag order');
var tmp = fromTagIndex;
fromTagIndex = toTagIndex;
toTagIndex = tmp;
tmp = question.from;
question.from = question.to;
question.to = tmp;
}
var fromTag = allTags[fromTagIndex];
var toTag = allTags[toTagIndex];
return {

@@ -83,2 +103,16 @@ fromTag: fromTag,

function nextUpdateReverseTagOrderExample() {
var question = {
user: 'bahmutov',
repo: 'next-update',
from: '0.8.2',
to: '0.8.0'
};
log('Getting commit SHA for the given tags');
log(question);
getFromToTags(question)
.then(log);
}
function chalkExample() {

@@ -99,4 +133,5 @@ var question = {

chalkExample();
// chalkExample();
nextUpdateReverseTagOrderExample();
}());
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc