From c51da02d30a1d03ef5291177fb4166338b0c352a Mon Sep 17 00:00:00 2001 From: William Zujkowski Date: Mon, 22 Jun 2026 23:10:45 -0400 Subject: [PATCH] fix(ci): make @civic-source/* resolvable for sync-law.yml inline scripts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The "Sync US Code" workflow failed with `ERR_MODULE_NOT_FOUND: Cannot find package '@civic-source/fetcher'` (run 27901575756). Its inline `node --input-type=module` steps run from the repo root and import @civic-source/fetcher, /transformer, /annotator, but pnpm only symlinks workspace packages into the node_modules of packages that declare them — and the root package.json declared none. Declare the three imported packages as root devDependencies (`workspace:*`) so pnpm symlinks them into the root node_modules, making them resolvable when the scripts execute from the repo root. No workflow path changes needed. Verified locally: reproduced the ERR_MODULE_NOT_FOUND, applied the fix, then confirmed all three imports resolve from repo root after `pnpm install && pnpm build`. Closes #194 --- package.json | 3 +++ pnpm-lock.yaml | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/package.json b/package.json index 00f7521..c817a7f 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,9 @@ } }, "devDependencies": { + "@civic-source/annotator": "workspace:*", + "@civic-source/fetcher": "workspace:*", + "@civic-source/transformer": "workspace:*", "@commitlint/cli": "^21.0.1", "@commitlint/config-conventional": "^21.0.1", "@eslint/js": "^10.0.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f1620c0..8eb6ee4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,15 @@ importers: .: devDependencies: + '@civic-source/annotator': + specifier: workspace:* + version: link:packages/annotator + '@civic-source/fetcher': + specifier: workspace:* + version: link:packages/fetcher + '@civic-source/transformer': + specifier: workspace:* + version: link:packages/transformer '@commitlint/cli': specifier: ^21.0.1 version: 21.0.1(@types/node@25.5.0)(conventional-commits-parser@6.3.0)(typescript@6.0.3)