Background
0.39.0 introduced a patches/ink+7.0.2.patch (1-line change to ink's render path) for issue #639 — alt-screen ghosting / log-update drift on CJK terminals where Yoga undercounts visual rows. It was wired up via postinstall: patch-package.
This approach can't work for a published library:
patch-package looks for ./node_modules/<dep> relative to itself
- When reasonix is installed as a dependency, npm hoists
ink to the consumer's top-level node_modules/ink
patch-package runs from node_modules/reasonix/ and finds nothing
0.39.0 also shipped without patch-package in dependencies and without patches/ in the files array, so the postinstall threw 'patch-package' is not recognized as an internal or external command on every fresh install. 0.39.0 has been deprecated on npm and the entire patch-package machinery is removed in 0.39.1.
Plan
Fork ink@7.0.2 with the alt-screen render patch applied, publish under a new name, and switch the dependency via the npm: alias mechanism.
Parallel: upstream PR
Also submit the same change upstream to vadimdemedes/ink as a PR. If it lands and ships, drop the fork and switch back to "ink": "^X.Y.Z".
Why this matters
Tracked symptom from #639: terminals showing ghosted prompt lines / scroll drift on Chinese/CJK input under alt-screen mode. 0.38.0 had the bug. 0.39.0 broke install while trying to fix it. 0.39.1 reverted the fix attempt — until this lands, the bug is present again.
Background
0.39.0 introduced a
patches/ink+7.0.2.patch(1-line change to ink's render path) for issue #639 — alt-screen ghosting / log-update drift on CJK terminals where Yoga undercounts visual rows. It was wired up viapostinstall: patch-package.This approach can't work for a published library:
patch-packagelooks for./node_modules/<dep>relative to itselfinkto the consumer's top-levelnode_modules/inkpatch-packageruns fromnode_modules/reasonix/and finds nothing0.39.0 also shipped without
patch-packageindependenciesand withoutpatches/in thefilesarray, so the postinstall threw'patch-package' is not recognized as an internal or external commandon every fresh install. 0.39.0 has been deprecated on npm and the entire patch-package machinery is removed in 0.39.1.Plan
Fork
ink@7.0.2with the alt-screen render patch applied, publish under a new name, and switch the dependency via thenpm:alias mechanism.vadimdemedes/inkat the7.0.2tagInk.render, seepatches/ink+7.0.2.patchin 0.39.0 git history for the exact change)reasonix-ink@7.0.2-reasonix.0(or@esengine/ink) — name TBDpackage.jsonchange"ink": "^7.0.2"to"ink": "npm:reasonix-ink@7.0.2-reasonix.0"with exact pinParallel: upstream PR
Also submit the same change upstream to
vadimdemedes/inkas a PR. If it lands and ships, drop the fork and switch back to"ink": "^X.Y.Z".Why this matters
Tracked symptom from #639: terminals showing ghosted prompt lines / scroll drift on Chinese/CJK input under alt-screen mode. 0.38.0 had the bug. 0.39.0 broke install while trying to fix it. 0.39.1 reverted the fix attempt — until this lands, the bug is present again.