set emit-target and libs to ES2022, avoid static-blocks, fix Error#cause conflict

https://github.com/microsoft/vscode/issues/185991
This commit is contained in:
Johannes 2023-06-30 11:43:19 +02:00
parent 032b14c3ff
commit eeae481e47
No known key found for this signature in database
GPG key ID: 6DEF802A22264FCA
6 changed files with 7 additions and 29 deletions

View file

@ -293,7 +293,7 @@ class SwcTranspiler {
tsx: false,
decorators: true
},
target: 'es2020',
target: 'es2022',
loose: false,
minify: {
compress: false,

View file

@ -376,7 +376,7 @@ export class SwcTranspiler implements ITranspiler {
tsx: false,
decorators: true
},
target: 'es2020',
target: 'es2022',
loose: false,
minify: {
compress: false,

View file

@ -17,29 +17,10 @@
"./vs/*"
]
},
"target": "es2022",
"useDefineForClassFields": false,
"lib": [
"ES2016",
"ES2017.Object",
"ES2017.String",
"ES2017.Intl",
"ES2017.TypedArrays",
"ES2018.AsyncIterable",
"ES2018.AsyncGenerator",
"ES2018.Promise",
"ES2018.Regexp",
"ES2018.Intl",
"ES2019.Array",
"ES2019.Object",
"ES2019.String",
"ES2019.Symbol",
"ES2020.BigInt",
"ES2020.Promise",
"ES2020.String",
"ES2020.Symbol.WellKnown",
"ES2020.Intl",
"ES2021.Promise",
"ES2021.String",
"ES2021.WeakRef",
"ES2022",
"DOM",
"DOM.Iterable",
"WebWorker.ImportScripts"

View file

@ -7,7 +7,6 @@
"allowJs": true,
"resolveJsonModule": true,
"outDir": "../out/vs",
"target": "es2021",
"types": [
"keytar",
"mocha",

View file

@ -36,7 +36,6 @@ export type ExtractErrorType = 'CorruptZip' | 'Incomplete';
export class ExtractError extends Error {
readonly type?: ExtractErrorType;
readonly cause: Error;
constructor(type: ExtractErrorType | undefined, cause: Error) {
let message = cause.message;

View file

@ -34,12 +34,11 @@ export interface IConsolePatchFn {
export abstract class ErrorHandler {
static {
static async installEarlyHandler(accessor: ServicesAccessor): Promise<void> {
// increase number of stack frames (from 10, https://github.com/v8/v8/wiki/Stack-Trace-API)
Error.stackTraceLimit = 100;
}
static async installEarlyHandler(accessor: ServicesAccessor): Promise<void> {
// does NOT dependent of extension information, can be installed immediately, and simply forwards
// to the log service and main thread errors
const logService = accessor.get(ILogService);