From d7b8a351c13fdd6d96eced694ee7ea2294037568 Mon Sep 17 00:00:00 2001 From: spaghet Date: Fri, 13 Nov 2026 01:43:07 -0500 Subject: [PATCH] fix: update build and test scripts to set Rayon and Tokio worker threads --- package.json | 6 +++--- src/components/FilteredList.tsx | 4 ++-- vitest.config.ts | 9 +++++++++ 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 1133d1b..29f5eac 100644 --- a/package.json +++ b/package.json @@ -6,12 +6,12 @@ "dev": "dotenv -e .env -- astro dev", "dev:network": "dotenv -e .env -- astro dev --host", "start": "dotenv -e .env -- astro dev", - "build": "astro check && astro build", + "build": "export RAYON_NUM_THREADS=1 TOKIO_WORKER_THREADS=1; astro check && astro build", "preview": "dotenv -e .env -- astro preview", "preview:network": "dotenv -e .env -- astro dev --host", "astro": "astro", - "test": "vitest run", - "test:watch": "vitest", + "test": "export RAYON_NUM_THREADS=1 TOKIO_WORKER_THREADS=1; vitest run", + "test:watch": "export RAYON_NUM_THREADS=1 TOKIO_WORKER_THREADS=1; vitest", "lint": "eslint .", "lint:fix": "eslint . --fix" }, diff --git a/src/components/FilteredList.tsx b/src/components/FilteredList.tsx index dcc6f6c..189a03a 100644 --- a/src/components/FilteredList.tsx +++ b/src/components/FilteredList.tsx @@ -102,7 +102,7 @@ export default function FilteredList({ entries, collection, initial }: Props) { )} -