|
| 1 | +diff --git a/build/gulpfile.extensions.js b/build/gulpfile.extensions.js |
| 2 | +index 7826f48..ff0e2f0 100644 |
| 3 | +--- a/build/gulpfile.extensions.js |
| 4 | ++++ b/build/gulpfile.extensions.js |
| 5 | +@@ -74,3 +74,3 @@ const compilations = [ |
| 6 | + |
| 7 | +-const getBaseUrl = out => `https://main.vscode-cdn.net/sourcemaps/${commit}/${out}`; |
| 8 | ++const getBaseUrl = out => `https://github.com/VSCodium/sourcemaps/releases/download/${commit}/${out.replaceAll('/', '-')}`; |
| 9 | + |
| 10 | +diff --git a/build/gulpfile.reh.js b/build/gulpfile.reh.js |
| 11 | +index 10b7b44..895b25b 100644 |
| 12 | +--- a/build/gulpfile.reh.js |
| 13 | ++++ b/build/gulpfile.reh.js |
| 14 | +@@ -454,3 +454,3 @@ function tweakProductForServerWeb(product) { |
| 15 | + util.rimraf(`out-vscode-${type}-min`), |
| 16 | +- optimize.minifyTask(`out-vscode-${type}`, `https://main.vscode-cdn.net/sourcemaps/${commit}/core`) |
| 17 | ++ optimize.minifyTask(`out-vscode-${type}`, `https://github.com/VSCodium/sourcemaps/releases/download/${commit}/core`) |
| 18 | + )); |
| 19 | +diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js |
| 20 | +index ed06b6a..ebedfc4 100644 |
| 21 | +--- a/build/gulpfile.vscode.js |
| 22 | ++++ b/build/gulpfile.vscode.js |
| 23 | +@@ -147,3 +147,3 @@ gulp.task(bundleVSCodeTask); |
| 24 | + |
| 25 | +-const sourceMappingURLBase = `https://main.vscode-cdn.net/sourcemaps/${commit}`; |
| 26 | ++const sourceMappingURLBase = `https://github.com/VSCodium/sourcemaps/releases/download/${commit}`; |
| 27 | + const minifyVSCodeTask = task.define('minify-vscode', task.series( |
| 28 | +diff --git a/build/gulpfile.vscode.web.js b/build/gulpfile.vscode.web.js |
| 29 | +index 295a977..ba0a598 100644 |
| 30 | +--- a/build/gulpfile.vscode.web.js |
| 31 | ++++ b/build/gulpfile.vscode.web.js |
| 32 | +@@ -140,3 +140,3 @@ const minifyVSCodeWebTask = task.define('minify-vscode-web', task.series( |
| 33 | + util.rimraf('out-vscode-web-min'), |
| 34 | +- optimize.minifyTask('out-vscode-web', `https://main.vscode-cdn.net/sourcemaps/${commit}/core`) |
| 35 | ++ optimize.minifyTask('out-vscode-web', `https://github.com/VSCodium/sourcemaps/releases/download/${commit}/core`) |
| 36 | + )); |
| 37 | +diff --git a/build/lib/extensions.js b/build/lib/extensions.js |
| 38 | +index c80a1be..000cf9f 100644 |
| 39 | +--- a/build/lib/extensions.js |
| 40 | ++++ b/build/lib/extensions.js |
| 41 | +@@ -76,3 +76,3 @@ const root = path_1.default.dirname(path_1.default.dirname(__dirname)); |
| 42 | + const commit = (0, getVersion_1.getVersion)(root); |
| 43 | +-const sourceMappingURLBase = `https://main.vscode-cdn.net/sourcemaps/${commit}`; |
| 44 | ++const sourceMappingURLBase = `https://github.com/VSCodium/sourcemaps/releases/download/${commit}`; |
| 45 | + function minifyExtensionResources(input) { |
| 46 | +@@ -205,3 +205,3 @@ function fromLocalWebpack(extensionPath, webpackConfigFileName, disableMangle) { |
| 47 | + data.contents = Buffer.from(contents.replace(/\n\/\/# sourceMappingURL=(.*)$/gm, function (_m, g1) { |
| 48 | +- return `\n//# sourceMappingURL=${sourceMappingURLBase}/extensions/${path_1.default.basename(extensionPath)}/${relativeOutputPath}/${g1}`; |
| 49 | ++ return `\n//# sourceMappingURL=${sourceMappingURLBase}/extensions-${path_1.default.basename(extensionPath).replaceAll('/', '-')}-${relativeOutputPath.replaceAll('/', '-')}-${g1.replaceAll('/', '-')}`; |
| 50 | + }), 'utf8'); |
| 51 | +diff --git a/build/lib/extensions.ts b/build/lib/extensions.ts |
| 52 | +index 9e7cf9f..e5f7c24 100644 |
| 53 | +--- a/build/lib/extensions.ts |
| 54 | ++++ b/build/lib/extensions.ts |
| 55 | +@@ -31,3 +31,3 @@ const root = path.dirname(path.dirname(__dirname)); |
| 56 | + const commit = getVersion(root); |
| 57 | +-const sourceMappingURLBase = `https://main.vscode-cdn.net/sourcemaps/${commit}`; |
| 58 | ++const sourceMappingURLBase = `https://github.com/VSCodium/sourcemaps/releases/download/${commit}`; |
| 59 | + |
| 60 | +@@ -179,3 +179,3 @@ function fromLocalWebpack(extensionPath: string, webpackConfigFileName: string, |
| 61 | + data.contents = Buffer.from(contents.replace(/\n\/\/# sourceMappingURL=(.*)$/gm, function (_m, g1) { |
| 62 | +- return `\n//# sourceMappingURL=${sourceMappingURLBase}/extensions/${path.basename(extensionPath)}/${relativeOutputPath}/${g1}`; |
| 63 | ++ return `\n//# sourceMappingURL=${sourceMappingURLBase}/extensions-${path.basename(extensionPath).replaceAll('/', '-')}-${relativeOutputPath.replaceAll('/', '-')}-${g1.replaceAll('/', '-')}`; |
| 64 | + }), 'utf8'); |
| 65 | +diff --git a/build/lib/optimize.js b/build/lib/optimize.js |
| 66 | +index fbc455b..4e7fe85 100644 |
| 67 | +--- a/build/lib/optimize.js |
| 68 | ++++ b/build/lib/optimize.js |
| 69 | +@@ -186,3 +186,3 @@ function bundleTask(opts) { |
| 70 | + function minifyTask(src, sourceMapBaseUrl) { |
| 71 | +- const sourceMappingURL = sourceMapBaseUrl ? ((f) => `${sourceMapBaseUrl}/${f.relative}.map`) : undefined; |
| 72 | ++ const sourceMappingURL = sourceMapBaseUrl ? ((f) => `${sourceMapBaseUrl}-${f.relative.replaceAll('/', '-')}.map`) : undefined; |
| 73 | + return cb => { |
| 74 | +diff --git a/build/lib/optimize.ts b/build/lib/optimize.ts |
| 75 | +index d89d0d6..fca30cf 100644 |
| 76 | +--- a/build/lib/optimize.ts |
| 77 | ++++ b/build/lib/optimize.ts |
| 78 | +@@ -211,3 +211,3 @@ export function bundleTask(opts: IBundleESMTaskOpts): () => NodeJS.ReadWriteStre |
| 79 | + export function minifyTask(src: string, sourceMapBaseUrl?: string): (cb: any) => void { |
| 80 | +- const sourceMappingURL = sourceMapBaseUrl ? ((f: any) => `${sourceMapBaseUrl}/${f.relative}.map`) : undefined; |
| 81 | ++ const sourceMappingURL = sourceMapBaseUrl ? ((f: any) => `${sourceMapBaseUrl}-${f.relative.replaceAll('/', '-')}.map`) : undefined; |
| 82 | + |
| 83 | +diff --git a/build/lib/util.js b/build/lib/util.js |
| 84 | +index 389b9e0..9abdb3c 100644 |
| 85 | +--- a/build/lib/util.js |
| 86 | ++++ b/build/lib/util.js |
| 87 | +@@ -235,4 +235,4 @@ function rewriteSourceMappingURL(sourceMappingURLBase) { |
| 88 | + const contents = f.contents.toString('utf8'); |
| 89 | +- const str = `//# sourceMappingURL=${sourceMappingURLBase}/${path_1.default.dirname(f.relative).replace(/\\/g, '/')}/$1`; |
| 90 | +- f.contents = Buffer.from(contents.replace(/\n\/\/# sourceMappingURL=(.*)$/gm, str)); |
| 91 | ++ const fp = path_1.default.dirname(f.relative).replace(/\\/g, '/').replaceAll('/', '-'); |
| 92 | ++ f.contents = Buffer.from(contents.replace(/\n\/\/# sourceMappingURL=(.*)$/gm, (_m, p) => `//# sourceMappingURL=${sourceMappingURLBase}/${fp}-${p.replaceAll('/', '-')}`)); |
| 93 | + return f; |
| 94 | +diff --git a/build/lib/util.ts b/build/lib/util.ts |
| 95 | +index 4931342..833091c 100644 |
| 96 | +--- a/build/lib/util.ts |
| 97 | ++++ b/build/lib/util.ts |
| 98 | +@@ -285,4 +285,4 @@ export function rewriteSourceMappingURL(sourceMappingURLBase: string): NodeJS.Re |
| 99 | + const contents = (<Buffer>f.contents).toString('utf8'); |
| 100 | +- const str = `//# sourceMappingURL=${sourceMappingURLBase}/${path.dirname(f.relative).replace(/\\/g, '/')}/$1`; |
| 101 | +- f.contents = Buffer.from(contents.replace(/\n\/\/# sourceMappingURL=(.*)$/gm, str)); |
| 102 | ++ const fp = path.dirname(f.relative).replace(/\\/g, '/').replaceAll('/', '-'); |
| 103 | ++ f.contents = Buffer.from(contents.replace(/\n\/\/# sourceMappingURL=(.*)$/gm, (_m, p) => `//# sourceMappingURL=${sourceMappingURLBase}/${fp}-${p.replaceAll('/', '-')}`)); |
| 104 | + return f; |
0 commit comments