Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the ESM init message wording #6325

Merged
merged 1 commit into from
Feb 19, 2025
Merged

Change the ESM init message wording #6325

merged 1 commit into from
Feb 19, 2025

Conversation

alcuadrado
Copy link
Member

No description provided.

Copy link

vercel bot commented Feb 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hardhat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 18, 2025 11:49am

@github-actions github-actions bot added the status:ready This issue is ready to be worked on label Feb 18, 2025
@ChristopherDedominici ChristopherDedominici linked an issue Feb 18, 2025 that may be closed by this pull request
@alcuadrado alcuadrado enabled auto-merge February 19, 2025 09:50
@@ -33,7 +33,7 @@ export async function promptForMigrateToEsm(
{
name: "migrateToEsm",
type: "confirm",
message: `Hardhat only supports ESM projects. Would you like to set the type for ${shortenPath(absolutePathToPackageJson)} to "module" now?`,
message: `Hardhat only supports ESM projects. Would you like to change your package.json "${shortenPath(absolutePathToPackageJson)}" to turn your project into ESM?`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As @ChristopherDedominici pointed out, after the fix from #6326, we would get duplicate package.json in the message. I'm going to apply this suggestion and then queue the PR for merge.

Suggested change
message: `Hardhat only supports ESM projects. Would you like to change your package.json "${shortenPath(absolutePathToPackageJson)}" to turn your project into ESM?`,
message: `Hardhat only supports ESM projects. Would you like to change your "${shortenPath(absolutePathToPackageJson)}" to turn your project into ESM?`,

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or not, I'll create a new PR since I cannot remove this one from the merge queue 🤦

@alcuadrado alcuadrado added this pull request to the merge queue Feb 19, 2025
Merged via the queue into v-next with commit 1e4df79 Feb 19, 2025
78 checks passed
@alcuadrado alcuadrado deleted the change-esm-message branch February 19, 2025 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:ready This issue is ready to be worked on
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Update init message on ESM projects
2 participants