Skip to content

Commit

Permalink
remove an unnecessary argument
Browse files Browse the repository at this point in the history
  • Loading branch information
evanw committed Aug 8, 2023
1 parent 6e05434 commit c067c5e
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions internal/bundler/bundler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit c067c5e

Please sign in to comment.