Skip to content

fix(ext/node): add deprecation warning for Duplex.toWeb({ type }) DEP0201 - #35972

Merged
bartlomieju merged 1 commit into
denoland:mainfrom
Medo-ID:stream-duplex-deprecation-warning
Jul 13, 2026
Merged

bartlomieju merged 1 commit into
denoland:mainfrom
Medo-ID:stream-duplex-deprecation-warning

Conversation

@Medo-ID

@Medo-ID Medo-ID commented Jul 11, 2026 •

Copy link
Copy Markdown
Contributor

Fixes part of #35293 (DEP0201 deprecation warning for Duplex.toWeb({ type }))

Implements the missing DEP0201 deprecation warning for Duplex.toWeb({ type }) to match Node.js behavior.

Specifically, when options.type is used (instead of options.readableType), Deno now emits the DEP0201 DeprecationWarning once per process, matching Node's implementation. This enables the previously ignored parallel/test-stream-duplex.js test for this case.

Tests have been added to cover the new behavior.

AI Disclosure

I used ChatGPT to help review the implementation and improve the wording of this pull request.

@bartlomieju bartlomieju left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@bartlomieju
bartlomieju merged commit e5aed78 into denoland:main Jul 13, 2026
137 checks passed
bartlomieju pushed a commit that referenced this pull request Jul 15, 2026
…0201 (#35972)

Fixes part of #35293 (DEP0201 deprecation warning for `Duplex.toWeb({
type })`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants