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

make the workerd compatibility date retrieval more stable by fetching it directly from the npm registry #4627

Merged
merged 4 commits into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/lucky-ghosts-sell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-cloudflare": patch
---

make the workerd compatibility retrieval more stable (by always performing it with npm)
6 changes: 3 additions & 3 deletions packages/create-cloudflare/src/helpers/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,9 +381,9 @@ export const listAccounts = async () => {
* @returns The latest compatibility date for workerd in the form "YYYY-MM-DD"
*/
export async function getWorkerdCompatibilityDate() {
const { npm } = detectPackageManager();

return runCommand([npm, "info", "workerd", "dist-tags.latest"], {
// the following command is run using npm regardless of the currently used package manager, this makes the
// command more stable and it doesn't really have any effect in regards to the currently used package manager
return runCommand(["npm", "info", "workerd", "dist-tags.latest"], {
silent: true,
captureOutput: true,
startText: "Retrieving current workerd compatibility date",
Expand Down