Skip to content

Commit 78efa07

Browse files
authored
feat(node): Remove unnecessary URL imports (#10860)
Now we will no longer be supporting Node v8, these imports are no longer required
1 parent 25a783b commit 78efa07

File tree

7 files changed

+1
-10
lines changed

7 files changed

+1
-10
lines changed

packages/node-experimental/src/integrations/anr/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { URL } from 'url';
21
import { defineIntegration, getCurrentScope } from '@sentry/core';
32
import type { Contexts, Event, EventHint, IntegrationFn } from '@sentry/types';
43
import { logger } from '@sentry/utils';

packages/node-experimental/src/integrations/spotlight.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as http from 'http';
2-
import { URL } from 'url';
32
import { defineIntegration } from '@sentry/core';
43
import type { Client, Envelope, IntegrationFn } from '@sentry/types';
54
import { logger, serializeEnvelope } from '@sentry/utils';

packages/node-experimental/src/integrations/tracing/hapi/types.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/c73060bd14bb74a2f1906ccfc714d385863bc07d/types/boom/v4/index.d.ts
2020

2121
import type * as stream from 'stream';
22-
import type * as url from 'url';
2322

2423
interface Podium {
2524
new (events?: Events[]): Podium;
@@ -214,7 +213,7 @@ interface Request extends Podium {
214213
readonly path: string;
215214
response: ResponseObject | Boom | null;
216215
readonly route: RequestRoute;
217-
readonly url: url.Url;
216+
readonly url: URL;
218217
}
219218

220219
interface ResponseObjectHeaderOptions {

packages/node-experimental/src/proxy/helpers.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030
import * as http from 'http';
3131
import * as https from 'https';
3232
import type { Readable } from 'stream';
33-
// TODO (v8): Remove this when Node < 12 is no longer supported
34-
import type { URL } from 'url';
3533

3634
export type ThenableRequest = http.ClientRequest & {
3735
then: Promise<http.IncomingMessage>['then'];

packages/node-experimental/src/proxy/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ import type * as http from 'http';
3333
import type { OutgoingHttpHeaders } from 'http';
3434
import * as net from 'net';
3535
import * as tls from 'tls';
36-
// TODO (v8): Remove this when Node < 12 is no longer supported
37-
import { URL } from 'url';
3836
import { logger } from '@sentry/utils';
3937
import { Agent } from './base';
4038
import type { AgentConnectOpts } from './base';

packages/node-experimental/src/transports/http-module.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import type { ClientRequest, IncomingHttpHeaders, RequestOptions as HTTPRequestOptions } from 'http';
22
import type { RequestOptions as HTTPSRequestOptions } from 'https';
3-
import type { URL } from 'url';
43

54
export type HTTPModuleRequestOptions = HTTPRequestOptions | HTTPSRequestOptions | string | URL;
65

packages/node-experimental/src/transports/http.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import * as http from 'http';
22
import * as https from 'https';
33
import { Readable } from 'stream';
4-
import { URL } from 'url';
54
import { createGzip } from 'zlib';
65
import { createTransport } from '@sentry/core';
76
import type {

0 commit comments

Comments
 (0)