fetch-json-cache 0.1.10 → 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/get.js CHANGED
@@ -20,7 +20,7 @@ module.exports = function getCache(endpoint, callback) {
20
20
  get(endpoint).head(function (err, res) {
21
21
  // not accessible
22
22
  if (err) {
23
- if (err.code === 'ENOTFOUND' || err.message.indexOf("routines:SSL23_GET_SERVER_HELLO") >= 0) return callback(null, record.body);
23
+ if (err.code === 'ENOTFOUND' || err.message.indexOf('routines:SSL23_GET_SERVER_HELLO') >= 0) return callback(null, record.body);
24
24
  return callback(err);
25
25
  }
26
26
  if (res.headers.etag === record.headers.etag) return callback(null, record.body);
@@ -1,8 +1,8 @@
1
1
  var rimraf = require('rimraf');
2
2
 
3
- var get = require('./lib/get');
4
- var hash = require('./lib/hash');
5
- var update = require('./lib/update');
3
+ var get = require('./get');
4
+ var hash = require('./hash');
5
+ var update = require('./update');
6
6
 
7
7
  function Cache(cacheDirectory, options) {
8
8
  if (!(this instanceof Cache)) return new Cache(cacheDirectory, options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fetch-json-cache",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "description": "Caches fetched json. Updates when etag changes and is uses cache regardless if endpoint unreachable. Uses write-file-atomic for safe updates",
5
5
  "keywords": [
6
6
  "every",
@@ -15,35 +15,35 @@
15
15
  },
16
16
  "license": "MIT",
17
17
  "author": "Kevin Malakoff <kmalakoff@gmail.com> (https://github.com/kmalakoff)",
18
- "main": "index.js",
18
+ "main": "lib/index.js",
19
+ "files": [
20
+ "lib"
21
+ ],
19
22
  "scripts": {
20
23
  "format": "prettier --write .",
21
24
  "lint": "eslint .",
22
25
  "prepublishOnly": "dtd \"npm run lint\" \"depcheck\"",
23
- "test": "mocha-compat test/spec/**/*.test.js",
24
- "test:engines": "nvu engines npm test"
26
+ "test": "mocha-compat test/spec/**/*.test.js --no-timeouts"
25
27
  },
26
28
  "dependencies": {
27
- "get-remote": "^0.6.1",
29
+ "get-remote": "^0.6.3",
28
30
  "mkpath": "^1.0.0",
29
31
  "rimraf": "^2.7.1",
30
32
  "write-file-atomic": "^1.3.4"
31
33
  },
32
34
  "devDependencies": {
33
- "babel-eslint": "^10.1.0",
34
- "depcheck": "^1.4.2",
35
- "dis-dat": "^0.1.3",
36
- "eslint": "^6.8.0",
37
- "eslint-config-prettier": "^6.11.0",
38
- "eslint-config-standard": "^14.1.1",
39
- "eslint-plugin-import": "^2.22.0",
40
- "eslint-plugin-node": "^11.1.0",
41
- "eslint-plugin-promise": "^4.2.1",
42
- "eslint-plugin-standard": "^4.0.1",
35
+ "@typescript-eslint/parser": "^5.30.0",
36
+ "depcheck": "^1.4.3",
37
+ "dis-dat": "^0.1.6",
38
+ "eslint": "^8.18.0",
39
+ "eslint-config-prettier": "^8.5.0",
40
+ "eslint-config-standard": "^17.0.0",
41
+ "eslint-plugin-import": "^2.26.0",
42
+ "eslint-plugin-n": "^15.2.3",
43
+ "eslint-plugin-promise": "^6.0.0",
43
44
  "fs-access-sync-compat": "^1.0.1",
44
45
  "mocha-compat": "^3.5.5",
45
- "node-version-use": "^0.2.0",
46
- "prettier": "^2.4.1"
46
+ "prettier": "^2.7.1"
47
47
  },
48
48
  "engines": {
49
49
  "node": ">=0.8"
@@ -1,11 +0,0 @@
1
- version: 2
2
- updates:
3
- - package-ecosystem: npm
4
- directory: '/'
5
- schedule:
6
- interval: daily
7
- - package-ecosystem: 'github-actions'
8
- directory: '/'
9
- schedule:
10
- # Check for updates to GitHub Actions every weekday
11
- interval: 'daily'
@@ -1,22 +0,0 @@
1
- name: CI
2
- on:
3
- - push
4
- - pull_request
5
- jobs:
6
- test:
7
- name: Node.js ${{ matrix.node-version }} ${{ matrix.os }}
8
- runs-on: ${{ matrix.os }}
9
- strategy:
10
- matrix:
11
- node: ['latest']
12
- os: [ubuntu-latest, windows-latest, macOS-latest]
13
- steps:
14
- - uses: actions/checkout@v2
15
- - uses: actions/setup-node@v2.4.1
16
- with:
17
- node-version: ${{ matrix.node-version }}
18
- - run: git config --global user.name "Github Actions"
19
- - run: git config --global user.email "actions@users.noreply.github.com"
20
- - run: npm ci
21
- - run: npm run lint
22
- - run: npm run test:engines