From 21d022a0fa71d3c820b9e8a520bab5244ef420cf Mon Sep 17 00:00:00 2001 From: Nazar Hussain Date: Tue, 7 Jan 2025 12:38:15 +0100 Subject: [PATCH] Update the binary to use import vs require --- .github/workflows/benchmark-compare.yml | 3 ++- .github/workflows/compare-js-runtimes.yml | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/benchmark-compare.yml b/.github/workflows/benchmark-compare.yml index 6e21056..a8549cd 100644 --- a/.github/workflows/benchmark-compare.yml +++ b/.github/workflows/benchmark-compare.yml @@ -17,9 +17,10 @@ jobs: uses: ChainSafe/benchmark/.github/workflows/compare-js-runtimes.yml@nh/compare with: node-version: 22 + node-options: --loader ts-node/esm bun-version: latest deno-version: v2.x - command: ./bin/index.js + command: src/cli/cli.ts setup: build files: test/perf/**/*.test.ts diff --git a/.github/workflows/compare-js-runtimes.yml b/.github/workflows/compare-js-runtimes.yml index 36cf280..23e948e 100644 --- a/.github/workflows/compare-js-runtimes.yml +++ b/.github/workflows/compare-js-runtimes.yml @@ -20,6 +20,10 @@ on: type: string description: Nodejs version required: true + node-options: + type: string + description: Extra options to run with the node, useful when using different loaders + required: false bun-version: type: string description: Bun version, if specified will be used in comparison @@ -47,7 +51,7 @@ jobs: run: ${{ inputs.setup }} - name: Run performance tests on node - run: node ${{ inputs.command }} ${{ inputs.files }} --local ./nodejs-benchmark --persist --noThrow ${{ github.event_name == 'push' }} + run: node ${{ inputs.node-options }} ${{ inputs.command }} ${{ inputs.files }} --local ./nodejs-benchmark --persist --noThrow ${{ github.event_name == 'push' }} - name: Archive nodejs benchmark artifacts uses: actions/upload-artifact@v4