[issues/656] Migrate to @couimet/logger-contract npm packages#659
Conversation
… its way to `main`
After migrating to external @couimet/logger-* packages we had no runtime visibility into which version was actually loaded. The activation log now includes loggerContractVersion as a structured field, resolved independently from version.json so one failing does not block the other. A failed resolution logs a warning instead of being silent. Tests now centralize DEFAULT_DELIMITERS and createMockConfig() at file scope, eliminating 13 repeated inline mock config definitions. A new Activation logging test suite covers the success path (parsed JSON with key presence assertions on dynamic build fields) and the version.json-not-found path (isolated module mocking). Benefits: - Activation log carries the running logger-contract version for post-migration debugging - Failed logger-contract resolution is observable via [WARNING] log, not swallowed - Zero inline mock config duplication across all tests in extension.test.ts - Activation logging contract is now verified by dedicated tests
|
Important Review skippedToo many files! This PR contains 191 files, which is 41 over the limit of 150. To get a review, narrow the scope: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (191)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ QA Coverage OK No user-visible changes were found in this pull request. Generated by QA Gap Check (GPT-4o-mini via GitHub Models) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ CI / Integration Tests (with overrides) — run summaryDuration: 1m 3s QA TC IDs: 2 exercised across 0 features Report: View run & artifacts Reproduce locally: Feature breakdown
|
✅ CI / Integration Tests (automated) — run summaryDuration: 11m 11s QA TC IDs: 163 exercised across 0 features Report: View run & artifacts Reproduce locally: Feature breakdown
|
✅ CI / Integration Tests (with extensions) — run summaryDuration: 12m 52s Unit tests: Ran in separate Test & Validate job QA TC IDs: 195 exercised across 0 features Report: View run & artifacts Reproduce locally: Feature breakdown
|
Summary
Replaces the in-monorepo
barebone-loggerandbarebone-logger-testingworkspace packages with their npm-published equivalents@couimet/logger-contractand@couimet/logger-contract-testing. A new CI gate blocks prerelease dependencies from reachingmain, and activation logging now captures the running logger-contract version for observability.Changes
rangelink-core-tsandrangelink-vscode-extensionnow import from@couimet/logger-contractand@couimet/logger-contract-testinginstead of workspace packages, with correspondingpackage.jsonandtsconfig.jsonupdatespackages/barebone-logger/andpackages/barebone-logger-testing/— the npm packages are 1:1 ports with identical public APIcheck-no-prerelease-deps(viascripts/check-no-prerelease-deps.sh+ BATS tests) blocks anypackage.jsonwith a prerelease dependency from landing onmainloggerContractVersionas a structured field, resolved at runtime viarequire.resolveto bypass the package'sexportsfield; failed resolution logs a warning instead of being silentextension.test.ts: sharedDEFAULT_DELIMITERSconstant andcreateMockConfig()factory eliminate 13 repeated inline mock config definitions; newActivation loggingtest suite covers success and version.json-not-found pathsKey Discoveries
@couimet/logger-contractdeclares anexportsfield that blocksrequire('pkg/package.json')— reading the version at runtime requiresrequire.resolve()+ absolute path to bypass itjest.isolateModules+jest.doMockworks for mocking JSON file imports, enabling the catch-path test forversion.jsonwithout affecting other tests in the same file^1.0.0) allow minor and patch updates to the logger packages without an explicit bumpTest Plan
pnpm test:release:automatedpasses (release-notifier-001, release-notifier-002)scripts/check-no-prerelease-deps.shexits 0 on this branchpnpm compilepasses monorepo-wideRelated
@couimet/logger-contractin RangeLink #656