@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.
Files changed (46) hide show
  1. package/dist/src/bigint.d.ts.map +1 -1
  2. package/dist/src/bigint.js +1 -0
  3. package/dist/src/bigint.js.map +1 -1
  4. package/dist/src/debug.d.ts.map +1 -1
  5. package/dist/src/error.d.ts +17 -0
  6. package/dist/src/error.d.ts.map +1 -1
  7. package/dist/src/error.js +20 -0
  8. package/dist/src/error.js.map +1 -1
  9. package/dist/src/fs.d.ts +35 -3
  10. package/dist/src/fs.d.ts.map +1 -1
  11. package/dist/src/fs.js +155 -25
  12. package/dist/src/fs.js.map +1 -1
  13. package/dist/src/internal/lang.d.ts +1 -0
  14. package/dist/src/internal/lang.d.ts.map +1 -1
  15. package/dist/src/internal/lang.js +28 -0
  16. package/dist/src/internal/lang.js.map +1 -1
  17. package/dist/src/lang.d.ts +19 -0
  18. package/dist/src/lang.d.ts.map +1 -1
  19. package/dist/src/lang.js +22 -1
  20. package/dist/src/lang.js.map +1 -1
  21. package/dist/src/package.d.ts +12 -0
  22. package/dist/src/package.d.ts.map +1 -1
  23. package/dist/src/package.js.map +1 -1
  24. package/dist/src/path.d.ts +1 -1
  25. package/dist/src/path.d.ts.map +1 -1
  26. package/dist/src/path.js +11 -2
  27. package/dist/src/path.js.map +1 -1
  28. package/dist/src/request.d.ts +17 -7
  29. package/dist/src/request.d.ts.map +1 -1
  30. package/dist/src/request.js +13 -5
  31. package/dist/src/request.js.map +1 -1
  32. package/dist/src/subprocess.js +1 -1
  33. package/dist/src/subprocess.js.map +1 -1
  34. package/dist/src/synchronization.js +4 -4
  35. package/dist/src/synchronization.js.map +1 -1
  36. package/package.json +9 -13
  37. package/src/bigint.ts +1 -0
  38. package/src/error.ts +24 -0
  39. package/src/fs.ts +196 -28
  40. package/src/internal/lang.ts +38 -0
  41. package/src/lang.ts +26 -1
  42. package/src/package.ts +26 -0
  43. package/src/path.ts +15 -5
  44. package/src/request.ts +25 -9
  45. package/src/subprocess.ts +1 -1
  46. package/src/synchronization.ts +4 -4
@@ -13,7 +13,7 @@ import path from "node:path";
13
13
 
14
14
  import debug from "debug";
15
15
 
16
- import { ensureError } from "./error.js";
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
- ensureError<NodeJS.ErrnoException>(e);
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
- ensureError<NodeJS.ErrnoException>(e);
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
- ensureError<NodeJS.ErrnoException>(e);
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.