Skip to content

Commit cb06606

Browse files
authored
fix: downloading from custom repository (#26)
* fix: requiring esm dependency * chore: add spec
1 parent 9d7cc07 commit cb06606

4 files changed

Lines changed: 30 additions & 6 deletions

File tree

package-lock.json

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

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vscode/gulp-electron",
3-
"version": "1.37.0",
3+
"version": "1.37.1",
44
"description": "gulp plugin for packaging Electron into VS Code",
55
"main": "src/index.js",
66
"scripts": {
@@ -11,7 +11,7 @@
1111
"url": "https://github.com/microsoft/vscode-gulp-electron.git"
1212
},
1313
"engines": {
14-
"node": ">=10"
14+
"node": ">=22"
1515
},
1616
"keywords": [
1717
"gulpplugin",

src/download.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var es = require("event-stream");
88
var zfs = require("gulp-vinyl-zip");
99
var filter = require("gulp-filter");
1010
const { Octokit } = require("@octokit/rest");
11-
const got = require("got");
11+
const { got } = require("got");
1212
const sumchecker = require('sumchecker');
1313

1414
async function getDownloadUrl(

test/download.test.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,30 @@ describe("download", function () {
5454
});
5555
});
5656

57+
it("should download from a custom repo", function (cb) {
58+
var didSeeInfoPList = false;
59+
60+
download({
61+
version: "32.2.3",
62+
repo: "deepak1556/electron-debug-version",
63+
platform: "darwin",
64+
arch: "arm64",
65+
token: process.env["GITHUB_TOKEN"],
66+
})
67+
.on("data", function (f) {
68+
if (
69+
f.relative === path.join("Electron.app", "Contents", "Info.plist")
70+
) {
71+
didSeeInfoPList = true;
72+
}
73+
})
74+
.on("error", cb)
75+
.on("end", function () {
76+
assert(didSeeInfoPList);
77+
cb();
78+
});
79+
});
80+
5781
it("should download PDBs", function (cb) {
5882
var didSeePDBs = false;
5983

0 commit comments

Comments
 (0)