Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: use node: prefix to bypass require.cache call for builtins #755

Merged
merged 1 commit into from
Sep 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/mode/static.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

const path = require('path')
const fs = require('fs')
const path = require('node:path')
const fs = require('node:fs')
const yaml = require('yaml')

module.exports = function (fastify, opts, done) {
Expand Down
4 changes: 2 additions & 2 deletions lib/util/read-package-json.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

const fs = require('fs')
const path = require('path')
const fs = require('node:fs')
const path = require('node:path')

function readPackageJson () {
try {
Expand Down
6 changes: 3 additions & 3 deletions test/mode/static.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
'use strict'

const path = require('path')
const path = require('node:path')
const { test } = require('tap')
const Fastify = require('fastify')
const fastifySwagger = require('../../index')
const fastifySwaggerDynamic = require('../../lib/mode/dynamic')
const Swagger = require('@apidevtools/swagger-parser')
const readFileSync = require('fs').readFileSync
const resolve = require('path').resolve
const readFileSync = require('node:fs').readFileSync
const resolve = require('node:path').resolve
const yaml = require('yaml')

test('specification validation check works', async (t) => {
Expand Down
Loading