Skip to content

Write fetch handler so that npm run start works#7894

Merged
petebacondarwin merged 2 commits into
cloudflare:mainfrom
juanmirocks:patch-1
Apr 4, 2025
Merged

Write fetch handler so that npm run start works#7894
petebacondarwin merged 2 commits into
cloudflare:mainfrom
juanmirocks:patch-1

Conversation

@juanmirocks
Copy link
Copy Markdown
Contributor

@juanmirocks juanmirocks commented Jan 24, 2025

Write a default fetch handler like the JS example: https://github.com/cloudflare/workers-sdk/edit/main/packages/create-cloudflare/templates/scheduled/js/src/index.js

Without it, npm run start / dev will point to a browser location that does not exist.


  • Tests
    • TODO (before merge)
    • Tests included
    • Tests not necessary because:
  • E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required
    • Not required because: c3 change
  • Public documentation
    • TODO (before merge)
    • Cloudflare docs PR(s):
    • Documentation not necessary because: change does not affect documentation
  • Wrangler V3 Backport
    • TODO (before merge)
    • Wrangler PR:
    • Not necessary because: c3 is not backported

@juanmirocks juanmirocks requested a review from a team January 24, 2025 13:57
@juanmirocks juanmirocks requested a review from a team as a code owner January 24, 2025 13:57
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jan 24, 2025

🦋 Changeset detected

Latest commit: e795073

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

This PR includes changesets to release 1 package
Name Type
create-cloudflare Patch

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
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 28, 2025

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14259893874/npm-package-wrangler-7894

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/7894/npm-package-wrangler-7894

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14259893874/npm-package-wrangler-7894 dev path/to/script.js
Additional artifacts:

cloudflare-workers-bindings-extension:

wget https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14259893874/npm-package-cloudflare-workers-bindings-extension-7894 -O ./cloudflare-workers-bindings-extension.0.0.0-v9324c06be.vsix && code --install-extension ./cloudflare-workers-bindings-extension.0.0.0-v9324c06be.vsix

create-cloudflare:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14259893874/npm-package-create-cloudflare-7894 --no-auto-update

@cloudflare/kv-asset-handler:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14259893874/npm-package-cloudflare-kv-asset-handler-7894

miniflare:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14259893874/npm-package-miniflare-7894

@cloudflare/pages-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14259893874/npm-package-cloudflare-pages-shared-7894

@cloudflare/unenv-preset:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14259893874/npm-package-cloudflare-unenv-preset-7894

@cloudflare/vite-plugin:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14259893874/npm-package-cloudflare-vite-plugin-7894

@cloudflare/vitest-pool-workers:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14259893874/npm-package-cloudflare-vitest-pool-workers-7894

@cloudflare/workers-editor-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14259893874/npm-package-cloudflare-workers-editor-shared-7894

@cloudflare/workers-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14259893874/npm-package-cloudflare-workers-shared-7894

@cloudflare/workflows-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14259893874/npm-package-cloudflare-workflows-shared-7894

Note that these links will no longer work once the GitHub Actions artifact expires.


wrangler@4.7.1 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 4.20250321.2
workerd 1.20250321.0 1.20250321.0
workerd --version 1.20250321.0 2025-03-21

Please ensure constraints are pinned, and miniflare/workerd minor versions match.

@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk Apr 2, 2025
@petebacondarwin petebacondarwin added package:c3 Relating to C3 (create-cloudflare) package ci:c3-e2e Run C3 E2E tests on a pull request labels Apr 2, 2025
@petebacondarwin petebacondarwin self-assigned this Apr 4, 2025
@petebacondarwin petebacondarwin merged commit 15a7618 into cloudflare:main Apr 4, 2025
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk Apr 4, 2025
@workers-devprod workers-devprod mentioned this pull request Apr 4, 2025
@workers-devprod workers-devprod added the contribution [Holopin] Recognizes an open-source contribution, big or small label Apr 4, 2025
@holopin-bot
Copy link
Copy Markdown

holopin-bot Bot commented Apr 4, 2025

Congratulations @juanmirocks, the maintainer of this repository has issued you a holobyte! Here it is: https://holopin.io/holobyte/cm92mb14w16240cl804kpskkw

This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account.
Or if you're new to Holopin, you can simply sign up with GitHub, which will do the trick!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:c3-e2e Run C3 E2E tests on a pull request contribution [Holopin] Recognizes an open-source contribution, big or small package:c3 Relating to C3 (create-cloudflare) package

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants