hardhat 3.9.0 → 3.9.1
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 +20 -0
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/config.js +6 -5
- package/dist/src/config.js.map +1 -1
- package/dist/src/hhu.d.ts +3 -0
- package/dist/src/hhu.d.ts.map +1 -0
- package/dist/src/hhu.js +14 -0
- package/dist/src/hhu.js.map +1 -0
- 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 +4 -1
- package/dist/src/internal/builtin-plugins/artifacts/hook-handlers/hre.js.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/function-gas-snapshots.d.ts +2 -2
- 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 +21 -23
- package/dist/src/internal/builtin-plugins/gas-analytics/function-gas-snapshots.js.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/snapshot-cheatcodes.d.ts +2 -2
- 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 +21 -27
- 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 +3 -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 +18 -10
- package/dist/src/internal/builtin-plugins/gas-analytics/tasks/solidity-test/task-action.js.map +1 -1
- package/dist/src/internal/builtin-plugins/hhu/index.d.ts +4 -0
- package/dist/src/internal/builtin-plugins/hhu/index.d.ts.map +1 -0
- package/dist/src/internal/builtin-plugins/hhu/index.js +9 -0
- package/dist/src/internal/builtin-plugins/hhu/index.js.map +1 -0
- package/dist/src/internal/builtin-plugins/hhu/tasks/constants/index.d.ts +3 -0
- package/dist/src/internal/builtin-plugins/hhu/tasks/constants/index.d.ts.map +1 -0
- package/dist/src/internal/builtin-plugins/hhu/tasks/constants/index.js +8 -0
- package/dist/src/internal/builtin-plugins/hhu/tasks/constants/index.js.map +1 -0
- package/dist/src/internal/builtin-plugins/hhu/tasks/constants/zero-address.d.ts +4 -0
- package/dist/src/internal/builtin-plugins/hhu/tasks/constants/zero-address.d.ts.map +1 -0
- package/dist/src/internal/builtin-plugins/hhu/tasks/constants/zero-address.js +6 -0
- package/dist/src/internal/builtin-plugins/hhu/tasks/constants/zero-address.js.map +1 -0
- package/dist/src/internal/builtin-plugins/hhu/tasks/convert/index.d.ts +3 -0
- package/dist/src/internal/builtin-plugins/hhu/tasks/convert/index.d.ts.map +1 -0
- package/dist/src/internal/builtin-plugins/hhu/tasks/convert/index.js +27 -0
- package/dist/src/internal/builtin-plugins/hhu/tasks/convert/index.js.map +1 -0
- package/dist/src/internal/builtin-plugins/hhu/tasks/convert/pad.d.ts +10 -0
- package/dist/src/internal/builtin-plugins/hhu/tasks/convert/pad.d.ts.map +1 -0
- package/dist/src/internal/builtin-plugins/hhu/tasks/convert/pad.js +31 -0
- package/dist/src/internal/builtin-plugins/hhu/tasks/convert/pad.js.map +1 -0
- package/dist/src/internal/builtin-plugins/hhu/tasks/fetch/block-number.d.ts +4 -0
- package/dist/src/internal/builtin-plugins/hhu/tasks/fetch/block-number.d.ts.map +1 -0
- package/dist/src/internal/builtin-plugins/hhu/tasks/fetch/block-number.js +17 -0
- package/dist/src/internal/builtin-plugins/hhu/tasks/fetch/block-number.js.map +1 -0
- package/dist/src/internal/builtin-plugins/hhu/tasks/fetch/index.d.ts +3 -0
- package/dist/src/internal/builtin-plugins/hhu/tasks/fetch/index.d.ts.map +1 -0
- package/dist/src/internal/builtin-plugins/hhu/tasks/fetch/index.js +8 -0
- package/dist/src/internal/builtin-plugins/hhu/tasks/fetch/index.js.map +1 -0
- package/dist/src/internal/builtin-plugins/hhu/tasks/index.d.ts +11 -0
- package/dist/src/internal/builtin-plugins/hhu/tasks/index.d.ts.map +1 -0
- package/dist/src/internal/builtin-plugins/hhu/tasks/index.js +20 -0
- package/dist/src/internal/builtin-plugins/hhu/tasks/index.js.map +1 -0
- package/dist/src/internal/builtin-plugins/hhu/tasks/utils-task.d.ts +13 -0
- package/dist/src/internal/builtin-plugins/hhu/tasks/utils-task.d.ts.map +1 -0
- package/dist/src/internal/builtin-plugins/hhu/tasks/utils-task.js +17 -0
- package/dist/src/internal/builtin-plugins/hhu/tasks/utils-task.js.map +1 -0
- package/dist/src/internal/builtin-plugins/hhu/types.d.ts +45 -0
- package/dist/src/internal/builtin-plugins/hhu/types.d.ts.map +1 -0
- package/dist/src/internal/builtin-plugins/hhu/types.js +2 -0
- package/dist/src/internal/builtin-plugins/hhu/types.js.map +1 -0
- package/dist/src/internal/builtin-plugins/index.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/index.js +5 -0
- package/dist/src/internal/builtin-plugins/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/stack-traces/stack-trace-solidity-errors.d.ts +1 -0
- package/dist/src/internal/builtin-plugins/network-manager/edr/stack-traces/stack-trace-solidity-errors.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/stack-traces/stack-trace-solidity-errors.js +17 -0
- package/dist/src/internal/builtin-plugins/network-manager/edr/stack-traces/stack-trace-solidity-errors.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/index.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/index.js +2 -10
- package/dist/src/internal/builtin-plugins/network-manager/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/network-option.d.ts +9 -0
- package/dist/src/internal/builtin-plugins/network-manager/network-option.d.ts.map +1 -0
- package/dist/src/internal/builtin-plugins/network-manager/network-option.js +15 -0
- package/dist/src/internal/builtin-plugins/network-manager/network-option.js.map +1 -0
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/accounts/automatic-sender-handler.d.ts +4 -2
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/accounts/automatic-sender-handler.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/accounts/automatic-sender-handler.js +28 -6
- package/dist/src/internal/builtin-plugins/network-manager/request-handlers/handlers/accounts/automatic-sender-handler.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 -4
- package/dist/src/internal/builtin-plugins/solidity-test/config.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/stack-trace-solidity-errors.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/stack-trace-solidity-errors.js +3 -1
- package/dist/src/internal/builtin-plugins/solidity-test/stack-trace-solidity-errors.js.map +1 -1
- package/dist/src/internal/cli/help/get-global-help-string.d.ts +3 -1
- package/dist/src/internal/cli/help/get-global-help-string.d.ts.map +1 -1
- package/dist/src/internal/cli/help/get-global-help-string.js +3 -3
- package/dist/src/internal/cli/help/get-global-help-string.js.map +1 -1
- package/dist/src/internal/cli/help/get-help-string.d.ts +3 -1
- package/dist/src/internal/cli/help/get-help-string.d.ts.map +1 -1
- package/dist/src/internal/cli/help/get-help-string.js +4 -4
- package/dist/src/internal/cli/help/get-help-string.js.map +1 -1
- package/dist/src/internal/cli/help/utils.d.ts +3 -1
- package/dist/src/internal/cli/help/utils.d.ts.map +1 -1
- package/dist/src/internal/cli/help/utils.js +2 -2
- package/dist/src/internal/cli/help/utils.js.map +1 -1
- package/dist/src/internal/cli/hhu.d.ts +14 -0
- package/dist/src/internal/cli/hhu.d.ts.map +1 -0
- package/dist/src/internal/cli/hhu.js +184 -0
- package/dist/src/internal/cli/hhu.js.map +1 -0
- package/dist/src/internal/cli/main.d.ts +0 -25
- package/dist/src/internal/cli/main.d.ts.map +1 -1
- package/dist/src/internal/cli/main.js +23 -303
- package/dist/src/internal/cli/main.js.map +1 -1
- package/dist/src/internal/cli/parser.d.ts +25 -0
- package/dist/src/internal/cli/parser.d.ts.map +1 -0
- package/dist/src/internal/cli/parser.js +282 -0
- package/dist/src/internal/cli/parser.js.map +1 -0
- package/dist/src/internal/cli/telemetry/analytics/analytics.d.ts +1 -1
- package/dist/src/internal/cli/telemetry/analytics/analytics.d.ts.map +1 -1
- package/dist/src/internal/cli/telemetry/analytics/analytics.js +2 -1
- package/dist/src/internal/cli/telemetry/analytics/analytics.js.map +1 -1
- package/dist/src/internal/cli/telemetry/analytics/types.d.ts +1 -0
- package/dist/src/internal/cli/telemetry/analytics/types.d.ts.map +1 -1
- package/dist/src/internal/using-hardhat2-plugin-errors.d.ts +2 -2
- package/dist/src/internal/using-hardhat2-plugin-errors.d.ts.map +1 -1
- package/dist/src/internal/using-hardhat2-plugin-errors.js +7 -3
- package/dist/src/internal/using-hardhat2-plugin-errors.js.map +1 -1
- package/dist/src/plugins.d.ts.map +1 -1
- package/dist/src/plugins.js +3 -2
- package/dist/src/plugins.js.map +1 -1
- package/package.json +4 -4
- package/src/config.ts +17 -5
- package/src/hhu.ts +18 -0
- package/src/internal/builtin-plugins/artifacts/hook-handlers/hre.ts +11 -3
- package/src/internal/builtin-plugins/gas-analytics/function-gas-snapshots.ts +32 -32
- package/src/internal/builtin-plugins/gas-analytics/snapshot-cheatcodes.ts +32 -36
- package/src/internal/builtin-plugins/gas-analytics/tasks/solidity-test/task-action.ts +22 -9
- package/src/internal/builtin-plugins/hhu/index.ts +13 -0
- package/src/internal/builtin-plugins/hhu/tasks/constants/index.ts +18 -0
- package/src/internal/builtin-plugins/hhu/tasks/constants/zero-address.ts +9 -0
- package/src/internal/builtin-plugins/hhu/tasks/convert/index.ts +40 -0
- package/src/internal/builtin-plugins/hhu/tasks/convert/pad.ts +61 -0
- package/src/internal/builtin-plugins/hhu/tasks/fetch/block-number.ts +28 -0
- package/src/internal/builtin-plugins/hhu/tasks/fetch/index.ts +18 -0
- package/src/internal/builtin-plugins/hhu/tasks/index.ts +36 -0
- package/src/internal/builtin-plugins/hhu/tasks/utils-task.ts +29 -0
- package/src/internal/builtin-plugins/hhu/types.ts +57 -0
- package/src/internal/builtin-plugins/index.ts +6 -0
- package/src/internal/builtin-plugins/network-manager/edr/stack-traces/stack-trace-solidity-errors.ts +33 -0
- package/src/internal/builtin-plugins/network-manager/index.ts +3 -10
- package/src/internal/builtin-plugins/network-manager/network-option.ts +17 -0
- package/src/internal/builtin-plugins/network-manager/request-handlers/handlers/accounts/automatic-sender-handler.ts +39 -9
- package/src/internal/builtin-plugins/solidity-test/config.ts +1 -4
- package/src/internal/builtin-plugins/solidity-test/stack-trace-solidity-errors.ts +6 -1
- package/src/internal/cli/help/get-global-help-string.ts +3 -2
- package/src/internal/cli/help/get-help-string.ts +4 -3
- package/src/internal/cli/help/utils.ts +2 -1
- package/src/internal/cli/hhu.ts +298 -0
- package/src/internal/cli/main.ts +41 -495
- package/src/internal/cli/parser.ts +472 -0
- package/src/internal/cli/telemetry/analytics/analytics.ts +5 -1
- package/src/internal/cli/telemetry/analytics/types.ts +3 -0
- package/src/internal/using-hardhat2-plugin-errors.ts +12 -3
- package/src/plugins.ts +5 -2
- package/templates/hardhat-3/01-node-test-runner-viem/package.json +6 -6
- package/templates/hardhat-3/02-mocha-ethers/package.json +9 -9
- package/templates/hardhat-3/03-minimal/package.json +1 -1
|
@@ -64,7 +64,7 @@ export interface FunctionGasSnapshotChange {
|
|
|
64
64
|
export interface FunctionGasSnapshotCheckResult {
|
|
65
65
|
passed: boolean;
|
|
66
66
|
comparison: FunctionGasSnapshotComparison;
|
|
67
|
-
|
|
67
|
+
noBaseline: boolean;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
export function getFunctionGasSnapshotsPath(basePath: string): string {
|
|
@@ -323,16 +323,17 @@ export async function checkFunctionGasSnapshots(
|
|
|
323
323
|
previousFunctionGasSnapshots = await readFunctionGasSnapshots(basePath);
|
|
324
324
|
} catch (error) {
|
|
325
325
|
if (error instanceof FileNotFoundError) {
|
|
326
|
-
|
|
327
|
-
|
|
326
|
+
// Running a check without a stored snapshot is a mistake: fail so it's
|
|
327
|
+
// caught, but only when this run actually produced something to check.
|
|
328
|
+
const noBaseline = functionGasSnapshots.length > 0;
|
|
328
329
|
return {
|
|
329
|
-
passed:
|
|
330
|
+
passed: !noBaseline,
|
|
330
331
|
comparison: {
|
|
331
332
|
added: [],
|
|
332
333
|
removed: [],
|
|
333
334
|
changed: [],
|
|
334
335
|
},
|
|
335
|
-
|
|
336
|
+
noBaseline,
|
|
336
337
|
};
|
|
337
338
|
}
|
|
338
339
|
|
|
@@ -344,59 +345,54 @@ export async function checkFunctionGasSnapshots(
|
|
|
344
345
|
functionGasSnapshots,
|
|
345
346
|
);
|
|
346
347
|
|
|
347
|
-
// Update snapshots when functions are added or removed (but not changed)
|
|
348
|
-
const hasAddedOrRemoved =
|
|
349
|
-
comparison.added.length > 0 || comparison.removed.length > 0;
|
|
350
|
-
if (comparison.changed.length === 0 && hasAddedOrRemoved) {
|
|
351
|
-
await writeFunctionGasSnapshots(basePath, functionGasSnapshots);
|
|
352
|
-
}
|
|
353
|
-
|
|
354
348
|
return {
|
|
355
349
|
passed: comparison.changed.length === 0,
|
|
356
350
|
comparison,
|
|
357
|
-
|
|
351
|
+
noBaseline: false,
|
|
358
352
|
};
|
|
359
353
|
}
|
|
360
354
|
|
|
361
355
|
export function logFunctionGasSnapshotsSection(
|
|
362
356
|
result: FunctionGasSnapshotCheckResult,
|
|
363
357
|
logger: typeof console.log = console.log,
|
|
358
|
+
isFiltered = false,
|
|
364
359
|
): void {
|
|
365
|
-
const { comparison,
|
|
360
|
+
const { comparison, noBaseline } = result;
|
|
366
361
|
const changedLength = comparison.changed.length;
|
|
367
|
-
const addedLength = comparison.added.length;
|
|
368
|
-
const removedLength = comparison.removed.length;
|
|
369
362
|
const hasChanges = changedLength > 0;
|
|
363
|
+
// On a filtered run (--grep or specific files), added and missing snapshots
|
|
364
|
+
// are mostly artifacts of the filter rather than real differences, so we
|
|
365
|
+
// don't report them.
|
|
366
|
+
const addedLength = isFiltered ? 0 : comparison.added.length;
|
|
367
|
+
const removedLength = isFiltered ? 0 : comparison.removed.length;
|
|
370
368
|
const hasAdded = addedLength > 0;
|
|
371
369
|
const hasRemoved = removedLength > 0;
|
|
372
370
|
const hasAnyDifferences = hasChanges || hasAdded || hasRemoved;
|
|
373
|
-
const isFirstTimeWrite = written && !hasAnyDifferences;
|
|
374
371
|
|
|
375
372
|
// Nothing to report
|
|
376
|
-
if (!
|
|
373
|
+
if (!noBaseline && !hasAnyDifferences) {
|
|
377
374
|
return;
|
|
378
375
|
}
|
|
379
376
|
|
|
380
|
-
|
|
381
|
-
formatSectionHeader("Function gas snapshots", {
|
|
382
|
-
changedLength,
|
|
383
|
-
addedLength,
|
|
384
|
-
removedLength,
|
|
385
|
-
}),
|
|
386
|
-
);
|
|
387
|
-
|
|
388
|
-
if (isFirstTimeWrite) {
|
|
389
|
-
logger();
|
|
377
|
+
if (noBaseline) {
|
|
390
378
|
logger(
|
|
391
379
|
styleText(
|
|
392
|
-
"
|
|
393
|
-
"
|
|
380
|
+
"yellow",
|
|
381
|
+
"Function gas snapshots: no snapshot found. Run your tests with --snapshot to create one.",
|
|
394
382
|
),
|
|
395
383
|
);
|
|
396
384
|
logger();
|
|
397
385
|
return;
|
|
398
386
|
}
|
|
399
387
|
|
|
388
|
+
logger(
|
|
389
|
+
formatSectionHeader("Function gas snapshots", {
|
|
390
|
+
changedLength,
|
|
391
|
+
addedLength,
|
|
392
|
+
removedLength,
|
|
393
|
+
}),
|
|
394
|
+
);
|
|
395
|
+
|
|
400
396
|
if (hasChanges) {
|
|
401
397
|
logger();
|
|
402
398
|
printFunctionGasSnapshotChanges(comparison.changed, logger);
|
|
@@ -404,7 +400,9 @@ export function logFunctionGasSnapshotsSection(
|
|
|
404
400
|
|
|
405
401
|
if (hasAdded) {
|
|
406
402
|
logger();
|
|
407
|
-
logger(
|
|
403
|
+
logger(
|
|
404
|
+
` ${comparison.added.length} function(s) produced by this run are not in the snapshot:`,
|
|
405
|
+
);
|
|
408
406
|
const addedLines = stringifyFunctionGasSnapshots(comparison.added).split(
|
|
409
407
|
"\n",
|
|
410
408
|
);
|
|
@@ -415,7 +413,9 @@ export function logFunctionGasSnapshotsSection(
|
|
|
415
413
|
|
|
416
414
|
if (hasRemoved) {
|
|
417
415
|
logger();
|
|
418
|
-
logger(
|
|
416
|
+
logger(
|
|
417
|
+
` ${comparison.removed.length} stored function(s) were not produced by this run:`,
|
|
418
|
+
);
|
|
419
419
|
const removedLines = stringifyFunctionGasSnapshots(
|
|
420
420
|
comparison.removed,
|
|
421
421
|
).split("\n");
|
|
@@ -78,7 +78,7 @@ export interface SnapshotCheatcodesComparison {
|
|
|
78
78
|
export interface SnapshotCheatcodesCheckResult {
|
|
79
79
|
passed: boolean;
|
|
80
80
|
comparison: SnapshotCheatcodesComparison;
|
|
81
|
-
|
|
81
|
+
noBaseline: boolean;
|
|
82
82
|
renamedGroups: RenamedSnapshotGroup[];
|
|
83
83
|
}
|
|
84
84
|
|
|
@@ -363,20 +363,17 @@ export async function checkSnapshotCheatcodes(
|
|
|
363
363
|
previousSnapshotCheatcodes = await readSnapshotCheatcodes(basePath);
|
|
364
364
|
} catch (error) {
|
|
365
365
|
if (error instanceof FileNotFoundError) {
|
|
366
|
-
//
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
await writeSnapshotCheatcodes(basePath, snapshotCheatcodes);
|
|
370
|
-
}
|
|
371
|
-
|
|
366
|
+
// Running a check without stored snapshots is a mistake: fail so it's
|
|
367
|
+
// caught, but only when this run actually produced something to check.
|
|
368
|
+
const noBaseline = snapshotCheatcodes.size > 0;
|
|
372
369
|
return {
|
|
373
|
-
passed:
|
|
370
|
+
passed: !noBaseline,
|
|
374
371
|
comparison: {
|
|
375
372
|
added: [],
|
|
376
373
|
removed: [],
|
|
377
374
|
changed: [],
|
|
378
375
|
},
|
|
379
|
-
|
|
376
|
+
noBaseline,
|
|
380
377
|
renamedGroups,
|
|
381
378
|
};
|
|
382
379
|
}
|
|
@@ -389,17 +386,10 @@ export async function checkSnapshotCheatcodes(
|
|
|
389
386
|
snapshotCheatcodes,
|
|
390
387
|
);
|
|
391
388
|
|
|
392
|
-
// Update snapshots when functions are added or removed (but not changed)
|
|
393
|
-
const hasAddedOrRemoved =
|
|
394
|
-
comparison.added.length > 0 || comparison.removed.length > 0;
|
|
395
|
-
if (comparison.changed.length === 0 && hasAddedOrRemoved) {
|
|
396
|
-
await writeSnapshotCheatcodes(basePath, snapshotCheatcodes);
|
|
397
|
-
}
|
|
398
|
-
|
|
399
389
|
return {
|
|
400
390
|
passed: comparison.changed.length === 0,
|
|
401
391
|
comparison,
|
|
402
|
-
|
|
392
|
+
noBaseline: false,
|
|
403
393
|
renamedGroups,
|
|
404
394
|
};
|
|
405
395
|
}
|
|
@@ -407,42 +397,44 @@ export async function checkSnapshotCheatcodes(
|
|
|
407
397
|
export function logSnapshotCheatcodesSection(
|
|
408
398
|
result: SnapshotCheatcodesCheckResult,
|
|
409
399
|
logger: typeof console.log = console.log,
|
|
400
|
+
isFiltered = false,
|
|
410
401
|
): void {
|
|
411
|
-
const { comparison,
|
|
402
|
+
const { comparison, noBaseline } = result;
|
|
412
403
|
const changedLength = comparison.changed.length;
|
|
413
|
-
const addedLength = comparison.added.length;
|
|
414
|
-
const removedLength = comparison.removed.length;
|
|
415
404
|
const hasChanges = changedLength > 0;
|
|
405
|
+
// On a filtered run (--grep or specific files), added and missing snapshots
|
|
406
|
+
// are mostly artifacts of the filter rather than real differences, so we
|
|
407
|
+
// don't report them.
|
|
408
|
+
const addedLength = isFiltered ? 0 : comparison.added.length;
|
|
409
|
+
const removedLength = isFiltered ? 0 : comparison.removed.length;
|
|
416
410
|
const hasAdded = addedLength > 0;
|
|
417
411
|
const hasRemoved = removedLength > 0;
|
|
418
412
|
const hasAnyDifferences = hasChanges || hasAdded || hasRemoved;
|
|
419
|
-
const isFirstTimeWrite = written && !hasAnyDifferences;
|
|
420
413
|
|
|
421
414
|
// Nothing to report
|
|
422
|
-
if (!
|
|
415
|
+
if (!noBaseline && !hasAnyDifferences) {
|
|
423
416
|
return;
|
|
424
417
|
}
|
|
425
418
|
|
|
426
|
-
|
|
427
|
-
formatSectionHeader("Snapshot cheatcodes", {
|
|
428
|
-
changedLength,
|
|
429
|
-
addedLength,
|
|
430
|
-
removedLength,
|
|
431
|
-
}),
|
|
432
|
-
);
|
|
433
|
-
|
|
434
|
-
if (isFirstTimeWrite) {
|
|
435
|
-
logger();
|
|
419
|
+
if (noBaseline) {
|
|
436
420
|
logger(
|
|
437
421
|
styleText(
|
|
438
|
-
"
|
|
439
|
-
"
|
|
422
|
+
"yellow",
|
|
423
|
+
"Snapshot cheatcodes: no snapshots found. Run your tests with --snapshot to create one.",
|
|
440
424
|
),
|
|
441
425
|
);
|
|
442
426
|
logger();
|
|
443
427
|
return;
|
|
444
428
|
}
|
|
445
429
|
|
|
430
|
+
logger(
|
|
431
|
+
formatSectionHeader("Snapshot cheatcodes", {
|
|
432
|
+
changedLength,
|
|
433
|
+
addedLength,
|
|
434
|
+
removedLength,
|
|
435
|
+
}),
|
|
436
|
+
);
|
|
437
|
+
|
|
446
438
|
if (hasChanges) {
|
|
447
439
|
logger();
|
|
448
440
|
printSnapshotCheatcodeChanges(comparison.changed, logger);
|
|
@@ -450,7 +442,9 @@ export function logSnapshotCheatcodesSection(
|
|
|
450
442
|
|
|
451
443
|
if (hasAdded) {
|
|
452
444
|
logger();
|
|
453
|
-
logger(
|
|
445
|
+
logger(
|
|
446
|
+
` ${comparison.added.length} snapshot(s) produced by this run are not in the snapshot:`,
|
|
447
|
+
);
|
|
454
448
|
const addedLines = stringifySnapshotCheatcodes(comparison.added).split(
|
|
455
449
|
"\n",
|
|
456
450
|
);
|
|
@@ -461,7 +455,9 @@ export function logSnapshotCheatcodesSection(
|
|
|
461
455
|
|
|
462
456
|
if (hasRemoved) {
|
|
463
457
|
logger();
|
|
464
|
-
logger(
|
|
458
|
+
logger(
|
|
459
|
+
` ${comparison.removed.length} stored snapshot(s) were not produced by this run:`,
|
|
460
|
+
);
|
|
465
461
|
const removedLines = stringifySnapshotCheatcodes(comparison.removed).split(
|
|
466
462
|
"\n",
|
|
467
463
|
);
|
|
@@ -31,6 +31,9 @@ import {
|
|
|
31
31
|
interface GasAnalyticsTestActionArguments {
|
|
32
32
|
snapshot: boolean;
|
|
33
33
|
snapshotCheck: boolean;
|
|
34
|
+
// Forwarded from the base `test solidity` task; used to detect scoped runs.
|
|
35
|
+
grep?: string;
|
|
36
|
+
testFiles?: string[];
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
export interface SnapshotResult {
|
|
@@ -74,7 +77,11 @@ const runSolidityTests: TaskOverrideActionFunction<
|
|
|
74
77
|
rootPath,
|
|
75
78
|
suiteResults,
|
|
76
79
|
);
|
|
77
|
-
|
|
80
|
+
// On a scoped run, added/missing snapshots are expected, so don't report
|
|
81
|
+
// them (they'd be noise from the filter, not real differences).
|
|
82
|
+
const isFiltered =
|
|
83
|
+
args.grep !== undefined || (args.testFiles?.length ?? 0) > 0;
|
|
84
|
+
logSnapshotCheckResult(snapshotCheckResult, console.log, isFiltered);
|
|
78
85
|
snapshotCheckPassed =
|
|
79
86
|
snapshotCheckResult.functionGasSnapshotsCheck.passed &&
|
|
80
87
|
snapshotCheckResult.snapshotCheatcodesCheck.passed;
|
|
@@ -141,6 +148,7 @@ export async function handleSnapshotCheck(
|
|
|
141
148
|
export function logSnapshotCheckResult(
|
|
142
149
|
{ functionGasSnapshotsCheck, snapshotCheatcodesCheck }: SnapshotCheckResult,
|
|
143
150
|
logger: typeof console.log = console.log,
|
|
151
|
+
isFiltered = false,
|
|
144
152
|
): void {
|
|
145
153
|
logger(
|
|
146
154
|
functionGasSnapshotsCheck.passed && snapshotCheatcodesCheck.passed
|
|
@@ -148,23 +156,28 @@ export function logSnapshotCheckResult(
|
|
|
148
156
|
: styleText("red", "Snapshot check failed"),
|
|
149
157
|
);
|
|
150
158
|
|
|
159
|
+
// On a filtered run, added/removed aren't reported, so they don't count
|
|
160
|
+
// towards a section having output (which drives the spacing below).
|
|
161
|
+
const showAddedRemoved = !isFiltered;
|
|
151
162
|
const functionGasHasOutput =
|
|
152
|
-
functionGasSnapshotsCheck.
|
|
163
|
+
functionGasSnapshotsCheck.noBaseline ||
|
|
153
164
|
functionGasSnapshotsCheck.comparison.changed.length > 0 ||
|
|
154
|
-
|
|
155
|
-
|
|
165
|
+
(showAddedRemoved &&
|
|
166
|
+
(functionGasSnapshotsCheck.comparison.added.length > 0 ||
|
|
167
|
+
functionGasSnapshotsCheck.comparison.removed.length > 0));
|
|
156
168
|
const snapshotCheatcodesHasOutput =
|
|
157
|
-
snapshotCheatcodesCheck.
|
|
169
|
+
snapshotCheatcodesCheck.noBaseline ||
|
|
158
170
|
snapshotCheatcodesCheck.comparison.changed.length > 0 ||
|
|
159
|
-
|
|
160
|
-
|
|
171
|
+
(showAddedRemoved &&
|
|
172
|
+
(snapshotCheatcodesCheck.comparison.added.length > 0 ||
|
|
173
|
+
snapshotCheatcodesCheck.comparison.removed.length > 0));
|
|
161
174
|
|
|
162
175
|
// Add an extra newline if function gas snapshots have output
|
|
163
176
|
if (functionGasHasOutput) {
|
|
164
177
|
logger();
|
|
165
178
|
}
|
|
166
179
|
|
|
167
|
-
logFunctionGasSnapshotsSection(functionGasSnapshotsCheck, logger);
|
|
180
|
+
logFunctionGasSnapshotsSection(functionGasSnapshotsCheck, logger, isFiltered);
|
|
168
181
|
|
|
169
182
|
// Add an extra newline if only snapshot cheatcodes have output
|
|
170
183
|
// (logFunctionGasSnapshotsSection adds one if it has output)
|
|
@@ -172,7 +185,7 @@ export function logSnapshotCheckResult(
|
|
|
172
185
|
logger();
|
|
173
186
|
}
|
|
174
187
|
|
|
175
|
-
logSnapshotCheatcodesSection(snapshotCheatcodesCheck, logger);
|
|
188
|
+
logSnapshotCheatcodesSection(snapshotCheatcodesCheck, logger, isFiltered);
|
|
176
189
|
|
|
177
190
|
// Add an extra newline if only the rename warnings have output
|
|
178
191
|
// (logSnapshotCheatcodesSection adds one if it has output)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { HardhatPlugin } from "../../../types/plugins.js";
|
|
2
|
+
|
|
3
|
+
import { definePlugin } from "../../../plugins.js";
|
|
4
|
+
|
|
5
|
+
import { generateTasks } from "./tasks/index.js";
|
|
6
|
+
|
|
7
|
+
const hardhatPlugin: HardhatPlugin = definePlugin({
|
|
8
|
+
id: "builtin:hhu",
|
|
9
|
+
tasks: generateTasks({ prefixWithUtils: true }),
|
|
10
|
+
npmPackage: "hardhat",
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export default hardhatPlugin;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { UtilsTaskDefinition } from "../../types.js";
|
|
2
|
+
|
|
3
|
+
import { emptyTask, task } from "../../../../core/config.js";
|
|
4
|
+
import { buildUtilsTask } from "../utils-task.js";
|
|
5
|
+
|
|
6
|
+
export function constants(prefix: string[]): UtilsTaskDefinition[] {
|
|
7
|
+
const constantsTask = emptyTask(
|
|
8
|
+
[...prefix, "constants"],
|
|
9
|
+
"Commonly used Ethereum constants",
|
|
10
|
+
).build();
|
|
11
|
+
|
|
12
|
+
const zeroAddressTask = buildUtilsTask(
|
|
13
|
+
task([...prefix, "constants", "zero-address"], "Print the zero address"),
|
|
14
|
+
async () => await import("./zero-address.js"),
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
return [constantsTask, zeroAddressTask];
|
|
18
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { NewUtilsTaskActionFunction } from "../../types.js";
|
|
2
|
+
|
|
3
|
+
const zeroAddress = "0x0000000000000000000000000000000000000000";
|
|
4
|
+
|
|
5
|
+
const zeroAddressAction: NewUtilsTaskActionFunction = async () => {
|
|
6
|
+
console.log(zeroAddress);
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default zeroAddressAction;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { UtilsTaskDefinition } from "../../types.js";
|
|
2
|
+
|
|
3
|
+
import { ArgumentType } from "../../../../../types/arguments.js";
|
|
4
|
+
import { emptyTask, task } from "../../../../core/config.js";
|
|
5
|
+
import { buildUtilsTask } from "../utils-task.js";
|
|
6
|
+
|
|
7
|
+
export function convert(prefix: string[]): UtilsTaskDefinition[] {
|
|
8
|
+
const convertTask = emptyTask(
|
|
9
|
+
[...prefix, "convert"],
|
|
10
|
+
"Convert values between common Ethereum representations",
|
|
11
|
+
).build();
|
|
12
|
+
|
|
13
|
+
const padTask = buildUtilsTask(
|
|
14
|
+
task(
|
|
15
|
+
[...prefix, "convert", "pad"],
|
|
16
|
+
"Pad a hex string to a given byte length",
|
|
17
|
+
)
|
|
18
|
+
.addPositionalArgument({
|
|
19
|
+
name: "value",
|
|
20
|
+
description: "The hex string to pad",
|
|
21
|
+
})
|
|
22
|
+
.addOption({
|
|
23
|
+
name: "length",
|
|
24
|
+
description: "The target length, in bytes",
|
|
25
|
+
type: ArgumentType.INT,
|
|
26
|
+
defaultValue: 32,
|
|
27
|
+
})
|
|
28
|
+
.addFlag({
|
|
29
|
+
name: "left",
|
|
30
|
+
description: "Pad to the left (default)",
|
|
31
|
+
})
|
|
32
|
+
.addFlag({
|
|
33
|
+
name: "right",
|
|
34
|
+
description: "Pad to the right",
|
|
35
|
+
}),
|
|
36
|
+
async () => await import("./pad.js"),
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
return [convertTask, padTask];
|
|
40
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { NewUtilsTaskActionFunction } from "../../types.js";
|
|
2
|
+
|
|
3
|
+
import { HardhatError } from "@nomicfoundation/hardhat-errors";
|
|
4
|
+
import {
|
|
5
|
+
getUnprefixedHexString,
|
|
6
|
+
isHexString,
|
|
7
|
+
} from "@nomicfoundation/hardhat-utils/hex";
|
|
8
|
+
|
|
9
|
+
interface PadActionArguments {
|
|
10
|
+
value: string;
|
|
11
|
+
length: number;
|
|
12
|
+
left: boolean;
|
|
13
|
+
right: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const padAction: NewUtilsTaskActionFunction<PadActionArguments> = async ({
|
|
17
|
+
value,
|
|
18
|
+
length,
|
|
19
|
+
left,
|
|
20
|
+
right,
|
|
21
|
+
}) => {
|
|
22
|
+
if (left && right) {
|
|
23
|
+
throw new HardhatError(
|
|
24
|
+
HardhatError.ERRORS.CORE.ARGUMENTS.MUTUALLY_EXCLUSIVE_OPTIONS,
|
|
25
|
+
{ optionA: "left", optionB: "right" },
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (length < 0) {
|
|
30
|
+
throw new HardhatError(HardhatError.ERRORS.CORE.ARGUMENTS.INVALID_VALUE, {
|
|
31
|
+
value: length,
|
|
32
|
+
name: "length",
|
|
33
|
+
reason: "it must be a non-negative integer",
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (!isHexString(value)) {
|
|
38
|
+
throw new HardhatError(
|
|
39
|
+
HardhatError.ERRORS.CORE.GENERAL.INVALID_HEX_STRING,
|
|
40
|
+
{ value },
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const unprefixedHexString = getUnprefixedHexString(value);
|
|
45
|
+
|
|
46
|
+
if (unprefixedHexString.length > length * 2) {
|
|
47
|
+
throw new HardhatError(HardhatError.ERRORS.CORE.ARGUMENTS.INVALID_VALUE, {
|
|
48
|
+
value,
|
|
49
|
+
name: "value",
|
|
50
|
+
reason: `it's longer than the target length of ${length} bytes`,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const paddedHexString = right
|
|
55
|
+
? unprefixedHexString.padEnd(length * 2, "0")
|
|
56
|
+
: unprefixedHexString.padStart(length * 2, "0");
|
|
57
|
+
|
|
58
|
+
console.log(`0x${paddedHexString}`);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export default padAction;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { NewUtilsTaskActionFunction } from "../../types.js";
|
|
2
|
+
|
|
3
|
+
import { assertHardhatInvariant } from "@nomicfoundation/hardhat-errors";
|
|
4
|
+
import { hexStringToBigInt } from "@nomicfoundation/hardhat-utils/hex";
|
|
5
|
+
|
|
6
|
+
const fetchBlockNumberAction: NewUtilsTaskActionFunction = async (
|
|
7
|
+
_taskArguments,
|
|
8
|
+
hre,
|
|
9
|
+
) => {
|
|
10
|
+
const connection = await hre.network.create();
|
|
11
|
+
|
|
12
|
+
try {
|
|
13
|
+
const blockNumber = await connection.provider.request({
|
|
14
|
+
method: "eth_blockNumber",
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
assertHardhatInvariant(
|
|
18
|
+
typeof blockNumber === "string",
|
|
19
|
+
"eth_blockNumber should return a string",
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
console.log(hexStringToBigInt(blockNumber).toString());
|
|
23
|
+
} finally {
|
|
24
|
+
await connection.close();
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default fetchBlockNumberAction;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { UtilsTaskDefinition } from "../../types.js";
|
|
2
|
+
|
|
3
|
+
import { emptyTask, task } from "../../../../core/config.js";
|
|
4
|
+
import { buildUtilsTask } from "../utils-task.js";
|
|
5
|
+
|
|
6
|
+
export function fetch(prefix: string[]): UtilsTaskDefinition[] {
|
|
7
|
+
const fetchTask = emptyTask(
|
|
8
|
+
[...prefix, "fetch"],
|
|
9
|
+
"Fetch on-chain data",
|
|
10
|
+
).build();
|
|
11
|
+
|
|
12
|
+
const blockNumberTask = buildUtilsTask(
|
|
13
|
+
task([...prefix, "fetch", "block-number"], "Print the latest block number"),
|
|
14
|
+
async () => await import("./block-number.js"),
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
return [fetchTask, blockNumberTask];
|
|
18
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { UtilsTaskDefinition } from "../types.js";
|
|
2
|
+
|
|
3
|
+
import { emptyTask } from "../../../core/config.js";
|
|
4
|
+
|
|
5
|
+
import { constants } from "./constants/index.js";
|
|
6
|
+
import { convert } from "./convert/index.js";
|
|
7
|
+
import { fetch } from "./fetch/index.js";
|
|
8
|
+
|
|
9
|
+
export interface GenerateTasksOptions {
|
|
10
|
+
/**
|
|
11
|
+
* Whether to nest every task under a top-level `utils` task. Used by the
|
|
12
|
+
* Hardhat CLI (`hardhat utils constants ...`) but not by the standalone hhu
|
|
13
|
+
* binary (`hhu constants ...`).
|
|
14
|
+
*/
|
|
15
|
+
prefixWithUtils: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The category builders that contribute the utils tasks. Each one receives the
|
|
20
|
+
* id prefix to nest its tasks under and returns its task definitions. Adding a
|
|
21
|
+
* new category is a single entry here.
|
|
22
|
+
*/
|
|
23
|
+
const CATEGORIES = [constants, convert, fetch];
|
|
24
|
+
|
|
25
|
+
export function generateTasks(
|
|
26
|
+
options: GenerateTasksOptions,
|
|
27
|
+
): UtilsTaskDefinition[] {
|
|
28
|
+
const prefix = options.prefixWithUtils ? ["utils"] : [];
|
|
29
|
+
|
|
30
|
+
return [
|
|
31
|
+
...(prefix.length > 0
|
|
32
|
+
? [emptyTask(prefix, "Utilities for common Ethereum tasks").build()]
|
|
33
|
+
: []),
|
|
34
|
+
...CATEGORIES.flatMap((category) => category(prefix)),
|
|
35
|
+
];
|
|
36
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
LazyActionObject,
|
|
3
|
+
NewTaskDefinitionBuilder,
|
|
4
|
+
TaskArguments,
|
|
5
|
+
} from "../../../../types/tasks.js";
|
|
6
|
+
import type {
|
|
7
|
+
NewUtilsTaskActionFunction,
|
|
8
|
+
NewUtilsTaskDefinition,
|
|
9
|
+
} from "../types.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Builds a utils task from a configured task builder and a lazily-loaded action.
|
|
13
|
+
*
|
|
14
|
+
* The standard builder's `setAction`/`build` are hardcoded to
|
|
15
|
+
* `NewTaskActionFunction`, so it can't produce a `NewUtilsTaskDefinition` on its
|
|
16
|
+
* own. This helper requires the action to be a `NewUtilsTaskActionFunction`
|
|
17
|
+
* (rejecting wider actions at the call site), which is what makes re-narrowing
|
|
18
|
+
* the built definition sound.
|
|
19
|
+
*/
|
|
20
|
+
export function buildUtilsTask<TaskArgumentsT extends TaskArguments>(
|
|
21
|
+
builder: NewTaskDefinitionBuilder<TaskArgumentsT>,
|
|
22
|
+
action: LazyActionObject<NewUtilsTaskActionFunction<TaskArgumentsT>>,
|
|
23
|
+
): NewUtilsTaskDefinition {
|
|
24
|
+
// The narrower action is assignable to the builder's `NewTaskActionFunction`,
|
|
25
|
+
// and since `action` is statically a `NewUtilsTaskActionFunction`, re-narrowing
|
|
26
|
+
// the result is safe.
|
|
27
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- see above
|
|
28
|
+
return builder.setAction(action).build() as NewUtilsTaskDefinition;
|
|
29
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { HardhatRuntimeEnvironment } from "../../../types/hre.js";
|
|
2
|
+
import type { NetworkManager } from "../../../types/network.js";
|
|
3
|
+
import type {
|
|
4
|
+
BaseTaskDefinition,
|
|
5
|
+
EmptyTaskDefinition,
|
|
6
|
+
LazyActionObject,
|
|
7
|
+
TaskArguments,
|
|
8
|
+
} from "../../../types/tasks.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The subset of the HRE that utils tasks are allowed to use.
|
|
12
|
+
*
|
|
13
|
+
* It is narrowed to what the hhu binary can provide without always creating
|
|
14
|
+
* a real HRE.
|
|
15
|
+
*/
|
|
16
|
+
export interface UtilsHardhatRuntimeEnvironment {
|
|
17
|
+
network: Pick<NetworkManager, "create">;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The fake HRE that the hhu binary builds so it can parse and run utils without
|
|
22
|
+
* creating a real one. It's the surface utils actions use
|
|
23
|
+
* ({@link UtilsHardhatRuntimeEnvironment}) plus the `config` that
|
|
24
|
+
* `TaskManagerImplementation` needs to build the task map.
|
|
25
|
+
*/
|
|
26
|
+
export interface FakeHhuHardhatRuntimeEnvironment
|
|
27
|
+
extends UtilsHardhatRuntimeEnvironment {
|
|
28
|
+
config: Pick<HardhatRuntimeEnvironment["config"], "tasks" | "plugins">;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The type of a utils task's action function.
|
|
33
|
+
*
|
|
34
|
+
* It mirrors `NewTaskActionFunction`, but the HRE passed as the second argument
|
|
35
|
+
* is narrowed to `UtilsHardhatRuntimeEnvironment` so that utils tasks only
|
|
36
|
+
* depend on the small surface that both the Hardhat CLI and the hhu binary can
|
|
37
|
+
* provide.
|
|
38
|
+
*/
|
|
39
|
+
export type NewUtilsTaskActionFunction<
|
|
40
|
+
TaskArgumentsT extends TaskArguments = TaskArguments,
|
|
41
|
+
> = (taskArguments: TaskArgumentsT, hre: UtilsHardhatRuntimeEnvironment) => any;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* The definition of a utils task.
|
|
45
|
+
*
|
|
46
|
+
* It mirrors `NewTaskDefinition`, but narrows that action to a
|
|
47
|
+
* `NewUtilsTaskActionFunction`.
|
|
48
|
+
*/
|
|
49
|
+
export type NewUtilsTaskDefinition = BaseTaskDefinition & {
|
|
50
|
+
action: LazyActionObject<NewUtilsTaskActionFunction>;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* The subset of `TaskDefinition` that utils tasks produce: either an empty task
|
|
55
|
+
* (a namespace placeholder) or a utils task. Override tasks are not supported.
|
|
56
|
+
*/
|
|
57
|
+
export type UtilsTaskDefinition = EmptyTaskDefinition | NewUtilsTaskDefinition;
|