Skip to content

Commit

Permalink
Merge branch 'main' into via-ir
Browse files Browse the repository at this point in the history
  • Loading branch information
fvictorio committed Dec 10, 2022
2 parents 67f4aa9 + 39014ab commit 92ac52b
Show file tree
Hide file tree
Showing 8 changed files with 118 additions and 64 deletions.
124 changes: 68 additions & 56 deletions docs/redirects.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,248 +18,260 @@ const customRedirects = [
{
source: "/config",
destination: "/hardhat-runner/docs/config",
permanent: false
permanent: false,
},
{
source: "/plugins",
destination: "/hardhat-runner/plugins",
permanent: false
permanent: false,
},
{
source: "/getting-started",
destination: "/hardhat-runner/docs/getting-started#overview",
permanent: false
permanent: false,
},
{ source: "/links/stack-traces", destination: "/", permanent: false },
{
source: "/reportbug",
destination: "https://github.com/NomicFoundation/hardhat/issues/new",
permanent: false
permanent: false,
},
{
source: "/report-bug",
destination: "https://github.com/NomicFoundation/hardhat/issues/new",
permanent: false
permanent: false,
},
{
source: "/console-log",
destination: "/hardhat-network/#console.log",
permanent: false
permanent: false,
},
{
source: "/discord",
destination: "https://discord.gg/TETZs2KK4k",
permanent: false
permanent: false,
},
{
source: "/hre",
destination: "/advanced/hardhat-runtime-environment",
permanent: false
permanent: false,
},
{
source: "/nodejs-versions",
destination: "/reference/stability-guarantees#node.js-versions-support",
permanent: false
permanent: false,
},
{
source: "/verify-custom-networks",
destination: "/plugins/nomiclabs-hardhat-etherscan#adding-support-for-other-networks",
permanent: false
destination:
"/plugins/nomiclabs-hardhat-etherscan#adding-support-for-other-networks",
permanent: false,
},
{
source: "/verify-multiple-networks",
destination: "plugins/nomiclabs-hardhat-etherscan.html#multiple-api-keys-and-alternative-block-explorers",
permanent: false
destination:
"plugins/nomiclabs-hardhat-etherscan.html#multiple-api-keys-and-alternative-block-explorers",
permanent: false,
},
{
source: "/metamask-issue",
destination: "/hardhat-network/docs/metamask-issue",
permanent: false
permanent: false,
},
{
source: "/migrate-from-waffle",
destination: "/hardhat-chai-matchers/docs/migrate-from-waffle",
permanent: false
permanent: false,
},
{
source: "/custom-hardfork-history",
destination: "/hardhat-network/docs/guides/forking-other-networks.html#using-a-custom-hardfork-history",
permanent: false
destination:
"/hardhat-network/docs/guides/forking-other-networks.html#using-a-custom-hardfork-history",
permanent: false,
},
{
source: "/solc-viair",
destination: "/hardhat-runner/docs/reference/solidity-support#support-for-ir-based-codegen",
permanent: false
destination:
"/hardhat-runner/docs/reference/solidity-support#support-for-ir-based-codegen",
permanent: false,
},
{
source: "/solidity-survey-2022",
destination:
"https://cryptpad.fr/form/#/2/form/view/HuPIRv4gvziSV0dPV1SJncKzYJXTVc8LGCaMfLUoj2c/",
permanent: false,
},

// top-level component URLs
{
source: "/hardhat-runner",
destination: "/hardhat-runner/docs/getting-started#overview",
permanent: false
permanent: false,
},
{
source: "/hardhat-runner/docs",
destination: "/hardhat-runner/docs/getting-started#overview",
permanent: false
permanent: false,
},
{
source: "/hardhat-network",
destination: "/hardhat-network/docs/overview",
permanent: false
permanent: false,
},
{
source: "/hardhat-network/docs",
destination: "/hardhat-network/docs/overview",
permanent: false
permanent: false,
},
{
source: "/hardhat-vscode",
destination: "/hardhat-vscode/docs/overview",
permanent: false
permanent: false,
},
{
source: "/hardhat-vscode/docs",
destination: "/hardhat-vscode/docs/overview",
permanent: false
permanent: false,
},
{
source: "/hardhat-chai-matchers",
destination: "/hardhat-chai-matchers/docs/overview",
permanent: false
permanent: false,
},
{
source: "/hardhat-chai-matchers/docs",
destination: "/hardhat-chai-matchers/docs/overview",
permanent: false
permanent: false,
},
{
source: "/hardhat-network-helpers",
destination: "/hardhat-network-helpers/docs/overview",
permanent: false
permanent: false,
},
{
source: "/hardhat-network-helpers/docs",
destination: "/hardhat-network-helpers/docs/overview",
permanent: false
permanent: false,
},

// legacy URLs
{
source: "/configuration",
destination: "/hardhat-runner/docs/config",
permanent: false
permanent: false,
},
{
source: "/guides/create-plugin",
destination: "/advanced/building-plugins",
permanent: false
permanent: false,
},
{
source: "/guides/mainnet-forking",
destination: "/hardhat-network/docs/guides/forking-other-networks",
permanent: false
permanent: false,
},
{
source: "/hardhat-network/guides/mainnet-forking",
destination: "/hardhat-network/docs/guides/forking-other-networks",
permanent: false
permanent: false,
},
{
source: "/hardhat-network/reference",
destination: "/hardhat-network/docs/reference",
permanent: false
permanent: false,
},
{
source: "/hardhat-network/explanation/mining-modes",
destination: "/hardhat-network/docs/explanation/mining-modes",
permanent: false
permanent: false,
},
{
source: "/troubleshooting/verbose-logging",
destination: "/hardhat-runner/docs/troubleshooting/verbose-logging",
permanent: false
permanent: false,
},
{
source: "/troubleshooting/common-problems",
destination: "/hardhat-runner/docs/troubleshooting/common-problems",
permanent: false
permanent: false,
},
{
source: "/errors",
destination: "/hardhat-runner/docs/errors",
permanent: false
permanent: false,
},
{
source: "/reference/stability-guarantees",
destination: "/hardhat-runner/docs/reference/stability-guarantees",
permanent: false
permanent: false,
},
{
source: "/reference/solidity-support",
destination: "/hardhat-runner/docs/reference/solidity-support",
permanent: false
permanent: false,
},
{
source: "/plugins/:slug",
destination: "/hardhat-runner/plugins/:slug",
permanent: false
permanent: false,
},
{
source: "/hardhat-runner/docs/guides/shorthand",
destination: "/hardhat-runner/docs/guides/command-line-completion",
permanent: false
permanent: false,
},
// guides redirects, exceptions go first
{
source: "/guides/:slug(hardhat-runtime-environment|create-task|scripts|building-plugins|vscode-tests)",
source:
"/guides/:slug(hardhat-runtime-environment|create-task|scripts|building-plugins|vscode-tests)",
destination: "/hardhat-runner/docs/advanced/:slug",
permanent: false
permanent: false,
},
{
source: "/guides/:slug(waffle-testing|truffle-testing|truffle-migration|ganache-tests)",
source:
"/guides/:slug(waffle-testing|truffle-testing|truffle-migration|ganache-tests)",
destination: "/hardhat-runner/docs/other-guides/:slug",
permanent: false
permanent: false,
},
{
source: "/guides/parallel-tests",
destination: "/hardhat-runner/docs/guides/test-contracts#running-tests-in-parallel",
permanent: false
destination:
"/hardhat-runner/docs/guides/test-contracts#running-tests-in-parallel",
permanent: false,
},
{
source: "/guides/:slug",
destination: "/hardhat-runner/docs/guides/:slug",
permanent: false
permanent: false,
},
{
source: "/advanced/:slug",
destination: "/hardhat-runner/docs/advanced/:slug",
permanent: false
permanent: false,
},
{
source: "/chai-matchers",
destination: "/hardhat-chai-matchers",
permanent: false
permanent: false,
},
{
source: "/chai-matchers/:slug",
destination: "/hardhat-chai-matchers/docs/:slug",
permanent: false
permanent: false,
},
{
source: "/network-helpers",
destination: "/hardhat-network-helpers",
permanent: false
permanent: false,
},
{
source: "/network-helpers/:slug",
destination: "/hardhat-network-helpers/docs/:slug",
permanent: false
permanent: false,
},
...loadErrorRedirects()
...loadErrorRedirects(),
];


module.exports = customRedirects;

function loadErrorRedirects() {
Expand Down
7 changes: 4 additions & 3 deletions docs/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ export const SOCIALS_LINKS = {
[SocialsEnum.DISCORD]: "/discord",
};

export const BANNER_LINK = "https://nomic.foundation/hiring";
export const BANNER_LINK =
"https://cryptpad.fr/form/#/2/form/view/HuPIRv4gvziSV0dPV1SJncKzYJXTVc8LGCaMfLUoj2c";

export const PRIVACY_POLICY_PATH = "/privacy-policy.html";

export const bannerContent = {
text: "Join the Hardhat team! Nomic Foundation is hiring",
shortText: "Join the Hardhat team! We are hiring",
text: "Please take a few minutes to complete the 2022 Solidity Survey",
shortText: "Complete the 2022 Solidity Survey here",
href: BANNER_LINK,
};

Expand Down
6 changes: 3 additions & 3 deletions docs/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5191,9 +5191,9 @@ decode-named-character-reference@^1.0.0:
character-entities "^2.0.0"

decode-uri-component@^0.2.0:
version "0.2.0"
resolved "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz"
integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=
version "0.2.2"
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9"
integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==

dedent@^0.7.0:
version "0.7.0"
Expand Down
7 changes: 7 additions & 0 deletions packages/hardhat-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# hardhat

## 2.12.4

### Patch Changes

- 7154371e3: Fixed an issue that caused compilation with solcjs to not work when Hardhat is bundled
- 2fc9a2cb8: Show a message with a link to the Solidity Developer Survey

## 2.12.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/hardhat-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hardhat",
"version": "2.12.3",
"version": "2.12.4",
"author": "Nomic Labs LLC",
"license": "MIT",
"homepage": "https://hardhat.org",
Expand Down
12 changes: 11 additions & 1 deletion packages/hardhat-core/src/internal/cli/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import { saveFlamegraph } from "../core/flamegraph";
import { Analytics } from "./analytics";
import { ArgumentsParser } from "./ArgumentsParser";
import { enableEmoji } from "./emoji";
import { createProject } from "./project-creation";
import { createProject, showSoliditySurveyMessage } from "./project-creation";
import { confirmHHVSCodeInstallation, confirmTelemetryConsent } from "./prompt";
import {
InstallationState,
Expand Down Expand Up @@ -301,6 +301,16 @@ async function main() {
process.stdout.isTTY === true
) {
await suggestInstallingHardhatVscode();

// we show the solidity survey message if the tests failed and only
// 1/3 of the time
if (
process.exitCode !== 0 &&
Math.random() < 0.3333 &&
process.env.HARDHAT_HIDE_SOLIDITY_SURVEY_MESSAGE !== "true"
) {
showSoliditySurveyMessage();
}
}

log(`Killing Hardhat after successfully running task ${taskName}`);
Expand Down
Loading

0 comments on commit 92ac52b

Please sign in to comment.