Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR upgrades the library to a new major version by restructuring the core API, renaming key namespaces, and reorganizing files for clarity and consistency.
- Bumps version to 3.0.0 to signal breaking changes
- Renames
MarkdownWriter,MermaidWriter, andDescriptionWriterto a unifiedPrismaMarkdownAPI with methods likewrite,writeChapter,writeDiagram, andwriteDescription - Reorganizes file structure, adjusts imports/exports, and introduces
IPrismaMarkdownConfigandIPrismaMarkdownChapter
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/writers/PrismaMarkdownMermaidWriter.ts | Renamed namespace and updated FieldUtil import path |
| src/writers/PrismaMarkdownDescriptionWriter.ts | Renamed namespace and corrected DMMF import source |
| src/utils/FieldUtil.ts | Fixed relative import for PrismaUtil |
| src/utils/FieldUtil.spec.ts | Updated test imports and utility reference |
| src/index.ts | Replaced old exports with new PrismaMarkdown and interfaces |
| src/executable/markdown.ts | Switched generator to use PrismaMarkdown.write and new config |
| src/PrismaMarkdown.ts | Introduced the main PrismaMarkdown namespace and refactored write logic |
| src/IPrismaMarkdownConfig.ts | Added interface for optional config (e.g., title) |
| src/IPrismaMarkdownChapter.ts | Added interface for chapter structure (name, descriptions, diagrams) |
| package.json | Bumped package version from 2.0.0 to 3.0.0 |
Comments suppressed due to low confidence (1)
src/PrismaMarkdown.ts:11
- [nitpick] Consider adding unit tests for
PrismaMarkdown.write(and related helpers likecategorize) to validate output structure under different schema inputs.
export const write = (
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates and refactors the code to export a new PrismaMarkdown API for third-party libraries, marks a major version bump to 3.0.0, and reorganizes the code including namespace and file renaming for improved clarity and maintainability.
- Export the consolidated PrismaMarkdown API for external use
- Refactor namespaces and writer names (e.g., PrismaMarkdownMermaidWriter, PrismaMarkdownDescriptionWriter)
- Reorganize file structure and update import paths consistently
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/writers/PrismaMarkdownMermaidWriter.ts | Rename namespace and update import for FieldUtil |
| src/writers/PrismaMarkdownDescriptionWriter.ts | Rename namespace and update import for DMMF module |
| src/utils/FieldUtil.ts & FieldUtil.spec.ts | Update file name casing in import paths |
| src/index.ts | Remove legacy exports and export new API modules |
| src/executable/markdown.ts | Update generator import and function calls to use new PrismaMarkdown API |
| src/PrismaMarkdown.ts | Refactor implementation, update writer calls, and improve chapter processing |
| src/IPrismaMarkdownConfig.ts & IPrismaMarkdownChapter.ts | Introduce new interfaces for API configuration and chapter structure |
| package.json | Bump version from 2.0.0 to 3.0.0 |
Comments suppressed due to low confidence (1)
src/PrismaMarkdown.ts:59
- The type 'IChapter' is used internally but not defined in the current PR. Consider renaming it or replacing it with 'IPrismaMarkdownChapter' for consistency with the public API.
const dict: Map<string, IChapter> = new Map();
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.
This pull request introduces significant changes to the
prisma-markdownproject, including a major version update, refactoring of namespaces and interfaces, and code reorganization for improved clarity and maintainability. The changes aim to enhance the library's structure, functionality, and usability.Version Update:
2.0.0to3.0.0inpackage.json, signaling a major release with breaking changes.Refactoring and Namespace Improvements:
MarkdownWritertoPrismaMarkdownand refactored its namespace to include new methods such aswrite,writeChapter,writeDiagram, andwriteDescription. This improves readability and aligns with a more descriptive naming convention. [1] [2] [3]DescriptionWriterandMermaidWritertoPrismaMarkdownDescriptionWriterandPrismaMarkdownMermaidWriter, respectively, for better alignment with the project naming scheme. [1] [2]New Interfaces:
IPrismaMarkdownChapterto represent chapters withname,descriptions, anddiagramsfields.IPrismaMarkdownConfigto handle optional configuration properties liketitle.File and Code Reorganization:
field-util.tstoFieldUtil.ts, to ensure consistent naming conventions across the codebase. [1] [2]src/index.tsandsrc/executable/markdown.ts. [1] [2] [3]These updates collectively improve the maintainability, readability, and usability of the
prisma-markdownlibrary while preparing it for future enhancements.