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

github-releases

Package Overview
Dependencies
Maintainers
3
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github-releases - npm Package Compare versions

Comparing version 0.2.1 to 0.3.0

12

lib/cli.js

@@ -14,3 +14,3 @@ (function() {

options = optimist.usage("Usage: github-releases [--tag==<tag>] [--filename=<filename>] [--token=<token>] <command> <repo>").alias('h', 'help').describe('help', 'Print this usage message').string('token').describe('token', 'Your GitHub token').string('tag').describe('tag', 'The tag of the release')["default"]('tag', '*').string('filename').describe('filename', 'The filename of the asset')["default"]('filename', '*');
options = optimist.usage("Usage: github-releases [--tag==<tag>] [--pre] [--filename=<filename>] [--token=<token>] <command> <repo>").alias('h', 'help').describe('help', 'Print this usage message').string('token').describe('token', 'Your GitHub token').string('tag').describe('tag', 'The tag of the release').boolean('pre').describe('pre', 'Is the release a pre-release')["default"]('pre', false).string('filename').describe('filename', 'The filename of the asset')["default"]('filename', '*');

@@ -28,7 +28,11 @@ print = function(error, result) {

run = function(github, command, argv, callback) {
var filters;
switch (command) {
case 'list':
return github.getReleases({
tag_name: argv.tag
}, callback);
filters = {};
if (argv.tag != null) {
filters.tag_name = argv.tag;
}
filters.prerelease = argv.pre;
return github.getReleases(filters, callback);
case 'show':

@@ -35,0 +39,0 @@ return run(github, 'list', argv, function(error, releases) {

@@ -16,15 +16,18 @@ (function() {

Filters.prototype.matches = function(str, filter) {
var _i, _len, _ref;
if (filter instanceof RegExp) {
return filter.test(str);
} else {
_ref = filter.split(',');
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
filter = _ref[_i];
if (minimatch(str, filter)) {
return true;
Filters.prototype.matches = function(value, filter) {
var filterPart, _i, _len, _ref;
switch (filter.constructor) {
case RegExp:
return filter.test(value);
case String:
_ref = filter.split(',');
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
filterPart = _ref[_i];
if (minimatch(value, filterPart)) {
return true;
}
}
}
return false;
return false;
default:
return value === filter;
}

@@ -31,0 +34,0 @@ };

{
"name": "github-releases",
"description": "Node module for using GitHub Releases feature",
"version": "0.2.1",
"version": "0.3.0",
"main": "./lib/github.js",

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

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