diff --git a/package-lock.json b/package-lock.json index 9fb6514..b12fe0f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -77,7 +77,7 @@ "terser-webpack-plugin": "5.3.9", "ts-node": "10.9.1", "tslib": "^2.6.2", - "typescript": "^5.2.2", + "typescript": "^5.3.3", "webpack": "^5.88.2", "webpack-assets-manifest": "^5.1.0", "webpack-bundle-analyzer": "^4.9.1", @@ -18420,9 +18420,9 @@ } }, "node_modules/typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/package.json b/package.json index 3348782..d2ea58f 100644 --- a/package.json +++ b/package.json @@ -125,7 +125,7 @@ "terser-webpack-plugin": "5.3.9", "ts-node": "10.9.1", "tslib": "^2.6.2", - "typescript": "^5.2.2", + "typescript": "^5.3.3", "webpack": "^5.88.2", "webpack-assets-manifest": "^5.1.0", "webpack-bundle-analyzer": "^4.9.1", diff --git a/src/common/typescript/compile.ts b/src/common/typescript/compile.ts index a92a265..533623e 100644 --- a/src/common/typescript/compile.ts +++ b/src/common/typescript/compile.ts @@ -52,10 +52,10 @@ export function compile( logger.verbose("We're about to create the program"); const compilerHost = ts.createCompilerHost(parsedConfig.options); compilerHost.readFile = displayFilename(compilerHost.readFile, 'Reading', logger); - // @ts-ignore + // @ts-expect-error compilerHost.readFile.enableDisplay(); const program = ts.createProgram(parsedConfig.fileNames, parsedConfig.options, compilerHost); - // @ts-ignore + // @ts-expect-error const filesCount = compilerHost.readFile.disableDisplay(); const allDiagnostics = ts.getPreEmitDiagnostics(program).slice(); logger.verbose(`Program created, read ${filesCount} files`); diff --git a/src/common/typescript/transformers.ts b/src/common/typescript/transformers.ts index 886297d..96a00bd 100644 --- a/src/common/typescript/transformers.ts +++ b/src/common/typescript/transformers.ts @@ -142,7 +142,7 @@ function updateImportDeclaration( node.modifiers, node.importClause, context.factory.createStringLiteral(resolvedPath), - node.assertClause, + node.attributes || node.assertClause, ); } @@ -173,7 +173,7 @@ function updateExportDeclaration( node.isTypeOnly, node.exportClause, context.factory.createStringLiteral(resolvedPath), - node.assertClause, + node.attributes || node.assertClause, ); } @@ -199,7 +199,7 @@ function updateImportTypeNode( return context.factory.updateImportTypeNode( node, context.factory.createLiteralTypeNode(context.factory.createStringLiteral(resolvedPath)), - node.assertions, + node.attributes || (node.assertions as any), node.qualifier, node.typeArguments, node.isTypeOf, diff --git a/src/common/typescript/watch.ts b/src/common/typescript/watch.ts index 5c61f29..c9cae5e 100644 --- a/src/common/typescript/watch.ts +++ b/src/common/typescript/watch.ts @@ -46,11 +46,11 @@ export function watch( 'createProgram', () => { logger.verbose("We're about to create the program"); - // @ts-ignore + // @ts-expect-error host.readFile.enableDisplay(); }, () => { - // @ts-ignore + // @ts-expect-error const count = host.readFile.disableDisplay(); logger.verbose(`Program created, read ${count} files`); },