From 10acbb1c633d635a654c8efb5c04fb4c11b5a306 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Mon, 11 Sep 2023 14:01:28 +0100 Subject: [PATCH] perf: use `node:` prefix to bypass require.cache call for builtins (#49) See https://github.com/fastify/fastify-static/pull/407 --- test.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test.js b/test.js index 7cd5761..a974f07 100644 --- a/test.js +++ b/test.js @@ -1,10 +1,10 @@ 'use strict' const { test } = require('tap') -const { join, basename } = require('path') -const { mkdtempSync, readdirSync } = require('fs') -const { tmpdir } = require('os') -const { spawnSync } = require('child_process') +const { join, basename } = require('node:path') +const { mkdtempSync, readdirSync } = require('node:fs') +const { tmpdir } = require('node:os') +const { spawnSync } = require('node:child_process') test('generates a fastify project in the current folder', async ({ equal, match }) => { const dir = mkdtempSync(join(tmpdir(), 'create-fastify-test'))