|
@@ -0,0 +1,104 @@
|
|
|
+diff --git a/build/gulpfile.extensions.js b/build/gulpfile.extensions.js
|
|
|
+index 7826f48..ff0e2f0 100644
|
|
|
+--- a/build/gulpfile.extensions.js
|
|
|
++++ b/build/gulpfile.extensions.js
|
|
|
+@@ -74,3 +74,3 @@ const compilations = [
|
|
|
+
|
|
|
+-const getBaseUrl = out => `https://main.vscode-cdn.net/sourcemaps/${commit}/${out}`;
|
|
|
++const getBaseUrl = out => `https://github.com/VSCodium/sourcemaps/releases/download/${commit}/${out.replaceAll('/', '-')}`;
|
|
|
+
|
|
|
+diff --git a/build/gulpfile.reh.js b/build/gulpfile.reh.js
|
|
|
+index 10b7b44..895b25b 100644
|
|
|
+--- a/build/gulpfile.reh.js
|
|
|
++++ b/build/gulpfile.reh.js
|
|
|
+@@ -454,3 +454,3 @@ function tweakProductForServerWeb(product) {
|
|
|
+ util.rimraf(`out-vscode-${type}-min`),
|
|
|
+- optimize.minifyTask(`out-vscode-${type}`, `https://main.vscode-cdn.net/sourcemaps/${commit}/core`)
|
|
|
++ optimize.minifyTask(`out-vscode-${type}`, `https://github.com/VSCodium/sourcemaps/releases/download/${commit}/core`)
|
|
|
+ ));
|
|
|
+diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js
|
|
|
+index ed06b6a..ebedfc4 100644
|
|
|
+--- a/build/gulpfile.vscode.js
|
|
|
++++ b/build/gulpfile.vscode.js
|
|
|
+@@ -147,3 +147,3 @@ gulp.task(bundleVSCodeTask);
|
|
|
+
|
|
|
+-const sourceMappingURLBase = `https://main.vscode-cdn.net/sourcemaps/${commit}`;
|
|
|
++const sourceMappingURLBase = `https://github.com/VSCodium/sourcemaps/releases/download/${commit}`;
|
|
|
+ const minifyVSCodeTask = task.define('minify-vscode', task.series(
|
|
|
+diff --git a/build/gulpfile.vscode.web.js b/build/gulpfile.vscode.web.js
|
|
|
+index 295a977..ba0a598 100644
|
|
|
+--- a/build/gulpfile.vscode.web.js
|
|
|
++++ b/build/gulpfile.vscode.web.js
|
|
|
+@@ -140,3 +140,3 @@ const minifyVSCodeWebTask = task.define('minify-vscode-web', task.series(
|
|
|
+ util.rimraf('out-vscode-web-min'),
|
|
|
+- optimize.minifyTask('out-vscode-web', `https://main.vscode-cdn.net/sourcemaps/${commit}/core`)
|
|
|
++ optimize.minifyTask('out-vscode-web', `https://github.com/VSCodium/sourcemaps/releases/download/${commit}/core`)
|
|
|
+ ));
|
|
|
+diff --git a/build/lib/extensions.js b/build/lib/extensions.js
|
|
|
+index c80a1be..000cf9f 100644
|
|
|
+--- a/build/lib/extensions.js
|
|
|
++++ b/build/lib/extensions.js
|
|
|
+@@ -76,3 +76,3 @@ const root = path_1.default.dirname(path_1.default.dirname(__dirname));
|
|
|
+ const commit = (0, getVersion_1.getVersion)(root);
|
|
|
+-const sourceMappingURLBase = `https://main.vscode-cdn.net/sourcemaps/${commit}`;
|
|
|
++const sourceMappingURLBase = `https://github.com/VSCodium/sourcemaps/releases/download/${commit}`;
|
|
|
+ function minifyExtensionResources(input) {
|
|
|
+@@ -205,3 +205,3 @@ function fromLocalWebpack(extensionPath, webpackConfigFileName, disableMangle) {
|
|
|
+ data.contents = Buffer.from(contents.replace(/\n\/\/# sourceMappingURL=(.*)$/gm, function (_m, g1) {
|
|
|
+- return `\n//# sourceMappingURL=${sourceMappingURLBase}/extensions/${path_1.default.basename(extensionPath)}/${relativeOutputPath}/${g1}`;
|
|
|
++ return `\n//# sourceMappingURL=${sourceMappingURLBase}/extensions-${path_1.default.basename(extensionPath).replaceAll('/', '-')}-${relativeOutputPath.replaceAll('/', '-')}-${g1.replaceAll('/', '-')}`;
|
|
|
+ }), 'utf8');
|
|
|
+diff --git a/build/lib/extensions.ts b/build/lib/extensions.ts
|
|
|
+index 9e7cf9f..e5f7c24 100644
|
|
|
+--- a/build/lib/extensions.ts
|
|
|
++++ b/build/lib/extensions.ts
|
|
|
+@@ -31,3 +31,3 @@ const root = path.dirname(path.dirname(__dirname));
|
|
|
+ const commit = getVersion(root);
|
|
|
+-const sourceMappingURLBase = `https://main.vscode-cdn.net/sourcemaps/${commit}`;
|
|
|
++const sourceMappingURLBase = `https://github.com/VSCodium/sourcemaps/releases/download/${commit}`;
|
|
|
+
|
|
|
+@@ -179,3 +179,3 @@ function fromLocalWebpack(extensionPath: string, webpackConfigFileName: string,
|
|
|
+ data.contents = Buffer.from(contents.replace(/\n\/\/# sourceMappingURL=(.*)$/gm, function (_m, g1) {
|
|
|
+- return `\n//# sourceMappingURL=${sourceMappingURLBase}/extensions/${path.basename(extensionPath)}/${relativeOutputPath}/${g1}`;
|
|
|
++ return `\n//# sourceMappingURL=${sourceMappingURLBase}/extensions-${path.basename(extensionPath).replaceAll('/', '-')}-${relativeOutputPath.replaceAll('/', '-')}-${g1.replaceAll('/', '-')}`;
|
|
|
+ }), 'utf8');
|
|
|
+diff --git a/build/lib/optimize.js b/build/lib/optimize.js
|
|
|
+index fbc455b..4e7fe85 100644
|
|
|
+--- a/build/lib/optimize.js
|
|
|
++++ b/build/lib/optimize.js
|
|
|
+@@ -186,3 +186,3 @@ function bundleTask(opts) {
|
|
|
+ function minifyTask(src, sourceMapBaseUrl) {
|
|
|
+- const sourceMappingURL = sourceMapBaseUrl ? ((f) => `${sourceMapBaseUrl}/${f.relative}.map`) : undefined;
|
|
|
++ const sourceMappingURL = sourceMapBaseUrl ? ((f) => `${sourceMapBaseUrl}-${f.relative.replaceAll('/', '-')}.map`) : undefined;
|
|
|
+ return cb => {
|
|
|
+diff --git a/build/lib/optimize.ts b/build/lib/optimize.ts
|
|
|
+index d89d0d6..fca30cf 100644
|
|
|
+--- a/build/lib/optimize.ts
|
|
|
++++ b/build/lib/optimize.ts
|
|
|
+@@ -211,3 +211,3 @@ export function bundleTask(opts: IBundleESMTaskOpts): () => NodeJS.ReadWriteStre
|
|
|
+ export function minifyTask(src: string, sourceMapBaseUrl?: string): (cb: any) => void {
|
|
|
+- const sourceMappingURL = sourceMapBaseUrl ? ((f: any) => `${sourceMapBaseUrl}/${f.relative}.map`) : undefined;
|
|
|
++ const sourceMappingURL = sourceMapBaseUrl ? ((f: any) => `${sourceMapBaseUrl}-${f.relative.replaceAll('/', '-')}.map`) : undefined;
|
|
|
+
|
|
|
+diff --git a/build/lib/util.js b/build/lib/util.js
|
|
|
+index 389b9e0..9abdb3c 100644
|
|
|
+--- a/build/lib/util.js
|
|
|
++++ b/build/lib/util.js
|
|
|
+@@ -235,4 +235,4 @@ function rewriteSourceMappingURL(sourceMappingURLBase) {
|
|
|
+ const contents = f.contents.toString('utf8');
|
|
|
+- const str = `//# sourceMappingURL=${sourceMappingURLBase}/${path_1.default.dirname(f.relative).replace(/\\/g, '/')}/$1`;
|
|
|
+- f.contents = Buffer.from(contents.replace(/\n\/\/# sourceMappingURL=(.*)$/gm, str));
|
|
|
++ const fp = path_1.default.dirname(f.relative).replace(/\\/g, '/').replaceAll('/', '-');
|
|
|
++ f.contents = Buffer.from(contents.replace(/\n\/\/# sourceMappingURL=(.*)$/gm, (_m, p) => `//# sourceMappingURL=${sourceMappingURLBase}/${fp}-${p.replaceAll('/', '-')}`));
|
|
|
+ return f;
|
|
|
+diff --git a/build/lib/util.ts b/build/lib/util.ts
|
|
|
+index 4931342..833091c 100644
|
|
|
+--- a/build/lib/util.ts
|
|
|
++++ b/build/lib/util.ts
|
|
|
+@@ -285,4 +285,4 @@ export function rewriteSourceMappingURL(sourceMappingURLBase: string): NodeJS.Re
|
|
|
+ const contents = (<Buffer>f.contents).toString('utf8');
|
|
|
+- const str = `//# sourceMappingURL=${sourceMappingURLBase}/${path.dirname(f.relative).replace(/\\/g, '/')}/$1`;
|
|
|
+- f.contents = Buffer.from(contents.replace(/\n\/\/# sourceMappingURL=(.*)$/gm, str));
|
|
|
++ const fp = path.dirname(f.relative).replace(/\\/g, '/').replaceAll('/', '-');
|
|
|
++ f.contents = Buffer.from(contents.replace(/\n\/\/# sourceMappingURL=(.*)$/gm, (_m, p) => `//# sourceMappingURL=${sourceMappingURLBase}/${fp}-${p.replaceAll('/', '-')}`));
|
|
|
+ return f;
|