Skip to content

Commit 22583f7

Browse files
authored
Test on more modern Node versions (#1051)
* Test on more modern Node versions * Fix tests and note that deprecated constants are not exported Since nodejs/node#49686, they are not enumerable properties, so Object.assign doesn't re-export them. Attempting to directly export them would trigger the deprecation warning.
1 parent 83ff8ca commit 22583f7

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
test:
1212
strategy:
1313
matrix:
14-
node: [14.x, 16.x, 18.x, 19.x]
14+
node: [14.x, 16.x, 18.x, 20.x, 22.x, 24.x]
1515
os: [ubuntu-latest, macos-13, windows-latest]
1616
runs-on: ${{ matrix.os }}
1717
steps:

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ const fs = require('fs')
5757
const fse = require('fs-extra')
5858
```
5959

60+
**NOTE:** The deprecated constants `fs.F_OK`, `fs.R_OK`, `fs.W_OK`, & `fs.X_OK` are not exported on Node.js v24.0.0+; please use their `fs.constants` equivalents.
61+
6062
### ESM
6163

6264
There is also an `fs-extra/esm` import, that supports both default and named exports. However, note that `fs` methods are not included in `fs-extra/esm`; you still need to import `fs` and/or `fs/promises` seperately:

lib/fs/__tests__/fs-integration.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,5 @@ describe('native fs', () => {
2727

2828
it('should have native fs constants', () => {
2929
assert.strictEqual(fse.constants.F_OK, fs.constants.F_OK)
30-
assert.strictEqual(fse.F_OK, fs.F_OK) // soft deprecated usage, but still available
3130
})
3231
})

0 commit comments

Comments
 (0)