Skip to content

Commit d044504

Browse files
renovate[bot]mrstork
andauthoredMay 17, 2024··
fix(deps): update dependency node-fetch to v3 (#6627)
* fix(deps): update dependency node-fetch to v3 * fix: add ts-expect errors to support node-fetch upgrade * fix: update node-fetch syntax * test: fix assertions for node-fetch upgrade --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Mateusz Bocian <mateusz.bocian@netlify.com>
1 parent 55c0cef commit d044504

File tree

12 files changed

+106
-168
lines changed

12 files changed

+106
-168
lines changed
 

‎functions-templates/javascript/submission-created/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
"author": "Netlify",
1515
"license": "MIT",
1616
"dependencies": {
17-
"node-fetch": "^2.6.1"
17+
"node-fetch": "^3.0.0"
1818
}
1919
}

‎package-lock.json

+73-154
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
"netlify-headers-parser": "7.1.4",
150150
"netlify-redirect-parser": "14.3.0",
151151
"netlify-redirector": "0.5.0",
152-
"node-fetch": "2.7.0",
152+
"node-fetch": "3.3.2",
153153
"node-version-alias": "3.4.1",
154154
"ora": "8.0.1",
155155
"p-filter": "3.0.0",

‎src/commands/functions/functions-create.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ const downloadFromURL = async function (command, options, argumentName, function
380380
const res = await fetch(downloadUrl)
381381
const finalName = path.basename(name, '.js') === functionName ? `${nameToUse}.js` : name
382382
const dest = fs.createWriteStream(path.join(fnFolder, finalName))
383-
res.body.pipe(dest)
383+
res.body?.pipe(dest)
384384
} catch (error_) {
385385
throw new Error(`Error while retrieving ${downloadUrl} ${error_}`)
386386
}
@@ -476,7 +476,7 @@ const installDeps = async ({ functionPackageJson, functionPath, functionsDir })
476476
* @param {'edge' | 'serverless'} funcType
477477
*/
478478
// @ts-expect-error TS(7006) FIXME: Parameter 'command' implicitly has an 'any' type.
479-
// eslint-disable-next-line max-params
479+
480480
const scaffoldFromTemplate = async function (command, options, argumentName, functionsDir, funcType) {
481481
// pull the rest of the metadata from the template
482482
const chosenTemplate = await pickTemplate(options, funcType)

2 commit comments

Comments
 (2)

github-actions[bot] commented on May 17, 2024

@github-actions[bot]

📊 Benchmark results

  • Dependency count: 1,364
  • Package size: 313 MB
  • Number of ts-expect-error directives: 999

github-actions[bot] commented on May 17, 2024

@github-actions[bot]

📊 Benchmark results

  • Dependency count: 1,364
  • Package size: 313 MB
  • Number of ts-expect-error directives: 999
Please sign in to comment.