@nomicfoundation/hardhat-utils 3.0.0-next.20 → 3.0.0-next.22

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.
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * Abstract custom error class, which inherits from the built-in Error class,
3
- * making sure that the standard errror properties are set, and the stack trace
3
+ * making sure that the standard error properties are set, and the stack trace
4
4
  * is not polluted with the custom error class' code.
5
5
  *
6
6
  * This class supports the `cause` property, which can be used to pass the
7
7
  * original error that caused the custom error to be thrown. Note that it needs
8
8
  * to be an instance of the built-in Error class, or a subclass of it. See `ensureError`
9
- * for a convinient way of using it.
9
+ * for a convenient way of using it.
10
10
  *
11
11
  * @example
12
12
  * ```ts
package/dist/src/error.js CHANGED
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * Abstract custom error class, which inherits from the built-in Error class,
3
- * making sure that the standard errror properties are set, and the stack trace
3
+ * making sure that the standard error properties are set, and the stack trace
4
4
  * is not polluted with the custom error class' code.
5
5
  *
6
6
  * This class supports the `cause` property, which can be used to pass the
7
7
  * original error that caused the custom error to be thrown. Note that it needs
8
8
  * to be an instance of the built-in Error class, or a subclass of it. See `ensureError`
9
- * for a convinient way of using it.
9
+ * for a convenient way of using it.
10
10
  *
11
11
  * @example
12
12
  * ```ts
