sync-core-lib
Sync the vendored dcc-core-lib copy after a lib fix merges upstream, then clean up temporary adapter workarounds. Use after a moonloch/dcc-core-lib PR lands, or when asked to update module/vendor/dcc-
SKILL.md.claude/skills/sync-core-lib/SKILL.md
GitHubVendor sync for dcc-core-lib
The lib's compiled output lives at module/vendor/dcc-core-lib/ and is
committed to the system repo (Foundry has no bundler). The upstream
checkout is at /Users/timlwhite/WebstormProjects/dcc-core-lib
(public GitHub repo moonloch/dcc-core-lib).
Sync procedure
- After the lib PR merges, pull
mainin the lib checkout. It must be clean and on the merged commit; otherwiseVERSION.jsonrecords"dirty": trueor a SHA that isn't on the lib'smain. - From the system repo, run
pnpm run sync-core-lib. The script (scripts/sync-core-lib.mjs) empties the lib'sdist/, builds the lib viapnpm run build(the lib uses pnpm), copiesdist/into the vendor directory, strips sourcemaps, and writesmodule/vendor/dcc-core-lib/VERSION.jsonwith the source commit SHA + timestamp.- Override the source path with
DCC_CORE_LIB_SRC=/path/to/dcc-core-lib pnpm run sync-core-lib. - Since lib 0.14.4,
dist/contains no compiled test files and addsdcc-core-lib.d.ts, the whole public API in one declaration file.
- Override the source path with
- Check the vendor diff. Changes to
.jsfiles outside comments mean behavior changes: run the affected unit tests and E2E specs. Changes only to.d.tsfiles are type-only. - Commit the resulting vendor diff with a message like
vendor: sync dcc-core-lib to <version> (<sha7>).
Adapter cleanup follows the sync
Once the new vendor copy is in place, remove any temporary adapter workaround added while the lib fix was in flight, and update tests that were asserting the workaround's compensated values back to the natural contract.