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

use node: imports #176

Merged
merged 1 commit into from
Dec 11, 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
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