File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,6 @@ const disallowedTypeCharacters = /[^\u{0020}-\u{007E}]/u;
7575
7676let ReadableStream ;
7777let URL ;
78- let EOL ;
7978
8079const enc = new TextEncoder ( ) ;
8180
@@ -94,13 +93,7 @@ function lazyReadableStream(options) {
9493 return new ReadableStream ( options ) ;
9594}
9695
97- // TODO(@jasnell): This is annoying but this has to be lazy because
98- // requiring the 'os' module too early causes building Node.js to
99- // fail with an unknown reference failure.
100- function lazyEOL ( ) {
101- EOL ??= require ( 'os' ) . EOL ;
102- return EOL ;
103- }
96+ const { EOL } = require ( 'internal/constants' ) ;
10497
10598function isBlob ( object ) {
10699 return object ?. [ kHandle ] !== undefined ;
@@ -115,7 +108,7 @@ function getSource(source, endings) {
115108 } else if ( ! isArrayBufferView ( source ) ) {
116109 source = `${ source } ` ;
117110 if ( endings === 'native' )
118- source = RegExpPrototypeSymbolReplace ( / \n | \r \n / g, source , lazyEOL ( ) ) ;
111+ source = RegExpPrototypeSymbolReplace ( / \n | \r \n / g, source , EOL ) ;
119112 source = enc . encode ( source ) ;
120113 }
121114
You can’t perform that action at this time.
0 commit comments