From 63bd16f8cdfb273b8a266a5522cc9b566be727d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCrg=C3=BCn=20Day=C4=B1o=C4=9Flu?= Date: Fri, 8 Sep 2023 11:57:55 +0200 Subject: [PATCH] perf: use `node:` prefix for builtins (#250) * use node: * nit --- signer.js | 2 +- test/cookie.test.js | 3 +-- test/signer.test.js | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/signer.js b/signer.js index 38bad49..a19ceb0 100644 --- a/signer.js +++ b/signer.js @@ -6,7 +6,7 @@ // The MIT License // Copyright (c) 2012–2022 LearnBoost and other contributors; -const crypto = require('crypto') +const crypto = require('node:crypto') const base64PaddingRE = /=/g diff --git a/test/cookie.test.js b/test/cookie.test.js index 6b08813..767302a 100644 --- a/test/cookie.test.js +++ b/test/cookie.test.js @@ -1,7 +1,6 @@ 'use strict' -const tap = require('tap') -const test = tap.test +const { test } = require('tap') const Fastify = require('fastify') const sinon = require('sinon') const { sign, unsign } = require('../signer') diff --git a/test/signer.test.js b/test/signer.test.js index 9b96faa..1ac7224 100644 --- a/test/signer.test.js +++ b/test/signer.test.js @@ -2,7 +2,7 @@ const { test } = require('tap') const sinon = require('sinon') -const crypto = require('crypto') +const crypto = require('node:crypto') const { Signer, sign, unsign } = require('../signer') test('default', t => {