Repository navigation
fix: preserve generated types without Matrix context - #6
Merged
Merged
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The safeguard is narrowly scoped, preserves documented overrides, and has comprehensive regression coverage with passing CI.
0 open findings
What changed in this PR
Prevents incomplete builds from overwriting generated declarations when Matrix context is unavailable.
Changes:
- Guards automatic type generation and warns once per plugin instance.
- Preserves explicit overrides, Vitest behavior, and valid empty schemas.
- Adds host/CLI regressions and synchronizes English and Chinese documentation.
| File | Description |
|---|---|
src/unplugin/index.ts |
Adds the missing-context safeguard. |
src/unplugin/options.ts |
Clarifies types behavior. |
test/unplugin/index.test.ts |
Covers Vite, Rollup, CLI, and override behavior. |
test/README.md |
Documents safeguard coverage. |
docs/site/en/reference/plugins.md |
Documents new defaults and overrides. |
docs/site/en/guides/integrations.md |
Links build-time behavior to plugin options. |
docs/site/zh-CN/reference/plugins.md |
Synchronizes Chinese reference documentation. |
docs/site/zh-CN/guides/integrations.md |
Synchronizes Chinese integration guidance. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Summary
types: true/ object overrides,types: false, Vitest defaults, valid empty schemas, and prepare collection.Validation
Final head:
e7405881846a3484e573c4c493a17606b26e7d0e.pnpm check, and docs typecheck/build.EBUSYfixture failures are resolved on both Node versions in the final run. Local Electron launch was blocked by cloud display/socket restrictions; actual launch coverage comes from the passing CI jobs above.Base:
a5026ea52cc55f3311f48ba722c35da54bf014ee.