Skip to content

Conversation

@AbhiPrasad
Copy link
Member

Node.js 24+ (Electron 40+) emits deprecation warnings for url.parse() which get captured by captureConsoleIntegration and cause test failures.

Replace url.parse() calls in net-breadcrumbs.ts with parseStringToURLObject from @sentry/core which uses the WHATWG URL API.

Also updates e2e test versions to include Electron 40.0.0.

@AbhiPrasad AbhiPrasad requested a review from timfish January 27, 2026 19:57
@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Bug Fixes 🐛

  • Replace deprecated url.parse with parseStringToURLObject by AbhiPrasad in #1303

🤖 This preview updates automatically when you update the PR.

@@ -42,16 +43,19 @@ export interface NetOptions {
* We want to match the final URL that Electron uses
*/
function parseOptions(optionsIn: ClientRequestConstructorOptions | string): { method: string; url: string } {
Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe we can evaluate changing this all together?

Node.js 24+ (Electron 40+) emits deprecation warnings for url.parse()
which get captured by captureConsoleIntegration and cause test failures.

Replace url.parse() calls in net-breadcrumbs.ts with parseStringToURLObject
from @sentry/core which uses the WHATWG URL API.

Also updates e2e test versions to include Electron 40.0.0.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@AbhiPrasad AbhiPrasad force-pushed the fix-url-parse-deprecation branch from 5de8f1b to b2ffa30 Compare January 27, 2026 20:10
@timfish
Copy link
Collaborator

timfish commented Jan 27, 2026

Could the remaining url.parse DeprecationWarning be due to Yarn v1? I've seen this during development. Maybe we just loosen the e2e test because this shouldn't cause the test to fail.

@timfish
Copy link
Collaborator

timfish commented Jan 28, 2026

It comes internally from Electron:
electron/electron#49550

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.

3 participants