ports/editors/vscode/files/patch-build_npm_postinstall.js
Hiroki Tagato 7bf327888c editors/vscode: switch from VS Market Place to Open VSX Registry
According to Microsoft Visual Studio Marketplace Terms of Use[1],
"Marketplace Offerings are intended for use only with In-Scope
Products and Services and you may install and use Marketplace
Offerings only with In-Scope Products and Services."

In-Scope Products and Services are "Microsoft Visual Studio, Visual
Studio for Mac, Visual Studio Code, GitHub Codespaces, Azure DevOps,
Azure DevOps Server, and successor products and services" and does not
include Code - OSS.

So switch to Open VSX Registry, a community driven, fully open
platform for publishing and consuming VS Code extensions.

While here, add option for building remote extension host (off by
default).

[1] https://aka.ms/vsmarketplace-ToU
2023-04-09 17:01:17 +09:00

25 lines
1.1 KiB
JavaScript

--- build/npm/postinstall.js.orig 2023-04-04 22:49:54 UTC
+++ build/npm/postinstall.js
@@ -20,7 +20,13 @@ function yarnInstall(location, opts) {
const raw = process.env['npm_config_argv'] || '{}';
const argv = JSON.parse(raw);
const original = argv.original || [];
- const args = original.filter(arg => arg === '--ignore-optional' || arg === '--frozen-lockfile' || arg === '--check-files');
+ const passargs = ['--ignore-optional', '--frozen-lockfile', '--check-files', '--offline', '--no-progress', '--verbose'];
+ const args = original.filter(arg => passargs.includes(arg));
+ if (opts.cwd === 'remote') {
+ args.push('--use-yarnrc=' + process.env.PWD + '/' + opts.cwd + '/.yarnrc');
+ } else {
+ args.push('--use-yarnrc=' + process.env.PWD + '/.yarnrc');
+ }
if (opts.ignoreEngines) {
args.push('--ignore-engines');
delete opts.ignoreEngines;
@@ -73,5 +79,5 @@ for (let dir of dirs) {
yarnInstall(dir, opts);
}
-cp.execSync('git config pull.rebase merges');
-cp.execSync('git config blame.ignoreRevsFile .git-blame-ignore');
+// cp.execSync('git config pull.rebase merges');
+// cp.execSync('git config blame.ignoreRevsFile .git-blame-ignore');