File tree 2 files changed +9
-1
lines changed
2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ Please see [CONTRIBUTING.md](./CONTRIBUTING.md) on how to contribute to Cucumber
11
11
### Added
12
12
- Support array notation of formats with path in configuration files ([ #2318 ] ( https://github.com/cucumber/cucumber-js/pull/2318 ) )
13
13
14
+ ### Fixed
15
+ - Wait for stream to finish at end of publish plugin ([ #2322 ] ( https://github.com/cucumber/cucumber-js/pull/2322 ) )
16
+
14
17
## [ 9.4.0] - 2023-08-12
15
18
### Fixed
16
19
- Fix type import from cucumber-expressions ([ #2310 ] ( https://github.com/cucumber/cucumber-js/pull/2310 ) )
Original file line number Diff line number Diff line change @@ -35,8 +35,13 @@ export const publishPlugin: Plugin = async ({
35
35
stream . pipe ( readerStream )
36
36
stream . on ( 'error' , ( error : Error ) => logger . error ( error . message ) )
37
37
on ( 'message' , ( value ) => stream . write ( JSON . stringify ( value ) + '\n' ) )
38
- return ( ) => stream . end ( )
38
+ return ( ) =>
39
+ new Promise < void > ( ( resolve ) => {
40
+ stream . on ( 'finish' , ( ) => resolve ( ) )
41
+ stream . end ( )
42
+ } )
39
43
}
44
+
40
45
/*
41
46
This is because the Cucumber Reports service returns a pre-formatted console message
42
47
including ANSI escapes, so if our stderr stream doesn't support those we need to
You can’t perform that action at this time.
0 commit comments