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

perf: use node: prefix to bypass require.cache call for builtins #190

Merged
merged 2 commits into from
Sep 10, 2023
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ If you need to run a middleware only under certain path(s), just pass the path a

```js
const fastify = require('fastify')()
const path = require('path')
const path = require('node:path')
const serveStatic = require('serve-static')

fastify
Expand All @@ -167,7 +167,7 @@ You can also use the engine itself without the Fastify plugin system.
## Usage
```js
const Middie = require('@fastify/middie/engine')
const http = require('http')
const http = require('node:http')
const helmet = require('helmet')
const cors = require('cors')

Expand Down
4 changes: 2 additions & 2 deletions test/engine.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

const middie = require('../lib/engine')
const t = require('tap')
const http = require('http')
const { join } = require('path')
const http = require('node:http')
const { join } = require('node:path')
const serveStatic = require('serve-static')
const test = t.test

Expand Down
2 changes: 1 addition & 1 deletion test/middleware.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const fastify = require('fastify')
const fp = require('fastify-plugin')
const cors = require('cors')
const helmet = require('helmet')
const fs = require('fs')
const fs = require('node:fs')

const middiePlugin = require('../index')

Expand Down
Loading