Skip to content

Commit

Permalink
perf: use node: prefix to bypass require.cache call for builtins (#231
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs authored Sep 10, 2023
1 parent 0e8014f commit 09dc053
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'use strict'

const { randomBytes } = require('crypto')
const { randomBytes } = require('node:crypto')

const fp = require('fastify-plugin')
const { AuthorizationCode } = require('simple-oauth2')
const kGenerateCallbackUriParams = Symbol.for('fastify-oauth2.generate-callback-uri-params')

const { promisify, callbackify } = require('util')
const { promisify, callbackify } = require('node:util')

const USER_AGENT = 'fastify-oauth2'

Expand Down
2 changes: 1 addition & 1 deletion test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const t = require('tap')
const nock = require('nock')
const createFastify = require('fastify')
const crypto = require('crypto')
const crypto = require('node:crypto')
const fastifyOauth2 = require('..')

nock.disableNetConnect()
Expand Down

0 comments on commit 09dc053

Please sign in to comment.