Skip to content

Commit 545ee8d

Browse files
authored
Merge branch 'v-next' into remove-defaultNetwork
2 parents cbbdf86 + 55ad313 commit 545ee8d

File tree

11 files changed

+46
-14
lines changed

11 files changed

+46
-14
lines changed

.changeset/loud-buses-wave.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"hardhat": patch
3+
---
4+
5+
Allowed requesting help via the -h flag

scripts/check-release.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { appendFile } from "node:fs/promises";
55
import { readPackage, isPackageReleasedToNpm } from "./lib/packages.mjs";
66

77
/**
8-
* The function checks whether the version of hardhat from its' package.json is available in the NPM registry
8+
* The function checks whether the version of hardhat from its package.json is available in the NPM registry
99
* It appends this information to the GITHUB_OUTPUT file (this is an env variable available in the GitHub Actions environment)
1010
*/
1111
async function checkRelease() {

v-next/hardhat-node-test-reporter/src/error-formatting.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ export function formatLocation(
368368
/**
369369
* Returns true if the stack line is a node line.
370370
*
371-
* A node line is a line that has a node stack reference, i.e. its' location
371+
* A node line is a line that has a node stack reference, i.e. its location
372372
* starts with "node:" or "async node:", or its context is for a node type.
373373
*/
374374
function isNodeLine({ reference }: StackLine): boolean {

v-next/hardhat/src/internal/builtin-global-options.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export const BUILTIN_GLOBAL_OPTIONS_DEFINITIONS: GlobalOptionDefinitions =
2323
pluginId: "builtin",
2424
option: globalFlag({
2525
name: "help",
26+
shortName: "h",
2627
description:
2728
"Shows this message, or a task's help if its name is provided.",
2829
}),

v-next/hardhat/src/internal/builtin-plugins/solidity/type-extensions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ declare module "../../../types/hooks.js" {
119119
*
120120
* @param context The hook context.
121121
* @param inputSourceName The input source name of the project file.
122+
* @param fsPath The absolute path to the project file.
122123
* @param fileContent The content of the project file.
123124
* @param solcVersion The solc version that will be used to compile the project file.
124125
* @param next A function to call the next handler for this hook, or the

v-next/hardhat/src/internal/cli/main.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ export async function parseBuiltinGlobalOptions(
248248
let version: boolean = false;
249249
let init: boolean = false;
250250

251+
// TODO: Use parseGlobalOptions(BUILTIN_GLOBAL_OPTIONS_DEFINITIONS, ...) instead
251252
for (let i = 0; i < cliArguments.length; i++) {
252253
const arg = cliArguments[i];
253254

@@ -291,7 +292,7 @@ export async function parseBuiltinGlobalOptions(
291292
continue;
292293
}
293294

294-
if (arg === "--help") {
295+
if (arg === "--help" || arg === "-h") {
295296
usedCliArguments[i] = true;
296297
help = true;
297298
continue;

v-next/hardhat/src/types/config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,14 @@ export interface ProjectPathsUserConfig {
8080
}
8181

8282
/**
83-
* The different paths were the Hardhat project's tests are located.
83+
* The different paths where the Hardhat project's tests are located.
8484
*/
8585
/* eslint-disable-next-line @typescript-eslint/no-empty-interface -- This is
8686
intended to be used through module augmentation. */
8787
export interface TestPathsUserConfig {}
8888

8989
/**
90-
* The different paths were the Hardhat project's sources are located.
90+
* The different paths where the Hardhat project's sources are located.
9191
*/
9292
/* eslint-disable-next-line @typescript-eslint/no-empty-interface -- This is
9393
intended to be used through module augmentation. */
@@ -122,14 +122,14 @@ export interface ProjectPathsConfig {
122122
}
123123

124124
/**
125-
* The resolved paths were the Hardhat project's tests are located.
125+
* The resolved paths where the Hardhat project's tests are located.
126126
*/
127127
/* eslint-disable-next-line @typescript-eslint/no-empty-interface -- This is
128128
intended to be used through module augmentation. */
129129
export interface TestPathsConfig {}
130130

131131
/**
132-
* The resolved paths were the Hardhat project's sources are located.
132+
* The resolved paths where the Hardhat project's sources are located.
133133
*/
134134
/* eslint-disable-next-line @typescript-eslint/no-empty-interface -- This is
135135
intended to be used through module augmentation. */

v-next/hardhat/src/types/user-interruptions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
export interface UserInterruptionManager {
1010
/**
1111
* Displays a message to the user, returning a `Promise` that resolve when the
12-
* message was displayed and we have a good digree of certainty that the user
12+
* message was displayed and we have a good degree of certainty that the user
1313
* has read it.
1414
*
1515
* For example, if the plugin/task handling the user output doesn't refresh the screen,
@@ -36,8 +36,8 @@ export interface UserInterruptionManager {
3636
* Request a secret input from the user, returning a `Promise` that resolves with
3737
* the user's input.
3838
*
39-
* The main difference between this method and `requestInput` is that this method
40-
* is that the plugin/task handling the user input/output should take extra care
39+
* The main difference between this method and `requestInput` is that with this
40+
* method the plugin/task handling the user input/output should take extra care
4141
* to avoid leaking the user's input or displaying it in the user's terminal.
4242
*
4343
* @param interruptor - A name or description of the module calling this method.

v-next/hardhat/test/internal/builtin-plugins/solidity/build-system/dependency-graph.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ describe("DependencyGraphImplementation", () => {
359359
});
360360

361361
describe("getFileBySourceName", () => {
362-
it("should return the file by its' input source name if the file was previously added", () => {
362+
it("should return the file by its input source name if the file was previously added", () => {
363363
const root = createProjectResolvedFile("root.sol");
364364
const dependency = createProjectResolvedFile("dependency.sol");
365365

v-next/hardhat/test/internal/cli/help/get-global-help-string.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ Usage: hardhat [GLOBAL OPTIONS] <TASK> [SUBTASK] [TASK OPTIONS] [--] [TASK ARGUM
195195
GLOBAL OPTIONS:
196196
197197
--config A Hardhat config file.
198-
--help Shows this message, or a task's help if its name is provided.
198+
--help, -h Shows this message, or a task's help if its name is provided.
199199
--init Initializes a Hardhat project.
200200
--show-stack-traces Show stack traces (always enabled on CI servers).
201201
--user-option-1 userOption1 description.
@@ -294,7 +294,7 @@ AVAILABLE SUBTASKS:
294294
GLOBAL OPTIONS:
295295
296296
--config A Hardhat config file.
297-
--help Shows this message, or a task's help if its name is provided.
297+
--help, -h Shows this message, or a task's help if its name is provided.
298298
--init Initializes a Hardhat project.
299299
--show-stack-traces Show stack traces (always enabled on CI servers).
300300
--user-option-1 userOption1 description.

0 commit comments

Comments
 (0)