Skip to content

Commit

Permalink
fix syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
sidey79 committed Jan 12, 2025
1 parent 5bb44bb commit bd710f0
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ncc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
id: selftest
uses: ./
with:
src: './func.cjs'
ncc_args: '-o testdist'
src: 'index.cjs'
#ncc_args: '-o testdist'

- uses: EndBug/add-and-commit@v9
if: ${{ github.actor != 'dependabot[bot]' }}
Expand Down
2 changes: 1 addition & 1 deletion __test__/func.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe('run', () => {

expect(core.startGroup).toHaveBeenCalledWith('Compiling /my/workdir/index.js');
expect(await exec.exec).toHaveBeenCalledTimes(2);
expect(await exec.exec).toHaveBeenNthCalledWith (1,'npm', ['install', "--no-save"]);
expect(await exec.exec).toHaveBeenNthCalledWith (1,'yarn', ['install', "--no-save"]);
expect(await exec.exec).toHaveBeenNthCalledWith (2,'npx', ['@vercel/ncc', 'build', '/my/workdir/index.js']);
expect(core.endGroup).toHaveBeenCalledWith('Compiling /my/workdir/index.js');
expect(core.info).toHaveBeenCalledWith('Compiled successfully 📦 🎉 ');
Expand Down
6 changes: 3 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: 'ncc action'
description: 'use @sidey79/ncc to compile and push your github action dist! 🚀'
author: 'Sven Butzek'
description: 'use sidey79/ncc to compile and push your github action dist! 🚀'
author: 'Sidey79'
inputs:
src:
description: 'source code dir/file to compile'
Expand All @@ -10,7 +10,7 @@ inputs:
required: false
runs:
using: 'node20'
main: 'dist/index.js'
main: 'dist/index.cjs'
branding:
icon: 'box'
color: 'green'
4 changes: 2 additions & 2 deletions func.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async function run_compile() {
core.startGroup(`Compiling ${src}`);

// install dependencies
await exec('npm', ['install', "--no-save"]);
await exec.exec('yarn', ['install', "--no-save"]);

// compile code
const compileArgs = ['@vercel/ncc', 'build', src];
Expand All @@ -25,7 +25,7 @@ async function run_compile() {
compileArgs.push(...args);
}

await exec('npx', compileArgs);
await exec.exec('npx', compileArgs);

core.endGroup(`Compiling ${src}`);

Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
undici "^5.25.4"

"@actions/io@^1.0.1":
version "1.1.1"
resolved "https://registry.npmjs.org/@actions/io/-/io-1.1.1.tgz"
integrity sha512-Qi4JoKXjmE0O67wAOH6y0n26QXhMKMFo7GD/4IXNVcrtLjUlGjGuVys6pQgwF3ArfGTQu0XpqaNr0YhED2RaRA==
version "1.1.3"
resolved "https://registry.npmjs.org/@actions/io/-/io-1.1.3.tgz"
integrity sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==

"@ampproject/remapping@^2.2.0":
version "2.3.0"
Expand Down Expand Up @@ -333,9 +333,9 @@
eslint-visitor-keys "^3.3.0"

"@eslint-community/regexpp@^4.6.1":
version "4.10.0"
resolved "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz"
integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==
version "4.12.1"
resolved "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz"
integrity sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==

"@eslint/config-array@^0.15.1":
version "0.15.1"
Expand Down Expand Up @@ -1056,7 +1056,7 @@ cross-spawn@^7.0.2, cross-spawn@^7.0.3:

debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2:
version "4.3.5"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e"
resolved "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz"
integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==
dependencies:
ms "2.1.2"
Expand Down Expand Up @@ -1917,7 +1917,7 @@ jest-worker@^29.7.0:
merge-stream "^2.0.0"
supports-color "^8.0.0"

jest@^29.3.1:
jest@^29.7.0:
version "29.7.0"
resolved "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz"
integrity sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==
Expand Down

0 comments on commit bd710f0

Please sign in to comment.