diff --git a/README.md b/README.md index 1d201adc..ff1f1460 100644 --- a/README.md +++ b/README.md @@ -692,7 +692,7 @@ The standalone mode is used to compile the code that can be directly run by `nod itself. You need to have `fast-json-stringify` installed for the standalone code to work. ```js -const fs = require('node:fs') +const fs = require('fs') const code = fastJson({ title: 'default string', type: 'object', diff --git a/benchmark/bench-cmp-branch.js b/benchmark/bench-cmp-branch.js index 96c10a6e..a896e986 100644 --- a/benchmark/bench-cmp-branch.js +++ b/benchmark/bench-cmp-branch.js @@ -1,6 +1,6 @@ 'use strict' -const { spawn } = require('node:child_process') +const { spawn } = require('child_process') const cliSelect = require('cli-select') const simpleGit = require('simple-git') diff --git a/benchmark/bench-thread.js b/benchmark/bench-thread.js index 88314358..7e3ba73e 100644 --- a/benchmark/bench-thread.js +++ b/benchmark/bench-thread.js @@ -1,6 +1,6 @@ 'use strict' -const { workerData: benchmark, parentPort } = require('node:worker_threads') +const { workerData: benchmark, parentPort } = require('worker_threads') const Benchmark = require('benchmark') Benchmark.options.minSamples = 100 diff --git a/benchmark/bench.js b/benchmark/bench.js index d0744850..12726184 100644 --- a/benchmark/bench.js +++ b/benchmark/bench.js @@ -1,7 +1,7 @@ 'use strict' -const path = require('node:path') -const { Worker } = require('node:worker_threads') +const path = require('path') +const { Worker } = require('worker_threads') const BENCH_THREAD_PATH = path.join(__dirname, 'bench-thread.js') diff --git a/build/build-schema-validator.js b/build/build-schema-validator.js index 8e4f811d..0c188cc4 100644 --- a/build/build-schema-validator.js +++ b/build/build-schema-validator.js @@ -3,8 +3,8 @@ const Ajv = require('ajv') const standaloneCode = require('ajv/dist/standalone').default const ajvFormats = require('ajv-formats') -const fs = require('node:fs') -const path = require('node:path') +const fs = require('fs') +const path = require('path') const ajv = new Ajv({ addUsedSchema: false, diff --git a/examples/server.js b/examples/server.js index 82f53775..706653b8 100644 --- a/examples/server.js +++ b/examples/server.js @@ -1,6 +1,6 @@ 'use strict' -const http = require('node:http') +const http = require('http') const stringify = require('fast-json-stringify')({ type: 'object', diff --git a/index.js b/index.js index f2a0d98a..5958c934 100644 --- a/index.js +++ b/index.js @@ -4,7 +4,7 @@ const merge = require('@fastify/deepmerge')() const clone = require('rfdc')({ proto: true }) -const { randomUUID } = require('node:crypto') +const { randomUUID } = require('crypto') const { RefResolver } = require('json-schema-ref-resolver') const validate = require('./lib/schema-validator') diff --git a/test/standalone-mode.test.js b/test/standalone-mode.test.js index 5f671d01..1e1570f2 100644 --- a/test/standalone-mode.test.js +++ b/test/standalone-mode.test.js @@ -2,8 +2,8 @@ const test = require('tap').test const fjs = require('..') -const fs = require('node:fs') -const path = require('node:path') +const fs = require('fs') +const path = require('path') function build (opts, schema) { return fjs(schema || { diff --git a/test/webpack.test.js b/test/webpack.test.js index dc59c29a..075d64c6 100644 --- a/test/webpack.test.js +++ b/test/webpack.test.js @@ -2,7 +2,7 @@ const test = require('tap').test const webpack = require('webpack') -const path = require('node:path') +const path = require('path') test('the library should work with webpack', async (t) => { t.plan(1)