-
Notifications
You must be signed in to change notification settings - Fork 2
refactor: remove bad attributes plugin #207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 5da53af The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughThis PR removes the attributes plugin feature from @alauda/doom. The changeset declares a minor version bump, removing the md-attr-parser dependency, all type declarations, plugin registration, and implementation files for processing custom markdown attributes. Changes
Sequence DiagramsequenceDiagram
participant Config as Load Config
participant Plugin as Attributes Plugin
participant Remark as Remark Pipeline
participant AST as Markdown AST
Note over Config,AST: BEFORE: Attributes Processing Enabled
Config->>Plugin: Load attributesPlugin()
Plugin->>Remark: Register remarkAttributes
Remark->>Remark: Parse micromark-attributes syntax
Remark->>AST: Transform attrs nodes via attributesTransformer
AST->>AST: Apply md-attr-parser to merge attributes
Note over Config,AST: AFTER: Attributes Plugin Removed
Config->>Remark: Skip plugin registration
Remark->>Remark: Standard markdown parsing only
Remark->>AST: No attrs node support or transformation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested labels
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Signed-off-by: JounQin <admin@1stg.me>
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes a poorly functioning attributes plugin and its associated dependencies from the codebase. The refactor eliminates the entire attributes plugin infrastructure including its remark integration, TypeScript types, and micromark extensions.
Key changes:
- Removes the
md-attr-parserdependency from package management files - Deletes all attributes plugin source code and type definitions
- Removes the plugin from the configuration system
Reviewed Changes
Copilot reviewed 9 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Removes md-attr-parser dependency entry |
| packages/doom/package.json | Removes md-attr-parser from dependencies |
| packages/doom/shim.d.ts | Removes type declarations for md-attr-parser module |
| packages/doom/src/cli/load-config.ts | Removes attributes plugin from configuration |
| packages/doom/src/plugins/attributes/ | Complete deletion of attributes plugin implementation files |
| .changeset/curvy-months-swim.md | Documents the refactor as a minor version change |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.changeset/curvy-months-swim.md (1)
1-5: Changeset format is correct, but consider adding migration guidance if applicable.The changeset file follows the correct format and provides a clear description. However, if
attributesPluginwas previously documented as part of the public API, consider adding a note to the changelog about the removal and any migration path for users currently using this plugin.If the plugin was public, consider enriching the changeset description:
-refactor: remove bad attributes plugin +refactor: remove bad attributes plugin +This change removes the attributes plugin feature from @alauda/doom. If you were using this plugin, please remove any `attributesPlugin` registrations from your configuration.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (10)
.changeset/curvy-months-swim.md(1 hunks)packages/doom/package.json(0 hunks)packages/doom/shim.d.ts(0 hunks)packages/doom/src/cli/load-config.ts(0 hunks)packages/doom/src/plugins/attributes/index.ts(0 hunks)packages/doom/src/plugins/attributes/remark-attributes/attributes-transformer.ts(0 hunks)packages/doom/src/plugins/attributes/remark-attributes/index.ts(0 hunks)packages/doom/src/plugins/attributes/remark-attributes/mdast-attributes.ts(0 hunks)packages/doom/src/plugins/attributes/remark-attributes/micromark-attributes.ts(0 hunks)packages/doom/src/plugins/attributes/remark-attributes/types.ts(0 hunks)
💤 Files with no reviewable changes (9)
- packages/doom/src/plugins/attributes/index.ts
- packages/doom/src/plugins/attributes/remark-attributes/attributes-transformer.ts
- packages/doom/src/plugins/attributes/remark-attributes/mdast-attributes.ts
- packages/doom/src/plugins/attributes/remark-attributes/micromark-attributes.ts
- packages/doom/shim.d.ts
- packages/doom/src/plugins/attributes/remark-attributes/types.ts
- packages/doom/package.json
- packages/doom/src/plugins/attributes/remark-attributes/index.ts
- packages/doom/src/cli/load-config.ts
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: JounQin
Repo: alauda/doom PR: 30
File: src/runtime/components/K8sCrd.tsx:5-5
Timestamp: 2025-05-26T09:09:21.339Z
Learning: The alauda/doom project uses yarn v4 for dependency management, which handles package exports and module resolution correctly, so imports like `rspress/core/theme` work without any ESLint errors.
📚 Learning: 2025-05-29T10:22:30.004Z
Learnt from: JounQin
Repo: alauda/doom PR: 34
File: src/cli/load-config.ts:290-0
Timestamp: 2025-05-29T10:22:30.004Z
Learning: In the alauda/doom project, the team prefers throwing descriptive errors for invalid configuration rather than using optional chaining or graceful fallbacks. This fail-fast approach helps catch configuration issues early during development.
Applied to files:
.changeset/curvy-months-swim.md
📚 Learning: 2025-07-09T02:33:05.638Z
Learnt from: JounQin
Repo: alauda/doom PR: 117
File: src/remark-lint/no-heading-punctuation.ts:4-4
Timestamp: 2025-07-09T02:33:05.638Z
Learning: In the alauda/doom project, JounQin prefers to keep the `toString` import from `mdast-util-to-string` as is, even though it shadows the global toString property. Variable shadowing warnings for this specific case should not be flagged as issues.
Applied to files:
.changeset/curvy-months-swim.md
🔇 Additional comments (1)
.changeset/curvy-months-swim.md (1)
2-2: No version bump adjustment needed—minor is appropriate.The
attributesPluginis not exposed in the package's public exports (checked viapackage.jsonexports field), is not documented in the README, and is not re-exported from index files. Removing an unexported, internal plugin is not a breaking change and correctly uses a minor version bump per semantic versioning.
Summary by CodeRabbit
Refactor
Chores
md-attr-parserdependency and related type definitions.