Skip to content

Commit

Permalink
refactor: rename a method for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
malept committed Aug 20, 2021
1 parent 102229e commit 1d2a9cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/module-rebuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export class ModuleRebuilder {
return binary?.napi_versions;
}

async getPrebuildRuntimeArgs(): Promise<string[]> {
async getPrebuildInstallRuntimeArgs(): Promise<string[]> {
const napiVersion = await this.getNapiVersion();
if (napiVersion) {
return [
Expand Down Expand Up @@ -375,7 +375,7 @@ export class ModuleRebuilder {
`--arch=${this.rebuilder.arch}`,
`--platform=${process.platform}`,
`--tag-prefix=${this.rebuilder.prebuildTagPrefix}`,
...await this.getPrebuildRuntimeArgs(),
...await this.getPrebuildInstallRuntimeArgs(),
],
{
cwd: this.modulePath,
Expand Down
2 changes: 1 addition & 1 deletion test/rebuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ describe('rebuilder', () => {
const modulePath = path.join(testModulePath, 'node_modules', 'farmhash');
const modRebuilder = new ModuleRebuilder(rebuilder, modulePath);
expect(await modRebuilder.getNapiVersion()).to.equal(3);
expect(await modRebuilder.getPrebuildRuntimeArgs()).to.deep.equal([
expect(await modRebuilder.getPrebuildInstallRuntimeArgs()).to.deep.equal([
'--runtime=napi',
`--target=3`,
])
Expand Down

0 comments on commit 1d2a9cb

Please sign in to comment.