Skip to content
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
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]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appveyor is windows testing; no need to duplicate it here. Is there a good reason for testing macOS separately?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File system related functions behave differently in some cases, even between Ubuntu and MacOS. I can't exactly enumerate said cases, as I don't know the details of when they happen or why...

I also am not sure if this package in particular is affected by them, but because it does touch the file system, it seems like it should be checking if it is affected. If you insist, I'll remove it, but IMO, it's better to include it for extra assurance.

As for Windows being duplicated between GH runners and AppVeyor... I actually submitted this PR as part of a batch to several packages, so I copy & pasted most things (except the imports, obviously), including this, and other packages don't use AppVeyor... If you prefer to use AppVeyor, sure, I'll remove that. But have you considered maybe not using AppVeyor, and using only GH runners instead? That would make all tests more "unified".

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No strong feelings on macOS testing. Migration from AppVeyor to GH Actions might be good, but would need to involve @jprichardson (I don't have necessary admin access), and shouldn't block this PR.

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
2 changes: 0 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
environment:
matrix:
# node.js
- nodejs_version: "10"
- nodejs_version: "12"
- nodejs_version: "14"
- nodejs_version: "16"

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 <jprichardson@gmail.com>",
"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