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:" prefixed imports everywhere. #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
10 changes: 8 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,21 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [8, 10, 12, 14, 16, 18, 20, 22]
node: [14.18.0, 14, 16.0.0, 16, 18, 20, 22]
os: [ubuntu-latest, windows-latest, macOS-latest]
exclude:
# Node 14 is not available on macos anymore
- os: macos-latest
node: 14
- os: macos-latest
node: 14.18.0

steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

'use strict';

const util = require('util');
const util = require('node:util');
const toRegexRange = require('to-regex-range');

const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
],
"main": "index.js",
"engines": {
"node": ">=8"
"node": ">=14.18.0 <15 || >=16"
},
"scripts": {
"lint": "eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives --ignore-path .gitignore .",
Expand All @@ -35,7 +35,7 @@
},
"devDependencies": {
"gulp-format-md": "^2.0.0",
"mocha": "^6.1.1",
"mocha": "^10.7.0",
"nyc": "^15.1.0"
},
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion test/errors.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const assert = require('assert');
const assert = require('node:assert');
const fill = require('..');

describe('error handling', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/invalid.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const assert = require('assert');
const assert = require('node:assert');
const fill = require('..');

describe('invalid ranges', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/matching.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const assert = require('assert');
const assert = require('node:assert');
const fill = require('..');

const toRegex = (...args) => new RegExp(`^(${fill(...args)})$`);
Expand Down
2 changes: 1 addition & 1 deletion test/options.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const assert = require('assert');
const assert = require('node:assert');
const exact = require('./support/exact');
const fill = require('..');

Expand Down
2 changes: 1 addition & 1 deletion test/padding.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const assert = require('assert').strict;
const assert = require('node:assert').strict;
const fill = require('..');

describe('padding: numbers', () => {
Expand Down
4 changes: 2 additions & 2 deletions test/support/exact.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const assert = require('assert');
const util = require('util');
const assert = require('node:assert');
const util = require('node:util');

module.exports = (actual, expected) => {
assert(Array.isArray(actual));
Expand Down
2 changes: 1 addition & 1 deletion test/verify-matches.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

'use strict';

const assert = require('assert');
const assert = require('node:assert');
const expand = require('./support/expand');
const fill = require('..');
let count = 0;
Expand Down