Skip to content

fix(create-astro): add timeout to npm registry fetch to prevent hanging#15344

Merged
matthewp merged 4 commits intonextfrom
create-astro-hang
Jan 30, 2026
Merged

fix(create-astro): add timeout to npm registry fetch to prevent hanging#15344
matthewp merged 4 commits intonextfrom
create-astro-hang

Conversation

@matthewp
Copy link
Contributor

@matthewp matthewp commented Jan 29, 2026

Changes

  • Adds a 10 second timeout to the npm registry fetch in create-astro to prevent indefinite hanging when the registry is slow or unresponsive
  • Adds a warning message when the fetch fails: "Unable to fetch latest {package} version from the npm registry. Using fallback version."
  • The CLI will now continue with the fallback version instead of hanging forever

Testing

Manual tested while npm registry was acting weird

Docs

N/A, bug fix

@changeset-bot
Copy link

changeset-bot bot commented Jan 29, 2026

🦋 Changeset detected

Latest commit: e2a708a

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

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

@github-actions github-actions bot added the pkg: create-astro Related to the `create-astro` package (scope) label Jan 29, 2026
@matthewp matthewp self-assigned this Jan 29, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 29, 2026

⚠️ Package Trust Level Decreased

Caution

Decreased trust levels may indicate a higher risk of supply chain attacks. Please review these changes carefully.

📦 Package 🔒 Before 🔓 After
eslint-plugin-regexp trusted-with-provenance none
@cloudflare/kv-asset-handler trusted-with-provenance none
@cloudflare/unenv-preset trusted-with-provenance none
workerd trusted-with-provenance none
@sveltejs/vite-plugin-svelte-inspector trusted-with-provenance provenance
@sveltejs/vite-plugin-svelte trusted-with-provenance provenance
jsdoc-type-pratt-parser trusted-with-provenance none
miniflare trusted-with-provenance none
youch provenance none
@cloudflare/workerd-darwin-64 trusted-with-provenance none
@cloudflare/workerd-darwin-arm64 trusted-with-provenance none
@cloudflare/workerd-linux-64 trusted-with-provenance none
@cloudflare/workerd-linux-arm64 trusted-with-provenance none
@cloudflare/workerd-windows-64 trusted-with-provenance none
wrangler trusted-with-provenance none

Copy link
Contributor

@vicb vicb left a comment

Choose a reason for hiding this comment

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

LGTM, one tiny nit.

Thank you so much for the fast turn around

Co-authored-by: Victor Berchet <victor@suumit.com>
@matthewp matthewp merged commit 9d87f77 into next Jan 30, 2026
22 checks passed
@matthewp matthewp deleted the create-astro-hang branch January 30, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: create-astro Related to the `create-astro` package (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants