diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 34306ef..21e55ce 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [14.0.0, 16, 18] + node-version: [16.0.0, 18, 20] steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} diff --git a/lib/doctest.js b/lib/doctest.js index a8d7dc8..79125d7 100644 --- a/lib/doctest.js +++ b/lib/doctest.js @@ -8,9 +8,9 @@ /// >>>>>>>> >>>>>>> >>>>>>> >>>> >>>>>>> >>>>>> >>>> /// .....................x.......xx.x................................. -import fs from 'fs/promises'; -import {dirname, resolve} from 'path'; -import vm from 'vm'; +import fs from 'node:fs/promises'; +import {dirname, resolve} from 'node:path'; +import vm from 'node:vm'; import * as acorn from 'acorn'; import CoffeeScript from 'coffeescript'; diff --git a/lib/require.js b/lib/require.js index b2129f4..857608d 100644 --- a/lib/require.js +++ b/lib/require.js @@ -1,4 +1,4 @@ -import module from 'module'; -import url from 'url'; +import module from 'node:module'; +import url from 'node:url'; export default module.createRequire (url.fileURLToPath (import.meta.url)); diff --git a/package.json b/package.json index 22d4ac2..52ec0ff 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "url": "git://github.com/davidchambers/doctest.git" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.0.0" }, "dependencies": { "acorn": "8.11.x", diff --git a/test/esm/dependencies.js b/test/esm/dependencies.js index dbed67c..a7397d8 100644 --- a/test/esm/dependencies.js +++ b/test/esm/dependencies.js @@ -1,6 +1,6 @@ // Convert degrees Celsius to degrees Fahrenheit. // -// > import util from 'util' +// > import util from 'node:util' // > util.inspect (toFahrenheit (0)) // '32' export function toFahrenheit(degreesCelsius) { diff --git a/test/index.js b/test/index.js index 1e48987..9af2cef 100644 --- a/test/index.js +++ b/test/index.js @@ -1,6 +1,6 @@ -import {strictEqual} from 'assert'; -import {exec} from 'child_process'; -import {promisify} from 'util'; +import {strictEqual} from 'node:assert'; +import {exec} from 'node:child_process'; +import {promisify} from 'node:util'; import test from 'oletus'; import show from 'sanctuary-show';