From cdb600e73767db0fe226dbea0a848ef0eb6fdc46 Mon Sep 17 00:00:00 2001 From: cryptam <102138190+CryptAm@users.noreply.github.com> Date: Sat, 3 Oct 2026 08:52:42 +0300 Subject: [PATCH] Fix spec formatting without requiring pnpm `scripts/update-spec.mjs` currently runs Biome through `pnpm exec`. The package does not declare `pnpm` as a dependency, while the update workflow is exposed through `npm run update-spec`. On Windows, when `pnpm` is unavailable, the formatting step fails with: `spawnSync pnpm ENOENT` The script continues after this error, leaving `opensea-api.json` unformatted and causing unnecessary formatting noise in the diff. ### Reproduction With `pnpm` unavailable: ```text biome format failed (continuing): spawnSync pnpm ENOENT ``` This resulted in a large formatting diff in `opensea-api.json`: ```text 3966 additions / 1157 deletions ``` ### Change Replace the `pnpm exec` invocation with `npm exec -- biome` in `scripts/update-spec.mjs`. This uses the existing `@biomejs/biome` devDependency and removes the undeclared `pnpm` requirement from the spec update workflow. --- scripts/update-spec.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/update-spec.mjs b/scripts/update-spec.mjs index dd13e14..b529280 100644 --- a/scripts/update-spec.mjs +++ b/scripts/update-spec.mjs @@ -8,7 +8,7 @@ * node scripts/update-spec.mjs */ -import { execFileSync } from "node:child_process"; +import { execSync } from "node:child_process"; import { existsSync, writeFileSync } from "node:fs"; import { resolve, dirname } from "node:path"; import { fileURLToPath } from "node:url"; @@ -36,7 +36,7 @@ try { // Match the repo's JSON formatting (biome inlines short arrays at lineWidth // 80) so diffs reflect real spec changes, not formatter drift. try { - execFileSync("pnpm", ["exec", "biome", "format", "--write", outPath], { + execSync(`npm exec -- biome format --write "${outPath}"`, { stdio: "inherit", }); } catch (err) {