@@ -2,7 +2,7 @@ import type { PrefixedHexString } from "../hex.js";
2
2
  export interface Artifact {
3
3
  bytecode: string;
4
4
  linkReferences: {
5
- [sourceName: string]: {
5
+ [inputSourceName: string]: {
6
6
  [libraryName: string]: Array<{
7
7
  start: number;
8
8
  length: number;
@@ -1 +1 @@
1
- {"version":3,"file":"bytecode.d.ts","sourceRoot":"","sources":["../../../src/internal/bytecode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAWnD,MAAM,WAAW,QAAQ;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE;QACd,CAAC,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WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,CAAC,YAAY,EAAE,MAAM,GAAG,iBAAiB,CAAC;CAC3C;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAC3C,iBAAiB,EAAE,gBAAgB,GAClC,IAAI,CAaN;AAED;;;;GAIG;AACH,wBAAgB,gCAAgC,CAC9C,iBAAiB,EAAE,gBAAgB,EACnC,eAAe,EAAE,WAAW,EAAE,GAC7B,IAAI,CAyBN;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,iBAAiB,EAAE,gBAAgB,EACnC,eAAe,EAAE,WAAW,EAAE,GAC7B,IAAI,CAcN;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,eAAe,EAAE,WAAW,EAAE,GAC7B,IAAI,CAUN"}
@@ -13,7 +13,7 @@ export declare function resolveFromRoot(root: string, target: string): string;
13
13
  * Tries to return a shorter version of the path if its inside the given folder.
14
14
  *
15
15
  * This is useful for displaying paths in the terminal, as they can be shorter
16
- * when they are insidde the current working directory. For example, if the
16
+ * when they are inside the current working directory. For example, if the
17
17
  * current working directory is `/home/user/project`, and the path is
18
18
  * `/home/user/project/contracts/File.sol`, the shorter path is
19
19
  * `contracts/File.sol`.
package/dist/src/path.js CHANGED
@@ -19,7 +19,7 @@ export function resolveFromRoot(root, target) {
19
19
  * Tries to return a shorter version of the path if its inside the given folder.
20
20
  *
21
21
  * This is useful for displaying paths in the terminal, as they can be shorter
22
- * when they are insidde the current working directory. For example, if the
22
+ * when they are inside the current working directory. For example, if the
23
23
  * current working directory is `/home/user/project`, and the path is
24
24
  * `/home/user/project/contracts/File.sol`, the shorter path is
25
25
  * `contracts/File.sol`.
@@ -38,7 +38,7 @@ export interface RequestOptions {
38
38
  export interface HttpResponse {
39
39
  statusCode: number;
40
40
  body: {
41
- json(): Promise<unknown>;
41
+ json(): Promise<any>;
42
42
  text(): Promise<string>;
43
43
  };
44
44
  }
@@ -1 +1 @@
1
- {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,aAAa,CAAC;AAE5C,OAAO,KAAK,OAAO,MAAM,QAAQ,CAAC;AAuBlC,eAAO,MAAM,+BAA+B,SAAU,CAAC;AACvD,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAChD,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAE5C,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;AAC5C,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,SAAS,CAAC;AAC/C,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;AAElD;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,WAAW,CAAC,EAAE,WAAW,GAAG,YAAY,CAAC;CAC1C;AAED,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE;QACJ,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;QACzB,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;KACzB,CAAC;CACH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EAAE,MAAM,GAAG,OAAO,CAiBnD;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAO/C;AAED,OAAO,EACL,sBAAsB,EACtB,eAAe,EACf,aAAa,EACb,YAAY,EACZ,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,qBAAqB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { Writable } from "node:stream";
2
2
  /**
3
- * Creates a Tansform that writes everything to actualWritable, without closing it
3
+ * Creates a Transform that writes everything to actualWritable, without closing it
4
4
  * when finished.
5
5
  *
6
6
  * This is useful to pipe things to stdout, without closing it, while being
@@ -1,6 +1,6 @@
1
1
  import { Writable } from "node:stream";
2
2
  /**
3
- * Creates a Tansform that writes everything to actualWritable, without closing it
3
+ * Creates a Transform that writes everything to actualWritable, without closing it
4
4
  * when finished.
5
5
  *
6
6
  * This is useful to pipe things to stdout, without closing it, while being
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nomicfoundation/hardhat-utils",
3
- "version": "3.0.0-next.20",
3
+ "version": "3.0.0-next.22",
4
4
  "description": "Utilities for Hardhat and its plugins",
5
5
  "homepage": "https://github.com/nomicfoundation/hardhat/tree/v-next/v-next/hardhat-utils",
6
6
  "repository": {
@@ -48,7 +48,7 @@
48
48
  "README.md"
49
49
  ],
50
50
  "devDependencies": {
51
- "@nomicfoundation/hardhat-node-test-reporter": "^3.0.0-next.20",
51
+ "@nomicfoundation/hardhat-node-test-reporter": "^3.0.0-next.22",
52
52
  "@types/bn.js": "^5.1.5",
53
53
  "@types/debug": "^4.1.7",
54
54
  "@types/node": "^20.14.9",
package/src/error.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * Abstract custom error class, which inherits from the built-in Error class,
3
- * making sure that the standard errror properties are set, and the stack trace
3
+ * making sure that the standard error properties are set, and the stack trace
4
4
  * is not polluted with the custom error class' code.
5
5
  *
6
6
  * This class supports the `cause` property, which can be used to pass the
7
7
  * original error that caused the custom error to be thrown. Note that it needs
8
8
  * to be an instance of the built-in Error class, or a subclass of it. See `ensureError`
9
- * for a convinient way of using it.
9
+ * for a convenient way of using it.
10
10
  *
11
11
  * @example
12
12
  * ```ts
@@ -12,7 +12,7 @@ import { isAddress } from "../eth.js";
12
12
  export interface Artifact {
13
13
  bytecode: string;
14
14
  linkReferences: {
15
- [sourceName: string]: {
15
+ [inputSourceName: string]: {
16
16
  [libraryName: string]: Array<{ start: number; length: number }>;
17
17
  };
18
18
  };
package/src/path.ts CHANGED
@@ -22,7 +22,7 @@ export function resolveFromRoot(root: string, target: string): string {
22
22
  * Tries to return a shorter version of the path if its inside the given folder.
23
23
  *
24
24
  * This is useful for displaying paths in the terminal, as they can be shorter
25
- * when they are insidde the current working directory. For example, if the
25
+ * when they are inside the current working directory. For example, if the
26
26
  * current working directory is `/home/user/project`, and the path is
27
27
  * `/home/user/project/contracts/File.sol`, the shorter path is
28
28
  * `contracts/File.sol`.
package/src/request.ts CHANGED
@@ -65,7 +65,7 @@ export interface RequestOptions {
65
65
  export interface HttpResponse {
66
66
  statusCode: number;
67
67
  body: {
68
- json(): Promise<unknown>;
68
+ json(): Promise<any>;
69
69
  text(): Promise<string>;
70
70
  };
71
71
  }
package/src/stream.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Writable } from "node:stream";
2
2
 
3
3
  /**
4
- * Creates a Tansform that writes everything to actualWritable, without closing it
4
+ * Creates a Transform that writes everything to actualWritable, without closing it
5
5
  * when finished.
6
6
  *
7
7
  * This is useful to pipe things to stdout, without closing it, while being