mirror of
https://github.com/Microsoft/vscode
synced 2024-10-02 17:32:41 +00:00
configure esModuleInterop: true
, change some star-imports
This commit is contained in:
parent
6908956c15
commit
09981a84af
|
@ -365,6 +365,9 @@ function removeDuplicateTSBoilerplate(destFiles: IConcatFile[]): IConcatFile[] {
|
|||
{ start: /^var __param/, end: /^};$/ },
|
||||
{ start: /^var __awaiter/, end: /^};$/ },
|
||||
{ start: /^var __generator/, end: /^};$/ },
|
||||
{ start: /^var __createBinding/, end: /^}\)\);$/ },
|
||||
{ start: /^var __setModuleDefault/, end: /^}\);$/ },
|
||||
{ start: /^var __importStar/, end: /^};$/ },
|
||||
];
|
||||
|
||||
destFiles.forEach((destFile) => {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"extends": "./tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"esModuleInterop": true,
|
||||
"removeComments": false,
|
||||
"preserveConstEnums": true,
|
||||
"sourceMap": false,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as minimist from 'minimist';
|
||||
import minimist from 'minimist';
|
||||
import { isWindows } from 'vs/base/common/platform';
|
||||
import { localize } from 'vs/nls';
|
||||
import { NativeParsedArgs } from 'vs/platform/environment/common/argv';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as assert from 'assert';
|
||||
import assert from 'assert';
|
||||
import { IProcessEnvironment } from 'vs/base/common/platform';
|
||||
import { localize } from 'vs/nls';
|
||||
import { NativeParsedArgs } from 'vs/platform/environment/common/argv';
|
||||
|
|
|
@ -500,7 +500,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain
|
|||
async isAdmin(): Promise<boolean> {
|
||||
let isAdmin: boolean;
|
||||
if (isWindows) {
|
||||
isAdmin = (await import('native-is-elevated'))();
|
||||
isAdmin = (await import('native-is-elevated')).default();
|
||||
} else {
|
||||
isAdmin = process.getuid?.() === 0;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
import * as nativeWatchdog from 'native-watchdog';
|
||||
import * as net from 'net';
|
||||
import * as minimist from 'minimist';
|
||||
import minimist from 'minimist';
|
||||
import * as performance from 'vs/base/common/performance';
|
||||
import type { MessagePortMain } from 'vs/base/parts/sandbox/node/electronTypes';
|
||||
import { isCancellationError, isSigPipeError, onUnexpectedError } from 'vs/base/common/errors';
|
||||
|
|
|
@ -77,11 +77,20 @@ export function connectProxyResolver(
|
|||
}
|
||||
|
||||
function createPatchedModules(params: ProxyAgentParams, resolveProxy: ReturnType<typeof createProxyResolver>) {
|
||||
|
||||
function proxyAssign(module: any, patch: any) {
|
||||
return new Proxy(module, {
|
||||
get(target, prop) {
|
||||
return prop in patch ? patch[prop] : target[prop];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
http: Object.assign(http, createHttpPatch(params, http, resolveProxy)),
|
||||
https: Object.assign(https, createHttpPatch(params, https, resolveProxy)),
|
||||
net: Object.assign(net, createNetPatch(params, net)),
|
||||
tls: Object.assign(tls, createTlsPatch(params, tls))
|
||||
http: proxyAssign(http, createHttpPatch(params, http, resolveProxy)),
|
||||
https: proxyAssign(https, createHttpPatch(params, https, resolveProxy)),
|
||||
net: proxyAssign(net, createNetPatch(params, net)),
|
||||
tls: proxyAssign(tls, createTlsPatch(params, tls))
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -207,7 +207,9 @@ async function loadTests(opts) {
|
|||
|
||||
for (const consoleFn of [console.log, console.error, console.info, console.warn, console.trace, console.debug]) {
|
||||
console[consoleFn.name] = function (msg) {
|
||||
if (!_allowedTestOutput.some(a => a.test(msg)) && !_allowedTestsWithOutput.has(currentTest.title)) {
|
||||
if (!currentTest) {
|
||||
consoleFn.apply(console, arguments);
|
||||
} else if (!_allowedTestOutput.some(a => a.test(msg)) && !_allowedTestsWithOutput.has(currentTest.title)) {
|
||||
_testsWithUnexpectedOutput = true;
|
||||
consoleFn.apply(console, arguments);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue