diff --git a/lib/mode/static.js b/lib/mode/static.js index 87024946..f5ffe925 100644 --- a/lib/mode/static.js +++ b/lib/mode/static.js @@ -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) { diff --git a/lib/util/read-package-json.js b/lib/util/read-package-json.js index 6c32b974..01f478e4 100644 --- a/lib/util/read-package-json.js +++ b/lib/util/read-package-json.js @@ -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 { diff --git a/test/mode/static.js b/test/mode/static.js index 5b2ae4c0..ce8ff837 100644 --- a/test/mode/static.js +++ b/test/mode/static.js @@ -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) => {