@nomicfoundation/hardhat-utils 3.0.0-next.2 → 3.0.0-next.20
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/dist/src/bigint.d.ts.map +1 -1
- package/dist/src/bigint.js +1 -0
- package/dist/src/bigint.js.map +1 -1
- package/dist/src/debug.d.ts.map +1 -1
- package/dist/src/error.d.ts +17 -0
- package/dist/src/error.d.ts.map +1 -1
- package/dist/src/error.js +20 -0
- package/dist/src/error.js.map +1 -1
- package/dist/src/fs.d.ts +35 -3
- package/dist/src/fs.d.ts.map +1 -1
- package/dist/src/fs.js +155 -25
- package/dist/src/fs.js.map +1 -1
- package/dist/src/internal/lang.d.ts +1 -0
- package/dist/src/internal/lang.d.ts.map +1 -1
- package/dist/src/internal/lang.js +28 -0
- package/dist/src/internal/lang.js.map +1 -1
- package/dist/src/lang.d.ts +19 -0
- package/dist/src/lang.d.ts.map +1 -1
- package/dist/src/lang.js +22 -1
- package/dist/src/lang.js.map +1 -1
- package/dist/src/package.d.ts +12 -0
- package/dist/src/package.d.ts.map +1 -1
- package/dist/src/package.js.map +1 -1
- package/dist/src/path.d.ts +1 -1
- package/dist/src/path.d.ts.map +1 -1
- package/dist/src/path.js +11 -2
- package/dist/src/path.js.map +1 -1
- package/dist/src/request.d.ts +17 -7
- package/dist/src/request.d.ts.map +1 -1
- package/dist/src/request.js +13 -5
- package/dist/src/request.js.map +1 -1
- package/dist/src/subprocess.js +1 -1
- package/dist/src/subprocess.js.map +1 -1
- package/dist/src/synchronization.js +4 -4
- package/dist/src/synchronization.js.map +1 -1
- package/package.json +9 -13
- package/src/bigint.ts +1 -0
- package/src/error.ts +24 -0
- package/src/fs.ts +196 -28
- package/src/internal/lang.ts +38 -0
- package/src/lang.ts +26 -1
- package/src/package.ts +26 -0
- package/src/path.ts +15 -5
- package/src/request.ts +25 -9
- package/src/subprocess.ts +1 -1
- package/src/synchronization.ts +4 -4
package/src/synchronization.ts
CHANGED
|
@@ -13,7 +13,7 @@ import path from "node:path";
|
|
|
13
13
|
|
|
14
14
|
import debug from "debug";
|
|
15
15
|
|
|
16
|
-
import {
|
|
16
|
+
import { ensureNodeErrnoExceptionError } from "./error.js";
|
|
17
17
|
import { FileSystemAccessError } from "./errors/fs.js";
|
|
18
18
|
import { sleep } from "./lang.js";
|
|
19
19
|
|
|
@@ -62,7 +62,7 @@ export class MultiProcessMutex {
|
|
|
62
62
|
fs.writeFileSync(this.#mutexFilePath, "", { flag: "wx+" });
|
|
63
63
|
return true;
|
|
64
64
|
} catch (e) {
|
|
65
|
-
|
|
65
|
+
ensureNodeErrnoExceptionError(e);
|
|
66
66
|
|
|
67
67
|
if (e.code === "EEXIST") {
|
|
68
68
|
// File already exists, so the mutex is already acquired
|
|
@@ -91,7 +91,7 @@ export class MultiProcessMutex {
|
|
|
91
91
|
try {
|
|
92
92
|
fileStat = fs.statSync(this.#mutexFilePath);
|
|
93
93
|
} catch (e) {
|
|
94
|
-
|
|
94
|
+
ensureNodeErrnoExceptionError(e);
|
|
95
95
|
|
|
96
96
|
if (e.code === "ENOENT") {
|
|
97
97
|
// The file might have been deleted by another process while this function was trying to access it.
|
|
@@ -113,7 +113,7 @@ export class MultiProcessMutex {
|
|
|
113
113
|
log(`Deleting mutex file at path '${this.#mutexFilePath}'`);
|
|
114
114
|
fs.unlinkSync(this.#mutexFilePath);
|
|
115
115
|
} catch (e) {
|
|
116
|
-
|
|
116
|
+
ensureNodeErrnoExceptionError(e);
|
|
117
117
|
|
|
118
118
|
if (e.code === "ENOENT") {
|
|
119
119
|
// The file might have been deleted by another process while this function was trying to access it.
|