Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

types: use node: prefix for builtins #336

Merged
merged 3 commits into from
Dec 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Note that the compress method is configured with either the per route parameters
the plugin was defined as global.

```javascript
import fs from 'fs'
import fs from 'node:fs'
import fastify from 'fastify'

const app = fastify()
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"c8": "^10.1.2",
"fastify": "^5.0.0",
"jsonstream": "^1.0.3",
"neostandard": "^0.11.9",
"neostandard": "^0.12.0",
"tsd": "^0.31.0",
"typescript": "~5.7.2"
},
Expand Down
4 changes: 2 additions & 2 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import {
RawServerBase,
RawServerDefault
} from 'fastify'
import { Stream } from 'stream'
import { BrotliOptions, ZlibOptions } from 'zlib'
import { Stream } from 'node:stream'
import { BrotliOptions, ZlibOptions } from 'node:zlib'

declare module 'fastify' {
export interface FastifyContextConfig {
Expand Down
4 changes: 2 additions & 2 deletions types/index.test-d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fastify, { FastifyInstance } from 'fastify'
import { createReadStream } from 'fs'
import { createReadStream } from 'node:fs'
import { expectError, expectType } from 'tsd'
import * as zlib from 'zlib'
import * as zlib from 'node:zlib'
import fastifyCompress, { FastifyCompressOptions } from '..'

const stream = createReadStream('./package.json')
Expand Down
Loading