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

changelog-view

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

changelog-view - npm Package Compare versions

Comparing version 1.5.1 to 1.6.0

src/logger.js

8

CHANGELOG.md

@@ -7,2 +7,10 @@ # Changelog

## [1.6.0] - 2018-04-05
### Changed
* add `--verbose` option to display debug informations
## [1.5.1] - 2018-04-02
### Changed
* Update README.md file to match current version
## [1.5.0] - 2018-03-16

@@ -9,0 +17,0 @@ ### Changed

2

package.json
{
"name": "changelog-view",
"version": "1.5.1",
"version": "1.6.0",
"description": "Tool to view changelog of package in console",

@@ -5,0 +5,0 @@ "bin": {

// #!/usr/bin/env node
import 'babel-polyfill';
import minimist from 'minimist';
import logger from './logger';
import packageListChangeLog from './';

@@ -12,2 +13,3 @@

help: 'h',
verbose: 'v',
},

@@ -28,2 +30,3 @@ });

log(' -h, --help Display this usage info');
log(' -v, --verbose Display debug informations');
process.exit(args.help ? 0 : 1);

@@ -35,3 +38,6 @@ } else {

function go(args) {
if (args.verbose) {
logger.setLogLevel(args.verbose);
}
packageListChangeLog(args._);
}

@@ -7,2 +7,3 @@ import https from 'https';

import { extractNextLink } from './github-tools';
import logger from './logger';

@@ -40,9 +41,14 @@ const TEST_PROCESSES = [

export async function getPackageData(packageName, gtThanVersion = null) {
logger.log(`Package: ${packageName}, current version: ${gtThanVersion}`);
for (let i = 0; i < TEST_PROCESSES.length; i++) {
const fileToTest = TEST_PROCESSES[i];
logger.log('testing file:', fileToTest);
try {
switch (fileToTest.type) {
case 'github-file':
const url = `https://raw.githubusercontent.com/${packageName}/master/${fileToTest.fileName}`;
const url = `https://raw.githubusercontent.com/${packageName}/master/${
fileToTest.fileName
}`;
const ghFileResult = await innerFetch(url);

@@ -68,3 +74,5 @@

default:
const msg = `Unable to determine file type to test: "${fileToTest.type}"`;
const msg = `Unable to determine file type to test: "${
fileToTest.type
}"`;
throw new Error(msg);

@@ -99,3 +107,10 @@ break;

.then(versionList => {
return filterVersionList(versionList, gtThanVersion);
const filteredVersionList = filterVersionList(versionList, gtThanVersion);
logger.log(
`found ${
filteredVersionList.length
} versions greater than "${gtThanVersion}" for package "${packageName}"`
);
return filteredVersionList;
});

@@ -102,0 +117,0 @@ }

Sorry, the diff of this file is not supported yet

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