@@ -64,7 +64,6 @@ type processedFiles struct {
6464 importHelpersImportSpecifiers map [tspath.Path ]* ast.Node
6565 libFiles map [tspath.Path ]* LibFile
6666 // List of present unsupported extensions
67- unsupportedExtensions []string
6867 sourceFilesFoundSearchingNodeModules collections.Set [tspath.Path ]
6968 includeProcessor * includeProcessor
7069 // if file was included using source file and its output is actually part of program
@@ -152,7 +151,6 @@ func processAllProgramFiles(
152151 sourceFileMetaDatas := make (map [tspath.Path ]ast.SourceFileMetaData , totalFileCount )
153152 var jsxRuntimeImportSpecifiers map [tspath.Path ]* jsxRuntimeImportSpecifier
154153 var importHelpersImportSpecifiers map [tspath.Path ]* ast.Node
155- var unsupportedExtensions []string
156154 var sourceFilesFoundSearchingNodeModules collections.Set [tspath.Path ]
157155 libFilesMap := make (map [tspath.Path ]* LibFile , libFileCount )
158156
@@ -217,10 +215,6 @@ func processAllProgramFiles(
217215 }
218216 importHelpersImportSpecifiers [path ] = task .importHelpersImportSpecifier
219217 }
220- extension := tspath .TryGetExtensionFromPath (file .FileName ())
221- if slices .Contains (tspath .SupportedJSExtensionsFlat , extension ) {
222- unsupportedExtensions = core .AppendIfUnique (unsupportedExtensions , extension )
223- }
224218 if task .fromExternalLibrary {
225219 sourceFilesFoundSearchingNodeModules .Add (path )
226220 }
@@ -251,7 +245,6 @@ func processAllProgramFiles(
251245 sourceFileMetaDatas : sourceFileMetaDatas ,
252246 jsxRuntimeImportSpecifiers : jsxRuntimeImportSpecifiers ,
253247 importHelpersImportSpecifiers : importHelpersImportSpecifiers ,
254- unsupportedExtensions : unsupportedExtensions ,
255248 sourceFilesFoundSearchingNodeModules : sourceFilesFoundSearchingNodeModules ,
256249 libFiles : libFilesMap ,
257250 missingFiles : missingFiles ,
@@ -638,16 +631,22 @@ func getLibraryNameFromLibFileName(libFileName string) string {
638631 // lib.dom.iterable.d.ts -> @typescript/lib-dom/iterable
639632 // lib.es2015.symbol.wellknown.d.ts -> @typescript/lib-es2015/symbol-wellknown
640633 components := strings .Split (libFileName , "." )
641- var path string
634+ var path strings.Builder
635+ path .WriteString ("@typescript/lib-" )
642636 if len (components ) > 1 {
643- path = components [1 ]
637+ path . WriteString ( components [1 ])
644638 }
645639 i := 2
646640 for i < len (components ) && components [i ] != "" && components [i ] != "d" {
647- path += core .IfElse (i == 2 , "/" , "-" ) + components [i ]
641+ if i == 2 {
642+ path .WriteByte ('/' )
643+ } else {
644+ path .WriteByte ('-' )
645+ }
646+ path .WriteString (components [i ])
648647 i ++
649648 }
650- return "@typescript/lib-" + path
649+ return path . String ()
651650}
652651
653652func getInferredLibraryNameResolveFrom (options * core.CompilerOptions , currentDirectory string , libFileName string ) string {
0 commit comments