Skip to content

Commit 29fae5b

Browse files
authored
fix: removes Readable.fromWeb and Readable.toWeb methods (#506)
* removing obsolete methods from Readable class Signed-off-by: Rishabh Bhandari <rishabhbhandari6@gmail.com> * moved the logic to replacements.mjs Signed-off-by: Rishabh Bhandari <rishabhbhandari6@gmail.com> * using the replacements.mjs logic Signed-off-by: Rishabh Bhandari <rishabhbhandari6@gmail.com> --------- Signed-off-by: Rishabh Bhandari <rishabhbhandari6@gmail.com>
1 parent 232e711 commit 29fae5b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

build/replacements.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,10 @@ const testParallelTicksReenableConsoleLog = ['silentConsole.log\\(i\\);', 'conso
216216

217217
const testParallelTickSaveHook = ['async_hooks.createHook\\(\\{', 'const hook = async_hooks.createHook({']
218218

219+
const removefromWebReadableMethod = ['Readable.fromWeb = function\\s\\s*\\([^)]*\\)\\s*{[^}]*}', '']
220+
221+
const removetoWebReadableMethod = ['Readable.toWeb = function\\s\\s*\\([^)]*\\)\\s*{[^}]*}', '']
222+
219223
const readmeInfo = ['(This package is a mirror of the streams implementations in Node.js) (\\d+.\\d+.\\d+).', '$1 $2.']
220224

221225
const readmeLink = ['(\\[Node.js website\\]\\(https://nodejs.org/dist/v)(\\d+.\\d+.\\d+)', '$1$2']
@@ -232,6 +236,10 @@ export const replacements = {
232236
internalStreamsAbortControllerPolyfill,
233237
internalStreamsNoRequireAbortController
234238
],
239+
'lib/internal/streams/readable.js': [
240+
removefromWebReadableMethod,
241+
removetoWebReadableMethod
242+
],
235243
'lib/internal/streams/.+': [
236244
internalStreamsRequireErrors,
237245
internalStreamsRequireEventEmitter,

0 commit comments

Comments
 (0)