From d1ad83817ab079c5bac40be946656bcb4a8bd1c8 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 8 Feb 2024 09:41:37 -0500 Subject: [PATCH] fix: add dependency type after dependency (#131) * fix: add dependency type after dependency * fix test --- .github/actions/update-axe-core-v1/dist/index.js | 4 ++-- .github/actions/update-axe-core-v1/src/run.test.ts | 8 ++++---- .github/actions/update-axe-core-v1/src/run.ts | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/actions/update-axe-core-v1/dist/index.js b/.github/actions/update-axe-core-v1/dist/index.js index 603485d3..5c42fcc5 100644 --- a/.github/actions/update-axe-core-v1/dist/index.js +++ b/.github/actions/update-axe-core-v1/dist/index.js @@ -27249,8 +27249,8 @@ async function run(core, getPackageManager, cwd) { } const { stderr: installError, exitCode: installExitCode } = await (0, exec_1.getExecOutput)(packageManager, [ packageManager === 'npm' ? 'i' : 'add', - dependencyType, - `axe-core@${pinStrategy}${latestAxeCoreVersion}` + `axe-core@${pinStrategy}${latestAxeCoreVersion}`, + dependencyType ], { cwd: dirPath }); diff --git a/.github/actions/update-axe-core-v1/src/run.test.ts b/.github/actions/update-axe-core-v1/src/run.test.ts index 0fc3bfa7..e01bc811 100644 --- a/.github/actions/update-axe-core-v1/src/run.test.ts +++ b/.github/actions/update-axe-core-v1/src/run.test.ts @@ -190,7 +190,7 @@ describe('run', () => { await run(core as unknown as Core, getPackageManagerStub, dirPath) assert.isTrue( - getExecOutputStub.calledWith('npm', ['i', '', sinon.match.any], { + getExecOutputStub.calledWith('npm', ['i', sinon.match.any, ''], { cwd: dirPath }) ) @@ -203,7 +203,7 @@ describe('run', () => { await run(core as unknown as Core, getPackageManagerStub, dirPath) assert.isTrue( - getExecOutputStub.calledWith('yarn', ['add', '', sinon.match.any], { + getExecOutputStub.calledWith('yarn', ['add', sinon.match.any, ''], { cwd: dirPath }) ) @@ -217,7 +217,7 @@ describe('run', () => { await run(core as unknown as Core, getPackageManagerStub, dirPath) assert.isTrue( - getExecOutputStub.calledWith('yarn', ['add', '', sinon.match.any], { + getExecOutputStub.calledWith('yarn', ['add', sinon.match.any, ''], { cwd: dirPath }) ) @@ -349,7 +349,7 @@ describe('run', () => { await run(core as unknown as Core, getPackageManagerStub, dirPath) assert.isTrue( - getExecOutputStub.calledWith('npm', ['i', '', `axe-core@${pin}`], { + getExecOutputStub.calledWith('npm', ['i', `axe-core@${pin}`, ''], { cwd: dirPath }) ) diff --git a/.github/actions/update-axe-core-v1/src/run.ts b/.github/actions/update-axe-core-v1/src/run.ts index f5aab371..1f5a8ab8 100644 --- a/.github/actions/update-axe-core-v1/src/run.ts +++ b/.github/actions/update-axe-core-v1/src/run.ts @@ -102,8 +102,8 @@ export default async function run( packageManager, [ packageManager === 'npm' ? 'i' : 'add', - dependencyType, - `axe-core@${pinStrategy}${latestAxeCoreVersion}` + `axe-core@${pinStrategy}${latestAxeCoreVersion}`, + dependencyType ], { cwd: dirPath