mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Merge from vscode merge-base (#22780)
* Revert "Revert "Merge from vscode merge-base (#22769)" (#22779)"
This reverts commit 47a1745180.
* Fix notebook download task
* Remove done call from extensions-ci
This commit is contained in:
@@ -43,14 +43,20 @@ function bundle(entryPoints, config, callback) {
|
||||
if (!config.paths['vs/css']) {
|
||||
config.paths['vs/css'] = 'out-build/vs/css.build';
|
||||
}
|
||||
config.buildForceInvokeFactory = config.buildForceInvokeFactory || {};
|
||||
config.buildForceInvokeFactory['vs/nls'] = true;
|
||||
config.buildForceInvokeFactory['vs/css'] = true;
|
||||
loader.config(config);
|
||||
loader(['require'], (localRequire) => {
|
||||
const resolvePath = (path) => {
|
||||
const r = localRequire.toUrl(path);
|
||||
if (!/\.js/.test(r)) {
|
||||
return r + '.js';
|
||||
const resolvePath = (entry) => {
|
||||
let r = localRequire.toUrl(entry.path);
|
||||
if (!r.endsWith('.js')) {
|
||||
r += '.js';
|
||||
}
|
||||
return r;
|
||||
// avoid packaging the build version of plugins:
|
||||
r = r.replace('vs/nls.build.js', 'vs/nls.js');
|
||||
r = r.replace('vs/css.build.js', 'vs/css.js');
|
||||
return { path: r, amdModuleId: entry.amdModuleId };
|
||||
};
|
||||
for (const moduleId in entryPointsMap) {
|
||||
const entryPoint = entryPointsMap[moduleId];
|
||||
@@ -299,9 +305,18 @@ function emitEntryPoint(modulesMap, deps, entryPoint, includedModules, prepend,
|
||||
if (module.shim) {
|
||||
mainResult.sources.push(emitShimmedModule(c, deps[c], module.shim, module.path, contents));
|
||||
}
|
||||
else {
|
||||
else if (module.defineLocation) {
|
||||
mainResult.sources.push(emitNamedModule(c, module.defineLocation, module.path, contents));
|
||||
}
|
||||
else {
|
||||
const moduleCopy = {
|
||||
id: module.id,
|
||||
path: module.path,
|
||||
defineLocation: module.defineLocation,
|
||||
dependencies: module.dependencies
|
||||
};
|
||||
throw new Error(`Cannot bundle module '${module.id}' for entry point '${entryPoint}' because it has no shim and it lacks a defineLocation: ${JSON.stringify(moduleCopy)}`);
|
||||
}
|
||||
});
|
||||
Object.keys(usedPlugins).forEach((pluginName) => {
|
||||
const plugin = usedPlugins[pluginName];
|
||||
@@ -322,10 +337,13 @@ function emitEntryPoint(modulesMap, deps, entryPoint, includedModules, prepend,
|
||||
plugin.writeFile(pluginName, entryPoint, req, write, {});
|
||||
}
|
||||
});
|
||||
const toIFile = (path) => {
|
||||
const contents = readFileAndRemoveBOM(path);
|
||||
const toIFile = (entry) => {
|
||||
let contents = readFileAndRemoveBOM(entry.path);
|
||||
if (entry.amdModuleId) {
|
||||
contents = contents.replace(/^define\(/m, `define("${entry.amdModuleId}",`);
|
||||
}
|
||||
return {
|
||||
path: path,
|
||||
path: entry.path,
|
||||
contents: contents
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user