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

libesvm

Package Overview
Dependencies
Maintainers
2
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libesvm - npm Package Compare versions

Comparing version 0.0.11 to 0.0.12

2

lib/checkEtag.js

@@ -12,3 +12,3 @@ var cache = require('./cache');

var options = {
url: 'https://api.github.com/repos/elasticsearch/elasticsearch/tags',
url: 'https://api.github.com/repos/elastic/elasticsearch/tags',
headers: {

@@ -15,0 +15,0 @@ 'User-Agent': 'ccowan/elastic-loader',

@@ -9,3 +9,3 @@ var _ = require('lodash');

* @param {function} cb The node style callback
* @returns {Promise}
* @returns {Promise}
*/

@@ -15,3 +15,3 @@ var fetchTags = function (queryString, cb) {

var options = {
url: 'https://api.github.com/repos/elasticsearch/elasticsearch/tags',
url: 'https://api.github.com/repos/elastic/elasticsearch/tags',
json: true,

@@ -25,3 +25,3 @@ headers: {

return utils.request(options).then(function (res) {
return res[1];
return res[1];
}).nodeify(cb);

@@ -28,0 +28,0 @@ };

@@ -11,20 +11,22 @@ var cache = require('./cache');

* Get an updated version of the latest tags from Github
* @param {function} cb The node style callback
* @param {function} cb The node style callback
* @returns {Promise}
*/
module.exports = function (cb) {
// return the tags if we have a fresh etag
// return the tags if we have a fresh etag
if (eTagFetched) return cache.get('tags');
return checkEtag().then(function (isFresh) {
eTagFetched = true;
if (isFresh === false) {
return fetchAllTags().then(function (tags) {
return cache.set('tags', tags).then(function () {
return tags;
return cache.get('tags').then(function (currentTags) {
if (isFresh === false || !currentTags) {
return fetchAllTags().then(function (tags) {
return cache.set('tags', tags).then(function () {
return tags;
});
});
});
}
return cache.get('tags');
}
return currentTags;
});
});
};

@@ -14,3 +14,3 @@ var _ = require('lodash');

tags = _.map(tags, function (tag) {
tag.name = tag.name.replace(/\.(beta|rc)/i, '-$1');
if (tag.name) tag.name = tag.name.replace(/\.(beta|rc)/i, '-$1');
return tag;

@@ -23,2 +23,3 @@ });

for (var i = 0; i<length; i++) {
if (!tags[i].name) continue;
var matches = tags[i].name.match(/^v(\d+\.\d+\.\d+)(\.(.+))?/);

@@ -25,0 +26,0 @@ var name = matches[1];

{
"name": "libesvm",
"version": "0.0.11",
"version": "0.0.12",
"description": "libesvm is a library for managning an Elasticsearch process for development and testing.",

@@ -5,0 +5,0 @@ "main": "index.js",

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