Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Quick-fix for stdin being broken in 1.19.0 (#6894)
Closes #6891. This downgrades the get-stream package from 5.x to 4.x, which does not use `async` functions which works around the problem of `regeneratorRuntime` not being defined (it shouldn’t be needed). This is an alternative solution to #6893 because I don’t know yet if we want to enable `corejs` given that we will most likely drop support for Node.js 8 and older in the next version. Just like #6893 this PR comes without tests, but I verified locally that `--stdin` works after this change.
- Loading branch information
Showing
3 changed files
with
24 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#### Fix `--stdin` regression in 1.19.0 ([#6894](https://github.com/prettier/prettier/pull/6894) by [@lydell](https://github.com/lydell)) | ||
|
||
<!-- prettier-ignore --> | ||
```jsx | ||
// Prettier stable | ||
$ echo "test" | prettier --stdin --parser babel | ||
[error] regeneratorRuntime is not defined | ||
|
||
// Prettier master | ||
$ echo "test" | prettier --stdin --parser babel | ||
test; | ||
``` |
This file contains 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
This file contains 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