From baf11b83d78175085f60ce9b8ae86c20d97404e1 Mon Sep 17 00:00:00 2001 From: Gustavo Madeira Santana Date: Thu, 16 Apr 2026 21:35:39 -0400 Subject: [PATCH] Check: avoid duplicate boundary prep Rely on the lint wrapper to prepare extension package-boundary artifacts during pnpm check instead of invoking the same prep script again at the end. Add a script regression so the duplicate check path does not return. --- package.json | 2 +- test/scripts/run-oxlint.test.ts | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 80af3c815bf..a30418562d6 100644 --- a/package.json +++ b/package.json @@ -1139,7 +1139,7 @@ "canon:check:json": "node scripts/canon.mjs check --json", "canon:enforce": "node scripts/canon.mjs enforce --json", "canvas:a2ui:bundle": "node scripts/bundle-a2ui.mjs", - "check": "pnpm check:no-conflict-markers && pnpm tool-display:check && pnpm check:host-env-policy:swift && pnpm tsgo && pnpm lint && pnpm lint:webhook:no-low-level-body-read && pnpm lint:auth:no-pairing-store-group && pnpm lint:auth:pairing-account-scope && pnpm check:import-cycles && pnpm check:madge-import-cycles && node scripts/prepare-extension-package-boundary-artifacts.mjs", + "check": "pnpm check:no-conflict-markers && pnpm tool-display:check && pnpm check:host-env-policy:swift && pnpm tsgo && pnpm lint && pnpm lint:webhook:no-low-level-body-read && pnpm lint:auth:no-pairing-store-group && pnpm lint:auth:pairing-account-scope && pnpm check:import-cycles && pnpm check:madge-import-cycles", "check:base-config-schema": "node --import tsx scripts/generate-base-config-schema.ts --check", "check:bundled-channel-config-metadata": "node --import tsx scripts/generate-bundled-channel-config-metadata.ts --check", "check:docs": "pnpm format:docs:check && pnpm lint:docs && pnpm docs:check-i18n-glossary && pnpm docs:check-links", diff --git a/test/scripts/run-oxlint.test.ts b/test/scripts/run-oxlint.test.ts index 461a3364e3c..03243f5cb5a 100644 --- a/test/scripts/run-oxlint.test.ts +++ b/test/scripts/run-oxlint.test.ts @@ -1,3 +1,4 @@ +import { readFileSync } from "node:fs"; import { describe, expect, it } from "vitest"; import { shouldPrepareExtensionPackageBoundaryArtifacts } from "../../scripts/run-oxlint.mjs"; @@ -14,4 +15,15 @@ describe("run-oxlint", () => { expect(shouldPrepareExtensionPackageBoundaryArtifacts(["--print-config"])).toBe(false); expect(shouldPrepareExtensionPackageBoundaryArtifacts(["--rules"])).toBe(false); }); + + it("does not run package-boundary artifact prep twice in pnpm check", () => { + const packageJson = JSON.parse(readFileSync("package.json", "utf8")) as { + scripts: Record; + }; + + expect(packageJson.scripts.check).toContain("pnpm lint"); + expect(packageJson.scripts.check).not.toContain( + "node scripts/prepare-extension-package-boundary-artifacts.mjs", + ); + }); });