Repository navigation
fix(mcp, verify): a type check writes the declarations it reads first - #262
Merged
Merged
Conversation
…, so it passes alone (#261)
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.
Closes #261.
What changes
typecheckrunspnpm --filter @missing-elements/h5p-verify --filter @missing-elements/h5p-author run typesbeforetsc -p tsconfig.json. Without verify'stypes/, TypeScript checkedverify.mjsitself under mcp's Node-onlyliband failed onwindowanddocument. That stopped mcp 0.4.0's publish (run 44726189991), where verify was not being released and so nothing wrote its types.typesbuilds the player's declarations first (tsc -bin packages/player), as the author'stypesalways has. Alone, from a checkout with notypes/, verify's owntypecheckfailed the same way.typecheckwrites the declarations it reads first, and passes alone.Checked
With every
types/folder and every build-info file deleted before each run:typecheckalone: mcp, verify, author, embed, cmi5, normalize, player, runtime, vscode, all pass;pnpm -r typecheckpasses;prepackrunstypes).After merging
Run publish.yml again. It skips normalize 1.5.0 and author 0.15.0, which are on npm, and publishes h5p-mcp 0.4.0. Its version needs no bump: 0.4.0 never reached npm.
Summary by cubic
Fixes #261: each package's
typechecknow writes the declarations it reads first, so it passes alone from a clean checkout with notypes/folders.typecheckruns verify's and author'stypesbeforetsc. Without verify's declarations, TypeScript fell back toverify.mjsunder mcp's Node-onlyliband failed onwindowanddocument, stopping the mcp 0.4.0 publish when verify wasn't released.typesnow builds the player's declarations first (tsc -bin packages/player), as author's already did.typecheckwrites what it reads.Written for commit 3f58053. Summary will update on new commits.