@renovatebot/osv-offline 1.2.2 → 1.2.4

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.
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.tryDownloadDb = void 0;
7
7
  const fs_extra_1 = __importDefault(require("fs-extra"));
8
+ const node_fetch_1 = __importDefault(require("node-fetch"));
8
9
  const rest_1 = require("@octokit/rest");
9
10
  const got_1 = __importDefault(require("got"));
10
11
  const stream_1 = require("stream");
@@ -32,9 +33,7 @@ async function tryDownloadDb() {
32
33
  luxon_1.DateTime.utc().diff(luxon_1.DateTime.fromJSDate(stats.mtime)).as('days') < 1) {
33
34
  return true;
34
35
  }
35
- const octokitOptions = process.env.GITHUB_COM_TOKEN
36
- ? { auth: process.env.GITHUB_COM_TOKEN }
37
- : undefined;
36
+ const octokitOptions = { auth: process.env.GITHUB_COM_TOKEN, request: { fetch: node_fetch_1.default } };
38
37
  let latestRelease = null;
39
38
  try {
40
39
  latestRelease = (await new rest_1.Octokit(octokitOptions).repos.listReleases({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@renovatebot/osv-offline",
3
- "version": "1.2.2",
3
+ "version": "1.2.4",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "license": "MIT",
@@ -11,17 +11,19 @@
11
11
  "@renovatebot/osv-offline-db": "1.3.2",
12
12
  "@octokit/rest": "^19.0.7",
13
13
  "adm-zip": "~0.5.10",
14
- "fs-extra": "^11.1.0",
14
+ "fs-extra": "^11.1.1",
15
15
  "got": "^11.8.6",
16
- "luxon": "^3.3.0"
16
+ "luxon": "^3.3.0",
17
+ "node-fetch": "^2.6.9"
17
18
  },
18
19
  "devDependencies": {
19
20
  "@types/adm-zip": "0.5.0",
20
21
  "@types/fs-extra": "11.0.1",
21
22
  "@types/luxon": "3.2.0",
22
- "@types/node": "18.14.6",
23
- "prettier": "2.8.4",
23
+ "@types/node": "18.15.7",
24
+ "@types/node-fetch": "2.6.3",
25
+ "prettier": "2.8.7",
24
26
  "ts-node": "10.9.1",
25
- "typescript": "4.9.5"
27
+ "typescript": "5.0.2"
26
28
  }
27
29
  }