Skip to content

Commit b0071ff

Browse files
author
Mariusz Pasinski
committed
chore: use more descriptive variable names
1 parent d7ad8a1 commit b0071ff

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/host/src/node/babel-plugin/plugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export function replaceWithRequireNodeAddon3(
6060
originalId: string
6161
) {
6262
const { packageName, relativePath } = determineModuleContext(resolvedPath);
63-
const finalRelPath = relativePath.startsWith("./") ? relativePath : `./${relativePath}`;
63+
const dotRelativePath = relativePath.startsWith("./") ? relativePath : `./${relativePath}`;
6464

6565
p.replaceWith(
6666
t.callExpression(
@@ -70,7 +70,7 @@ export function replaceWithRequireNodeAddon3(
7070
]),
7171
t.identifier("requireNodeAddon")
7272
),
73-
[finalRelPath, packageName, originalId]
73+
[dotRelativePath, packageName, originalId]
7474
.map(t.stringLiteral),
7575
)
7676
);

packages/host/src/node/path-utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ export function determineModuleContext(
134134
packageNameCache.set(pkgDir, pkgName);
135135
}
136136
// Compute module-relative path
137-
const relPath = path.relative(pkgDir, originalPath)
137+
const relativePath = path.relative(pkgDir, originalPath)
138138
.replaceAll("\\", "/");
139-
return { packageName: pkgName, relativePath: relPath };
139+
return { packageName: pkgName, relativePath };
140140
}
141141

142142
/**

0 commit comments

Comments
 (0)