exportConstants accepts definition objects with a from field in the generated schema, but its evaluator ignores from and only recognizes exports parsed directly as local const declarations. Constant re-exports therefore cannot be constrained by module source as the schema suggests.
Relevant files:
packages/konsistent/src/typescript/predicates/export-constants.ts
packages/konsistent/src/typescript/predicates/export-constants.test.ts
packages/konsistent/src/typescript/parser.ts
packages/konsistent/konsistent.schema.json
docs/reference/predicates.md
Honor from using the same module-source matching semantics as export and exportTypes, including re-exports, and add coverage for correct, incorrect, and missing module sources. Apply structural schema checks only when a local constant declaration is available.
Backward compatibility: internal code and documentation can be refactored without compatibility shims. Keep the existing from config field; no schema rename is needed. If a replacement field is introduced, retain from and its prior behavior as deprecated and emit a non-failing CLI warning when it is used.
exportConstantsaccepts definition objects with afromfield in the generated schema, but its evaluator ignoresfromand only recognizes exports parsed directly as localconstdeclarations. Constant re-exports therefore cannot be constrained by module source as the schema suggests.Relevant files:
packages/konsistent/src/typescript/predicates/export-constants.tspackages/konsistent/src/typescript/predicates/export-constants.test.tspackages/konsistent/src/typescript/parser.tspackages/konsistent/konsistent.schema.jsondocs/reference/predicates.mdHonor
fromusing the same module-source matching semantics asexportandexportTypes, including re-exports, and add coverage for correct, incorrect, and missing module sources. Apply structural schema checks only when a local constant declaration is available.Backward compatibility: internal code and documentation can be refactored without compatibility shims. Keep the existing
fromconfig field; no schema rename is needed. If a replacement field is introduced, retainfromand its prior behavior as deprecated and emit a non-failing CLI warning when it is used.