Skip to content

Commit

Permalink
Use "node:" prefixed imports everywhere, and bump the minimum nodejs …
Browse files Browse the repository at this point in the history
…version to the ones that support this.

CI is updated accordingly.
  • Loading branch information
boenrobot committed Jul 26, 2024
1 parent 17f97e1 commit 73a5006
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 24 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,19 @@ jobs:
test:
strategy:
matrix:
node: [10.x, 12.x, 14.x, 16.x]
runs-on: ubuntu-latest
node: [14.18.0, 14, 16.0.0, 16]
os: [ubuntu-latest, macOS-latest, windows-latest]
exclude:
# Node 14 is not available on macos anymore
- os: macos-latest
node-version: 14
- os: macos-latest
node-version: 14.18.0
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: npm install
Expand Down
5 changes: 1 addition & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@
environment:
matrix:
# node.js
- nodejs_version: "10"
- nodejs_version: "12"
- nodejs_version: "14"
- nodejs_version: "16"


# Install scripts. (runs after repo cloning)
install:
# Get the latest stable version of Node.js or io.js
- ps: Install-Product node $env:nodejs_version
- ps: Install-Product node $env:nodejs_version x64
# install modules
- npm config set loglevel warn
- npm install --silent
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ let _fs
try {
_fs = require('graceful-fs')
} catch (_) {
_fs = require('fs')
_fs = require('node:fs')
}
const universalify = require('universalify')
const { stringify, stripBom } = require('./utils')
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
],
"author": "JP Richardson <[email protected]>",
"license": "MIT",
"engines": {
"node": ">=14.18.0 <15 || >=16"
},
"dependencies": {
"universalify": "^2.0.0"
},
Expand Down
8 changes: 4 additions & 4 deletions test/read-file-sync.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const assert = require('assert')
const fs = require('fs')
const os = require('os')
const path = require('path')
const assert = require('node:assert')
const fs = require('node:fs')
const os = require('node:os')
const path = require('node:path')
const rimraf = require('rimraf')
const jf = require('../')

Expand Down
8 changes: 4 additions & 4 deletions test/read-file.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const assert = require('assert')
const fs = require('fs')
const os = require('os')
const path = require('path')
const assert = require('node:assert')
const fs = require('node:fs')
const os = require('node:os')
const path = require('node:path')
const rimraf = require('rimraf')
const jf = require('../')

Expand Down
8 changes: 4 additions & 4 deletions test/write-file-sync.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const assert = require('assert')
const fs = require('fs')
const os = require('os')
const path = require('path')
const assert = require('node:assert')
const fs = require('node:fs')
const os = require('node:os')
const path = require('node:path')
const rimraf = require('rimraf')
const jf = require('../')

Expand Down
8 changes: 4 additions & 4 deletions test/write-file.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const assert = require('assert')
const fs = require('fs')
const os = require('os')
const path = require('path')
const assert = require('node:assert')
const fs = require('node:fs')
const os = require('node:os')
const path = require('node:path')
const rimraf = require('rimraf')
const jf = require('../')

Expand Down

0 comments on commit 73a5006

Please sign in to comment.