mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-27 13:40:25 +00:00
esm - fix tests (#226389)
This commit is contained in:
@@ -4,13 +4,12 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { isESM, canASAR } from 'vs/base/common/amd';
|
||||
import { AppResourcePath, FileAccess, nodeModulesAsarPath, nodeModulesPath } from 'vs/base/common/network';
|
||||
import { AppResourcePath, FileAccess, nodeModulesAsarPath, nodeModulesPath, Schemas, VSCODE_AUTHORITY } from 'vs/base/common/network';
|
||||
import * as platform from 'vs/base/common/platform';
|
||||
import { IProductConfiguration } from 'vs/base/common/product';
|
||||
import { assertType } from 'vs/base/common/types';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
|
||||
|
||||
class DefineCall {
|
||||
constructor(
|
||||
public readonly id: string | null | undefined,
|
||||
@@ -65,6 +64,9 @@ class AMDModuleImporter {
|
||||
if (value.startsWith(window.location.origin)) {
|
||||
return value;
|
||||
}
|
||||
if (value.startsWith(`${Schemas.vscodeFileResource}://${VSCODE_AUTHORITY}`)) {
|
||||
return value;
|
||||
}
|
||||
throw new Error(`[trusted_script_src] Invalid script url: ${value}`);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user