Skip to content

Commit bf83e0b

Browse files
Update bindings to node v18 LTS
1 parent c38f300 commit bf83e0b

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/Node/OS.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export {
22
EOL as eol,
3+
availableParallelism,
34
arch as archImpl,
45
constants,
56
cpus,
@@ -9,7 +10,8 @@ export {
910
getPriority as getPriorityImpl,
1011
homedir,
1112
hostname,
12-
loadavg as loadavgImpl,
13+
loadavg as loadavgImpl,
14+
machine,
1315
networkInterfaces as networkInterfacesImpl,
1416
// platform, -- platform is defined in `node-process` library
1517
release,

src/Node/OS.purs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module Node.OS
22
( eol
3+
, availableParallelism
34
, Arch(..)
45
, arch
56
, constants
@@ -62,6 +63,8 @@ import Unsafe.Coerce (unsafeCoerce)
6263
-- | `\r\n` on Windows
6364
foreign import eol :: String
6465

66+
foreign import availableParallelism :: Effect Int
67+
6568
-- | Possible values are 'arm', 'arm64', 'ia32', 'mips', 'mipsel', 'ppc', 'ppc64', 's390',
6669
-- | 's390x', 'x32', and 'x64'.
6770
foreign import archImpl :: Effect String
@@ -221,6 +224,8 @@ instance Show IpVersion where
221224
IPv6 -> "IPv6"
222225
UnknownFamily x -> "(UnknownFamily " <> x <> ")"
223226

227+
foreign import machine :: Effect String
228+
224229
foreign import networkInterfacesImpl
225230
:: Effect
226231
( Object

0 commit comments

Comments
 (0)