Skip to content

Commit

Permalink
fix: removes Readable.fromWeb and Readable.toWeb methods (#506)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
RishabhKodes committed May 8, 2023
1 parent 232e711 commit 29fae5b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions build/replacements.mjs
Expand Up @@ -216,6 +216,10 @@ const testParallelTicksReenableConsoleLog = ['silentConsole.log\\(i\\);', 'conso

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

const removefromWebReadableMethod = ['Readable.fromWeb = function\\s\\s*\\([^)]*\\)\\s*{[^}]*}', '']

const removetoWebReadableMethod = ['Readable.toWeb = function\\s\\s*\\([^)]*\\)\\s*{[^}]*}', '']

const readmeInfo = ['(This package is a mirror of the streams implementations in Node.js) (\\d+.\\d+.\\d+).', '$1 $2.']

const readmeLink = ['(\\[Node.js website\\]\\(https://nodejs.org/dist/v)(\\d+.\\d+.\\d+)', '$1$2']
Expand All @@ -232,6 +236,10 @@ export const replacements = {
internalStreamsAbortControllerPolyfill,
internalStreamsNoRequireAbortController
],
'lib/internal/streams/readable.js': [
removefromWebReadableMethod,
removetoWebReadableMethod
],
'lib/internal/streams/.+': [
internalStreamsRequireErrors,
internalStreamsRequireEventEmitter,
Expand Down

0 comments on commit 29fae5b

Please sign in to comment.