Commit 6abf57e
committed
streams: let destroyed-flagged readables still flush to piped destinations [build images]
Deliberate divergence from Node 26 (nodejs/node#62557 made pause()/resume()
early-return on destroyed streams). Legacy Readable subclasses like fd-slicer
assign `this.destroyed = true` — which hits the prototype setter on modern
streams — right before push(null). With the upstream guard, a piped
destination's 'drain' can no longer resume the source, so the last buffered
chunk is silently dropped and the pipeline never finishes. In practice that
breaks yauzl → extract-zip → puppeteer browser installs and other zip/tar
tooling, and the same hang reproduces on Node 26.3.0 itself.
Keep the Node 24 behavior of letting such streams flush their buffer, and
replace the no-op assertion test with a regression test for the fd-slicer
pattern (verified: extract-zip now extracts a full chrome-headless-shell
archive instead of stopping after the first entries).1 parent 09f9406 commit 6abf57e
2 files changed
Lines changed: 49 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1132 | 1132 | | |
1133 | 1133 | | |
1134 | 1134 | | |
1135 | | - | |
1136 | | - | |
1137 | | - | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
1138 | 1142 | | |
1139 | 1143 | | |
1140 | 1144 | | |
| |||
1174 | 1178 | | |
1175 | 1179 | | |
1176 | 1180 | | |
1177 | | - | |
1178 | | - | |
1179 | | - | |
| 1181 | + | |
1180 | 1182 | | |
1181 | 1183 | | |
1182 | 1184 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
821 | 821 | | |
822 | 822 | | |
823 | 823 | | |
824 | | - | |
825 | | - | |
826 | | - | |
827 | | - | |
828 | | - | |
829 | | - | |
830 | | - | |
831 | | - | |
832 | | - | |
833 | | - | |
834 | | - | |
835 | | - | |
836 | | - | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
837 | 865 | | |
838 | 866 | | |
839 | 867 | | |
| |||
0 commit comments