`.destroy()` is an important method in the lifecycle of a Node.js
Readable stream. It is typically called to reclaim the resources
(e.g., close file descriptor). The only situations where calling
it manually isn't necessary are when the following events are
emitted first:
- `end`: natural end of a stream
- `error`: stream terminated due to a failure
Prior to this commit the ended state was incorrectly tracked together
with a pending internal error. It led to situations where the request
could get aborted during a read and then get marked as ended (having
pending error).
With this change we disentangle pending "error" and "destroyed" cases to
always properly terminate an active Node.js Readable stream.
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
* build: use --frozen-lockfile
* build: don't include src/electron in src artifacts
* Use mac intel runner for mac-x64 tests
* test: debug mac tests not exiting
* skip navigator.serial tests on GHA
* TCC magic
* Fix release notes tests needing ELECTRON_GITHUB_TOKEN
* Add Azure env vars to gn check pipeline segment
* use RO token for tests
* temporarily disable codesign tests
* test: disable LoginItemSettings on x64 macOS
* test: bump up time on protocol test for slower machines
* fixup: use RO token for tests
---------
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
* refactor(protocol): extract file stream factory
Increase readability by moving the file stream creation logic out of the
`uploadData` to request body conversion function.
* fix: properly flatten streams in `protocol.handle()`
Refs: electron/electron#39658
* fix: `protocol.handle()` filter null origin header
Refs: electron/electron#40754
* fix: remove obsolete TODO comment
Refs: electron/electron#38929
* fix: forward `Blob` parts in `protocol.handle()`
Refs: electron/electron#40826
* fix: explicitly error out on unknown chunk parts
* test: drop the now-empty remote runner from CI
* move fixtures to spec-main
* remove remote runner
* fix stuff
* remove global-paths hack
* move ts-smoke to spec/
* fix test after merge
* rename spec-main to spec
* no need to ignore spec/node_modules twice
* simplify spec-runner a little
* no need to hash pj/yl twice
* undo lint change to verify-mksnapshot.py
* excessive ..
* update electron_woa_testing.yml
* don't search for test-results-remote.xml
it is never produced now