From 6b4cab8fdf9a5615531c6301798229fb594734ad Mon Sep 17 00:00:00 2001 From: Yann Thibodeau Date: Sun, 27 Oct 2024 22:03:41 -0400 Subject: [PATCH] chore: fix benchmark (#99) --- .github/workflows/publish-package.yml | 2 ++ .gitignore | 1 + benchmark/src/main.ts | 6 ++++++ ss-search/package.json | 7 +++++-- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index f09e815..1d275ac 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -1,4 +1,6 @@ name: ss-search CI +env: + NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} on: pull_request: diff --git a/.gitignore b/.gitignore index 06e753a..71650e4 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,7 @@ npm-debug.log yarn-error.log testem.log /typings +*.env # System Files .DS_Store diff --git a/benchmark/src/main.ts b/benchmark/src/main.ts index ed1fd57..a9f2578 100644 --- a/benchmark/src/main.ts +++ b/benchmark/src/main.ts @@ -16,6 +16,7 @@ export interface BenchmarkResult { } const benchmarkResultPath = `${__dirname}/../../../../web-app/src/assets/benchmarkResults.json` +const ignoredVersions = ["1.9.1"] async function main() { const packageVersions: string[] = JSON.parse(execSync('npm view ss-search versions --json').toString()) @@ -28,6 +29,11 @@ async function main() { ) for (const version of missingVersionsToBenchmark) { + if (ignoredVersions.includes(version)) { + console.info(`Ignoring version ${version}`) + continue + } + console.log(`Benchmarking version ${version}`) execSync(`npm i --prefix ${__dirname} ss-search@${version}`) diff --git a/ss-search/package.json b/ss-search/package.json index 3d79081..3488fb5 100644 --- a/ss-search/package.json +++ b/ss-search/package.json @@ -5,7 +5,10 @@ "dependencies": { "lodash": "4.17.21" }, - "type": "module", "main": "./index.cjs", - "module": "./index.js" + "module": "./index.esm.js", + "exports": { + "require": "./index.cjs.js", + "import": "./index.esm.js" + } }