From bce3e24f97ad125c36692d820971c42ee29c6b96 Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Sun, 12 Oct 2025 23:08:12 +0500 Subject: [PATCH] global: replace npm and npx with bun --- .github/workflows/help.publish.yml | 5 ++++- .github/workflows/web.tests.yml | 4 ++-- apps/desktop/__tests__/utils.ts | 2 +- apps/web/playwright.config.ts | 2 +- packages/editor-mobile/playwright.config.ts | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/help.publish.yml b/.github/workflows/help.publish.yml index 7c8d0df7c..6a54b11f2 100644 --- a/.github/workflows/help.publish.yml +++ b/.github/workflows/help.publish.yml @@ -19,6 +19,9 @@ jobs: with: toolchain: stable + - name: Setup Node + uses: ./.github/actions/setup-node-with-cache + - name: Install docgen run: cargo install --git https://github.com/thecodrr/docgen @@ -32,4 +35,4 @@ jobs: echo "CLOUDFLARE_API_TOKEN=${{ secrets.CLOUDFLARE_API_TOKEN }}" >> $GITHUB_ENV - name: Publish on Cloudflare Pages - run: npx --yes wrangler pages deploy --project-name notesnook-help ./docs/help/site/ --branch main + run: bun --silent wrangler pages deploy --project-name notesnook-help ./docs/help/site/ --branch main diff --git a/.github/workflows/web.tests.yml b/.github/workflows/web.tests.yml index acfcec8e7..902c4fb53 100644 --- a/.github/workflows/web.tests.yml +++ b/.github/workflows/web.tests.yml @@ -88,7 +88,7 @@ jobs: run: ls -ld ./apps/web/build/index.html - name: Install Playwright Browsers - run: npx playwright install chromium --with-deps + run: bun playwright install chromium --with-deps working-directory: apps/web - name: Add environment variables @@ -99,7 +99,7 @@ jobs: echo "USER_KEY=${{ secrets.USER_KEY }}" >> $GITHUB_ENV - name: Run tests - run: npx playwright test --shard=${{ matrix.shard }}/${{ strategy.job-total }} + run: bun playwright test --shard=${{ matrix.shard }}/${{ strategy.job-total }} working-directory: apps/web - name: Upload test results diff --git a/apps/desktop/__tests__/utils.ts b/apps/desktop/__tests__/utils.ts index bdc17d38a..f66e08172 100644 --- a/apps/desktop/__tests__/utils.ts +++ b/apps/desktop/__tests__/utils.ts @@ -139,7 +139,7 @@ export async function buildApp(version?: string) { ]; if (version) args.push(`--c.extraMetadata.version=${version}`); try { - execSync(`npx ${args.join(" ")}`, { + execSync(`bun ${args.join(" ")}`, { stdio: IS_DEBUG ? "inherit" : "ignore", env: { ...process.env, diff --git a/apps/web/playwright.config.ts b/apps/web/playwright.config.ts index 74731374e..921d01567 100644 --- a/apps/web/playwright.config.ts +++ b/apps/web/playwright.config.ts @@ -23,7 +23,7 @@ const IS_CI = !!process.env.CI; const config: PlaywrightTestConfig = { webServer: { - command: "npm run start:test", + command: "bun run start:test", port: 3000, timeout: 60 * 1000, reuseExistingServer: false diff --git a/packages/editor-mobile/playwright.config.ts b/packages/editor-mobile/playwright.config.ts index 63a1413ea..85d901cc5 100644 --- a/packages/editor-mobile/playwright.config.ts +++ b/packages/editor-mobile/playwright.config.ts @@ -23,7 +23,7 @@ const IS_CI = !!process.env.CI; const config: PlaywrightTestConfig = { webServer: { - command: "npm run start", + command: "bun run start", port: 3000, timeout: 60 * 1000, reuseExistingServer: false