@vscode/gulp-electron 1.33.0 → 1.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/azure-pipelines.yml +2 -0
- package/package.json +3 -3
- package/src/darwin.js +15 -0
- package/src/download.js +5 -3
package/azure-pipelines.yml
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vscode/gulp-electron",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.35.0",
|
|
4
4
|
"description": "gulp plugin for packaging Electron into VS Code",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -42,11 +42,11 @@
|
|
|
42
42
|
"rimraf": "^2.4.2",
|
|
43
43
|
"semver": "^4.3.4",
|
|
44
44
|
"temp": "^0.8.3",
|
|
45
|
-
"vinyl": "^
|
|
45
|
+
"vinyl": "^3.0.0",
|
|
46
46
|
"vinyl-fs": "^3.0.3"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"gulp-buffer": "0.0.2",
|
|
50
|
-
"mocha": "^
|
|
50
|
+
"mocha": "^10.2.0"
|
|
51
51
|
}
|
|
52
52
|
}
|
package/src/darwin.js
CHANGED
|
@@ -323,6 +323,20 @@ function addCredits(opts) {
|
|
|
323
323
|
return es.duplex(input, es.merge(input, credits));
|
|
324
324
|
}
|
|
325
325
|
|
|
326
|
+
function moveChromiumLicense(opts) {
|
|
327
|
+
var newLicensePath = path.join(
|
|
328
|
+
getOriginalAppFullName(opts),
|
|
329
|
+
"Contents",
|
|
330
|
+
"Resources"
|
|
331
|
+
);
|
|
332
|
+
return es.mapSync(function (f) {
|
|
333
|
+
if (!f.isNull() && !f.isDirectory() && f.path === "LICENSES.chromium.html") {
|
|
334
|
+
f.dirname = newLicensePath;
|
|
335
|
+
}
|
|
336
|
+
return f;
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
|
|
326
340
|
function renameApp(opts) {
|
|
327
341
|
var originalAppName = getOriginalAppName(opts);
|
|
328
342
|
var originalAppNameRegexp = new RegExp("^" + getOriginalAppFullName(opts));
|
|
@@ -403,6 +417,7 @@ exports.patch = function (opts) {
|
|
|
403
417
|
.pipe(patchHelperInfoPlist(opts))
|
|
404
418
|
.pipe(createEntitlementsPlist(opts))
|
|
405
419
|
.pipe(addCredits(opts))
|
|
420
|
+
.pipe(moveChromiumLicense(opts))
|
|
406
421
|
.pipe(renameApp(opts))
|
|
407
422
|
.pipe(renameAppHelper(opts));
|
|
408
423
|
|
package/src/download.js
CHANGED
|
@@ -11,17 +11,18 @@ const { Octokit } = require("@octokit/rest");
|
|
|
11
11
|
const got = require("got");
|
|
12
12
|
|
|
13
13
|
async function getDownloadUrl(
|
|
14
|
-
ownerRepo,
|
|
14
|
+
ownerRepo, customTag,
|
|
15
15
|
{ version, platform, arch, token, artifactName, artifactSuffix }
|
|
16
16
|
) {
|
|
17
17
|
const [owner, repo] = ownerRepo.split("/");
|
|
18
18
|
const octokit = new Octokit({ auth: token });
|
|
19
19
|
const releaseVersion = version.startsWith("v") ? version : `v${version}`;
|
|
20
|
+
const tag = customTag ?? releaseVersion;
|
|
20
21
|
|
|
21
22
|
const { data: release } = await octokit.repos.getReleaseByTag({
|
|
22
23
|
owner,
|
|
23
24
|
repo,
|
|
24
|
-
tag
|
|
25
|
+
tag,
|
|
25
26
|
});
|
|
26
27
|
|
|
27
28
|
if (!release) {
|
|
@@ -117,7 +118,7 @@ async function download(opts) {
|
|
|
117
118
|
);
|
|
118
119
|
|
|
119
120
|
if (opts.repo) {
|
|
120
|
-
const url = await getDownloadUrl(opts.repo, downloadOpts);
|
|
121
|
+
const url = await getDownloadUrl(opts.repo, opts.tag, downloadOpts);
|
|
121
122
|
|
|
122
123
|
downloadOpts = {
|
|
123
124
|
...downloadOpts,
|
|
@@ -166,6 +167,7 @@ function getDarwinLibFFMpegPath(opts) {
|
|
|
166
167
|
module.exports = function (opts) {
|
|
167
168
|
const downloadOpts = {
|
|
168
169
|
version: opts.version,
|
|
170
|
+
tag: opts.tag,
|
|
169
171
|
platform: opts.platform,
|
|
170
172
|
arch: opts.arch === "arm" ? "armv7l" : opts.arch,
|
|
171
173
|
artifactName: "electron",
|