From c067c5eae69fa42e72a551d6f2ea41ef07b37ed9 Mon Sep 17 00:00:00 2001 From: Evan Wallace Date: Tue, 8 Aug 2023 01:36:03 -0400 Subject: [PATCH] remove an unnecessary argument --- internal/bundler/bundler.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/internal/bundler/bundler.go b/internal/bundler/bundler.go index e57e53c37b3..a72f7ecb5eb 100644 --- a/internal/bundler/bundler.go +++ b/internal/bundler/bundler.go @@ -1295,7 +1295,6 @@ func (s *scanner) maybeParseFile( prettyPath string, importSource *logger.Source, importPathRange logger.Range, - pluginData interface{}, kind inputKind, inject chan config.InjectedFile, ) uint32 { @@ -1393,7 +1392,7 @@ func (s *scanner) maybeParseFile( importSource: importSource, sideEffects: sideEffects, importPathRange: importPathRange, - pluginData: pluginData, + pluginData: resolveResult.PluginData, options: optionsClone, results: s.resultChannel, inject: inject, @@ -1543,7 +1542,7 @@ func (s *scanner) preprocessInjectedFiles() { for _, resolveResult := range injectResolveResults { if resolveResult != nil { channel := make(chan config.InjectedFile, 1) - s.maybeParseFile(*resolveResult, resolver.PrettyPath(s.fs, resolveResult.PathPair.Primary), nil, logger.Range{}, nil, inputKindNormal, channel) + s.maybeParseFile(*resolveResult, resolver.PrettyPath(s.fs, resolveResult.PathPair.Primary), nil, logger.Range{}, inputKindNormal, channel) injectWaitGroup.Add(1) // Wait for the results in parallel. The results slice is large enough so @@ -1586,7 +1585,7 @@ func (s *scanner) addEntryPoints(entryPoints []EntryPoint) []graph.EntryPoint { } } resolveResult := resolver.ResolveResult{PathPair: resolver.PathPair{Primary: stdinPath}} - sourceIndex := s.maybeParseFile(resolveResult, resolver.PrettyPath(s.fs, stdinPath), nil, logger.Range{}, nil, inputKindStdin, nil) + sourceIndex := s.maybeParseFile(resolveResult, resolver.PrettyPath(s.fs, stdinPath), nil, logger.Range{}, inputKindStdin, nil) entryMetas = append(entryMetas, graph.EntryPoint{ OutputPath: "stdin", SourceIndex: sourceIndex, @@ -1702,7 +1701,7 @@ func (s *scanner) addEntryPoints(entryPoints []EntryPoint) []graph.EntryPoint { for i, resolveResult := range entryPointResolveResults { if resolveResult != nil { prettyPath := resolver.PrettyPath(s.fs, resolveResult.PathPair.Primary) - sourceIndex := s.maybeParseFile(*resolveResult, prettyPath, nil, logger.Range{}, resolveResult.PluginData, inputKindEntryPoint, nil) + sourceIndex := s.maybeParseFile(*resolveResult, prettyPath, nil, logger.Range{}, inputKindEntryPoint, nil) outputPath := entryPoints[i].OutputPath outputPathWasAutoGenerated := false @@ -1876,7 +1875,7 @@ func (s *scanner) scanAllDependencies() { if !resolveResult.IsExternal { // Handle a path within the bundle sourceIndex := s.maybeParseFile(*resolveResult, resolver.PrettyPath(s.fs, path), - &result.file.inputFile.Source, record.Range, resolveResult.PluginData, inputKindNormal, nil) + &result.file.inputFile.Source, record.Range, inputKindNormal, nil) record.SourceIndex = ast.MakeIndex32(sourceIndex) } else { // Allow this import statement to be removed if something marked it as "sideEffects: false"