Skip to content

Add update notifier and skip version check option #175

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

0x7EAB07
Copy link

Added

Update notifier

Addresses #155

Version check is skippable (In case we want to add a blocking check in the future).

Copy link

changeset-bot bot commented Jun 18, 2025

🦋 Changeset detected

Latest commit: 31ada70

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
create-solana-dapp Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@@ -12,6 +14,7 @@ export async function main(argv: string[]) {

// Get app info from package.json
const app = getAppInfo()
const notifier = updateNotifier({ pkg: app })
Copy link
Collaborator

Choose a reason for hiding this comment

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

For this to work as expected, it doesn't make sense to wait 24 hours to notify. Instead, we want to make this check always and forget about the interval all together. So the updateCheckInterval should be configured and set to 0.

image

Also, this const notifier = updateNotifier(...) is defined too early, this doesn't need to be defined if skipVersionCheck is enabled. So this should go right before running the notifier, and only when skipVersionCheck is not set.

@@ -28,6 +31,10 @@ export async function main(argv: string[]) {
console.warn(args)
}

if (!args.skipVersionCheck) {
notifier.notify()
Copy link
Collaborator

Choose a reason for hiding this comment

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

This logic is not handling anything? No custom message if versions are not met?

Currently, it just lets the notify go do it's thing, but no custom instructions on what to run instead, nor halting the process (as per the issue this PR aims to fix).

This means that the notification will (probably?) happen after the user completed the wizard, which is not what we're after.

One because it's too late (the user might already have issues before we tell them to update).

Second issue is that the message is incorrect. The default message suggests to do a global install, whereas create-solana-dapp is only supported to run using npx or npm create (or variations based on the package manager).

image

This version check should happen before any prompts, and after the package manager is selected so that we can give a specific instruction on what to run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants