From 989a7c76c8ed298ce27ddaac8f65282a52a2242e Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Thu, 25 Apr 2024 15:56:15 +0800 Subject: [PATCH] fix(language-tools): no longer need typescript version patch --- tests/language-tools.ts | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/language-tools.ts b/tests/language-tools.ts index 6ab0c94..9920e8e 100644 --- a/tests/language-tools.ts +++ b/tests/language-tools.ts @@ -9,19 +9,19 @@ export async function test(options: RunOptions) { beforeBuild: 'pnpm dedupe', build: 'build', test: 'test', - patchFiles: { - 'package.json': (content) => { - const pkg = JSON.parse(content) - // As of 2024-03-19, - // the version of TypeScript in the package.json is latest, which resolves to 5.4.2 if we dedupe it. - // The new feature in TypeScript 5.4, - // [Preserved Narrowing in Closures Following Last Assignments](https://devblogs.microsoft.com/typescript/announcing-typescript-5-4/#preserved-narrowing-in-closures-following-last-assignments), - // would cause a type error at . - // There are also other tests broken by TypeScript 5.4. - // So we need to pin the version to ~5.3.3. - pkg.devDependencies.typescript = '~5.3.3' - return JSON.stringify(pkg, null, 2) - }, - }, + // patchFiles: { + // 'package.json': (content) => { + // const pkg = JSON.parse(content) + // // As of 2024-03-19, + // // the version of TypeScript in the package.json is latest, which resolves to 5.4.2 if we dedupe it. + // // The new feature in TypeScript 5.4, + // // [Preserved Narrowing in Closures Following Last Assignments](https://devblogs.microsoft.com/typescript/announcing-typescript-5-4/#preserved-narrowing-in-closures-following-last-assignments), + // // would cause a type error at . + // // There are also other tests broken by TypeScript 5.4. + // // So we need to pin the version to ~5.3.3. + // pkg.devDependencies.typescript = '~5.3.3' + // return JSON.stringify(pkg, null, 2) + // }, + // }, }) }