hardhat 3.4.0 → 3.4.2
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 +36 -0
- package/dist/src/cli.js +5 -5
- package/dist/src/cli.js.map +1 -1
- package/dist/src/internal/builtin-plugins/artifacts/artifact-manager.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/artifacts/artifact-manager.js +11 -4
- package/dist/src/internal/builtin-plugins/artifacts/artifact-manager.js.map +1 -1
- package/dist/src/internal/builtin-plugins/artifacts/hook-handlers/hre.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/artifacts/hook-handlers/hre.js +10 -10
- package/dist/src/internal/builtin-plugins/artifacts/hook-handlers/hre.js.map +1 -1
- package/dist/src/internal/builtin-plugins/clean/index.js +1 -1
- package/dist/src/internal/builtin-plugins/clean/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/console/index.js +1 -1
- package/dist/src/internal/builtin-plugins/console/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/coverage/exports.d.ts +1 -1
- package/dist/src/internal/builtin-plugins/coverage/exports.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/coverage/exports.js +1 -1
- package/dist/src/internal/builtin-plugins/coverage/exports.js.map +1 -1
- package/dist/src/internal/builtin-plugins/coverage/helpers/accessors.d.ts +7 -0
- package/dist/src/internal/builtin-plugins/coverage/helpers/accessors.d.ts.map +1 -0
- package/dist/src/internal/builtin-plugins/coverage/helpers/accessors.js +24 -0
- package/dist/src/internal/builtin-plugins/coverage/helpers/accessors.js.map +1 -0
- package/dist/src/internal/builtin-plugins/coverage/helpers/compat.d.ts +4 -0
- package/dist/src/internal/builtin-plugins/coverage/helpers/compat.d.ts.map +1 -0
- package/dist/src/internal/builtin-plugins/coverage/helpers/compat.js +27 -0
- package/dist/src/internal/builtin-plugins/coverage/helpers/compat.js.map +1 -0
- package/dist/src/internal/builtin-plugins/coverage/hook-handlers/clean.js +1 -1
- package/dist/src/internal/builtin-plugins/coverage/hook-handlers/clean.js.map +1 -1
- package/dist/src/internal/builtin-plugins/coverage/hook-handlers/hre.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/coverage/hook-handlers/hre.js +18 -15
- package/dist/src/internal/builtin-plugins/coverage/hook-handlers/hre.js.map +1 -1
- package/dist/src/internal/builtin-plugins/coverage/hook-handlers/solidity.js +3 -3
- package/dist/src/internal/builtin-plugins/coverage/hook-handlers/solidity.js.map +1 -1
- package/dist/src/internal/builtin-plugins/coverage/hook-handlers/test.js +1 -1
- package/dist/src/internal/builtin-plugins/coverage/hook-handlers/test.js.map +1 -1
- package/dist/src/internal/builtin-plugins/flatten/index.js +1 -1
- package/dist/src/internal/builtin-plugins/flatten/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/helpers/accessors.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/helpers/accessors.js +10 -4
- package/dist/src/internal/builtin-plugins/gas-analytics/helpers/accessors.js.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/hook-handlers/hre.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/hook-handlers/hre.js +18 -14
- package/dist/src/internal/builtin-plugins/gas-analytics/hook-handlers/hre.js.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/index.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/index.js +2 -2
- package/dist/src/internal/builtin-plugins/gas-analytics/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/snapshot-cheatcodes.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/snapshot-cheatcodes.js +2 -7
- package/dist/src/internal/builtin-plugins/gas-analytics/snapshot-cheatcodes.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/config-resolution.js +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/config-resolution.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/edr-constants.d.ts +14 -0
- package/dist/src/internal/builtin-plugins/network-manager/edr/edr-constants.d.ts.map +1 -0
- package/dist/src/internal/builtin-plugins/network-manager/edr/edr-constants.js +40 -0
- package/dist/src/internal/builtin-plugins/network-manager/edr/edr-constants.js.map +1 -0
- package/dist/src/internal/builtin-plugins/network-manager/edr/edr-provider.d.ts +1 -12
- package/dist/src/internal/builtin-plugins/network-manager/edr/edr-provider.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/edr-provider.js +3 -42
- package/dist/src/internal/builtin-plugins/network-manager/edr/edr-provider.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/genesis-state.js +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/genesis-state.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/types/hardfork.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/types/hardfork.js +2 -5
- package/dist/src/internal/builtin-plugins/network-manager/edr/types/hardfork.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/utils/convert-to-edr.js +2 -2
- package/dist/src/internal/builtin-plugins/network-manager/edr/utils/convert-to-edr.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/hook-handlers/hre.js +4 -4
- package/dist/src/internal/builtin-plugins/network-manager/hook-handlers/hre.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/hook-handlers/network.js +2 -2
- package/dist/src/internal/builtin-plugins/network-manager/hook-handlers/network.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/http-provider.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/http-provider.js +2 -2
- package/dist/src/internal/builtin-plugins/network-manager/http-provider.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/network-manager.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/network-manager.js +7 -7
- package/dist/src/internal/builtin-plugins/network-manager/network-manager.js.map +1 -1
- package/dist/src/internal/builtin-plugins/node/helpers.js +2 -2
- package/dist/src/internal/builtin-plugins/node/helpers.js.map +1 -1
- package/dist/src/internal/builtin-plugins/node/index.js +1 -1
- package/dist/src/internal/builtin-plugins/node/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/run/index.js +1 -1
- package/dist/src/internal/builtin-plugins/run/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/build-system.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/build-system.js +61 -28
- package/dist/src/internal/builtin-plugins/solidity/build-system/build-system.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/compilation-job.js +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/compilation-job.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/compiler/downloader.js +4 -4
- package/dist/src/internal/builtin-plugins/solidity/build-system/compiler/downloader.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/compiler/index.js +2 -2
- package/dist/src/internal/builtin-plugins/solidity/build-system/compiler/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/compiler/solcjs-runner.js +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/compiler/solcjs-runner.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/dependency-graph-building.js +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/dependency-graph-building.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/read-source-file.js +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/read-source-file.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/resolver/dependency-resolver.js +10 -10
- package/dist/src/internal/builtin-plugins/solidity/build-system/resolver/dependency-resolver.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/resolver/remapped-npm-packages-graph.js +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/resolver/remapped-npm-packages-graph.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/hook-handlers/config.js +1 -1
- package/dist/src/internal/builtin-plugins/solidity/hook-handlers/config.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/hook-handlers/hre.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/hook-handlers/hre.js +16 -11
- package/dist/src/internal/builtin-plugins/solidity/hook-handlers/hre.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/index.js +1 -1
- package/dist/src/internal/builtin-plugins/solidity/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/solidity-hooks.js +1 -1
- package/dist/src/internal/builtin-plugins/solidity/solidity-hooks.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/tasks/build.js +4 -4
- package/dist/src/internal/builtin-plugins/solidity/tasks/build.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/edr-artifacts.js +2 -2
- package/dist/src/internal/builtin-plugins/solidity-test/edr-artifacts.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/hook-handlers/config.js +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/hook-handlers/config.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/hook-handlers/test.js +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/hook-handlers/test.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/index.js +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/reporter.js +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/reporter.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/task-action.js +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/task-action.js.map +1 -1
- package/dist/src/internal/builtin-plugins/telemetry/index.js +1 -1
- package/dist/src/internal/builtin-plugins/telemetry/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/test/hook-handlers/config.js +1 -1
- package/dist/src/internal/builtin-plugins/test/hook-handlers/config.js.map +1 -1
- package/dist/src/internal/builtin-plugins/test/index.js +1 -1
- package/dist/src/internal/builtin-plugins/test/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/test/task-action.js +1 -1
- package/dist/src/internal/builtin-plugins/test/task-action.js.map +1 -1
- package/dist/src/internal/cli/init/init.d.ts.map +1 -1
- package/dist/src/internal/cli/init/init.js +18 -9
- package/dist/src/internal/cli/init/init.js.map +1 -1
- package/dist/src/internal/cli/init/template.d.ts.map +1 -1
- package/dist/src/internal/cli/init/template.js +5 -14
- package/dist/src/internal/cli/init/template.js.map +1 -1
- package/dist/src/internal/cli/main.d.ts.map +1 -1
- package/dist/src/internal/cli/main.js +4 -2
- package/dist/src/internal/cli/main.js.map +1 -1
- package/dist/src/internal/cli/node-version.d.ts +1 -1
- package/dist/src/internal/cli/node-version.d.ts.map +1 -1
- package/dist/src/internal/cli/node-version.js +18 -8
- package/dist/src/internal/cli/node-version.js.map +1 -1
- package/dist/src/internal/cli/telemetry/analytics/analytics.js +2 -2
- package/dist/src/internal/cli/telemetry/analytics/analytics.js.map +1 -1
- package/dist/src/internal/cli/telemetry/error-reporter/global-error-handlers.d.ts +6 -0
- package/dist/src/internal/cli/telemetry/error-reporter/global-error-handlers.d.ts.map +1 -0
- package/dist/src/internal/cli/telemetry/error-reporter/global-error-handlers.js +47 -0
- package/dist/src/internal/cli/telemetry/error-reporter/global-error-handlers.js.map +1 -0
- package/dist/src/internal/cli/telemetry/error-reporter/reporter.d.ts +27 -0
- package/dist/src/internal/cli/telemetry/error-reporter/reporter.d.ts.map +1 -0
- package/dist/src/internal/cli/telemetry/error-reporter/reporter.js +40 -0
- package/dist/src/internal/cli/telemetry/error-reporter/reporter.js.map +1 -0
- package/dist/src/internal/cli/telemetry/sentry/anonymizer.js +1 -1
- package/dist/src/internal/cli/telemetry/sentry/anonymizer.js.map +1 -1
- package/dist/src/internal/cli/telemetry/sentry/init.d.ts +0 -8
- package/dist/src/internal/cli/telemetry/sentry/init.d.ts.map +1 -1
- package/dist/src/internal/cli/telemetry/sentry/init.js +1 -37
- package/dist/src/internal/cli/telemetry/sentry/init.js.map +1 -1
- package/dist/src/internal/cli/telemetry/sentry/reporter.d.ts +8 -2
- package/dist/src/internal/cli/telemetry/sentry/reporter.d.ts.map +1 -1
- package/dist/src/internal/cli/telemetry/sentry/reporter.js +18 -12
- package/dist/src/internal/cli/telemetry/sentry/reporter.js.map +1 -1
- package/dist/src/internal/cli/telemetry/sentry/transport.js +1 -1
- package/dist/src/internal/cli/telemetry/sentry/transport.js.map +1 -1
- package/dist/src/internal/cli/telemetry/telemetry-permissions.js +1 -1
- package/dist/src/internal/cli/telemetry/telemetry-permissions.js.map +1 -1
- package/dist/src/internal/config-loading.js +3 -3
- package/dist/src/internal/config-loading.js.map +1 -1
- package/dist/src/internal/core/configuration-variables.d.ts.map +1 -1
- package/dist/src/internal/core/configuration-variables.js +1 -1
- package/dist/src/internal/core/configuration-variables.js.map +1 -1
- package/dist/src/internal/core/hook-manager.d.ts.map +1 -1
- package/dist/src/internal/core/hook-manager.js +196 -59
- package/dist/src/internal/core/hook-manager.js.map +1 -1
- package/dist/src/internal/core/hre.d.ts.map +1 -1
- package/dist/src/internal/core/hre.js +5 -5
- package/dist/src/internal/core/hre.js.map +1 -1
- package/dist/src/internal/core/lazy-user-interruptions.d.ts +11 -0
- package/dist/src/internal/core/lazy-user-interruptions.d.ts.map +1 -0
- package/dist/src/internal/core/lazy-user-interruptions.js +39 -0
- package/dist/src/internal/core/lazy-user-interruptions.js.map +1 -0
- package/dist/src/internal/core/plugins/resolve-plugin-list.js +1 -1
- package/dist/src/internal/core/plugins/resolve-plugin-list.js.map +1 -1
- package/dist/src/internal/core/tasks/resolved-task.js +4 -4
- package/dist/src/internal/core/tasks/resolved-task.js.map +1 -1
- package/dist/src/internal/core/user-interruptions.js +9 -9
- package/dist/src/internal/core/user-interruptions.js.map +1 -1
- package/dist/src/internal/hre-initialization.js +1 -1
- package/dist/src/internal/hre-initialization.js.map +1 -1
- package/package.json +4 -4
- package/src/cli.ts +5 -5
- package/src/internal/builtin-plugins/artifacts/artifact-manager.ts +13 -6
- package/src/internal/builtin-plugins/artifacts/hook-handlers/hre.ts +16 -10
- package/src/internal/builtin-plugins/clean/index.ts +1 -1
- package/src/internal/builtin-plugins/console/index.ts +1 -1
- package/src/internal/builtin-plugins/coverage/exports.ts +1 -1
- package/src/internal/builtin-plugins/coverage/helpers/accessors.ts +44 -0
- package/src/internal/builtin-plugins/coverage/helpers/compat.ts +37 -0
- package/src/internal/builtin-plugins/coverage/hook-handlers/clean.ts +1 -1
- package/src/internal/builtin-plugins/coverage/hook-handlers/hre.ts +26 -16
- package/src/internal/builtin-plugins/coverage/hook-handlers/solidity.ts +3 -3
- package/src/internal/builtin-plugins/coverage/hook-handlers/test.ts +1 -1
- package/src/internal/builtin-plugins/flatten/index.ts +1 -1
- package/src/internal/builtin-plugins/gas-analytics/helpers/accessors.ts +12 -5
- package/src/internal/builtin-plugins/gas-analytics/hook-handlers/hre.ts +29 -17
- package/src/internal/builtin-plugins/gas-analytics/index.ts +4 -2
- package/src/internal/builtin-plugins/gas-analytics/snapshot-cheatcodes.ts +2 -6
- package/src/internal/builtin-plugins/network-manager/config-resolution.ts +1 -1
- package/src/internal/builtin-plugins/network-manager/edr/edr-constants.ts +61 -0
- package/src/internal/builtin-plugins/network-manager/edr/edr-provider.ts +3 -62
- package/src/internal/builtin-plugins/network-manager/edr/genesis-state.ts +1 -1
- package/src/internal/builtin-plugins/network-manager/edr/types/hardfork.ts +3 -9
- package/src/internal/builtin-plugins/network-manager/edr/utils/convert-to-edr.ts +2 -2
- package/src/internal/builtin-plugins/network-manager/hook-handlers/hre.ts +4 -4
- package/src/internal/builtin-plugins/network-manager/hook-handlers/network.ts +2 -2
- package/src/internal/builtin-plugins/network-manager/http-provider.ts +6 -2
- package/src/internal/builtin-plugins/network-manager/network-manager.ts +11 -7
- package/src/internal/builtin-plugins/node/helpers.ts +2 -2
- package/src/internal/builtin-plugins/node/index.ts +1 -1
- package/src/internal/builtin-plugins/run/index.ts +1 -1
- package/src/internal/builtin-plugins/solidity/build-system/build-system.ts +84 -49
- package/src/internal/builtin-plugins/solidity/build-system/compilation-job.ts +1 -1
- package/src/internal/builtin-plugins/solidity/build-system/compiler/downloader.ts +4 -4
- package/src/internal/builtin-plugins/solidity/build-system/compiler/index.ts +2 -2
- package/src/internal/builtin-plugins/solidity/build-system/compiler/solcjs-runner.ts +1 -1
- package/src/internal/builtin-plugins/solidity/build-system/dependency-graph-building.ts +1 -1
- package/src/internal/builtin-plugins/solidity/build-system/read-source-file.ts +2 -2
- package/src/internal/builtin-plugins/solidity/build-system/resolver/dependency-resolver.ts +11 -11
- package/src/internal/builtin-plugins/solidity/build-system/resolver/remapped-npm-packages-graph.ts +1 -1
- package/src/internal/builtin-plugins/solidity/hook-handlers/config.ts +1 -1
- package/src/internal/builtin-plugins/solidity/hook-handlers/hre.ts +27 -14
- package/src/internal/builtin-plugins/solidity/index.ts +1 -1
- package/src/internal/builtin-plugins/solidity/solidity-hooks.ts +1 -1
- package/src/internal/builtin-plugins/solidity/tasks/build.ts +4 -4
- package/src/internal/builtin-plugins/solidity-test/edr-artifacts.ts +2 -2
- package/src/internal/builtin-plugins/solidity-test/hook-handlers/config.ts +1 -1
- package/src/internal/builtin-plugins/solidity-test/hook-handlers/test.ts +1 -1
- package/src/internal/builtin-plugins/solidity-test/index.ts +1 -1
- package/src/internal/builtin-plugins/solidity-test/reporter.ts +1 -1
- package/src/internal/builtin-plugins/solidity-test/task-action.ts +1 -1
- package/src/internal/builtin-plugins/telemetry/index.ts +1 -1
- package/src/internal/builtin-plugins/test/hook-handlers/config.ts +1 -1
- package/src/internal/builtin-plugins/test/index.ts +1 -1
- package/src/internal/builtin-plugins/test/task-action.ts +1 -1
- package/src/internal/cli/init/init.ts +32 -14
- package/src/internal/cli/init/template.ts +22 -27
- package/src/internal/cli/main.ts +5 -3
- package/src/internal/cli/node-version.ts +21 -10
- package/src/internal/cli/telemetry/analytics/analytics.ts +2 -2
- package/src/internal/cli/telemetry/error-reporter/global-error-handlers.ts +64 -0
- package/src/internal/cli/telemetry/error-reporter/reporter.ts +49 -0
- package/src/internal/cli/telemetry/sentry/anonymizer.ts +1 -1
- package/src/internal/cli/telemetry/sentry/init.ts +2 -62
- package/src/internal/cli/telemetry/sentry/reporter.ts +27 -15
- package/src/internal/cli/telemetry/sentry/transport.ts +1 -1
- package/src/internal/cli/telemetry/telemetry-permissions.ts +1 -1
- package/src/internal/config-loading.ts +3 -3
- package/src/internal/core/configuration-variables.ts +19 -18
- package/src/internal/core/hook-manager.ts +267 -103
- package/src/internal/core/hre.ts +7 -5
- package/src/internal/core/lazy-user-interruptions.ts +75 -0
- package/src/internal/core/plugins/resolve-plugin-list.ts +1 -1
- package/src/internal/core/tasks/resolved-task.ts +4 -4
- package/src/internal/core/user-interruptions.ts +9 -9
- package/src/internal/hre-initialization.ts +1 -1
- package/templates/hardhat-3/01-node-test-runner-viem/package.json +10 -10
- package/templates/hardhat-3/02-mocha-ethers/package.json +13 -13
- package/templates/hardhat-3/03-minimal/package.json +1 -1
- package/dist/src/internal/builtin-plugins/coverage/helpers.d.ts +0 -15
- package/dist/src/internal/builtin-plugins/coverage/helpers.d.ts.map +0 -1
- package/dist/src/internal/builtin-plugins/coverage/helpers.js +0 -35
- package/dist/src/internal/builtin-plugins/coverage/helpers.js.map +0 -1
- package/src/internal/builtin-plugins/coverage/helpers.ts +0 -63
|
@@ -21,8 +21,8 @@ export class UserInterruptionManagerImplementation
|
|
|
21
21
|
interruptor: string,
|
|
22
22
|
message: string,
|
|
23
23
|
): Promise<void> {
|
|
24
|
-
return this.#mutex.exclusiveRun(async () => {
|
|
25
|
-
return this.#hooks.runHandlerChain(
|
|
24
|
+
return await this.#mutex.exclusiveRun(async () => {
|
|
25
|
+
return await this.#hooks.runHandlerChain(
|
|
26
26
|
"userInterruptions",
|
|
27
27
|
"displayMessage",
|
|
28
28
|
[interruptor, message],
|
|
@@ -35,8 +35,8 @@ export class UserInterruptionManagerImplementation
|
|
|
35
35
|
interruptor: string,
|
|
36
36
|
inputDescription: string,
|
|
37
37
|
): Promise<string> {
|
|
38
|
-
return this.#mutex.exclusiveRun(async () => {
|
|
39
|
-
return this.#hooks.runHandlerChain(
|
|
38
|
+
return await this.#mutex.exclusiveRun(async () => {
|
|
39
|
+
return await this.#hooks.runHandlerChain(
|
|
40
40
|
"userInterruptions",
|
|
41
41
|
"requestInput",
|
|
42
42
|
[interruptor, inputDescription],
|
|
@@ -49,8 +49,8 @@ export class UserInterruptionManagerImplementation
|
|
|
49
49
|
interruptor: string,
|
|
50
50
|
inputDescription: string,
|
|
51
51
|
): Promise<string> {
|
|
52
|
-
return this.#mutex.exclusiveRun(async () => {
|
|
53
|
-
return this.#hooks.runHandlerChain(
|
|
52
|
+
return await this.#mutex.exclusiveRun(async () => {
|
|
53
|
+
return await this.#hooks.runHandlerChain(
|
|
54
54
|
"userInterruptions",
|
|
55
55
|
"requestSecretInput",
|
|
56
56
|
[interruptor, inputDescription],
|
|
@@ -62,7 +62,7 @@ export class UserInterruptionManagerImplementation
|
|
|
62
62
|
public async uninterrupted<ReturnT>(
|
|
63
63
|
f: () => ReturnT,
|
|
64
64
|
): Promise<Awaited<ReturnT>> {
|
|
65
|
-
return this.#mutex.exclusiveRun(f);
|
|
65
|
+
return await this.#mutex.exclusiveRun(f);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
|
|
@@ -84,7 +84,7 @@ async function defaultRequestInput(
|
|
|
84
84
|
output: process.stdout,
|
|
85
85
|
});
|
|
86
86
|
|
|
87
|
-
return new Promise<string>((resolve) => {
|
|
87
|
+
return await new Promise<string>((resolve) => {
|
|
88
88
|
rl.question(
|
|
89
89
|
chalk.blue(`[${interruptor}]`) + ` ${inputDescription}: `,
|
|
90
90
|
(answer) => {
|
|
@@ -138,7 +138,7 @@ async function defaultRequestSecretInput(
|
|
|
138
138
|
}
|
|
139
139
|
};
|
|
140
140
|
|
|
141
|
-
return new Promise<string>((resolve) => {
|
|
141
|
+
return await new Promise<string>((resolve) => {
|
|
142
142
|
rl.question(
|
|
143
143
|
chalk.blue(`[${interruptor}]`) + ` ${inputDescription}: `,
|
|
144
144
|
(answer) => {
|
|
@@ -65,7 +65,7 @@ export async function createHardhatRuntimeEnvironment(
|
|
|
65
65
|
unsafeOptions.globalOptionDefinitions = globalOptionDefinitions;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
return HardhatRuntimeEnvironmentImplementation.create(
|
|
68
|
+
return await HardhatRuntimeEnvironmentImplementation.create(
|
|
69
69
|
config,
|
|
70
70
|
userProvidedGlobalOptions,
|
|
71
71
|
resolvedProjectRoot,
|
|
@@ -5,22 +5,22 @@
|
|
|
5
5
|
"description": "A TypeScript Hardhat project using Node Test Runner and Viem",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"devDependencies": {
|
|
8
|
-
"hardhat": "workspace:^3.4.
|
|
8
|
+
"hardhat": "workspace:^3.4.2",
|
|
9
9
|
"@nomicfoundation/hardhat-toolbox-viem": "workspace:^5.0.4",
|
|
10
|
-
"@nomicfoundation/hardhat-ignition": "workspace:^3.1.
|
|
10
|
+
"@nomicfoundation/hardhat-ignition": "workspace:^3.1.3",
|
|
11
11
|
"@types/node": "^22.8.5",
|
|
12
12
|
"forge-std": "foundry-rs/forge-std#v1.9.4",
|
|
13
13
|
"typescript": "~5.8.0",
|
|
14
14
|
"viem": "^2.47.6"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
|
-
"@nomicfoundation/hardhat-ignition-viem": "workspace:^3.1.
|
|
18
|
-
"@nomicfoundation/hardhat-keystore": "workspace:^3.0.
|
|
19
|
-
"@nomicfoundation/hardhat-network-helpers": "workspace:^3.0.
|
|
20
|
-
"@nomicfoundation/hardhat-node-test-runner": "workspace:^3.0.
|
|
21
|
-
"@nomicfoundation/hardhat-viem": "workspace:^3.0.
|
|
22
|
-
"@nomicfoundation/hardhat-viem-assertions": "workspace:^3.0.
|
|
23
|
-
"@nomicfoundation/hardhat-verify": "workspace:^3.0.
|
|
24
|
-
"@nomicfoundation/ignition-core": "workspace:^3.1.
|
|
17
|
+
"@nomicfoundation/hardhat-ignition-viem": "workspace:^3.1.4",
|
|
18
|
+
"@nomicfoundation/hardhat-keystore": "workspace:^3.0.7",
|
|
19
|
+
"@nomicfoundation/hardhat-network-helpers": "workspace:^3.0.6",
|
|
20
|
+
"@nomicfoundation/hardhat-node-test-runner": "workspace:^3.0.14",
|
|
21
|
+
"@nomicfoundation/hardhat-viem": "workspace:^3.0.6",
|
|
22
|
+
"@nomicfoundation/hardhat-viem-assertions": "workspace:^3.0.9",
|
|
23
|
+
"@nomicfoundation/hardhat-verify": "workspace:^3.0.15",
|
|
24
|
+
"@nomicfoundation/ignition-core": "workspace:^3.1.3"
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
"description": "A TypeScript Hardhat project using Mocha and Ethers.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"devDependencies": {
|
|
8
|
-
"hardhat": "workspace:^3.4.
|
|
8
|
+
"hardhat": "workspace:^3.4.2",
|
|
9
9
|
"@nomicfoundation/hardhat-toolbox-mocha-ethers": "workspace:^3.0.4",
|
|
10
|
-
"@nomicfoundation/hardhat-ethers": "workspace:^4.0.
|
|
11
|
-
"@nomicfoundation/hardhat-ignition": "workspace:^3.1.
|
|
10
|
+
"@nomicfoundation/hardhat-ethers": "workspace:^4.0.9",
|
|
11
|
+
"@nomicfoundation/hardhat-ignition": "workspace:^3.1.3",
|
|
12
12
|
"@types/chai": "^5.2.3",
|
|
13
13
|
"@types/chai-as-promised": "^8.0.1",
|
|
14
14
|
"@types/mocha": ">=10.0.10",
|
|
@@ -20,15 +20,15 @@
|
|
|
20
20
|
"typescript": "~5.8.0"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@nomicfoundation/hardhat-ethers": "workspace:^4.0.
|
|
24
|
-
"@nomicfoundation/hardhat-ethers-chai-matchers": "workspace:^3.0.
|
|
25
|
-
"@nomicfoundation/hardhat-ignition": "workspace:^3.1.
|
|
26
|
-
"@nomicfoundation/hardhat-ignition-ethers": "workspace:^3.1.
|
|
27
|
-
"@nomicfoundation/hardhat-keystore": "workspace:^3.0.
|
|
28
|
-
"@nomicfoundation/hardhat-mocha": "workspace:^3.0.
|
|
29
|
-
"@nomicfoundation/hardhat-network-helpers": "workspace:^3.0.
|
|
30
|
-
"@nomicfoundation/hardhat-typechain": "workspace:^3.0.
|
|
31
|
-
"@nomicfoundation/hardhat-verify": "workspace:^3.0.
|
|
32
|
-
"@nomicfoundation/ignition-core": "workspace:^3.1.
|
|
23
|
+
"@nomicfoundation/hardhat-ethers": "workspace:^4.0.9",
|
|
24
|
+
"@nomicfoundation/hardhat-ethers-chai-matchers": "workspace:^3.0.6",
|
|
25
|
+
"@nomicfoundation/hardhat-ignition": "workspace:^3.1.3",
|
|
26
|
+
"@nomicfoundation/hardhat-ignition-ethers": "workspace:^3.1.4",
|
|
27
|
+
"@nomicfoundation/hardhat-keystore": "workspace:^3.0.7",
|
|
28
|
+
"@nomicfoundation/hardhat-mocha": "workspace:^3.0.17",
|
|
29
|
+
"@nomicfoundation/hardhat-network-helpers": "workspace:^3.0.6",
|
|
30
|
+
"@nomicfoundation/hardhat-typechain": "workspace:^3.0.7",
|
|
31
|
+
"@nomicfoundation/hardhat-verify": "workspace:^3.0.15",
|
|
32
|
+
"@nomicfoundation/ignition-core": "workspace:^3.1.3"
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { CoverageManager } from "./types.js";
|
|
2
|
-
import type { HookContext } from "../../../types/hooks.js";
|
|
3
|
-
import type { HardhatRuntimeEnvironment } from "../../../types/hre.js";
|
|
4
|
-
export declare function getCoveragePath(rootPath: string): string;
|
|
5
|
-
export declare function getCoverageManager(hookContextOrHre: HookContext | HardhatRuntimeEnvironment): CoverageManager;
|
|
6
|
-
export declare function setCoverageManager(hre: HardhatRuntimeEnvironment, coverageManager: CoverageManager): void;
|
|
7
|
-
/**
|
|
8
|
-
* The following helpers are kept for backward compatibility with older versions
|
|
9
|
-
* of test runner plugins (hardhat-mocha, hardhat-node-test-runner) that import
|
|
10
|
-
* from "hardhat/internal/coverage".
|
|
11
|
-
*/
|
|
12
|
-
export declare function markTestRunStart(id: string): Promise<void>;
|
|
13
|
-
export declare function markTestWorkerDone(id: string): Promise<void>;
|
|
14
|
-
export declare function markTestRunDone(id: string): Promise<void>;
|
|
15
|
-
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/internal/builtin-plugins/coverage/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAevE,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAExD;AAED,wBAAgB,kBAAkB,CAChC,gBAAgB,EAAE,WAAW,GAAG,yBAAyB,GACxD,eAAe,CAOjB;AAED,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,yBAAyB,EAC9B,eAAe,EAAE,eAAe,GAC/B,IAAI,CAMN;AAED;;;;GAIG;AAEH,wBAAsB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGhE;AAED,wBAAsB,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGlE;AAED,wBAAsB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAG/D"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import { assertHardhatInvariant } from "@nomicfoundation/hardhat-errors";
|
|
3
|
-
import { HardhatRuntimeEnvironmentImplementation } from "../../core/hre.js";
|
|
4
|
-
import { CoverageManagerImplementation } from "./coverage-manager.js";
|
|
5
|
-
import { testRunDone, testRunStart, testWorkerDone, } from "./hook-handlers/test.js";
|
|
6
|
-
export function getCoveragePath(rootPath) {
|
|
7
|
-
return path.join(rootPath, "coverage");
|
|
8
|
-
}
|
|
9
|
-
export function getCoverageManager(hookContextOrHre) {
|
|
10
|
-
assertHardhatInvariant("_coverage" in hookContextOrHre &&
|
|
11
|
-
hookContextOrHre._coverage instanceof CoverageManagerImplementation, "Expected _coverage to be an instance of CoverageManagerImplementation");
|
|
12
|
-
return hookContextOrHre._coverage;
|
|
13
|
-
}
|
|
14
|
-
export function setCoverageManager(hre, coverageManager) {
|
|
15
|
-
assertHardhatInvariant(hre instanceof HardhatRuntimeEnvironmentImplementation, "Expected HRE to be an instance of HardhatRuntimeEnvironmentImplementation");
|
|
16
|
-
hre._coverage = coverageManager;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* The following helpers are kept for backward compatibility with older versions
|
|
20
|
-
* of test runner plugins (hardhat-mocha, hardhat-node-test-runner) that import
|
|
21
|
-
* from "hardhat/internal/coverage".
|
|
22
|
-
*/
|
|
23
|
-
export async function markTestRunStart(id) {
|
|
24
|
-
const { default: hre } = await import("../../../index.js");
|
|
25
|
-
await testRunStart(hre, id);
|
|
26
|
-
}
|
|
27
|
-
export async function markTestWorkerDone(id) {
|
|
28
|
-
const { default: hre } = await import("../../../index.js");
|
|
29
|
-
await testWorkerDone(hre, id);
|
|
30
|
-
}
|
|
31
|
-
export async function markTestRunDone(id) {
|
|
32
|
-
const { default: hre } = await import("../../../index.js");
|
|
33
|
-
await testRunDone(hre, id);
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=helpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../src/internal/builtin-plugins/coverage/helpers.ts"],"names":[],"mappings":"AAIA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAEzE,OAAO,EAAE,uCAAuC,EAAE,MAAM,mBAAmB,CAAC;AAE5E,OAAO,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,EACL,WAAW,EACX,YAAY,EACZ,cAAc,GACf,MAAM,yBAAyB,CAAC;AAEjC,MAAM,UAAU,eAAe,CAAC,QAAgB;IAC9C,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,kBAAkB,CAChC,gBAAyD;IAEzD,sBAAsB,CACpB,WAAW,IAAI,gBAAgB;QAC7B,gBAAgB,CAAC,SAAS,YAAY,6BAA6B,EACrE,uEAAuE,CACxE,CAAC;IACF,OAAO,gBAAgB,CAAC,SAAS,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,kBAAkB,CAChC,GAA8B,EAC9B,eAAgC;IAEhC,sBAAsB,CACpB,GAAG,YAAY,uCAAuC,EACtD,2EAA2E,CAC5E,CAAC;IACF,GAAG,CAAC,SAAS,GAAG,eAAe,CAAC;AAClC,CAAC;AAED;;;;GAIG;AAEH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,EAAU;IAC/C,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,MAAM,MAAM,CAAC,mBAAmB,CAAC,CAAC;IAC3D,MAAM,YAAY,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;AAC9B,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,EAAU;IACjD,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,MAAM,MAAM,CAAC,mBAAmB,CAAC,CAAC;IAC3D,MAAM,cAAc,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;AAChC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,EAAU;IAC9C,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,MAAM,MAAM,CAAC,mBAAmB,CAAC,CAAC;IAC3D,MAAM,WAAW,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import type { CoverageManager } from "./types.js";
|
|
2
|
-
import type { HookContext } from "../../../types/hooks.js";
|
|
3
|
-
import type { HardhatRuntimeEnvironment } from "../../../types/hre.js";
|
|
4
|
-
|
|
5
|
-
import path from "node:path";
|
|
6
|
-
|
|
7
|
-
import { assertHardhatInvariant } from "@nomicfoundation/hardhat-errors";
|
|
8
|
-
|
|
9
|
-
import { HardhatRuntimeEnvironmentImplementation } from "../../core/hre.js";
|
|
10
|
-
|
|
11
|
-
import { CoverageManagerImplementation } from "./coverage-manager.js";
|
|
12
|
-
import {
|
|
13
|
-
testRunDone,
|
|
14
|
-
testRunStart,
|
|
15
|
-
testWorkerDone,
|
|
16
|
-
} from "./hook-handlers/test.js";
|
|
17
|
-
|
|
18
|
-
export function getCoveragePath(rootPath: string): string {
|
|
19
|
-
return path.join(rootPath, "coverage");
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export function getCoverageManager(
|
|
23
|
-
hookContextOrHre: HookContext | HardhatRuntimeEnvironment,
|
|
24
|
-
): CoverageManager {
|
|
25
|
-
assertHardhatInvariant(
|
|
26
|
-
"_coverage" in hookContextOrHre &&
|
|
27
|
-
hookContextOrHre._coverage instanceof CoverageManagerImplementation,
|
|
28
|
-
"Expected _coverage to be an instance of CoverageManagerImplementation",
|
|
29
|
-
);
|
|
30
|
-
return hookContextOrHre._coverage;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export function setCoverageManager(
|
|
34
|
-
hre: HardhatRuntimeEnvironment,
|
|
35
|
-
coverageManager: CoverageManager,
|
|
36
|
-
): void {
|
|
37
|
-
assertHardhatInvariant(
|
|
38
|
-
hre instanceof HardhatRuntimeEnvironmentImplementation,
|
|
39
|
-
"Expected HRE to be an instance of HardhatRuntimeEnvironmentImplementation",
|
|
40
|
-
);
|
|
41
|
-
hre._coverage = coverageManager;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* The following helpers are kept for backward compatibility with older versions
|
|
46
|
-
* of test runner plugins (hardhat-mocha, hardhat-node-test-runner) that import
|
|
47
|
-
* from "hardhat/internal/coverage".
|
|
48
|
-
*/
|
|
49
|
-
|
|
50
|
-
export async function markTestRunStart(id: string): Promise<void> {
|
|
51
|
-
const { default: hre } = await import("../../../index.js");
|
|
52
|
-
await testRunStart(hre, id);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export async function markTestWorkerDone(id: string): Promise<void> {
|
|
56
|
-
const { default: hre } = await import("../../../index.js");
|
|
57
|
-
await testWorkerDone(hre, id);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export async function markTestRunDone(id: string): Promise<void> {
|
|
61
|
-
const { default: hre } = await import("../../../index.js");
|
|
62
|
-
await testRunDone(hre, id);
|
|
63
|
-
}
|