Skip to content

Commit

Permalink
Merge pull request #176 from davidchambers/node-imports
Browse files Browse the repository at this point in the history
use `node:` imports
  • Loading branch information
davidchambers authored Dec 11, 2023
2 parents fcca9e0 + 97bc307 commit 26be516
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
6 changes: 3 additions & 3 deletions lib/doctest.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
4 changes: 2 additions & 2 deletions lib/require.js
Original file line number Diff line number Diff line change
@@ -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));
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion test/esm/dependencies.js
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions test/index.js
Original file line number Diff line number Diff line change
@@ -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';
Expand Down

0 comments on commit 26be516

Please sign in to comment.