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

chore: graduate hello world workers + assets templates #8379

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

Conversation

emily-shen
Copy link
Contributor

@emily-shen emily-shen commented Mar 6, 2025

Fixes DEVX-1729

Screenshot 2025-03-06 at 15 15 43
  • Tests
    • TODO (before merge)
    • Tests included
    • Tests not necessary because: existing tests
  • Wrangler E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required
    • Not required because:
  • Public documentation

@emily-shen emily-shen requested review from a team as code owners March 6, 2025 15:27
Copy link

changeset-bot bot commented Mar 6, 2025

🦋 Changeset detected

Latest commit: 37a023c

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

@@ -48,7 +48,7 @@ export const isUpdateAvailable = async () => {
export const C3_DEFAULTS: C3Args = {
projectName: new Haikunator().haikunate({ tokenHex: true }),
category: "hello-world",
type: "hello-world",
type: "hello-world-with-assets",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed the default to worker + assets

Is it weird for the default to be in the middle of the list? is this list too many options?
Screenshot 2025-03-06 at 15 15 43

Copy link
Contributor

Choose a reason for hiding this comment

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

works for me.

@emily-shen emily-shen force-pushed the emily/graduate-assets-hello-world branch from c7fa27a to e31239c Compare March 6, 2025 15:46
Copy link
Contributor

github-actions bot commented Mar 6, 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/13729499416/npm-package-wrangler-8379

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

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

Or you can use npx with this latest build directly:

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

cloudflare-workers-bindings-extension:

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

create-cloudflare:

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

@cloudflare/kv-asset-handler:

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

miniflare:

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

@cloudflare/pages-shared:

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

@cloudflare/unenv-preset:

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

@cloudflare/vite-plugin:

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

@cloudflare/vitest-pool-workers:

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

@cloudflare/workers-editor-shared:

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

@cloudflare/workers-shared:

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

@cloudflare/workflows-shared:

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

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


[email protected] includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20250224.0
workerd 1.20250224.0 1.20250224.0
workerd --version 1.20250224.0 2025-02-24

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

@emily-shen emily-shen added the e2e Run wrangler e2e tests on a PR label Mar 6, 2025
@@ -128,7 +127,6 @@ describe.skipIf(experimental || frameworkToTest || isQuarantineMode())(
expect(project.path).toExist();
expect(output).toContain(`type Scheduled Worker (Cron Trigger)`);
expect(output).toContain(`lang JavaScript`);
expect(output).toContain(`no git`);
Copy link
Contributor Author

@emily-shen emily-shen Mar 6, 2025

Choose a reason for hiding this comment

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

Not sure why this is failing now - I would've expected this to start failing after #8290. This question definitely isn't there if you pass in --no-git on c3 latest, so it's not a result of this PR. Were the tests just cached all that time? 😬

Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps because these tests were skipped in experimental mode?

describe.skipIf(experimental || ...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

but the no git thing applies regardless of whether experimental, so they should have have been failing in the experimental:false runs too 🤔

@petebacondarwin petebacondarwin force-pushed the emily/graduate-assets-hello-world branch from e04363c to ac2ae06 Compare March 7, 2025 13:50
Copy link
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -128,7 +127,6 @@ describe.skipIf(experimental || frameworkToTest || isQuarantineMode())(
expect(project.path).toExist();
expect(output).toContain(`type Scheduled Worker (Cron Trigger)`);
expect(output).toContain(`lang JavaScript`);
expect(output).toContain(`no git`);
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps because these tests were skipped in experimental mode?

describe.skipIf(experimental || ...

@@ -32,7 +32,35 @@ type WorkerTestConfig = RunnerConfig & {

function getWorkerTests(opts: { experimental: boolean }): WorkerTestConfig[] {
if (opts.experimental) {
// none currently
Copy link
Contributor

Choose a reason for hiding this comment

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

🎉

@@ -48,7 +48,7 @@ export const isUpdateAvailable = async () => {
export const C3_DEFAULTS: C3Args = {
projectName: new Haikunator().haikunate({ tokenHex: true }),
category: "hello-world",
type: "hello-world",
type: "hello-world-with-assets",
Copy link
Contributor

Choose a reason for hiding this comment

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

works for me.

@emily-shen emily-shen force-pushed the emily/graduate-assets-hello-world branch from 47df992 to 4a88cc9 Compare March 7, 2025 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c3-e2e e2e Run wrangler e2e tests on a PR
Projects
Status: Approved
Development

Successfully merging this pull request may close these issues.

3 participants