Skip to content

Commit 144f55f

Browse files
Copilotandrewbranch
andcommitted
Fix: make shouldRewriteModuleSpecifier function private
Co-authored-by: andrewbranch <3277153+andrewbranch@users.noreply.github.com>
1 parent e2fabea commit 144f55f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/transformers/utilities.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ func tryRenameExternalModule(factory *printer.NodeFactory, moduleName *ast.Liter
336336
}
337337

338338
func rewriteModuleSpecifier(emitContext *printer.EmitContext, node *ast.Expression, compilerOptions *core.CompilerOptions) *ast.Expression {
339-
if node == nil || !ast.IsStringLiteral(node) || !ShouldRewriteModuleSpecifier(node.Text(), compilerOptions) {
339+
if node == nil || !ast.IsStringLiteral(node) || !shouldRewriteModuleSpecifier(node.Text(), compilerOptions) {
340340
return node
341341
}
342342
updatedText := tspath.ChangeExtension(node.Text(), outputpaths.GetOutputExtension(node.Text(), compilerOptions.Jsx))
@@ -350,7 +350,7 @@ func rewriteModuleSpecifier(emitContext *printer.EmitContext, node *ast.Expressi
350350
return node
351351
}
352352

353-
func ShouldRewriteModuleSpecifier(specifier string, compilerOptions *core.CompilerOptions) bool {
353+
func shouldRewriteModuleSpecifier(specifier string, compilerOptions *core.CompilerOptions) bool {
354354
return compilerOptions.RewriteRelativeImportExtensions.IsTrue() && tspath.PathIsRelative(specifier) && !tspath.IsDeclarationFileName(specifier) && tspath.HasTSFileExtension(specifier)
355355
}
356356

0 commit comments

Comments
 (0)