Repository navigation
Conversation
…wned
`pnpm typecheck` fails on main, which fails the "JavaScript checks" job
there and on every pull request based on it:
src/features/notices/ShellNotices.test.tsx(25,7): error TS2322
The types returned by 'snapshot()' are incompatible between these types.
Property 'hostOwned' is missing in type '{ configuration: ...
Two changes that landed about eleven hours apart crossed:
- 1044a41 (PR 2953) added ShellNotices.test.tsx, whose plugin manager
fake builds a snapshot by hand.
- c8e7b73 (PR 3701) added a required `hostOwned` to the plugin
manager's snapshot and updated the other test fakes, but not this
one.
Since c8e7b73 the fake no longer matches
`Pick<PluginManager, "subscribe" | "snapshot">`. "JavaScript checks"
last passed on main at 4eff0ce, three commits before c8e7b73, and
has failed on each main commit it has run on since (e9c7586,
38fe301).
Add `hostOwned: []` to the fake, as c8e7b73 did for the fake in
src/app/PluginUpdates.test.tsx. The notice under test comes from an
external plugin, so no host-owned feature is involved. It was the only
type error; no production code changes.
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Collaborator
|
🤖 Closing as a duplicate of #4238, which has the identical one-line change and is merging. Thanks for the fix! |
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.
What is failing
pnpm typecheck(tsc --noEmit) fails on main, which fails the "JavaScript checks" job there and on every open pull request based on it:"JavaScript checks" last passed on main at 4eff0ce and has failed on each main commit it has run on since (e9c7586, 38fe301).
Root cause
Two changes that landed about eleven hours apart crossed:
ShellNotices.test.tsx, whose plugin manager fake builds a snapshot by hand.hostOwnedto the plugin manager's snapshot insrc/plugins/manager.tsand updated the other test fakes, but not this one.What changed
One line: the fake snapshot in
ShellNotices.test.tsxgainshostOwned: [], as #3701 did for the fake insrc/app/PluginUpdates.test.tsx. The notice under test comes from an external plugin, so no host-owned feature is involved. No production code changes.This unblocks "JavaScript checks" on main and on open pull requests once they pick it up.
Verification
Run locally on this branch, based on 38fe301:
pnpm typecheckbefore the change: the one error above, exit 1. After: no errors, exit 0. It was the only type error.vitest run src/features/notices/ShellNotices.test.tsx: 1 file, 1 test passed.biome check src/features/notices/ShellNotices.test.tsx: clean.🤖 Generated with Claude Code