Skip to content

Commit afeed3d

Browse files
authored
Merge pull request #3 from docsbydoxdox/hotfix/removed-node-fetch
[hotfix] Removed node-fetch package.
2 parents cc17d83 + fa9865f commit afeed3d

File tree

3 files changed

+7
-102
lines changed

3 files changed

+7
-102
lines changed

package-lock.json

Lines changed: 4 additions & 96 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
},
1010
"dependencies": {
1111
"adm-zip": "0.5.16",
12-
"doxdox-core": "4.0.0-preview.25",
13-
"node-fetch": "3.3.2"
12+
"doxdox-core": "4.0.0-preview.25"
1413
},
1514
"devDependencies": {
1615
"@types/adm-zip": "0.5.7",

src/index.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import Zip from 'adm-zip';
22

3-
import nodeFetch from 'node-fetch';
4-
53
import { File } from 'doxdox-core';
64

75
import { Repo, Tag } from './types';
@@ -14,7 +12,7 @@ export const fetchFromGitHubAPI = async <T>(
1412
path: string,
1513
token: string | undefined
1614
) => {
17-
const response = await nodeFetch(`https://api.github.com/${path}`, {
15+
const response = await fetch(`https://api.github.com/${path}`, {
1816
headers: {
1917
Authorization: `Bearer ${token}`,
2018
'Content-Type': 'application/json'
@@ -36,7 +34,7 @@ export const downloadFile = async (
3634
branch: string,
3735
filterPatterns: RegExp[] = []
3836
): Promise<{ path: string; content: string }[]> => {
39-
const response = await nodeFetch(
37+
const response = await fetch(
4038
`https://github.com/${username}/${repo}/archive/${branch}.zip`
4139
);
4240

0 commit comments

Comments
 (0)