Repository navigation
chore: one client-externals table, client wiring and card tests, retired source ids stay valid - #3
Merged
Conversation
…eck every require
…ee chip assertions
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.
These are the three follow-ups from the 0.2.0 port's final review. None of them changes how the plugin behaves for current users.
Changes
build:). The nine platform seed ids now live only inscripts/client-externals.json.tsdown.config.tsandscripts/check-client-bundle.mjsboth read that file, so the two lists can no longer drift apart. The bundle check now validates every string-literalrequire("…")inlib/client.js. Before, it checked only@deepseek-ai/*. If a stray dependency is pulled into the bundle, the check names it and fails. The build-time file does not ship, so the npm package still has 56 files.test:). These run against a fake cordis context and typed fakes of the slot registry and ofconfigForms.refkitnamespace. That includes the case where the namespace is already served at load.RefkitCardrenders correctly in every phase: preparing, start, result, error, plain text and the JSON-text fallback. The tests usereact-dom/server, a new dev dependency.feat(config):). Retired ids are accepted by thesourcesschema throughRETIRED_IDS, which is empty today, and by the settings page throughRETIRED_SOURCE_IDS.SHIPPED_IDS, the frozen list of ids that have shipped, exactly equal to the live ids plus the retired ids. Adding a provider then forces its id to be appended, and removing one forces a move toRETIRED_IDS. Without that move, a user's stored whitelist would fail the plugin at startup.Testing
lib/is rebuilt and committed. The client bundle changed only by theRETIRED_SOURCE_IDStable.poetrydbfrom the registry fails the shipped-ids guard, with a message that says what to do.require("left-pad")into the bundle fails the new check. The old check let it pass.tsdown.config.tsunder CI's Node 22.Not in this PR
When a
sourceswhitelist holds only retired ids, it enables nothing, and the first call fails with the generic "no sources enabled" error. A clearer message can come in a later release. It cannot happen whileRETIRED_IDSis empty.