Skip to content

Commit

Permalink
Change ProposedSymlink to object
Browse files Browse the repository at this point in the history
  • Loading branch information
Silic0nS0ldier committed Nov 27, 2023
1 parent 88019fe commit 842a09f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/linker/link_node_modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type SymlinkFilePath = string & { __SymlinkFilePath: never };
/** Path for symlink target. */
type SymlinkTargetPath = string & { __SymlinkTargetPath: never };
/** Describes potential symlinks. */
type ProposedSymlink = [filePath: SymlinkFilePath, targetPath: SymlinkTargetPath];
type ProposedSymlink = { filePath: SymlinkFilePath, targetPath: SymlinkTargetPath };

// NOTE Trailing '/' not included in matcher to cover all scenarios (e.g. RUNFILES_DIR environment variable)
const runfilesPathMatcher = '.runfiles';
Expand Down Expand Up @@ -89,7 +89,7 @@ export function getProposedSymlinks(
repositoryName,
nodeModulesDir,
) as SymlinkTargetPath;
symlinks.push([filePath, targetPath]);
symlinks.push({ filePath, targetPath });
}

return symlinks;
Expand Down Expand Up @@ -211,7 +211,7 @@ function main() {
log('Inferring symlink paths...');
const symlinks = getProposedSymlinks(modulesManifest, runfilesDirPath);

for (const [filePath, targetPath] of symlinks) {
for (const { filePath, targetPath } of symlinks) {
tryCreateSymlink(filePath, targetPath);
}

Expand Down

0 comments on commit 842a09f

Please sign in to comment.