Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions packages/cli-kit/src/public/node/import-extractor.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {fileExistsSync, isDirectorySync} from './fs.js'
import {dirname, joinPath} from './path.js'
import {uniq} from '../common/array.js'
import {openSync, readSync, closeSync} from 'fs'

// Only read the first 128KB of each file for import scanning. This covers
Expand Down Expand Up @@ -125,7 +126,7 @@ export function extractImportPathsRecursively(filePath: string, visited: Set<str
}
}

return [...new Set(allImports)]
return uniq(allImports)
}

/**
Expand Down Expand Up @@ -183,7 +184,7 @@ function extractJSLikeImports(content: string, filePath: string): string[] {
}
}

return [...new Set(imports)]
return uniq(imports)
}

function extractRustImports(content: string, filePath: string): string[] {
Expand Down Expand Up @@ -215,7 +216,7 @@ function extractRustImports(content: string, filePath: string): string[] {
}
}

return [...new Set(imports)]
return uniq(imports)
}

function resolveJSImport(importPath: string, fromFile: string): string | null {
Expand Down
Loading