Skip to content

Commit fbe3756

Browse files
authored
Remove require('constants') and fsctl workaround (#41)
1 parent 872e17e commit fbe3756

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

index.js

+2-9
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
11
const RandomAccessStorage = require('random-access-storage')
22
const fs = require('fs')
33
const path = require('path')
4-
const constants = fs.constants || require('constants') // eslint-disable-line n/no-deprecated-api
4+
const constants = fs.constants
55

66
let fsext = null
77
try {
88
fsext = require('fs-native-extensions')
9-
} catch {
10-
try { // tmp workaround for places where fsctl is bundled...
11-
fsext = {
12-
tryLock: require('fsctl').lock,
13-
sparse: () => Promise.resolve()
14-
}
15-
} catch {}
16-
}
9+
} catch {}
1710

1811
const RDWR = constants.O_RDWR
1912
const RDONLY = constants.O_RDONLY

0 commit comments

Comments
 (0)