New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cachely

Package Overview
Dependencies
Maintainers
2
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cachely - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0-next.1573218864.af635ba7416929388d80018334eb9d52e1c50be8

.github/FUNDING.yml

104

edition-browsers/index.js

@@ -17,6 +17,2 @@ 'use strict';

function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

@@ -111,66 +107,56 @@

key: "resolve",
value: function () {
var _resolve = _asyncToGenerator(
/*#__PURE__*/
regeneratorRuntime.mark(function _callee() {
var cache;
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
cache = this.validate();
_context.t0 = cache;
_context.next = _context.t0 === 'valid' ? 4 : _context.t0 === 'invalid' ? 6 : _context.t0 === 'empty' ? 6 : _context.t0 === 'updating' ? 23 : 25;
break;
value: function resolve() {
var cache;
return regeneratorRuntime.async(function resolve$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
cache = this.validate();
_context.t0 = cache;
_context.next = _context.t0 === 'valid' ? 4 : _context.t0 === 'invalid' ? 6 : _context.t0 === 'empty' ? 6 : _context.t0 === 'updating' ? 23 : 25;
break;
case 4:
this.log('debug', 'Cachely has resolved cached data');
return _context.abrupt("return", this.data);
case 4:
this.log('debug', 'Cachely has resolved cached data');
return _context.abrupt("return", this.data);
case 6:
this.log('debug', 'Cachely must resolve new data');
this.lastRequested = new Date();
this.lastUpdated = null;
this.lastRetrieval = Promise.resolve(this.retrieve());
_context.prev = 10;
_context.next = 13;
return this.lastRetrieval;
case 6:
this.log('debug', 'Cachely must resolve new data');
this.lastRequested = new Date();
this.lastUpdated = null;
this.lastRetrieval = Promise.resolve(this.retrieve());
_context.prev = 10;
_context.next = 13;
return regeneratorRuntime.awrap(this.lastRetrieval);
case 13:
this.data = _context.sent;
this.lastUpdated = new Date();
_context.next = 21;
break;
case 13:
this.data = _context.sent;
this.lastUpdated = new Date();
_context.next = 21;
break;
case 17:
_context.prev = 17;
_context.t1 = _context["catch"](10);
this.log('debug', 'Cachely failed to resolve new data');
return _context.abrupt("return", Promise.reject(_context.t1));
case 17:
_context.prev = 17;
_context.t1 = _context["catch"](10);
this.log('debug', 'Cachely failed to resolve new data');
return _context.abrupt("return", Promise.reject(_context.t1));
case 21:
this.log('debug', 'Cachely has resolved the new data');
return _context.abrupt("return", this.data);
case 21:
this.log('debug', 'Cachely has resolved the new data');
return _context.abrupt("return", this.data);
case 23:
this.log('debug', 'Cachely is waiting for the new data to resolve');
return _context.abrupt("return", this.lastRetrieval);
case 23:
this.log('debug', 'Cachely is waiting for the new data to resolve');
return _context.abrupt("return", this.lastRetrieval);
case 25:
return _context.abrupt("return", Promise.reject(new Error('Unknown cache state')));
case 25:
return _context.abrupt("return", Promise.reject(new Error('Unknown cache state')));
case 26:
case "end":
return _context.stop();
}
case 26:
case "end":
return _context.stop();
}
}, _callee, this, [[10, 17]]);
}));
function resolve() {
return _resolve.apply(this, arguments);
}
return resolve;
}()
}
}, null, this, [[10, 17]]);
}
}], [{

@@ -177,0 +163,0 @@ key: "create",

# History
## v2.2.0 2019 November 8
- Updated [base files](https://github.com/bevry/base) and [editions](https://editions.bevry.me) using [boundation](https://github.com/bevry/boundation)
## v2.1.0 2019 January 1

@@ -4,0 +8,0 @@

@@ -18,3 +18,3 @@ <!-- LICENSEFILE/ -->

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.

@@ -21,0 +21,0 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

{
"name": "cachely",
"version": "2.1.0",
"version": "2.2.0-next.1573218864.af635ba7416929388d80018334eb9d52e1c50be8",
"description": "A tiny wrapper that sits around your request function that caches its data for a specified duration, provides updates as requested rather than polling each interval",

@@ -23,4 +23,2 @@ "homepage": "https://github.com/bevry/cachely",

"liberapay",
"thanksapp",
"boostlab",
"buymeacoffee",

@@ -43,2 +41,6 @@ "opencollective",

},
"funding": {
"type": "cooperative",
"url": "https://bevry.me/fund"
},
"author": "2015+ Bevry Pty Ltd <us@bevry.me> (http://bevry.me)",

@@ -72,3 +74,3 @@ "maintainers": [

"engines": {
"node": "8 || 10 || 11",
"node": "8 || 10 || 12",
"browsers": false

@@ -97,18 +99,18 @@ }

"devDependencies": {
"@babel/cli": "^7.2.3",
"@babel/core": "^7.2.2",
"@babel/plugin-proposal-object-rest-spread": "^7.2.0",
"@babel/preset-env": "^7.2.3",
"assert-helpers": "^4.9.3",
"eslint": "^5.11.1",
"eslint-config-bevry": "^1.1.1",
"eslint-config-prettier": "^3.3.0",
"eslint-plugin-prettier": "^3.0.1",
"jsdoc": "^3.5.5",
"@babel/cli": "^7.7.0",
"@babel/core": "^7.7.2",
"@babel/plugin-proposal-object-rest-spread": "^7.6.2",
"@babel/preset-env": "^7.7.1",
"assert-helpers": "^4.9.7",
"eslint": "^6.6.0",
"eslint-config-bevry": "^1.2.1",
"eslint-config-prettier": "^6.5.0",
"eslint-plugin-prettier": "^3.1.1",
"jsdoc": "^3.6.3",
"kava": "^3.1.0",
"minami": "^1.2.3",
"prettier": "^1.15.3",
"projectz": "^1.7.4",
"surge": "^0.20.1",
"typechecker": "^4.5.0",
"prettier": "^1.18.2",
"projectz": "^1.7.5",
"surge": "^0.21.3",
"typechecker": "^4.7.0",
"valid-directory": "^1.0.0"

@@ -131,8 +133,9 @@ },

"our:release:tag": "export MESSAGE=$(cat ./HISTORY.md | sed -n \"/## v$npm_package_version/,/##/p\" | sed 's/## //' | awk 'NR>1{print buf}{buf = $0}') && test \"$MESSAGE\" || (echo 'proper changelog entry not found' && exit -1) && git tag v$npm_package_version -am \"$MESSAGE\"",
"our:setup": "npm run our:setup:npm",
"our:setup:npm": "npm install",
"our:setup": "npm run our:setup:install",
"our:setup:install": "npm install",
"our:test": "npm run our:verify && npm test",
"our:verify": "npm run our:verify:directory && npm run our:verify:eslint",
"our:verify": "npm run our:verify:directory && npm run our:verify:eslint && npm run our:verify:prettier",
"our:verify:directory": "npx valid-directory",
"our:verify:eslint": "eslint --fix --ignore-pattern '**/*.d.ts' --ignore-pattern '**/vendor/' --ignore-pattern '**/node_modules/' --ext .mjs,.js,.jsx,.ts,.tsx ./source",
"our:verify:prettier": "prettier --write ./source/**",
"test": "node ./source/test.js"

@@ -139,0 +142,0 @@ },

@@ -19,4 +19,2 @@ <!-- TITLE/ -->

<span class="badge-liberapay"><a href="https://liberapay.com/bevry" title="Donate to this project using Liberapay"><img src="https://img.shields.io/badge/liberapay-donate-yellow.svg" alt="Liberapay donate button" /></a></span>
<span class="badge-thanksapp"><a href="https://givethanks.app/donate/npm/cachely" title="Donate to this project using Thanks App"><img src="https://img.shields.io/badge/thanksapp-donate-yellow.svg" alt="Thanks App donate button" /></a></span>
<span class="badge-boostlab"><a href="https://boost-lab.app/bevry/cachely" title="Donate to this project using Boost Lab"><img src="https://img.shields.io/badge/boostlab-donate-yellow.svg" alt="Boost Lab donate button" /></a></span>
<span class="badge-buymeacoffee"><a href="https://buymeacoffee.com/balupton" title="Donate to this project using Buy Me A Coffee"><img src="https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg" alt="Buy Me A Coffee donate button" /></a></span>

@@ -156,3 +154,3 @@ <span class="badge-opencollective"><a href="https://opencollective.com/bevry" title="Donate to this project using Open Collective"><img src="https://img.shields.io/badge/open%20collective-donate-yellow.svg" alt="Open Collective donate button" /></a></span>

<ul><li><a href="http://balupton.com">Benjamin Lupton</a> — <a href="https://github.com/bevry/cachely/commits?author=balupton" title="View the GitHub contributions of Benjamin Lupton on repository bevry/cachely">view contributions</a></li></ul>
<ul><li><a href="http://balupton.com">Benjamin Lupton</a></li></ul>

@@ -166,4 +164,2 @@ <h3>Sponsors</h3>

<span class="badge-liberapay"><a href="https://liberapay.com/bevry" title="Donate to this project using Liberapay"><img src="https://img.shields.io/badge/liberapay-donate-yellow.svg" alt="Liberapay donate button" /></a></span>
<span class="badge-thanksapp"><a href="https://givethanks.app/donate/npm/cachely" title="Donate to this project using Thanks App"><img src="https://img.shields.io/badge/thanksapp-donate-yellow.svg" alt="Thanks App donate button" /></a></span>
<span class="badge-boostlab"><a href="https://boost-lab.app/bevry/cachely" title="Donate to this project using Boost Lab"><img src="https://img.shields.io/badge/boostlab-donate-yellow.svg" alt="Boost Lab donate button" /></a></span>
<span class="badge-buymeacoffee"><a href="https://buymeacoffee.com/balupton" title="Donate to this project using Buy Me A Coffee"><img src="https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg" alt="Buy Me A Coffee donate button" /></a></span>

@@ -179,3 +175,3 @@ <span class="badge-opencollective"><a href="https://opencollective.com/bevry" title="Donate to this project using Open Collective"><img src="https://img.shields.io/badge/open%20collective-donate-yellow.svg" alt="Open Collective donate button" /></a></span>

<ul><li><a href="http://balupton.com">Benjamin Lupton</a> — <a href="https://github.com/bevry/cachely/commits?author=balupton" title="View the GitHub contributions of Benjamin Lupton on repository bevry/cachely">view contributions</a></li></ul>
<ul><li><a href="http://balupton.com">Benjamin Lupton</a></li></ul>

@@ -182,0 +178,0 @@ <a href="https://github.com/bevry/cachely/blob/master/CONTRIBUTING.md#files">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a>

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