Repository navigation
test(verify): type-check the consumer shop with library checks on - #130
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The verify-interface harness compiled the consumer shop with
--skipLibCheck. The packed interface is linked into the shop'snode_modules, so its declarations were never checked. A declaration error like the TS2635 fixed in #129 passed every journey. Consumers on decorators 0.5 hit it, and in our projectsskipLibCheckis forbidden. The shop is now type-checked the way those consumers compile it.What
.agents/skills/verify-interface/harness.ts:TSC_FLAGSdrops--skipLibCheck. Every journey that compiles the shop,metadata/consumer-compilesincluded, now checks the packed declarations and the declarations of the interfaces they import. The shop compile cache key includes the flags, so no compile from the old flags is reused.@antelopejs/mongodbmodule moves from 1.4.4 to 1.7.0. Since fix(metadata): declare modifier classes without type arguments for decorators 0.5 #129 the repository runs on decorators 0.5, which callsSchema.list. mongodb 1.4.4 lacks it, so every shop journey failed to start (TypeError: interface_database_1.Schema.list is not a function). fix(metadata): declare modifier classes without type arguments for decorators 0.5 #129 made the same move forpnpm test, and I missed the verify harness there.Proof
Verify run on this head (
antelopejs-verify journey <run> --featureswith all 13 features): 55 of 55 journeys pass.metadata/consumer-compileswith the run's packeddist/metadata.d.tsput back to the 0.7.1 declaration (typeof ContainerModifier<any>):With the packed declaration restored:
The same bad declaration under the old flags (
--skipLibCheckrestored in the harness, uncommitted, on an earlier run of this branch):Before the mongodb move, on the first run of this branch, every shop journey failed at
ready, withTypeError: interface_database_1.Schema.list is not a functionin theajs project devstderr. After it, all 55 pass.pnpm run checks: 11 passed, 0 failed. The harness is not part of the published package: