Skip to content

Commit 43678da

Browse files
Merge branch 'v-next' of github.com:NomicFoundation/hardhat into change-the-type-of-package-name
2 parents 8e52a78 + 4255874 commit 43678da

File tree

30 files changed

+259
-68
lines changed

30 files changed

+259
-68
lines changed

.changeset/khaki-seahorses-develop.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+
Group `mocha` and `solidityTest` config under `test` property ([#7101](https://github.com/NomicFoundation/hardhat/pull/7101))

.changeset/proud-colts-itch.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"hardhat": minor
3+
---
4+
5+
Upgraded EDR dependency to @nomicfoundation/edr v0.12.0-next.3

.changeset/real-emus-begin.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+
Upgraded EDR dependency to @nomicfoundation/edr v0.12.0-next.2

.changeset/spicy-bugs-sit.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+
Added the addresses of created contracts in call traces

.changeset/spotty-pianos-confess.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"hardhat": minor
3+
---
4+
5+
Removed deprecated JSON-RPC methods: `eth_mining`, `net_listening`, `net_peerCount`, `hardhat_addCompilationResult`, `hardhat_intervalMine`, and `hardhat_reset`.

pnpm-lock.yaml

Lines changed: 36 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

v-next/example-project/hardhat.config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,14 @@ const config: HardhatUserConfig = {
207207
typechain: {
208208
tsNocheck: false,
209209
},
210+
test: {
211+
mocha: {
212+
color: true,
213+
},
214+
solidity: {
215+
timeout: 1000,
216+
},
217+
},
210218
};
211219

212220
export default config;

v-next/hardhat-mocha/src/hookHandlers/config.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,11 @@ const mochaConfigType = z.object({
7373
});
7474

7575
const userConfigType = z.object({
76-
mocha: z.optional(mochaConfigType),
76+
test: z
77+
.object({
78+
mocha: z.optional(mochaConfigType),
79+
})
80+
.optional(),
7781
paths: z
7882
.object({
7983
test: conditionalUnionType(
@@ -110,10 +114,13 @@ export default async (): Promise<Partial<ConfigHooks>> => {
110114

111115
return {
112116
...resolvedConfig,
113-
mocha: {
114-
timeout: 40000,
115-
...resolvedConfig.mocha,
116-
...userConfig.mocha,
117+
test: {
118+
...resolvedConfig.test,
119+
mocha: {
120+
timeout: 40000,
121+
...resolvedConfig.test.mocha,
122+
...userConfig.test?.mocha,
123+
},
117124
},
118125
paths: {
119126
...resolvedConfig.paths,

v-next/hardhat-mocha/src/task-action.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const testWithHardhat: NewTaskActionFunction<TestActionArguments> = async (
6767

6868
const { default: Mocha } = await import("mocha");
6969

70-
const mochaConfig: MochaOptions = { ...hre.config.mocha };
70+
const mochaConfig: MochaOptions = { ...hre.config.test.mocha };
7171

7272
if (grep !== "") {
7373
mochaConfig.grep = grep;

v-next/hardhat-mocha/src/type-extensions.ts

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,22 @@ import "hardhat/types/config";
33
import type { MochaOptions } from "mocha";
44

55
declare module "hardhat/types/config" {
6-
export interface HardhatUserConfig {
7-
mocha?: MochaOptions;
8-
}
9-
106
export interface TestPathsUserConfig {
117
mocha?: string;
128
}
139

14-
export interface HardhatConfig {
15-
mocha: MochaOptions;
16-
}
17-
1810
export interface TestPathsConfig {
1911
mocha: string;
2012
}
2113
}
14+
15+
import "hardhat/types/test";
16+
declare module "hardhat/types/test" {
17+
export interface HardhatTestUserConfig {
18+
mocha?: MochaOptions;
19+
}
20+
21+
export interface HardhatTestConfig {
22+
mocha: MochaOptions;
23+
}
24+
}

0 commit comments

Comments
 (0)