Repository navigation
refactor: use sql-highlight instead of cli-highlight - #11221
Merged
Merged
Conversation
alumni
force-pushed
the
refactor/highlight
branch
from
January 3, 2025 17:17
42645a2 to
11b176d
Compare
Member
|
Love this - reducing dependencies AND package size is very good. Would it be possible to get before/after screenshots so we can see how it looks? |
Collaborator
Author
|
Looking at the I am currently considering creating a better wrapper for |
Collaborator
Author
|
sexy |
|
what about treesitter sql? |
Collaborator
Author
@hinogi Do you have a link to the npm package? One is 4 years old, so I'd avoid it. Another one is using NAPI which I'd avoid as well. |
Collaborator
Author
|
Seems it's quite complex for a feature of lower importance, the point of this PR was to reduce unnecessary complexity :) |
michaelbromley
approved these changes
Jan 20, 2025
4 of 7 tasks
aberonni
pushed a commit
to global-121/typeorm
that referenced
this pull request
Mar 5, 2025
ThbltLmr
pushed a commit
to ThbltLmr/typeorm
that referenced
this pull request
Dec 2, 2025
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.


Description of change
Replace
[email protected]which is using an older version ofhighlight.jswith[email protected].sql-highlighthas no dependencies and only 15Kb (see https://npmgraph.js.org/[email protected])cli-highlighthas 28 (sub-)dependencies which total 3MB (see https://npmgraph.js.org/[email protected]). It useshighlight.jsto parse SQL and convert to HTML, then it usesparse5to parse the HTML and convert to ANSI colored text.cli-highlightwas also used to highlight JSON, but that can be done by the built-inconsole.dir, again much simpler.Pull-Request Checklist
masterbranchnpm run formatto apply prettier formattingnpm run testpasses with this changeFixes #0000