hardhat 3.4.2 → 3.4.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/CHANGELOG.md +37 -0
- package/dist/src/internal/builtin-plugins/console/task-action.js +4 -4
- package/dist/src/internal/builtin-plugins/console/task-action.js.map +1 -1
- package/dist/src/internal/builtin-plugins/coverage/coverage-manager.d.ts +1 -1
- package/dist/src/internal/builtin-plugins/coverage/coverage-manager.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/coverage/coverage-manager.js +16 -16
- package/dist/src/internal/builtin-plugins/coverage/coverage-manager.js.map +1 -1
- package/dist/src/internal/builtin-plugins/coverage/helpers/accessors.js +1 -1
- package/dist/src/internal/builtin-plugins/coverage/helpers/accessors.js.map +1 -1
- package/dist/src/internal/builtin-plugins/coverage/hook-handlers/solidity.js +2 -2
- package/dist/src/internal/builtin-plugins/coverage/hook-handlers/solidity.js.map +1 -1
- package/dist/src/internal/builtin-plugins/coverage/instrumentation.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/coverage/instrumentation.js +7 -2
- package/dist/src/internal/builtin-plugins/coverage/instrumentation.js.map +1 -1
- package/dist/src/internal/builtin-plugins/coverage/process-coverage.js +6 -6
- package/dist/src/internal/builtin-plugins/coverage/process-coverage.js.map +1 -1
- package/dist/src/internal/builtin-plugins/flatten/task-action.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/flatten/task-action.js +4 -4
- package/dist/src/internal/builtin-plugins/flatten/task-action.js.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/function-gas-snapshots.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/function-gas-snapshots.js +10 -10
- package/dist/src/internal/builtin-plugins/gas-analytics/function-gas-snapshots.js.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/gas-analytics-manager.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/gas-analytics-manager.js +12 -9
- package/dist/src/internal/builtin-plugins/gas-analytics/gas-analytics-manager.js.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/helpers/accessors.js +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/helpers/accessors.js.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/helpers/utils.js +2 -2
- package/dist/src/internal/builtin-plugins/gas-analytics/helpers/utils.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 +9 -9
- package/dist/src/internal/builtin-plugins/gas-analytics/snapshot-cheatcodes.js.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/tasks/solidity-test/task-action.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/tasks/solidity-test/task-action.js +5 -5
- package/dist/src/internal/builtin-plugins/gas-analytics/tasks/solidity-test/task-action.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/edr-provider.js +2 -2
- package/dist/src/internal/builtin-plugins/network-manager/edr/edr-provider.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/utils/trace-formatters.d.ts +2 -2
- package/dist/src/internal/builtin-plugins/network-manager/edr/utils/trace-formatters.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/utils/trace-formatters.js +21 -24
- package/dist/src/internal/builtin-plugins/network-manager/edr/utils/trace-formatters.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/utils/trace-output.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/utils/trace-output.js +13 -11
- package/dist/src/internal/builtin-plugins/network-manager/edr/utils/trace-output.js.map +1 -1
- package/dist/src/internal/builtin-plugins/node/artifacts/build-info-watcher.js +2 -2
- package/dist/src/internal/builtin-plugins/node/artifacts/build-info-watcher.js.map +1 -1
- package/dist/src/internal/builtin-plugins/node/helpers.d.ts +2 -1
- package/dist/src/internal/builtin-plugins/node/helpers.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/node/helpers.js +3 -3
- package/dist/src/internal/builtin-plugins/node/helpers.js.map +1 -1
- package/dist/src/internal/builtin-plugins/node/json-rpc/server.js +2 -2
- package/dist/src/internal/builtin-plugins/node/json-rpc/server.js.map +1 -1
- package/dist/src/internal/builtin-plugins/node/task-action.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/node/task-action.js +4 -4
- package/dist/src/internal/builtin-plugins/node/task-action.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 +18 -9
- 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-cost.d.ts +8 -0
- package/dist/src/internal/builtin-plugins/solidity/build-system/compilation-job-cost.d.ts.map +1 -0
- package/dist/src/internal/builtin-plugins/solidity/build-system/compilation-job-cost.js +46 -0
- package/dist/src/internal/builtin-plugins/solidity/build-system/compilation-job-cost.js.map +1 -0
- package/dist/src/internal/builtin-plugins/solidity/build-system/compiler/compiler.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/compiler/compiler.js +9 -3
- package/dist/src/internal/builtin-plugins/solidity/build-system/compiler/compiler.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/compiler/downloader.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/compiler/downloader.js +2 -2
- 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-wrapper.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/compiler/solcjs-wrapper.js +7 -19
- package/dist/src/internal/builtin-plugins/solidity/build-system/compiler/solcjs-wrapper.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/resolver/dependency-resolver.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/resolver/dependency-resolver.js +4 -3
- 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/utils.d.ts +2 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/resolver/utils.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/resolver/utils.js +12 -8
- package/dist/src/internal/builtin-plugins/solidity/build-system/resolver/utils.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/solc-info.d.ts +3 -2
- package/dist/src/internal/builtin-plugins/solidity/build-system/solc-info.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/solc-info.js +15 -6
- package/dist/src/internal/builtin-plugins/solidity/build-system/solc-info.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/config.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/config.js +2 -2
- package/dist/src/internal/builtin-plugins/solidity/config.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/constants.d.ts +1 -0
- package/dist/src/internal/builtin-plugins/solidity/constants.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/constants.js +2 -0
- package/dist/src/internal/builtin-plugins/solidity/constants.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/config.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/config.js +1 -0
- package/dist/src/internal/builtin-plugins/solidity-test/config.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/helpers.d.ts +1 -2
- package/dist/src/internal/builtin-plugins/solidity-test/helpers.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/helpers.js +3 -3
- package/dist/src/internal/builtin-plugins/solidity-test/helpers.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/reporter.d.ts +2 -2
- package/dist/src/internal/builtin-plugins/solidity-test/reporter.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/reporter.js +19 -17
- package/dist/src/internal/builtin-plugins/solidity-test/reporter.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/task-action.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/task-action.js +5 -2
- package/dist/src/internal/builtin-plugins/solidity-test/task-action.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/type-extensions.d.ts +1 -0
- package/dist/src/internal/builtin-plugins/solidity-test/type-extensions.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/test/task-action.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/test/task-action.js +8 -6
- package/dist/src/internal/builtin-plugins/test/task-action.js.map +1 -1
- package/dist/src/internal/cli/banner-manager.js +2 -2
- package/dist/src/internal/cli/banner-manager.js.map +1 -1
- package/dist/src/internal/cli/error-handler.d.ts.map +1 -1
- package/dist/src/internal/cli/error-handler.js +6 -6
- package/dist/src/internal/cli/error-handler.js.map +1 -1
- package/dist/src/internal/cli/help/get-help-string.js +2 -2
- package/dist/src/internal/cli/help/get-help-string.js.map +1 -1
- package/dist/src/internal/cli/init/init.d.ts.map +1 -1
- package/dist/src/internal/cli/init/init.js +40 -28
- package/dist/src/internal/cli/init/init.js.map +1 -1
- package/dist/src/internal/cli/init/package-manager.d.ts.map +1 -1
- package/dist/src/internal/cli/init/package-manager.js +5 -5
- package/dist/src/internal/cli/init/package-manager.js.map +1 -1
- package/dist/src/internal/cli/init/prompt.d.ts.map +1 -1
- package/dist/src/internal/cli/init/prompt.js +3 -3
- package/dist/src/internal/cli/init/prompt.js.map +1 -1
- package/dist/src/internal/cli/main.d.ts.map +1 -1
- package/dist/src/internal/cli/main.js +2 -2
- package/dist/src/internal/cli/main.js.map +1 -1
- package/dist/src/internal/cli/node-version.js +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/analytics/utils.js +2 -2
- package/dist/src/internal/cli/telemetry/analytics/utils.js.map +1 -1
- package/dist/src/internal/cli/telemetry/error-classification/classifier.d.ts +58 -0
- package/dist/src/internal/cli/telemetry/error-classification/classifier.d.ts.map +1 -0
- package/dist/src/internal/cli/telemetry/error-classification/classifier.js +402 -0
- package/dist/src/internal/cli/telemetry/error-classification/classifier.js.map +1 -0
- package/dist/src/internal/cli/telemetry/error-classification/codebase-dependent-helpers.d.ts +67 -0
- package/dist/src/internal/cli/telemetry/error-classification/codebase-dependent-helpers.d.ts.map +1 -0
- package/dist/src/internal/cli/telemetry/error-classification/codebase-dependent-helpers.js +140 -0
- package/dist/src/internal/cli/telemetry/error-classification/codebase-dependent-helpers.js.map +1 -0
- package/dist/src/internal/cli/telemetry/error-classification/filter.d.ts +15 -0
- package/dist/src/internal/cli/telemetry/error-classification/filter.d.ts.map +1 -0
- package/dist/src/internal/cli/telemetry/error-classification/filter.js +114 -0
- package/dist/src/internal/cli/telemetry/error-classification/filter.js.map +1 -0
- package/dist/src/internal/cli/telemetry/error-classification/helpers.d.ts +52 -0
- package/dist/src/internal/cli/telemetry/error-classification/helpers.d.ts.map +1 -0
- package/dist/src/internal/cli/telemetry/error-classification/helpers.js +163 -0
- package/dist/src/internal/cli/telemetry/error-classification/helpers.js.map +1 -0
- package/dist/src/internal/cli/telemetry/error-reporter/global-error-handlers.js +2 -2
- package/dist/src/internal/cli/telemetry/error-reporter/global-error-handlers.js.map +1 -1
- package/dist/src/internal/cli/telemetry/error-reporter/reporter.d.ts.map +1 -1
- package/dist/src/internal/cli/telemetry/error-reporter/reporter.js +14 -0
- package/dist/src/internal/cli/telemetry/error-reporter/reporter.js.map +1 -1
- package/dist/src/internal/cli/telemetry/sentry/anonymizer.d.ts +0 -2
- package/dist/src/internal/cli/telemetry/sentry/anonymizer.d.ts.map +1 -1
- package/dist/src/internal/cli/telemetry/sentry/anonymizer.js +0 -117
- package/dist/src/internal/cli/telemetry/sentry/anonymizer.js.map +1 -1
- package/dist/src/internal/cli/telemetry/sentry/init.d.ts.map +1 -1
- package/dist/src/internal/cli/telemetry/sentry/init.js +14 -9
- package/dist/src/internal/cli/telemetry/sentry/init.js.map +1 -1
- package/dist/src/internal/cli/telemetry/sentry/reporter.d.ts.map +1 -1
- package/dist/src/internal/cli/telemetry/sentry/reporter.js +3 -29
- package/dist/src/internal/cli/telemetry/sentry/reporter.js.map +1 -1
- package/dist/src/internal/cli/telemetry/sentry/subprocess.js +13 -19
- package/dist/src/internal/cli/telemetry/sentry/subprocess.js.map +1 -1
- package/dist/src/internal/cli/telemetry/sentry/transport.js +2 -2
- package/dist/src/internal/cli/telemetry/sentry/transport.js.map +1 -1
- package/dist/src/internal/cli/telemetry/telemetry-permissions.js +2 -2
- package/dist/src/internal/cli/telemetry/telemetry-permissions.js.map +1 -1
- package/dist/src/internal/config-loading.js +2 -2
- package/dist/src/internal/config-loading.js.map +1 -1
- package/dist/src/internal/core/hook-manager.d.ts.map +1 -1
- package/dist/src/internal/core/hook-manager.js +10 -3
- package/dist/src/internal/core/hook-manager.js.map +1 -1
- package/dist/src/internal/core/user-interruptions.js +4 -4
- package/dist/src/internal/core/user-interruptions.js.map +1 -1
- package/dist/src/internal/using-hardhat2-plugin-errors.d.ts.map +1 -1
- package/dist/src/internal/using-hardhat2-plugin-errors.js +2 -2
- package/dist/src/internal/using-hardhat2-plugin-errors.js.map +1 -1
- package/package.json +6 -9
- package/src/internal/builtin-plugins/console/task-action.ts +4 -4
- package/src/internal/builtin-plugins/coverage/coverage-manager.ts +21 -17
- package/src/internal/builtin-plugins/coverage/helpers/accessors.ts +1 -1
- package/src/internal/builtin-plugins/coverage/hook-handlers/solidity.ts +2 -2
- package/src/internal/builtin-plugins/coverage/instrumentation.ts +21 -2
- package/src/internal/builtin-plugins/coverage/process-coverage.ts +6 -6
- package/src/internal/builtin-plugins/flatten/task-action.ts +8 -4
- package/src/internal/builtin-plugins/gas-analytics/function-gas-snapshots.ts +11 -10
- package/src/internal/builtin-plugins/gas-analytics/gas-analytics-manager.ts +13 -9
- package/src/internal/builtin-plugins/gas-analytics/helpers/accessors.ts +1 -1
- package/src/internal/builtin-plugins/gas-analytics/helpers/utils.ts +2 -2
- package/src/internal/builtin-plugins/gas-analytics/snapshot-cheatcodes.ts +10 -9
- package/src/internal/builtin-plugins/gas-analytics/tasks/solidity-test/task-action.ts +11 -5
- package/src/internal/builtin-plugins/network-manager/edr/edr-provider.ts +2 -2
- package/src/internal/builtin-plugins/network-manager/edr/utils/trace-formatters.ts +23 -23
- package/src/internal/builtin-plugins/network-manager/edr/utils/trace-output.ts +14 -11
- package/src/internal/builtin-plugins/node/artifacts/build-info-watcher.ts +2 -2
- package/src/internal/builtin-plugins/node/helpers.ts +7 -4
- package/src/internal/builtin-plugins/node/json-rpc/server.ts +2 -2
- package/src/internal/builtin-plugins/node/task-action.ts +5 -4
- package/src/internal/builtin-plugins/solidity/build-system/build-system.ts +23 -9
- package/src/internal/builtin-plugins/solidity/build-system/compilation-job-cost.ts +61 -0
- package/src/internal/builtin-plugins/solidity/build-system/compiler/compiler.ts +17 -3
- package/src/internal/builtin-plugins/solidity/build-system/compiler/downloader.ts +4 -2
- package/src/internal/builtin-plugins/solidity/build-system/compiler/index.ts +2 -2
- package/src/internal/builtin-plugins/solidity/build-system/compiler/solcjs-wrapper.ts +19 -22
- package/src/internal/builtin-plugins/solidity/build-system/resolver/dependency-resolver.ts +9 -1
- package/src/internal/builtin-plugins/solidity/build-system/resolver/utils.ts +16 -7
- package/src/internal/builtin-plugins/solidity/build-system/solc-info.ts +27 -6
- package/src/internal/builtin-plugins/solidity/config.ts +5 -2
- package/src/internal/builtin-plugins/solidity/constants.ts +3 -0
- package/src/internal/builtin-plugins/solidity-test/config.ts +1 -0
- package/src/internal/builtin-plugins/solidity-test/helpers.ts +3 -4
- package/src/internal/builtin-plugins/solidity-test/reporter.ts +19 -18
- package/src/internal/builtin-plugins/solidity-test/task-action.ts +5 -2
- package/src/internal/builtin-plugins/solidity-test/type-extensions.ts +1 -0
- package/src/internal/builtin-plugins/test/task-action.ts +12 -6
- package/src/internal/cli/banner-manager.ts +2 -2
- package/src/internal/cli/error-handler.ts +10 -6
- package/src/internal/cli/help/get-help-string.ts +2 -2
- package/src/internal/cli/init/init.ts +53 -28
- package/src/internal/cli/init/package-manager.ts +8 -6
- package/src/internal/cli/init/prompt.ts +4 -3
- package/src/internal/cli/main.ts +4 -3
- package/src/internal/cli/node-version.ts +1 -1
- package/src/internal/cli/telemetry/analytics/analytics.ts +2 -2
- package/src/internal/cli/telemetry/analytics/utils.ts +2 -2
- package/src/internal/cli/telemetry/error-classification/classifier.ts +636 -0
- package/src/internal/cli/telemetry/error-classification/codebase-dependent-helpers.ts +200 -0
- package/src/internal/cli/telemetry/error-classification/filter.ts +140 -0
- package/src/internal/cli/telemetry/error-classification/helpers.ts +235 -0
- package/src/internal/cli/telemetry/error-reporter/global-error-handlers.ts +2 -2
- package/src/internal/cli/telemetry/error-reporter/reporter.ts +21 -0
- package/src/internal/cli/telemetry/sentry/anonymizer.ts +0 -168
- package/src/internal/cli/telemetry/sentry/init.ts +42 -33
- package/src/internal/cli/telemetry/sentry/reporter.ts +4 -47
- package/src/internal/cli/telemetry/sentry/subprocess.ts +13 -21
- package/src/internal/cli/telemetry/sentry/transport.ts +2 -2
- package/src/internal/cli/telemetry/telemetry-permissions.ts +2 -2
- package/src/internal/config-loading.ts +2 -2
- package/src/internal/core/hook-manager.ts +21 -3
- package/src/internal/core/user-interruptions.ts +4 -4
- package/src/internal/using-hardhat2-plugin-errors.ts +2 -2
- package/templates/hardhat-3/01-node-test-runner-viem/package.json +7 -7
- package/templates/hardhat-3/02-mocha-ethers/package.json +12 -12
- package/templates/hardhat-3/03-minimal/package.json +1 -1
- package/dist/src/internal/utils/colorizer.d.ts +0 -10
- package/dist/src/internal/utils/colorizer.d.ts.map +0 -1
- package/dist/src/internal/utils/colorizer.js +0 -2
- package/dist/src/internal/utils/colorizer.js.map +0 -1
- package/src/internal/utils/colorizer.ts +0 -9
|
@@ -153,174 +153,6 @@ export class Anonymizer {
|
|
|
153
153
|
);
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
public filterOutEventsWithExceptionsNotRaisedByHardhat(
|
|
157
|
-
envelope: Envelope,
|
|
158
|
-
): Envelope {
|
|
159
|
-
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions --
|
|
160
|
-
We are just filtering events in place, not changing any type */
|
|
161
|
-
envelope[1] = envelope[1].filter((item) => {
|
|
162
|
-
if (item[0].type !== "event") {
|
|
163
|
-
return true;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
167
|
-
-- We know that the item is an event item */
|
|
168
|
-
const eventItem = item as EventItem;
|
|
169
|
-
|
|
170
|
-
return this.raisedByHardhat(eventItem[1]);
|
|
171
|
-
}) as any;
|
|
172
|
-
|
|
173
|
-
return envelope;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
public raisedByHardhat(event: Event): boolean {
|
|
177
|
-
const exceptions = event?.exception?.values;
|
|
178
|
-
|
|
179
|
-
if (exceptions === undefined) {
|
|
180
|
-
// if we can't prove that the exception doesn't come from hardhat,
|
|
181
|
-
// we err on the side of reporting the error
|
|
182
|
-
return true;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
const originalException = exceptions[exceptions.length - 1];
|
|
186
|
-
|
|
187
|
-
if (!this.#isErrorMessageAllowed(originalException)) {
|
|
188
|
-
return false;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
const frames = originalException?.stacktrace?.frames;
|
|
192
|
-
|
|
193
|
-
if (frames === undefined) {
|
|
194
|
-
return true;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
for (const frame of frames.slice().reverse()) {
|
|
198
|
-
if (frame.filename === undefined) {
|
|
199
|
-
continue;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
// We don't report errors from the Hardhat.config file
|
|
203
|
-
if (
|
|
204
|
-
this.#configPath !== undefined &&
|
|
205
|
-
this.#configPath.includes(frame.filename)
|
|
206
|
-
) {
|
|
207
|
-
return false;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
if (this.#isPackageFile(frame.filename)) {
|
|
211
|
-
// We don't report errors from the ignored package list e.g. `ethers`
|
|
212
|
-
// even when buried as a subpackage of a hardhat package
|
|
213
|
-
if (this.#errorRaisedByPackageToIgnore(frame.filename)) {
|
|
214
|
-
return false;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
// We report errors from Hardhat packages, we exclude
|
|
218
|
-
// those from non-hardhat packages
|
|
219
|
-
return this.#isHardhatFile(frame.filename);
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
// Error originating not in packages, but in the user project
|
|
223
|
-
// should be filtered.
|
|
224
|
-
if (this.#isUserProjectFile(frame.filename)) {
|
|
225
|
-
return false;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
// Otherwise look at the next frame up
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
// if we didn't find any hardhat frame, we don't report the error
|
|
232
|
-
return false;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
#isErrorMessageAllowed(originalException: Exception): boolean {
|
|
236
|
-
const exceptionType = originalException.type;
|
|
237
|
-
const exceptionMessage = originalException.value;
|
|
238
|
-
|
|
239
|
-
// Without an exception message, we can't filter so allow it
|
|
240
|
-
if (exceptionMessage === undefined) {
|
|
241
|
-
return true;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
// Filter out required not defined in ES Modules errors
|
|
245
|
-
if (
|
|
246
|
-
exceptionType === "ReferenceError" &&
|
|
247
|
-
exceptionMessage ===
|
|
248
|
-
"require is not defined in ES module scope, you can use import instead"
|
|
249
|
-
) {
|
|
250
|
-
return false;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
// Filter out cannot find package when importing errors
|
|
254
|
-
if (
|
|
255
|
-
exceptionType === "Error" &&
|
|
256
|
-
/^Cannot find package '([^']+)' imported from .+$/.test(exceptionMessage)
|
|
257
|
-
) {
|
|
258
|
-
return false;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
// Filter out cannot find module errors
|
|
262
|
-
if (
|
|
263
|
-
exceptionType === "Error" &&
|
|
264
|
-
/^Cannot find module '([^']+)'/.test(exceptionMessage)
|
|
265
|
-
) {
|
|
266
|
-
return false;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
// Filter out "require() cannot be sued on an ESM graph"
|
|
270
|
-
if (
|
|
271
|
-
exceptionType === "Error" &&
|
|
272
|
-
exceptionMessage.startsWith(
|
|
273
|
-
"require() cannot be used on an ESM graph with top-level await. Use import() instead.",
|
|
274
|
-
)
|
|
275
|
-
) {
|
|
276
|
-
return false;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
return true;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
#errorRaisedByPackageToIgnore(filename: string): boolean {
|
|
283
|
-
// List of external packages that we don't want to report errors from
|
|
284
|
-
const pkgsToIgnore: string[] = [
|
|
285
|
-
path.join("node_modules", "@ethersproject"),
|
|
286
|
-
];
|
|
287
|
-
|
|
288
|
-
// Match path separators both for Windows and Unix
|
|
289
|
-
const pkgs = filename.match(/node_modules[\/\\][^\/\\]+/g);
|
|
290
|
-
|
|
291
|
-
if (pkgs === null) {
|
|
292
|
-
return false;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
const errorSourcePkg = pkgs[pkgs.length - 1];
|
|
296
|
-
|
|
297
|
-
return pkgsToIgnore.includes(errorSourcePkg);
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
#isHardhatFile(filename: string): boolean {
|
|
301
|
-
const nomicFoundationPath = path.join("node_modules", "@nomicfoundation");
|
|
302
|
-
const ignoredOrgPath = path.join("node_modules", "@ignored");
|
|
303
|
-
const hardhatPath = path.join("node_modules", "hardhat");
|
|
304
|
-
|
|
305
|
-
filename = filename.toLowerCase();
|
|
306
|
-
|
|
307
|
-
return (
|
|
308
|
-
filename.includes(nomicFoundationPath) ||
|
|
309
|
-
filename.includes(ignoredOrgPath) ||
|
|
310
|
-
filename.includes(hardhatPath)
|
|
311
|
-
);
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
#isPackageFile(filename: string): boolean {
|
|
315
|
-
return filename.includes("node_modules");
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
#isUserProjectFile(filename: string): boolean {
|
|
319
|
-
const anonymizedUserPath = anonymizeUserPaths(filename);
|
|
320
|
-
|
|
321
|
-
return anonymizedUserPath === ANONYMIZED_PATH;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
156
|
async #anonymizeExceptions(exceptions: Exception[]): Promise<Exception[]> {
|
|
325
157
|
const anonymizedExceptions = await Promise.all(
|
|
326
158
|
exceptions.map((exception) => this.#anonymizeException(exception)),
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
import type { ServerRuntimeClientOptions, Transport } from "@sentry/core";
|
|
4
4
|
|
|
5
5
|
import os from "node:os";
|
|
6
|
-
import path from "node:path";
|
|
7
6
|
|
|
7
|
+
import { getRuntimeInfo } from "@nomicfoundation/hardhat-utils/runtime";
|
|
8
8
|
import {
|
|
9
|
+
applySdkMetadata,
|
|
9
10
|
createStackParser,
|
|
10
11
|
functionToStringIntegration,
|
|
11
12
|
initAndBind,
|
|
@@ -61,40 +62,48 @@ interface GlobalCustomSentryReporterOptions {
|
|
|
61
62
|
* errors integration.
|
|
62
63
|
*/
|
|
63
64
|
export function init(options: GlobalCustomSentryReporterOptions): void {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
65
|
+
const runtimeInfo = getRuntimeInfo();
|
|
66
|
+
const runtime = {
|
|
67
|
+
name: runtimeInfo?.runtime ?? "unknown",
|
|
68
|
+
version: runtimeInfo?.version ?? "unknown",
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const sentryOptions: ServerRuntimeClientOptions = {
|
|
72
|
+
dsn: options.dsn,
|
|
73
|
+
environment: options.environment,
|
|
74
|
+
serverName: GENERIC_SERVER_NAME,
|
|
75
|
+
release: options.release,
|
|
76
|
+
runtime,
|
|
77
|
+
initialScope: {
|
|
78
|
+
contexts: {
|
|
79
|
+
os: {
|
|
80
|
+
name: os.type(),
|
|
81
|
+
build: os.release(),
|
|
82
|
+
version: os.version(),
|
|
83
|
+
},
|
|
84
|
+
device: {
|
|
85
|
+
arch: os.arch(),
|
|
85
86
|
},
|
|
87
|
+
runtime,
|
|
86
88
|
},
|
|
87
|
-
transport: () => options.transport,
|
|
88
|
-
integrations: [
|
|
89
|
-
functionToStringIntegration(),
|
|
90
|
-
contextLinesIntegration(),
|
|
91
|
-
linkedErrorsIntegration(),
|
|
92
|
-
nodeContextIntegration(),
|
|
93
|
-
],
|
|
94
|
-
platform: process.platform,
|
|
95
|
-
stackParser: stackParserFromStackParserOptions(
|
|
96
|
-
createStackParser(nodeStackLineParser(createGetModuleFromFilename())),
|
|
97
|
-
),
|
|
98
89
|
},
|
|
90
|
+
transport: () => options.transport,
|
|
91
|
+
integrations: [
|
|
92
|
+
functionToStringIntegration(),
|
|
93
|
+
contextLinesIntegration(),
|
|
94
|
+
linkedErrorsIntegration(),
|
|
95
|
+
nodeContextIntegration(),
|
|
96
|
+
],
|
|
97
|
+
platform: "javascript",
|
|
98
|
+
stackParser: stackParserFromStackParserOptions(
|
|
99
|
+
createStackParser(nodeStackLineParser(createGetModuleFromFilename())),
|
|
100
|
+
),
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
applySdkMetadata(sentryOptions, "core");
|
|
104
|
+
|
|
105
|
+
initAndBind<ServerRuntimeClient, ServerRuntimeClientOptions>(
|
|
106
|
+
ServerRuntimeClient,
|
|
107
|
+
sentryOptions,
|
|
99
108
|
);
|
|
100
109
|
}
|
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
HardhatPluginError,
|
|
4
|
-
} from "@nomicfoundation/hardhat-errors";
|
|
5
|
-
import debug from "debug";
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
ProviderError,
|
|
9
|
-
UnknownError,
|
|
10
|
-
} from "../../../builtin-plugins/network-manager/provider-errors.js";
|
|
11
|
-
import { UsingHardhat2PluginError } from "../../../using-hardhat2-plugin-errors.js";
|
|
1
|
+
import { createDebug } from "@nomicfoundation/hardhat-utils/debug";
|
|
2
|
+
|
|
12
3
|
import { getHardhatVersion } from "../../../utils/package.js";
|
|
13
4
|
import { isTelemetryAllowed } from "../telemetry-permissions.js";
|
|
14
5
|
|
|
15
|
-
const log =
|
|
6
|
+
const log = createDebug("hardhat:core:cli:telemetry:sentry:reporter");
|
|
16
7
|
|
|
17
8
|
// export const SENTRY_DSN =
|
|
18
9
|
// "https://d578a176729662a28e7a8da268d36912@o385026.ingest.us.sentry.io/4507685793103872"; // DEV
|
|
@@ -110,11 +101,9 @@ class Reporter {
|
|
|
110
101
|
error: Error,
|
|
111
102
|
hint?: { unhandled?: boolean; mechanismType?: string },
|
|
112
103
|
): Promise<boolean> {
|
|
113
|
-
if (!
|
|
114
|
-
log("Error not send: this type of error should not be reported");
|
|
104
|
+
if (!this.#telemetryEnabled) {
|
|
115
105
|
return false;
|
|
116
106
|
}
|
|
117
|
-
|
|
118
107
|
const { captureException, flush } = await import("@sentry/core");
|
|
119
108
|
|
|
120
109
|
log("Capturing exception");
|
|
@@ -134,36 +123,4 @@ class Reporter {
|
|
|
134
123
|
|
|
135
124
|
return true;
|
|
136
125
|
}
|
|
137
|
-
|
|
138
|
-
async #shouldBeReported(error: Error): Promise<boolean> {
|
|
139
|
-
if (!this.#telemetryEnabled) {
|
|
140
|
-
return false;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
if (
|
|
144
|
-
HardhatError.isHardhatError(error) &&
|
|
145
|
-
!error.descriptor.shouldBeReported
|
|
146
|
-
) {
|
|
147
|
-
return false;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
if (error instanceof UsingHardhat2PluginError) {
|
|
151
|
-
return false;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
if (HardhatPluginError.isHardhatPluginError(error)) {
|
|
155
|
-
// Don't log errors from third-party plugins
|
|
156
|
-
return false;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
if (
|
|
160
|
-
ProviderError.isProviderError(error) &&
|
|
161
|
-
error.code !== UnknownError.CODE
|
|
162
|
-
) {
|
|
163
|
-
// We don't report known network related errors
|
|
164
|
-
return false;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
return true;
|
|
168
|
-
}
|
|
169
126
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable no-restricted-syntax -- Allow top-level await */
|
|
2
|
+
import { createDebug } from "@nomicfoundation/hardhat-utils/debug";
|
|
2
3
|
import { captureMessage, close, captureException } from "@sentry/core";
|
|
3
|
-
import debug from "debug";
|
|
4
4
|
|
|
5
5
|
import { Anonymizer } from "./anonymizer.js";
|
|
6
6
|
import { init } from "./init.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
sendEnvelopeToSentryBackend,
|
|
10
10
|
} from "./transport.js";
|
|
11
11
|
|
|
12
|
-
const log =
|
|
12
|
+
const log = createDebug("hardhat:core:cli:telemetry:sentry:subprocess");
|
|
13
13
|
|
|
14
14
|
const serializedEnvelope = process.argv[2];
|
|
15
15
|
const configPath = process.argv[3] !== "" ? process.argv[3] : undefined;
|
|
@@ -38,30 +38,22 @@ const envelope = JSON.parse(serializedEnvelope);
|
|
|
38
38
|
|
|
39
39
|
const anonymizer = new Anonymizer(configPath);
|
|
40
40
|
|
|
41
|
-
const
|
|
42
|
-
anonymizer.filterOutEventsWithExceptionsNotRaisedByHardhat(envelope);
|
|
41
|
+
const anonymizeResult = await anonymizer.anonymizeEventsFromEnvelope(envelope);
|
|
43
42
|
|
|
44
|
-
if (
|
|
45
|
-
log("
|
|
43
|
+
if (!anonymizeResult.success) {
|
|
44
|
+
log("Failed to anonymize envelope", anonymizeResult.error);
|
|
45
|
+
captureMessage(anonymizeResult.error);
|
|
46
46
|
} else {
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
try {
|
|
48
|
+
log("Sending received envelope to Sentry");
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
log("Failed to anonymize envelope", anonymizeResult.error);
|
|
52
|
-
captureMessage(anonymizeResult.error);
|
|
53
|
-
} else {
|
|
54
|
-
try {
|
|
55
|
-
log("Sending received envelope to Sentry");
|
|
50
|
+
await sendEnvelopeToSentryBackend(dsn, anonymizeResult.envelope);
|
|
56
51
|
|
|
57
|
-
|
|
52
|
+
log("Successfully sent received envelope to Sentry");
|
|
53
|
+
} catch (e) {
|
|
54
|
+
log("Failed to send received envelope to Sentry", e);
|
|
58
55
|
|
|
59
|
-
|
|
60
|
-
} catch (e) {
|
|
61
|
-
log("Failed to send received envelope to Sentry", e);
|
|
62
|
-
|
|
63
|
-
captureException(e);
|
|
64
|
-
}
|
|
56
|
+
captureException(e);
|
|
65
57
|
}
|
|
66
58
|
}
|
|
67
59
|
|
|
@@ -7,10 +7,10 @@ import type {
|
|
|
7
7
|
import { spawn } from "node:child_process";
|
|
8
8
|
import { fileURLToPath } from "node:url";
|
|
9
9
|
|
|
10
|
+
import { createDebug } from "@nomicfoundation/hardhat-utils/debug";
|
|
10
11
|
import { createTransport, serializeEnvelope } from "@sentry/core";
|
|
11
|
-
import debug from "debug";
|
|
12
12
|
|
|
13
|
-
const log =
|
|
13
|
+
const log = createDebug("hardhat:core:cli:telemetry:sentry:transport");
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Creates a detached process transport.
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
|
|
3
3
|
import { isCi } from "@nomicfoundation/hardhat-utils/ci";
|
|
4
|
+
import { createDebug } from "@nomicfoundation/hardhat-utils/debug";
|
|
4
5
|
import {
|
|
5
6
|
exists,
|
|
6
7
|
readJsonFile,
|
|
7
8
|
writeJsonFile,
|
|
8
9
|
} from "@nomicfoundation/hardhat-utils/fs";
|
|
9
10
|
import { getTelemetryDir } from "@nomicfoundation/hardhat-utils/global-dir";
|
|
10
|
-
import debug from "debug";
|
|
11
11
|
|
|
12
12
|
import { sendTelemetryConfigAnalytics } from "./analytics/analytics.js";
|
|
13
13
|
|
|
14
|
-
const log =
|
|
14
|
+
const log = createDebug("hardhat:core:cli:telemetry:permissions");
|
|
15
15
|
|
|
16
16
|
interface TelemetryConfig {
|
|
17
17
|
enabled: boolean;
|
|
@@ -4,13 +4,13 @@ import path from "node:path";
|
|
|
4
4
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
5
5
|
|
|
6
6
|
import { HardhatError } from "@nomicfoundation/hardhat-errors";
|
|
7
|
+
import { createDebug } from "@nomicfoundation/hardhat-utils/debug";
|
|
7
8
|
import { ensureError } from "@nomicfoundation/hardhat-utils/error";
|
|
8
9
|
import { exists, findUp, getRealPath } from "@nomicfoundation/hardhat-utils/fs";
|
|
9
10
|
import { isObject } from "@nomicfoundation/hardhat-utils/lang";
|
|
10
11
|
import { resolveFromRoot } from "@nomicfoundation/hardhat-utils/path";
|
|
11
|
-
import debug from "debug";
|
|
12
12
|
|
|
13
|
-
const log =
|
|
13
|
+
const log = createDebug("hardhat:core:config-loading");
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* This cache stores any `.ts` files compiled using `tsImport`.
|
|
@@ -12,7 +12,10 @@ import type {
|
|
|
12
12
|
import type { HardhatPlugin } from "../../types/plugins.js";
|
|
13
13
|
import type { LastParameter, Return } from "../../types/utils.js";
|
|
14
14
|
|
|
15
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
assertHardhatInvariant,
|
|
17
|
+
HardhatError,
|
|
18
|
+
} from "@nomicfoundation/hardhat-errors";
|
|
16
19
|
import { ensureError } from "@nomicfoundation/hardhat-utils/error";
|
|
17
20
|
import { AsyncMutex } from "@nomicfoundation/hardhat-utils/synchronization";
|
|
18
21
|
|
|
@@ -451,7 +454,11 @@ export class HookManagerImplementation implements HookManager {
|
|
|
451
454
|
|
|
452
455
|
await detectPluginNpmDependencyProblems(this.#projectRoot, plugin, error);
|
|
453
456
|
|
|
454
|
-
throw
|
|
457
|
+
throw new HardhatError(
|
|
458
|
+
HardhatError.ERRORS.CORE.HOOKS.FAILED_TO_LOAD_HOOK_HANDLER_FACTORY,
|
|
459
|
+
{ pluginId: plugin.id, hookCategoryName },
|
|
460
|
+
error,
|
|
461
|
+
);
|
|
455
462
|
}
|
|
456
463
|
|
|
457
464
|
assertHardhatInvariant(
|
|
@@ -459,7 +466,18 @@ export class HookManagerImplementation implements HookManager {
|
|
|
459
466
|
`Plugin ${plugin.id} doesn't export a hook factory for category ${hookCategoryName}`,
|
|
460
467
|
);
|
|
461
468
|
|
|
462
|
-
|
|
469
|
+
let hookCategory: Partial<HardhatHooks[HookCategoryNameT]>;
|
|
470
|
+
try {
|
|
471
|
+
hookCategory = await factory();
|
|
472
|
+
} catch (error) {
|
|
473
|
+
ensureError(error);
|
|
474
|
+
|
|
475
|
+
throw new HardhatError(
|
|
476
|
+
HardhatError.ERRORS.CORE.HOOKS.FAILED_TO_RUN_HOOK_HANDLER_FACTORY,
|
|
477
|
+
{ pluginId: plugin.id, hookCategoryName },
|
|
478
|
+
error,
|
|
479
|
+
);
|
|
480
|
+
}
|
|
463
481
|
|
|
464
482
|
assertHardhatInvariant(
|
|
465
483
|
hookCategory !== null && typeof hookCategory === "object",
|
|
@@ -2,10 +2,10 @@ import type { HookContext, HookManager } from "../../types/hooks.js";
|
|
|
2
2
|
import type { UserInterruptionManager } from "../../types/user-interruptions.js";
|
|
3
3
|
|
|
4
4
|
import { createInterface } from "node:readline";
|
|
5
|
+
import { styleText } from "node:util";
|
|
5
6
|
|
|
6
7
|
import { assertHardhatInvariant } from "@nomicfoundation/hardhat-errors";
|
|
7
8
|
import { AsyncMutex } from "@nomicfoundation/hardhat-utils/synchronization";
|
|
8
|
-
import chalk from "chalk";
|
|
9
9
|
|
|
10
10
|
export class UserInterruptionManagerImplementation
|
|
11
11
|
implements UserInterruptionManager
|
|
@@ -71,7 +71,7 @@ async function defaultDisplayMessage(
|
|
|
71
71
|
interruptor: string,
|
|
72
72
|
message: string,
|
|
73
73
|
) {
|
|
74
|
-
console.log(
|
|
74
|
+
console.log(styleText("blue", `[${interruptor}]`) + ` ${message}`);
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
async function defaultRequestInput(
|
|
@@ -86,7 +86,7 @@ async function defaultRequestInput(
|
|
|
86
86
|
|
|
87
87
|
return await new Promise<string>((resolve) => {
|
|
88
88
|
rl.question(
|
|
89
|
-
|
|
89
|
+
styleText("blue", `[${interruptor}]`) + ` ${inputDescription}: `,
|
|
90
90
|
(answer) => {
|
|
91
91
|
resolve(answer);
|
|
92
92
|
rl.close();
|
|
@@ -140,7 +140,7 @@ async function defaultRequestSecretInput(
|
|
|
140
140
|
|
|
141
141
|
return await new Promise<string>((resolve) => {
|
|
142
142
|
rl.question(
|
|
143
|
-
|
|
143
|
+
styleText("blue", `[${interruptor}]`) + ` ${inputDescription}: `,
|
|
144
144
|
(answer) => {
|
|
145
145
|
resolve(answer);
|
|
146
146
|
rl.close();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { fileURLToPath } from "node:url";
|
|
2
|
+
import { styleText } from "node:util";
|
|
2
3
|
|
|
3
4
|
import { CustomError } from "@nomicfoundation/hardhat-utils/error";
|
|
4
5
|
import { shortenPath } from "@nomicfoundation/hardhat-utils/path";
|
|
5
|
-
import chalk from "chalk";
|
|
6
6
|
|
|
7
7
|
export class UsingHardhat2PluginError extends CustomError {
|
|
8
8
|
public readonly callerRelativePath: string | undefined;
|
|
@@ -13,7 +13,7 @@ export class UsingHardhat2PluginError extends CustomError {
|
|
|
13
13
|
if (callerPath !== undefined) {
|
|
14
14
|
message = `You are trying to use a Hardhat 2 plugin in a Hardhat 3 project.
|
|
15
15
|
|
|
16
|
-
This file is part of a Hardhat 2 plugin calling an API that was removed in Hardhat 3: ${
|
|
16
|
+
This file is part of a Hardhat 2 plugin calling an API that was removed in Hardhat 3: ${styleText("bold", callerPath)}
|
|
17
17
|
|
|
18
18
|
Please read https://hardhat.org/migrate-from-hardhat2 to learn how to migrate your project to Hardhat 3.
|
|
19
19
|
`;
|
|
@@ -5,9 +5,9 @@
|
|
|
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.4",
|
|
9
9
|
"@nomicfoundation/hardhat-toolbox-viem": "workspace:^5.0.4",
|
|
10
|
-
"@nomicfoundation/hardhat-ignition": "workspace:^3.1.
|
|
10
|
+
"@nomicfoundation/hardhat-ignition": "workspace:^3.1.4",
|
|
11
11
|
"@types/node": "^22.8.5",
|
|
12
12
|
"forge-std": "foundry-rs/forge-std#v1.9.4",
|
|
13
13
|
"typescript": "~5.8.0",
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"@nomicfoundation/hardhat-ignition-viem": "workspace:^3.1.4",
|
|
18
|
-
"@nomicfoundation/hardhat-keystore": "workspace:^3.0.
|
|
19
|
-
"@nomicfoundation/hardhat-network-helpers": "workspace:^3.0.
|
|
18
|
+
"@nomicfoundation/hardhat-keystore": "workspace:^3.0.8",
|
|
19
|
+
"@nomicfoundation/hardhat-network-helpers": "workspace:^3.0.7",
|
|
20
20
|
"@nomicfoundation/hardhat-node-test-runner": "workspace:^3.0.14",
|
|
21
21
|
"@nomicfoundation/hardhat-viem": "workspace:^3.0.6",
|
|
22
|
-
"@nomicfoundation/hardhat-viem-assertions": "workspace:^3.0.
|
|
23
|
-
"@nomicfoundation/hardhat-verify": "workspace:^3.0.
|
|
24
|
-
"@nomicfoundation/ignition-core": "workspace:^3.1.
|
|
22
|
+
"@nomicfoundation/hardhat-viem-assertions": "workspace:^3.0.10",
|
|
23
|
+
"@nomicfoundation/hardhat-verify": "workspace:^3.0.16",
|
|
24
|
+
"@nomicfoundation/ignition-core": "workspace:^3.1.4"
|
|
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.4",
|
|
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.10",
|
|
11
|
+
"@nomicfoundation/hardhat-ignition": "workspace:^3.1.4",
|
|
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.
|
|
23
|
+
"@nomicfoundation/hardhat-ethers": "workspace:^4.0.10",
|
|
24
|
+
"@nomicfoundation/hardhat-ethers-chai-matchers": "workspace:^3.0.7",
|
|
25
|
+
"@nomicfoundation/hardhat-ignition": "workspace:^3.1.4",
|
|
26
26
|
"@nomicfoundation/hardhat-ignition-ethers": "workspace:^3.1.4",
|
|
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.
|
|
27
|
+
"@nomicfoundation/hardhat-keystore": "workspace:^3.0.8",
|
|
28
|
+
"@nomicfoundation/hardhat-mocha": "workspace:^3.0.18",
|
|
29
|
+
"@nomicfoundation/hardhat-network-helpers": "workspace:^3.0.7",
|
|
30
|
+
"@nomicfoundation/hardhat-typechain": "workspace:^3.0.8",
|
|
31
|
+
"@nomicfoundation/hardhat-verify": "workspace:^3.0.16",
|
|
32
|
+
"@nomicfoundation/ignition-core": "workspace:^3.1.4"
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export interface Colorizer {
|
|
2
|
-
blue: (text: string) => string;
|
|
3
|
-
green: (text: string) => string;
|
|
4
|
-
red: (text: string) => string;
|
|
5
|
-
cyan: (text: string) => string;
|
|
6
|
-
yellow: (text: string) => string;
|
|
7
|
-
grey: (text: string) => string;
|
|
8
|
-
dim: (text: string) => string;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=colorizer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"colorizer.d.ts","sourceRoot":"","sources":["../../../../src/internal/utils/colorizer.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/B,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAChC,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC9B,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/B,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACjC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/B,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CAC/B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"colorizer.js","sourceRoot":"","sources":["../../../../src/internal/utils/colorizer.ts"],"names":[],"mappings":""}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export interface Colorizer {
|
|
2
|
-
blue: (text: string) => string;
|
|
3
|
-
green: (text: string) => string;
|
|
4
|
-
red: (text: string) => string;
|
|
5
|
-
cyan: (text: string) => string;
|
|
6
|
-
yellow: (text: string) => string;
|
|
7
|
-
grey: (text: string) => string;
|
|
8
|
-
dim: (text: string) => string;
|
|
9
|
-
}
|