From 0bb2466a27fe1c93604ec1c6306f5b0ecf6358ac Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Sun, 10 Sep 2023 08:41:22 +0100 Subject: [PATCH] docs: use `node:` prefix to bypass require.cache call for builtins --- README.md | 6 +++--- callback.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 62046b74..30874f06 100644 --- a/README.md +++ b/README.md @@ -26,9 +26,9 @@ If you are looking for the documentation for the legacy callback-api please see ```js const fastify = require('fastify')() -const fs = require('fs') -const util = require('util') -const { pipeline } = require('stream') +const fs = require('node:fs') +const util = require('node:util') +const { pipeline } = require('node:stream') const pump = util.promisify(pipeline) fastify.register(require('@fastify/multipart')) diff --git a/callback.md b/callback.md index 00e01335..23b2b054 100644 --- a/callback.md +++ b/callback.md @@ -11,7 +11,7 @@ ```js const fastify = require('fastify')() const concat = require('concat-stream') -const fs = require('fs') +const fs = require('node:fs') const pump = require('pump') fastify.register(require('@fastify/multipart'))