-
Notifications
You must be signed in to change notification settings - Fork 194
moving mermaid to plugin #1686
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
moving mermaid to plugin #1686
Conversation
The changes refactor the handling of the mermaid functionality by moving it from Concern: The Suggestion: Other than that, the changes look well-structured for modular improvement. 🔥 Fix Suggestion Example: Provide a fallback log when an attempt to access a now-missing @@ -2953,6 +2953,12 @@ export interface Parsers {
* @param content
*/
HTMLToMarkdown(content: string | WorkspaceFile, options?: HTMLToMarkdownOptions): Promise<string>;
+
+ // Compatibility Note (Optional):
+ // You could return an error log or transitional method while migrating.
+ // Logging here if the method is called but deprecated similar reduction
.
|
@@ -2953,12 +2953,6 @@ export interface Parsers { | |||
*/ | |||
HTMLToMarkdown(content: string | WorkspaceFile, options?: HTMLToMarkdownOptions): Promise<string>; | |||
|
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.
Removing the mermaid
parser from the Parsers
interface is a breaking API change and may cause runtime errors for consumers expecting this method. Consider providing a migration path or documenting this change clearly.
AI-generated content by pr-review-commit
api_breaking_change
may be incorrect. Use reactions to eval.
@@ -140,11 +139,6 @@ export function createParsers(): Parsers { | |||
data: pages, | |||
}; | |||
}, |
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.
Removing the mermaid
parser from createParsers()
is a breaking change and will break any code relying on this parser. Ensure all usages are migrated to the new location or provide a compatibility layer.
AI-generated content by pr-review-commit
api_breaking_change
may be incorrect. Use reactions to eval.
Linter: variable-namesThis pull request potentially introduces significant changes to the project structure. Make sure to include tests for the newly introduced Consider cases where Linter: stats
Linter: no-fix-mesNo Linter: grumpy-dev
Messenger chain autYes
|
exclude: ["**/*.d.ts", "**/test/**"], | ||
}, | ||
}, | ||
}); |
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.
File is missing a newline at the end, which can cause issues with some tooling and POSIX compliance.
}); | |
[22] +}); |
AI-generated content by pr-review-commit
missing_newline_eof
may be incorrect. Use reactions to eval.
const f = filenameOrFileToContent(file); | ||
const res = await mermaidParse(f); | ||
return res; | ||
} |
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.
File is missing a newline at the end, which can cause issues with some tooling and POSIX compliance.
} | |
[10] +} |
AI-generated content by pr-review-commit
missing_newline_eof
may be incorrect. Use reactions to eval.
Caution File does not end with a newline, which can cause issues with POSIX tools and version control diffs.
Caution File does not end with a newline, which can cause issues with POSIX tools and version control diffs.
Caution File does not end with a newline, which can cause issues with POSIX tools and version control diffs.
|
mermaid
-related functionality and dependencies from the core package, including types, parsers, and exports (jsdom
,dompurify
,mermaid
).@genaiscript/plugin-mermaid
package as a standalone module for handlingmermaid
diagrams, moving related files (dom.ts
,mermaid.ts
, tests) from core to the plugin.plugin-mermaid
now manages its own dependencies (jsdom
,dompurify
,mermaid
) and includes necessary TypeScript configurations, ESLint setup, and build/test scripts for independent lifecycle management.mermaid
parsing functionality from the user-facing types in the core package API.mermaid
-related libraries, improving modularity and efficiency.