From 725c938428fbb6dc72b1bfa2d3ad94a931f335cf Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Sun, 1 Oct 2023 10:04:15 +0100 Subject: [PATCH] perf: use `node:` prefix to bypass require.cache call for builtins (#108) See https://github.com/fastify/fastify-static/pull/407 --- example/app.js | 2 +- index.js | 2 +- test/index.test.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/example/app.js b/example/app.js index 35e1a9d..9b28a93 100644 --- a/example/app.js +++ b/example/app.js @@ -1,6 +1,6 @@ 'use strict' -const { join } = require('path') +const { join } = require('node:path') const fastify = require('fastify')({ logger: { prettyPrint: true diff --git a/index.js b/index.js index 943b358..e654016 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,6 @@ 'use strict' -const { join } = require('path') +const { join } = require('node:path') const fp = require('fastify-plugin') const Piscina = require('piscina') diff --git a/test/index.test.js b/test/index.test.js index 2e3eddc..83ae6a2 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -1,6 +1,6 @@ 'use strict' -const { join } = require('path') +const { join } = require('node:path') const { test } = require('tap') const Fastify = require('fastify') const Hotwire = require('..')