You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
lint:deps cannot stop a target package from importing its adapter #30458
What a maintainer sees. ADR 198 says a target package never imports its adapter; the adapter depends on the target. pnpm lint:deps does not enforce that. architecture.config.json maps the PostgreSQL, SQLite and MongoDB target packages (packages/3-targets/3-targets/*, packages/3-mongo-target/1-mongo-target) to the extensions domain, and the extensions domain may import from the targets layer where the adapters sit. A target importing its adapter passes lint:deps today. For MongoDB the rule is held only by a hand-written test, packages/3-mongo-target/1-mongo-target/test/layering.test.ts.
Where.architecture.config.json (the entries for packages/3-targets/3-targets/postgres/**, packages/3-targets/3-targets/sqlite/** and packages/3-mongo-target/1-mongo-target/**), and the dependency-cruiser rules that read it.
Likely fix. Give target packages their own domain or layer below the adapters, so the existing direction rules forbid a target-to-adapter import. Then replace the Mongo layering test with the dependency-cruiser rule. This touches all three targets, so it is a change of its own.
Where it came from. Found while moving the Mongo codecs into the target package, #30396.
Activity