Skip to content

Commit 29017e9

Browse files
authored
perf: use node: prefix to bypass require.cache call for builtins (#412)
1 parent d4bb4f6 commit 29017e9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

types/index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ import {
1616
AgentOptions,
1717
IncomingHttpHeaders,
1818
RequestOptions,
19-
} from 'http'
19+
} from 'node:http'
2020
import {
2121
ClientSessionOptions,
2222
ClientSessionRequestOptions,
2323
IncomingHttpHeaders as Http2IncomingHttpHeaders,
2424
SecureClientSessionOptions,
25-
} from 'http2'
25+
} from 'node:http2'
2626
import {
2727
Agent as SecureAgent,
2828
AgentOptions as SecureAgentOptions,
2929
RequestOptions as SecureRequestOptions
30-
} from 'https'
30+
} from 'node:https'
3131
import { Pool, ProxyAgent, Dispatcher } from 'undici'
3232

3333
declare module 'fastify' {

types/index.test-d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import fastify, { FastifyReply, FastifyRequest, RawReplyDefaultExpression, RawServerBase, RequestGenericInterface, RouteGenericInterface } from 'fastify'
22
import * as http from 'node:http'
3-
import { IncomingHttpHeaders } from 'http2'
3+
import { IncomingHttpHeaders } from 'node:http2'
44
import * as https from 'node:https'
5-
import { AddressInfo } from 'net'
5+
import { AddressInfo } from 'node:net'
66
import { expectType } from 'tsd'
77
import { Agent, Client, Dispatcher, Pool } from 'undici'
88
import replyFrom, { FastifyReplyFromOptions } from '..'

0 commit comments

Comments
 (0)