From 10a5952f6522fe31226ded41227c1fa8ae0eb157 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Sun, 10 Sep 2023 08:31:50 +0100 Subject: [PATCH 1/2] perf: use `node:` prefix to bypass require.cache call for builtins See https://github.com/fastify/fastify-static/pull/407 --- benchmark/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/benchmark/index.js b/benchmark/index.js index 93220e4..325a305 100644 --- a/benchmark/index.js +++ b/benchmark/index.js @@ -1,6 +1,6 @@ -const fs = require('fs') -const path = require('path') -const spawn = require('child_process').spawn +const fs = require('node:fs') +const path = require('node:path') +const spawn = require('node:child_process').spawn const exe = process.argv[0] const cwd = process.cwd() From 43412b7c4909153110bc7fb48a360ae38c66bf8d Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Mon, 11 Sep 2023 18:27:16 +0100 Subject: [PATCH 2/2] chore: fix linting errors --- benchmark/compiling.js | 1 - benchmark/kind.js | 1 - benchmark/matching.js | 1 - 3 files changed, 3 deletions(-) diff --git a/benchmark/compiling.js b/benchmark/compiling.js index 1bf7420..537415e 100644 --- a/benchmark/compiling.js +++ b/benchmark/compiling.js @@ -1,4 +1,3 @@ - /** * Globals for benchmark.js */ diff --git a/benchmark/kind.js b/benchmark/kind.js index 3f254c5..50081f5 100644 --- a/benchmark/kind.js +++ b/benchmark/kind.js @@ -1,4 +1,3 @@ - /** * Globals for benchmark.js */ diff --git a/benchmark/matching.js b/benchmark/matching.js index 0ca7fb2..2bcfabb 100644 --- a/benchmark/matching.js +++ b/benchmark/matching.js @@ -1,4 +1,3 @@ - /** * Globals for benchmark.js */