Skip to content

fix: update @mswjs/interceptors to fix a memory leak#2938

Merged
mikicho merged 4 commits into
nock:mainfrom
kettanaito:fix/interceptors-require
Feb 8, 2026
Merged

fix: update @mswjs/interceptors to fix a memory leak#2938
mikicho merged 4 commits into
nock:mainfrom
kettanaito:fix/interceptors-require

Conversation

@kettanaito
Copy link
Copy Markdown
Collaborator

@kettanaito kettanaito commented Feb 3, 2026

Motivation

In the next version, @mswjs/interceptors will no longer have a default named export in its CJS bundle. That is to comply with the best bundling practices (the default output tsdown produces). As a result, the { default: nodeInterceptors } aliasing breaks as default is undefined.

This also updates Interceptors to include two fixes for memory leaks discovered in the library.

@kettanaito
Copy link
Copy Markdown
Collaborator Author

kettanaito commented Feb 3, 2026

Please note that the current tests will fail as the change expects the new version of Interceptors to be released. I will update it here as well since the Nock's test suite is passing against the local link:

  634 passing (9s)
  11 pending

Update: I've updated the Interceptors version and the tests should pass on CI now.

@kettanaito kettanaito changed the title fix: drop default require alias of @mswjs/interceptors fix: update @mswjs/interceptors to fix a memory leak Feb 3, 2026
Comment thread package-lock.json
@mikicho mikicho merged commit 025db76 into nock:main Feb 8, 2026
14 checks passed
@mikicho
Copy link
Copy Markdown
Member

mikicho commented Feb 8, 2026

I attempted to fix the tslint issue but couldn't identify all the underlying causes quickly, so I also disabled the dtslint run, which is unmaintained and likely doesn’t support newer TypeScript features. My goal is to support TypeScript natively anyway.

@kettanaito kettanaito deleted the fix/interceptors-require branch February 9, 2026 14:20
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 9, 2026

🎉 This PR is included in version 14.0.11 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 9, 2026

🎉 This PR is included in version 15.0.0-beta.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants