Skip to content

Commit 0ca48fc

Browse files
committed
replace node-fetch with fetch native
1 parent 5598850 commit 0ca48fc

File tree

17 files changed

+1370
-711
lines changed

17 files changed

+1370
-711
lines changed

eslint.config.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default [
2121
},
2222
rules: {
2323
// StandardJS-like rules
24-
'no-unused-vars': ['error', {
24+
'no-unused-vars': ['warn', {
2525
args: 'none',
2626
caughtErrors: 'none',
2727
ignoreRestSiblings: true,
@@ -99,4 +99,4 @@ export default [
9999
'resources/**'
100100
]
101101
}
102-
]
102+
]

lib/acl-checker.mjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import aclCheck from '@solid/acl-check'
99
import Url, { URL } from 'url'
1010
import { promisify } from 'util'
1111
import fs from 'fs'
12-
import httpFetch from 'node-fetch'
1312

1413
export const DEFAULT_ACL_SUFFIX = '.acl'
1514
const ACL = rdf.Namespace('http://www.w3.org/ns/auth/acl#')
@@ -308,7 +307,7 @@ function fetchLocalOrRemote (mapper, serverUri) {
308307
body = await promisify(fs.readFile)(path, { encoding: 'utf8' })
309308
} else {
310309
// Fetch the acl from the internet
311-
const response = await httpFetch(url)
310+
const response = await fetch(url)
312311
body = await response.text()
313312
contentType = response.headers.get('content-type')
314313
}

lib/ldp.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import extend from 'extend'
1212
import rimraf from 'rimraf'
1313
import { exec } from 'child_process'
1414
import * as ldpContainer from './ldp-container.mjs'
15-
import fetch from 'node-fetch'
1615
import { promisify } from 'util'
1716
import withLock from './lock.mjs'
1817
import { clearAclCache } from './acl-checker.mjs'

lib/webid/lib/get.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import fetch from 'node-fetch'
21
import { URL } from 'url'
32

43
export default function get (webid, callback) {

0 commit comments

Comments
 (0)