Files
vue-tui/packages/runtime/package.json
T
Yunfei He 9b5eac3ba4 feat(runtime): port ErrorOverview to Ink's full error frame (parity) (#81)
ErrorOverview was a one-line `Name: message` stub; Ink v7.0.4 renders a full
ERROR overview. Ports it faithfully:

- white-on-red ` ERROR ` label + message, dim cwd-relative file:line:column origin
- a code excerpt around the throwing line (padded gutter, error line highlighted,
  `Line N` / `Line N, error` aria-labels)
- the parsed stack (`- fn (file:line:col)`, cwd-relative, StackUtils nodeInternals
  filtering, unparsable-line fallback, fs.existsSync guard)

Adds code-excerpt@4.0.0 + stack-utils@2.0.6 (the versions Ink uses). The error
boundary now keeps the raw thrown value for display (Ink stores the raw value;
ErrorOverview renders a stack only when one exists) -- so a non-Error throw no
longer shows a misleading synthetic framework stack. The exit/reject path still
receives a wrapped Error (semantics unchanged). The unparsable-stack fallback
emits a literal backslash-t to match Ink's JSX.

Showing String(value) for a non-Error message (vs Ink's blank) is a documented
additive divergence (ink-divergences.md).

Adds 4 error-overview tests.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-31 05:26:02 +08:00

58 lines
1.3 KiB
JSON

{
"name": "@vue-tui/runtime",
"version": "0.0.2",
"description": "Vue 3 terminal renderer with Yoga flexbox layout, inspired by React Ink.",
"license": "MIT",
"files": [
"dist"
],
"type": "module",
"exports": {
".": "./dist/index.mjs",
"./internal": "./dist/internal.mjs",
"./package.json": "./package.json"
},
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "vp pack",
"dev": "vp pack --watch",
"test": "vp test",
"check:type": "tsc --noEmit",
"prepublishOnly": "vp run build"
},
"dependencies": {
"@alcalzone/ansi-tokenize": "catalog:",
"@vue/runtime-core": "^3.4.0",
"ansi-escapes": "catalog:",
"chalk": "^5.3.0",
"cli-boxes": "^3.0.0",
"cli-truncate": "^6.0.0",
"code-excerpt": "^4.0.0",
"is-in-ci": "catalog:",
"patch-console": "catalog:",
"signal-exit": "^4.1.0",
"slice-ansi": "^9.0.0",
"stack-utils": "^2.0.6",
"string-width": "^8.0.0",
"terminal-size": "catalog:",
"wrap-ansi": "^10.0.0",
"yoga-layout": "^3.1.0"
},
"devDependencies": {
"@types/node": "^25.6.2",
"@types/stack-utils": "^2.0.3",
"@vitejs/plugin-vue-jsx": "catalog:",
"typescript": "^6.0.3",
"vite-plus": "^0.1.20",
"vue": "^3.4.0"
},
"peerDependencies": {
"vue": "^3.4.0"
},
"engines": {
"node": ">=22"
}
}