tty-table 6.1.0 → 7.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -4
- package/dist/browser/tty-table.global.js +1903 -3673
- package/dist/browser/tty-table.global.js.map +1 -1
- package/dist/browser.js +191 -368
- package/dist/browser.js.map +1 -1
- package/dist/browser.mjs +189 -366
- package/dist/browser.mjs.map +1 -1
- package/dist/cli.js +223 -402
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +221 -400
- package/dist/cli.mjs.map +1 -1
- package/dist/index.js +191 -368
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +189 -366
- package/dist/index.mjs.map +1 -1
- package/dist/mcp.js +195 -374
- package/dist/mcp.js.map +1 -1
- package/dist/mcp.mjs +193 -372
- package/dist/mcp.mjs.map +1 -1
- package/package.json +4 -6
package/README.md
CHANGED
|
@@ -112,7 +112,7 @@ Rendered result:
|
|
|
112
112
|
- ANSI-safe display-width calculation and Unicode-aware wrapping/truncation.
|
|
113
113
|
- Typed column/table options and formatter context.
|
|
114
114
|
- ESM and CommonJS package exports.
|
|
115
|
-
- Modern Node.js LTS baseline (Node 20+).
|
|
115
|
+
- Modern Node.js LTS baseline (Node 22+; raised from 20+ when adopting smartwrap v4).
|
|
116
116
|
- A standalone browser bundle is produced for direct use from a browser console or `<script>` tag.
|
|
117
117
|
- Legacy `Table(header, rows, footer, options)` and `Table(rows, options)` construction remains supported.
|
|
118
118
|
|
|
@@ -120,9 +120,9 @@ Rendered result:
|
|
|
120
120
|
|
|
121
121
|
### Node.js
|
|
122
122
|
|
|
123
|
-
**
|
|
123
|
+
**Current releases require Node.js 22 or newer.** This is a breaking change from the Node 20 baseline used by early v6 releases (and from the v5 line, which supported older Node.js releases). The floor was raised to match `smartwrap@4` / `breakword@2.1.0`. If your application must remain on Node 20, stay on a prior tty-table release until you can upgrade.
|
|
124
124
|
|
|
125
|
-
The published package provides both ESM and CommonJS entry points for Node.js. The CLI requires Node.js
|
|
125
|
+
The published package provides both ESM and CommonJS entry points for Node.js. The CLI requires Node.js 22+ as well.
|
|
126
126
|
|
|
127
127
|
## API
|
|
128
128
|
|
|
@@ -153,7 +153,9 @@ The compatibility callback signature is still accepted. New integrations should
|
|
|
153
153
|
|
|
154
154
|
### Width semantics
|
|
155
155
|
|
|
156
|
-
Widths are measured in terminal display columns, not JavaScript string length. ANSI escape sequences are ignored for measurement;
|
|
156
|
+
Widths are measured in terminal display columns, not JavaScript string length. ANSI escape sequences are ignored for measurement; Unicode code points are counted using [`breakword.width()`](https://github.com/tecfu/breakword) (Unicode 18.0.0 East Asian Width + UAX #51 Emoji_Presentation). Wrapping and truncation operate on the same display-width semantics.
|
|
157
|
+
|
|
158
|
+
Compared with older releases that used `wcwidth`, some symbols that were previously treated as 1 cell are now 2 cells (for example `⚡` U+26A1). Tables containing those characters may reflow slightly; measurement is now aligned with the same library used for wrapping.
|
|
157
159
|
|
|
158
160
|
## Development
|
|
159
161
|
|