File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Unreleased
2+ - [ FIXED] Restore issue with document values containing ` \u2028 ` and ` \u2029 ` on Node.js 24.
23- [ FIXED] Restore issue with readline pause/resume after close on Node.js 24.
34- [ UPGRADED] ` axios ` peerDependency to minimum version ` 1.13.1 ` to avoid broken ` 1.13.0 ` version.
45- [ NOTE] Updated Node.js version requirement statement for LTS 24.
Original file line number Diff line number Diff line change 1313// limitations under the License.
1414
1515const { createInterface } = require ( 'node:readline' ) ;
16- const { PassThrough , Duplex } = require ( 'node:stream' ) ;
16+ const { Transform , Duplex } = require ( 'node:stream' ) ;
1717const debug = require ( 'debug' ) ;
1818
1919/**
@@ -39,7 +39,17 @@ class Liner extends Duplex {
3939 // Buffer of processed lines
4040 lines = [ ] ;
4141 // Stream of bytes that will be processed to lines.
42- inStream = new PassThrough ( { objectMode : false } )
42+ inStream = new Transform ( {
43+ objectMode : false ,
44+ transform ( chunk , encoding , callback ) {
45+ try {
46+ this . push ( chunk . toString ( 'utf-8' ) . replace ( / \u2028 / , '\\u2028' ) . replace ( / \u2029 / , '\\u2029' ) ) ;
47+ callback ( ) ;
48+ } catch ( e ) {
49+ callback ( e ) ;
50+ }
51+ }
52+ } )
4353 // if there is an error destroy this Duplex with it
4454 . on ( 'error' , e => this . destroy ( e ) ) ;
4555
You can’t perform that action at this time.
0 commit comments