Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
through2is only used for the three line-parsing transforms insrc/android/utils/adb.tsandsrc/android/utils/emulator.ts.through2(fn)is justnew Transform()with_transform = fn, so this replaces it withnew Transform({ transform: fn })from Node's built-instreammodule.This removes 6 packages from production installs:
through2,readable-stream,inherits,string_decoder,safe-bufferandutil-deprecate.Most of the diff is re-indentation; it's easier to review with whitespace hidden (
?w=1).Why this is not a breaking change
through2@4depends onreadable-stream@3, which is a copy of the stream implementation from Node 10. native-run requires Node>=16.0.0, whose built-instreammodule is a newer version of the same code, so nothing that worked before relies on an API that's missing now.through2passed{}toTransform, and the new code passes onlytransform.objectMode,highWaterMarkand the encoding defaults are unchanged.split2@4, which feeds these transforms, already uses the built-instream, so the pipelines now use one stream implementation end to end.engineschange.Testing
npm run lint,npm run buildandnpm testpass.through2and withstream.Transformon Node 16.20.2 and 24: two sources into one parser (spawnEmulator, including one source ending before the other) and a single source (installApk,getAVDFromEmulator). Both delivered the same lines and the same stream events, with no errors.