bare-fs 4.7.3 → 4.7.4
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/binding.c +19 -0
- package/lib/errors.js +2 -2
- package/package.json +1 -1
- package/prebuilds/android-arm/bare-fs.bare +0 -0
- package/prebuilds/android-arm64/bare-fs.bare +0 -0
- package/prebuilds/android-ia32/bare-fs.bare +0 -0
- package/prebuilds/android-x64/bare-fs.bare +0 -0
- package/prebuilds/darwin-arm64/bare-fs.bare +0 -0
- package/prebuilds/darwin-x64/bare-fs.bare +0 -0
- package/prebuilds/ios-arm64/bare-fs.bare +0 -0
- package/prebuilds/ios-arm64-simulator/bare-fs.bare +0 -0
- package/prebuilds/ios-x64-simulator/bare-fs.bare +0 -0
- package/prebuilds/linux-arm64/bare-fs.bare +0 -0
- package/prebuilds/linux-x64/bare-fs.bare +0 -0
- package/prebuilds/win32-arm64/bare-fs.bare +0 -0
- package/prebuilds/win32-x64/bare-fs.bare +0 -0
package/binding.c
CHANGED
|
@@ -2887,6 +2887,25 @@ bare_fs_exports(js_env_t *env, js_value_t *exports) {
|
|
|
2887
2887
|
V(UV_CHANGE)
|
|
2888
2888
|
#undef V
|
|
2889
2889
|
|
|
2890
|
+
js_value_t *errnos;
|
|
2891
|
+
err = js_create_object(env, &errnos);
|
|
2892
|
+
assert(err == 0);
|
|
2893
|
+
|
|
2894
|
+
err = js_set_named_property(env, exports, "errnos", errnos);
|
|
2895
|
+
assert(err == 0);
|
|
2896
|
+
|
|
2897
|
+
#define V(name, msg) \
|
|
2898
|
+
{ \
|
|
2899
|
+
js_value_t *val; \
|
|
2900
|
+
err = js_create_int32(env, UV_##name, &val); \
|
|
2901
|
+
assert(err == 0); \
|
|
2902
|
+
err = js_set_named_property(env, errnos, #name, val); \
|
|
2903
|
+
assert(err == 0); \
|
|
2904
|
+
}
|
|
2905
|
+
|
|
2906
|
+
UV_ERRNO_MAP(V);
|
|
2907
|
+
#undef V
|
|
2908
|
+
|
|
2890
2909
|
return exports;
|
|
2891
2910
|
}
|
|
2892
2911
|
|
package/lib/errors.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const binding = require('../binding')
|
|
2
2
|
|
|
3
3
|
module.exports = class FileError extends Error {
|
|
4
4
|
constructor(msg, opts = {}) {
|
|
@@ -22,7 +22,7 @@ module.exports = class FileError extends Error {
|
|
|
22
22
|
|
|
23
23
|
// For Node.js compatibility
|
|
24
24
|
get errno() {
|
|
25
|
-
return
|
|
25
|
+
return binding.errnos[this.code]
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
// For Node.js compatibility
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|