Skip to content

fix(types): add optional logs parameter to filterCallsByX functions#5399

Open
mukejane wants to merge 2 commits into
nodejs:mainfrom
mukejane:main
Open

fix(types): add optional logs parameter to filterCallsByX functions#5399
mukejane wants to merge 2 commits into
nodejs:mainfrom
mukejane:main

Conversation

@mukejane

@mukejane mukejane commented Jun 8, 2026

Copy link
Copy Markdown

Fix for #5324

The filterCallsByProtocol, filterCallsByHost, filterCallsByPort, filterCallsByOrigin, filterCallsByPath, filterCallsByHash, filterCallsByFullUrl, and filterCallsByMethod functions in MockCallHistory accept an optional second logs parameter (defaulting to this.logs) in the JS implementation, but the TypeScript type definitions were missing this parameter.

This caused TypeScript errors when calling these methods with the internal logs argument.


Co-Authored-By: Claude Bounty mukejane@users.noreply.github.com

mukejane added 2 commits June 8, 2026 22:01
The filterCallsByProtocol/Host/Port/Origin/Path/Hash/FullUrl/Method
functions accept an optional second 'logs' parameter (defaulting to
this.logs) in the JS implementation, but the TypeScript definitions
were missing this parameter, causing type errors when calling these
methods with the internal logs argument.

Fixes nodejs#5324
…s true

Per the WHATWG EventSource spec, when withCredentials is true,
the request credentials mode should be 'include', not 'omit'.

When corsAttributeState is 'use-credentials' (set when
withCredentials === true), the credentials should be 'include'.
When corsAttributeState is 'anonymous', credentials should be
'same-origin'.

Fixes nodejs#5378
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.

1 participant