From 0d88e76a98466f45c562357c9119eb161c4bc940 Mon Sep 17 00:00:00 2001 From: Nick Oliver Date: Thu, 23 May 2024 02:49:27 -0700 Subject: [PATCH] fix(install-module): use latest versions during dependency installation (#48) --- __tests__/utils/install-module.spec.js | 4 ++-- src/utils/install-module.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/__tests__/utils/install-module.spec.js b/__tests__/utils/install-module.spec.js index 2ae0685..541fa14 100644 --- a/__tests__/utils/install-module.spec.js +++ b/__tests__/utils/install-module.spec.js @@ -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); @@ -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'); }); }); diff --git a/src/utils/install-module.js b/src/utils/install-module.js index 134eba4..015ebf3 100644 --- a/src/utils/install-module.js +++ b/src/utils/install-module.js @@ -28,7 +28,7 @@ const installModule = async (moduleWorkingDirectory) => { runInstall = runNpmInstall; } - return runInstall(moduleWorkingDirectory, ['--prefer-offline']); + return runInstall(moduleWorkingDirectory); }; module.exports = installModule;