Tablemark v4 is here #22
haltcase
announced in
Announcements
Replies: 1 comment
-
|
I was about to type up a comment about how it would be nice if Thanks for this library! It's really great. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Tablemark v4
is on the horizonhas arrived—the most notable change is more complete support for things like emoji, ANSI styles, and CJK fullwidth forms by default. This allows for properly calculating the width of a column as well as proper wrapping of text styled by ANSI sequences. This enhanced text handling is slightly slower, but shouldn't be noticeable for most data. On larger datasets where the performance hit is undesirable, an option will allow switching to a "basic" text handling strategy that acts more like <= v3 (though not entirely).Regarding ANSI styles, v4 does not count them as part of the cell's width by default so that the output renders nicely in a terminal. However, you can set
countAnsiEscapeCodes: trueto change this behavior, which would be useful for example when the output will be primarily rendered in a markdown document that doesn't interpret ANSI styles.You can install v4 today:
Below are the changes for v4.
FEATURES
DEPRECATIONS
options.caseHeadersis deprecated in favor ofoptions.headerCase.options.wrapWidthis deprecated in favor ofoptions.maxWidth.These deprecated options will be removed in the next major version.
BREAKING CHANGES
tablemarkis now a named export instead of the default.an error.
options.alignno longer allows uppercase values likeLEFT.options.toCellTextnow receives an object withkey(object key)and
value(cell content) properties, rather than just the stringvalue.
characters, which is the narrowest width that still allows for both left and
right alignment characters and a single hyphen in the divider cell. This is a
fairly innocuous change, but does change output table layouts.
Beta Was this translation helpful? Give feedback.
All reactions