From 936957735cf0bdc5bfdd57d83d75a24a17e4c6c3 Mon Sep 17 00:00:00 2001 From: Christopher Hiller Date: Mon, 9 Oct 2023 17:31:48 -0700 Subject: [PATCH] fix(midnight-smoker): fix npm9 load() function Closes #401 --- packages/midnight-smoker/src/pm/npm9.ts | 2 +- packages/midnight-smoker/test/unit/pm/npm7.spec.ts | 1 + packages/midnight-smoker/test/unit/pm/npm9.spec.ts | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/midnight-smoker/src/pm/npm9.ts b/packages/midnight-smoker/src/pm/npm9.ts index ee4606ce1..e4d872c52 100644 --- a/packages/midnight-smoker/src/pm/npm9.ts +++ b/packages/midnight-smoker/src/pm/npm9.ts @@ -56,7 +56,7 @@ export class Npm9 extends Npm7 implements PackageManager { } public static load(executor: CorepackExecutor, opts?: PackageManagerOpts) { - return new Npm7(executor, opts); + return new Npm9(executor, opts); } public async install(manifest: InstallManifest): Promise { diff --git a/packages/midnight-smoker/test/unit/pm/npm7.spec.ts b/packages/midnight-smoker/test/unit/pm/npm7.spec.ts index 66f2de15c..ca3ccdc82 100644 --- a/packages/midnight-smoker/test/unit/pm/npm7.spec.ts +++ b/packages/midnight-smoker/test/unit/pm/npm7.spec.ts @@ -300,6 +300,7 @@ describe('midnight-smoker', function () { expect(execStub, 'to have a call satisfying', [ [ 'install', + '--no-audit', '--no-package-lock', '--global-style', ...manifest.packedPkgs.map((pkg) => pkg.tarballFilepath), diff --git a/packages/midnight-smoker/test/unit/pm/npm9.spec.ts b/packages/midnight-smoker/test/unit/pm/npm9.spec.ts index 831e3031a..d10fb01f4 100644 --- a/packages/midnight-smoker/test/unit/pm/npm9.spec.ts +++ b/packages/midnight-smoker/test/unit/pm/npm9.spec.ts @@ -84,6 +84,7 @@ describe('midnight-smoker', function () { expect(execStub, 'to have a call satisfying', [ [ 'install', + '--no-audit', '--no-package-lock', '--install-strategy=shallow', ...manifest.packedPkgs.map((pkg) => pkg.tarballFilepath),