Commit 8c806b1
committed
fix: guard inquirer readline and disable conpty for node 24 (replaces patch-package)
Replaces the two patch-package patches with code-owned fixes so the
Node 24 behavior ships in compiled source rather than post-install
patches.
A new bootstrap shim (packages/amplify-cli/src/node24-inquirer-shim.ts)
overrides inquirer's base UI.close() to skip rl.pause() on an
already-closed readline, avoiding ERR_USE_AFTER_CLOSE on Node 24. It is
installed idempotently as the first statement of run() in index.ts, so
it ships to customers via the compiled cli-internal lib and runs before
any prompt can fire.
The e2e asciinema recorder now spawns node-pty with useConpty: false to
avoid the Windows ConPTY AttachConsole failure during PTY teardown on
Node 24, while keeping ...this.options last so callers can override.
The inquirer+7.3.3 and node-pty+1.1.0 patch files are removed since the
code fixes replace them. The patch-package devDependency and postinstall
hook are intentionally left in place as a harmless no-op (minimal
change; husky untouched).
---
Prompt: On the node24 branch (PR #14959), replace the two patch-package
patches with code-owned fixes: A1 (inquirer bootstrap shim in
amplify-cli source) + B (useConpty: false in the e2e harness), and
remove both .patch files. Then build/validate, commit, push.1 parent 829cb83 commit 8c806b1
5 files changed
Lines changed: 71 additions & 38 deletions
File tree
- packages
- amplify-cli/src
- amplify-e2e-core/src
- patches
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
67 | 72 | | |
68 | 73 | | |
69 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
64 | 67 | | |
65 | 68 | | |
66 | 69 | | |
| |||
This file was deleted.
This file was deleted.
0 commit comments