Skip to content

Commit 5596273

Browse files
author
Mariusz Pasinski
committed
fix: remove unused requiredFrom parameter
1 parent 41d4ebb commit 5596273

File tree

1 file changed

+3
-4
lines changed
  • packages/react-native-node-api-modules/src/node/babel-plugin

1 file changed

+3
-4
lines changed

packages/react-native-node-api-modules/src/node/babel-plugin/plugin.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ function findNodeAddonForBindings(id: string, fromDir: string) {
7676
export function replaceWithRequireNodeAddon3(
7777
p: NodePath,
7878
resolvedPath: string,
79-
originalPath: string,
80-
requiredFrom: string
79+
originalPath: string
8180
) {
8281
const { packageName, relativePath } = determineModuleContext(resolvedPath);
8382
const finalRelPath = relativePath.startsWith("./")
@@ -124,14 +123,14 @@ export function plugin(): PluginObj {
124123
const id = argument.value;
125124
const resolvedPath = findNodeAddonForBindings(id, from);
126125
if (resolvedPath !== undefined) {
127-
replaceWithRequireNodeAddon3(p.parentPath, resolvedPath, id, this.filename);
126+
replaceWithRequireNodeAddon3(p.parentPath, resolvedPath, id);
128127
}
129128
}
130129
} else {
131130
// This should handle "bare specifiers" and "private imports" that start with `#`
132131
const resolvedPath = tryResolveModulePath(id, from);
133132
if (!!resolvedPath && isNodeApiModule(resolvedPath)) {
134-
replaceWithRequireNodeAddon3(p, resolvedPath, id, this.filename);
133+
replaceWithRequireNodeAddon3(p, resolvedPath, id);
135134
}
136135
}
137136
}

0 commit comments

Comments
 (0)