Skip to content

Commit 4491714

Browse files
authored
Replace node-fetch with fetch (#203)
1 parent 2a189e5 commit 4491714

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "sass-embedded",
3-
"version": "1.58.0",
4-
"protocol-version": "1.1.0",
5-
"compiler-version": "1.58.0",
3+
"version": "1.58.1",
4+
"protocol-version": "1.2.0",
5+
"compiler-version": "1.58.1",
66
"description": "Node.js library that communicates with Embedded Dart Sass using the Embedded Sass protocol",
77
"repository": "sass/embedded-host-node",
88
"author": "Google Inc.",
@@ -50,7 +50,6 @@
5050
"@types/google-protobuf": "^3.7.2",
5151
"@types/jest": "^29.4.0",
5252
"@types/node": "^18.11.18",
53-
"@types/node-fetch": "^2.6.0",
5453
"@types/shelljs": "^0.8.8",
5554
"@types/supports-color": "^8.1.1",
5655
"@types/tar": "^6.1.0",
@@ -60,7 +59,6 @@
6059
"gts": "^4.0.0",
6160
"jest": "^29.4.1",
6261
"minipass": "4.0.3",
63-
"node-fetch": "^3.3.0",
6462
"npm-run-all": "^4.1.5",
6563
"path-equal": "^1.2.5",
6664
"shelljs": "^0.8.4",

tool/prepare-optional-release.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import extractZip = require('extract-zip');
22
import {promises as fs} from 'fs';
3-
import fetch from 'node-fetch';
43
import * as p from 'path';
54
import {extract as extractTar} from 'tar';
65
import yargs from 'yargs';
@@ -80,7 +79,7 @@ async function downloadRelease(options: {
8079
`Failed to download ${options.repo} release asset: ${response.statusText}`
8180
);
8281
}
83-
const releaseAsset = await response.buffer();
82+
const releaseAsset = Buffer.from(await response.arrayBuffer());
8483

8584
console.log(`Unzipping ${options.repo} release asset to ${options.outPath}.`);
8685
await utils.cleanDir(p.join(options.outPath, options.repo));

0 commit comments

Comments
 (0)