Skip to content

chore: remove generate components from fetch#259

Merged
luxass merged 4 commits intomainfrom
remove-fetch-components
Sep 26, 2025
Merged

chore: remove generate components from fetch#259
luxass merged 4 commits intomainfrom
remove-fetch-components

Conversation

@luxass
Copy link
Copy Markdown
Member

@luxass luxass commented Sep 26, 2025

🔗 Linked issue

📚 Description

Summary by CodeRabbit

  • New Features

    • Enhanced Cloudflare Worker typings with generic props for ExecutionContext and Durable Objects, plus loopback/stub utilities for RPC-style exports.
    • Extended public types to support project-level augmentation of worker exports and durable namespace bindings.
    • D1 typings: added total_attempts to metadata.
  • Refactor

    • Removed public re-export of component types from the fetch package (may require updating imports).
  • Chores

    • Removed the components generation script, related build task, and an unused dev dependency from the fetch package.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Sep 26, 2025

⚠️ No Changeset found

Latest commit: 5811b54

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Sep 26, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Adds project-mergeable GlobalProps and generic Props to Cloudflare TypeScript typings (ExecutionContext, DurableObjectState, WorkerEntrypoint, DurableObject), introduces loopback/stub typing utilities and cloudflare:workers module augmentation, updates D1 meta typing. Removes fetch package component-generation script, task, and component type re-exports.

Changes

Cohort / File(s) Summary
Cloudflare worker typing augmentation
apps/api/wrangler-types.d.ts, apps/web/worker/wrangler-types.d.ts
Add GlobalProps and projection utilities; make ExecutionContext and DurableObjectState generic over Props; add WorkerEntrypoint<Env, Props> and DurableObject<Env, Props> generics; introduce Loopback* and stub types; compute Exports from MainModule; module-augment cloudflare:workers; minor D1 typing change (total_attempts?) and literal normalization.
Fetch package: remove component-generation tooling
packages/fetch/package.json, packages/fetch/turbo.json, packages/fetch/scripts/extract-components.ts, packages/fetch/src/components.ts, packages/fetch/src/index.ts
Remove generate:components script/task and its extract-components.ts script; delete autogenerated header/import from src/components.ts; stop re-exporting ./components types from src/index.ts; remove related devDependency.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Client
  participant Worker as WorkerEntrypoint<Env,Props>
  participant Ctx as ExecutionContext<Props>
  participant DO as DurableObject<Props>

  Client->>Worker: fetch(request, env, ctx)
  Note over Worker,Ctx: ctx.props : Props (readonly)
  Worker->>DO: instantiate / call (state: DurableObjectState<Props>)
  DO-->>Worker: response / handling
  Worker-->>Client: Response

  Note over Worker: Loopback/Stub types map exports to local typed stubs (type-level)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

I thump my paws—types stretch and grow,
Props tucked in pockets, tidy and low.
Loopbacks hop, stubs find their place,
Old scripts gone, I bound with grace.
🐇✨

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch remove-fetch-components

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 29a3bd6 and 5811b54.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (7)
  • apps/api/wrangler-types.d.ts (12 hunks)
  • apps/web/worker/wrangler-types.d.ts (12 hunks)
  • packages/fetch/package.json (0 hunks)
  • packages/fetch/scripts/extract-components.ts (0 hunks)
  • packages/fetch/src/components.ts (0 hunks)
  • packages/fetch/src/index.ts (0 hunks)
  • packages/fetch/turbo.json (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Sep 26, 2025

📋 OpenAPI Schema Analysis

No changes detected - The OpenAPI schema is identical to the main branch.

🤖 This comment is automatically updated when you push new commits.

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Sep 26, 2025

Preview Deployment for Web

The Web worker has been deployed successfully.

Preview URL: https://preview.ucdjs.dev

This preview was built from commit 5811b54


🤖 This comment will be updated automatically when you push new commits to this PR.

@luxass luxass marked this pull request as ready for review September 26, 2025 03:41
@luxass luxass merged commit f31fa10 into main Sep 26, 2025
7 of 8 checks passed
@luxass luxass deleted the remove-fetch-components branch September 26, 2025 03:41
@github-actions
Copy link
Copy Markdown
Contributor

Preview Deployment for Api

The Api worker has been deployed successfully.

Preview URL: https://preview.api.ucdjs.dev

This preview was built from commit 5811b54


🤖 This comment will be updated automatically when you push new commits to this PR.

@github-actions github-actions bot added api Changes related to the API. web Changes related to the Website. labels Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Changes related to the API. web Changes related to the Website.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant