Skip to content

Commit

Permalink
fix(install-module): use latest versions during dependency installation
Browse files Browse the repository at this point in the history
fixes #40
  • Loading branch information
PixnBits committed May 2, 2024
1 parent 3be9b05 commit eb4b9ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions __tests__/utils/install-module.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('installModule', () => {
)));
await expect(installModule('workingDirectoryMock')).resolves.toBe('npmInstallResponseMock');
expect(runNpmInstall).toHaveBeenCalledTimes(1);
expect(runNpmInstall).toHaveBeenNthCalledWith(1, 'workingDirectoryMock', ['--prefer-offline']);
expect(runNpmInstall).toHaveBeenNthCalledWith(1, 'workingDirectoryMock');
});
it('should runNpmCleanInstall with the correct parameters when there is a lock file', async () => {
expect.assertions(3);
Expand All @@ -50,6 +50,6 @@ describe('installModule', () => {
}));
await expect(installModule('workingDirectoryMock')).resolves.toBe('npmCleanInstallResponseMock');
expect(runNpmCleanInstall).toHaveBeenCalledTimes(1);
expect(runNpmCleanInstall).toHaveBeenNthCalledWith(1, 'workingDirectoryMock', ['--prefer-offline']);
expect(runNpmCleanInstall).toHaveBeenNthCalledWith(1, 'workingDirectoryMock');
});
});
2 changes: 1 addition & 1 deletion src/utils/install-module.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const installModule = async (moduleWorkingDirectory) => {
runInstall = runNpmInstall;
}

return runInstall(moduleWorkingDirectory, ['--prefer-offline']);
return runInstall(moduleWorkingDirectory);
};

module.exports = installModule;

0 comments on commit eb4b9ed

Please sign in to comment.