@reventlessdev/rescript-node 2.0.0-alpha.6 → 2.0.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/NodeFs.res +28 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# 2.0.0-alpha.7 (2026-08-15)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **local:** serve ui-hints.json edits without restarting the platform ([b29b104](https://github.com/ReventlessDev/reventless-core/commit/b29b1044f31f620071423c618486daef9692c614))
|
|
11
|
+
|
|
12
|
+
|
|
6
13
|
# 2.0.0-alpha.6 (2026-08-14)
|
|
7
14
|
|
|
8
15
|
### Features
|
package/package.json
CHANGED
package/src/NodeFs.res
CHANGED
|
@@ -38,6 +38,34 @@ external writeFileSync: (string, string, @as("utf8") _) => unit = "writeFileSync
|
|
|
38
38
|
@module("node:fs")
|
|
39
39
|
external writeFileSyncBuffer: (string, Uint8Array.t) => unit = "writeFileSync"
|
|
40
40
|
|
|
41
|
+
// ── Watching ─────────────────────────────────────────────────────────────────
|
|
42
|
+
|
|
43
|
+
/** A handle from {!watch}. Held so it can be closed, and so it can be `unref`ed
|
|
44
|
+
— an active watcher keeps the event loop alive, which turns a stray watch in
|
|
45
|
+
a test into a run that never exits. */
|
|
46
|
+
type watcher
|
|
47
|
+
|
|
48
|
+
/** Stop watching. */
|
|
49
|
+
@send external watcherClose: watcher => unit = "close"
|
|
50
|
+
|
|
51
|
+
/** Take the watcher off the event loop's reference count, so it never by itself
|
|
52
|
+
keeps the process running. Returns the same watcher, as Node does. */
|
|
53
|
+
@send external watcherUnref: watcher => watcher = "unref"
|
|
54
|
+
|
|
55
|
+
/** [`fs.watch`](https://nodejs.org/api/fs.html#fswatchfilename-options-listener).
|
|
56
|
+
|
|
57
|
+
The listener takes the event type (`"rename"` or `"change"`) and the
|
|
58
|
+
basename, which Node may report as null on some platforms — hence
|
|
59
|
+
`Nullable.t`.
|
|
60
|
+
|
|
61
|
+
**Watch the directory, not the file**, when the file is one an editor
|
|
62
|
+
writes: a save that replaces rather than rewrites (write-temp-then-rename,
|
|
63
|
+
which is how most editors save atomically) gives the path a new inode, and a
|
|
64
|
+
watcher registered on the old one goes silent with no error. Watching the
|
|
65
|
+
containing directory and filtering on the basename survives that. */
|
|
66
|
+
@module("node:fs")
|
|
67
|
+
external watch: (string, (string, Nullable.t<string>) => unit) => watcher = "watch"
|
|
68
|
+
|
|
41
69
|
// ── Directories ──────────────────────────────────────────────────────────────
|
|
42
70
|
|
|
43
71
|
type dirent
|