From 1113142043633d9bbf1690415d9f84371661053f Mon Sep 17 00:00:00 2001 From: Jason <11984468+bettercalljason@users.noreply.github.com> Date: Mon, 25 Nov 2024 18:24:06 +0100 Subject: [PATCH] Add new TypeScript 5.7 options (#4238) --- src/schemas/json/jsconfig.json | 23 +++++++++++++++---- src/schemas/json/tsconfig.json | 17 ++++++++++++-- src/test/tsconfig/tsconfig-lib.json | 9 ++++++++ src/test/tsconfig/tsconfig-typescript5.7.json | 16 +++++++++++++ 4 files changed, 58 insertions(+), 7 deletions(-) create mode 100644 src/test/tsconfig/tsconfig-typescript5.7.json diff --git a/src/schemas/json/jsconfig.json b/src/schemas/json/jsconfig.json index f68a228c429..8f722aa069e 100644 --- a/src/schemas/json/jsconfig.json +++ b/src/schemas/json/jsconfig.json @@ -440,7 +440,7 @@ ] }, { - "pattern": "^(([Nn]ode)|([Nn]ode16)|([Nn]ode[Nn]ext)|([Cc]lassic)|([Bb]undler))$" + "pattern": "^(([Nn]ode)|([Nn]ode1[06])|([Nn]ode[Nn]ext)|([Cc]lassic)|([Bb]undler))$" } ], "markdownDescription": "Specify how TypeScript looks up a file from a given module specifier.\n\nSee more: https://www.typescriptlang.org/tsconfig#moduleResolution" @@ -494,10 +494,10 @@ }, "noUnusedLocals": { "$comment": "The value of 'null' is UNDOCUMENTED (https://github.com/microsoft/TypeScript/pull/18058).", - "description": "Enable error reporting when a local variables aren't read.", + "description": "Enable error reporting when a local variable isn't read.", "type": ["boolean", "null"], "default": false, - "markdownDescription": "Enable error reporting when a local variables aren't read.\n\nSee more: https://www.typescriptlang.org/tsconfig#noUnusedLocals" + "markdownDescription": "Enable error reporting when a local variable isn't read.\n\nSee more: https://www.typescriptlang.org/tsconfig#noUnusedLocals" }, "noUnusedParameters": { "$comment": "The value of 'null' is UNDOCUMENTED (https://github.com/microsoft/TypeScript/pull/18058).", @@ -660,11 +660,12 @@ "ES2021", "ES2022", "ES2023", + "ES2024", "ESNext" ] }, { - "pattern": "^([Ee][Ss]([356]|(20(1[56789]|2[0123]))|[Nn][Ee][Xx][Tt]))$" + "pattern": "^([Ee][Ss]([356]|(20(1[56789]|2[01234]))|[Nn][Ee][Xx][Tt]))$" } ], "markdownDescription": "Set the JavaScript language version for emitted JavaScript and include compatible library declarations.\n\nSee more: https://www.typescriptlang.org/tsconfig#target" @@ -925,6 +926,7 @@ "ES2017.SharedMemory", "ES2017.String", "ES2017.TypedArrays", + "ES2017.ArrayBuffer", "ES2018", "ES2018.AsyncGenerator", "ES2018.AsyncIterable", @@ -982,6 +984,14 @@ "ES2022.RegExp", "ES2023", "ES2023.Array", + "ES2024", + "ES2024.ArrayBuffer", + "ES2024.Collection", + "ES2024.Object", + "ES2024.Promise", + "ES2024.Regexp", + "ES2024.SharedMemory", + "ES2024.String", "Decorators", "Decorators.Legacy", "ES2017.Date", @@ -1000,7 +1010,7 @@ "pattern": "^[Ee][Ss]2016(\\.[Aa][Rr][Rr][Aa][Yy]\\.[Ii][Nn][Cc][Ll][Uu][Dd][Ee])?$" }, { - "pattern": "^[Ee][Ss]2017(\\.([Ii][Nn][Tt][Ll]|[Oo][Bb][Jj][Ee][Cc][Tt]|[Ss][Hh][Aa][Rr][Ee][Dd][Mm][Ee][Mm][Oo][Rr][Yy]|[Ss][Tt][Rr][Ii][Nn][Gg]|[Tt][Yy][Pp][Ee][Dd][Aa][Rr][Rr][Aa][Yy][Ss]|[Dd][Aa][Tt][Ee]))?$" + "pattern": "^[Ee][Ss]2017(\\.([Ii][Nn][Tt][Ll]|[Oo][Bb][Jj][Ee][Cc][Tt]|[Ss][Hh][Aa][Rr][Ee][Dd][Mm][Ee][Mm][Oo][Rr][Yy]|[Ss][Tt][Rr][Ii][Nn][Gg]|[Tt][Yy][Pp][Ee][Dd][Aa][Rr][Rr][Aa][Yy][Ss]|[Dd][Aa][Tt][Ee]|[Aa][Rr][Rr][Aa][Yy][Bb][Uu][Ff][Ff][Ee][Rr]))?$" }, { "pattern": "^[Ee][Ss]2018(\\.([Aa][Ss][Yy][Nn][Cc][Gg][Ee][Nn][Ee][Rr][Aa][Tt][Oo][Rr]|[Aa][Ss][Yy][Nn][Cc][Ii][Tt][Ee][Rr][Aa][Bb][Ll][Ee]|[Ii][Nn][Tt][Ll]|[Pp][Rr][Oo][Mm][Ii][Ss][Ee]|[Rr][Ee][Gg][Ee][Xx][Pp]))?$" @@ -1020,6 +1030,9 @@ { "pattern": "^[Ee][Ss]2023(\\.([Aa][Rr][Rr][Aa][Yy]|[Cc][Oo][Ll][Ll][Ee][Cc][Tt][Ii][Oo][Nn]))?$" }, + { + "pattern": "^[Ee][Ss]2024(\\.([Aa][Rr][Rr][Aa][Yy][Bb][Uu][Ff][Ff][Ee][Rr]|[Cc][Oo][Ll][Ll][Ee][Cc][Tt][Ii][Oo][Nn]|[Oo][Bb][Jj][Ee][Cc][Tt]|[Pp][Rr][Oo][Mm][Ii][Ss][Ee]|[Rr][Ee][Gg][Ee][Xx][Pp]|[Ss][Hh][Aa][Rr][Ee][Dd][Mm][Ee][Mm][Oo][Rr][Yy]|[Ss][Tt][Rr][Ii][Nn][Gg]))?$" + }, { "pattern": "^[Ee][Ss][Nn][Ee][Xx][Tt](\\.([Aa][Rr][Rr][Aa][Yy]|[Aa][Ss][Yy][Nn][Cc][Ii][Tt][Ee][Rr][Aa][Bb][Ll][Ee]|[Bb][Ii][Gg][Ii][Nn][Tt]|[Ii][Nn][Tt][Ll]|[Pp][Rr][Oo][Mm][Ii][Ss][Ee]|[Ss][Tt][Rr][Ii][Nn][Gg]|[Ss][Yy][Mm][Bb][Oo][Ll]|[Ww][Ee][Aa][Kk][Rr][Ee][Ff]|[Dd][Ee][Cc][Oo][Rr][Aa][Tt][Oo][Rr][Ss]|[Dd][Ii][Ss][Pp][Oo][Ss][Aa][Bb][Ll][Ee]))?$" }, diff --git a/src/schemas/json/tsconfig.json b/src/schemas/json/tsconfig.json index 9174a585370..430763a8b9b 100644 --- a/src/schemas/json/tsconfig.json +++ b/src/schemas/json/tsconfig.json @@ -663,11 +663,12 @@ "ES2021", "ES2022", "ES2023", + "ES2024", "ESNext" ] }, { - "pattern": "^([Ee][Ss]([356]|(20(1[56789]|2[0123]))|[Nn][Ee][Xx][Tt]))$" + "pattern": "^([Ee][Ss]([356]|(20(1[56789]|2[01234]))|[Nn][Ee][Xx][Tt]))$" } ], "markdownDescription": "Set the JavaScript language version for emitted JavaScript and include compatible library declarations.\n\nSee more: https://www.typescriptlang.org/tsconfig#target" @@ -928,6 +929,7 @@ "ES2017.SharedMemory", "ES2017.String", "ES2017.TypedArrays", + "ES2017.ArrayBuffer", "ES2018", "ES2018.AsyncGenerator", "ES2018.AsyncIterable", @@ -985,6 +987,14 @@ "ES2022.RegExp", "ES2023", "ES2023.Array", + "ES2024", + "ES2024.ArrayBuffer", + "ES2024.Collection", + "ES2024.Object", + "ES2024.Promise", + "ES2024.Regexp", + "ES2024.SharedMemory", + "ES2024.String", "Decorators", "Decorators.Legacy", "ES2017.Date", @@ -1003,7 +1013,7 @@ "pattern": "^[Ee][Ss]2016(\\.[Aa][Rr][Rr][Aa][Yy]\\.[Ii][Nn][Cc][Ll][Uu][Dd][Ee])?$" }, { - "pattern": "^[Ee][Ss]2017(\\.([Ii][Nn][Tt][Ll]|[Oo][Bb][Jj][Ee][Cc][Tt]|[Ss][Hh][Aa][Rr][Ee][Dd][Mm][Ee][Mm][Oo][Rr][Yy]|[Ss][Tt][Rr][Ii][Nn][Gg]|[Tt][Yy][Pp][Ee][Dd][Aa][Rr][Rr][Aa][Yy][Ss]|[Dd][Aa][Tt][Ee]))?$" + "pattern": "^[Ee][Ss]2017(\\.([Ii][Nn][Tt][Ll]|[Oo][Bb][Jj][Ee][Cc][Tt]|[Ss][Hh][Aa][Rr][Ee][Dd][Mm][Ee][Mm][Oo][Rr][Yy]|[Ss][Tt][Rr][Ii][Nn][Gg]|[Tt][Yy][Pp][Ee][Dd][Aa][Rr][Rr][Aa][Yy][Ss]|[Dd][Aa][Tt][Ee]|[Aa][Rr][Rr][Aa][Yy][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tsconfig-lib.json index d0c13eaee0b..d1fe18445b5 100644 --- a/src/test/tsconfig/tsconfig-lib.json +++ b/src/test/tsconfig/tsconfig-lib.json @@ -16,6 +16,7 @@ "es2016", "es2016.array.include", "es2017", + "es2017.arraybuffer", "es2017.intl", "es2017.object", "es2017.sharedmemory", @@ -75,6 +76,14 @@ "es2022.regexp", "es2023", "es2023.array", + "es2024", + "es2024.arraybuffer", + "es2024.collection", + "es2024.object", + "es2024.promise", + "es2024.regexp", + "es2024.sharedmemory", + "es2024.string", "decorators", "decorators.legacy", "es2017.date", diff --git a/src/test/tsconfig/tsconfig-typescript5.7.json b/src/test/tsconfig/tsconfig-typescript5.7.json new file mode 100644 index 00000000000..37d18195db6 --- /dev/null +++ b/src/test/tsconfig/tsconfig-typescript5.7.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "lib": [ + "es2017.arraybuffer", + "es2024", + "es2024.arraybuffer", + "es2024.collection", + "es2024.object", + "es2024.promise", + "es2024.regexp", + "es2024.sharedmemory", + "es2024.string" + ], + "target": "es2024" + } +}