Skip to content

C3: Fix issue with hono Bindings type#5687

Merged
jculvey merged 2 commits intomainfrom
c3-fix-hono-bindings-type
Apr 24, 2024
Merged

C3: Fix issue with hono Bindings type#5687
jculvey merged 2 commits intomainfrom
c3-fix-hono-bindings-type

Conversation

@jculvey
Copy link
Copy Markdown
Contributor

@jculvey jculvey commented Apr 23, 2024

What this PR solves / how to test

This fixes an issue introduced with #5675 where the Bindings type ends up being too permissive (essentially Record<string, unknown>).

Open to suggestions on a better implementation of the new type.

Author has addressed the following

@jculvey jculvey requested a review from a team April 23, 2024 03:48
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 23, 2024

🦋 Changeset detected

Latest commit: bee5189

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 Apr 23, 2024

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/8806211271/npm-package-wrangler-5687

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

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

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8806211271/npm-package-wrangler-5687 dev path/to/script.js
Additional artifacts:
npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8806211271/npm-package-create-cloudflare-5687 --no-auto-update
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8806211271/npm-package-cloudflare-kv-asset-handler-5687
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8806211271/npm-package-miniflare-5687
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8806211271/npm-package-cloudflare-pages-shared-5687
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8806211271/npm-package-cloudflare-vitest-pool-workers-5687

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


wrangler@3.51.2 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20240405.2
workerd 1.20240419.0 1.20240419.0
workerd --version 1.20240419.0 2024-04-19

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

@yusukebe
Copy link
Copy Markdown
Contributor

Hi @jculvey

As mentioned by also @Cherry, it should not allow Record<string, unknown>. I think your way of defining Bindings is best, though anyone can write more shortly. Thanks!

@jculvey jculvey force-pushed the c3-fix-hono-bindings-type branch from c263846 to bee5189 Compare April 24, 2024 13:59
@jculvey jculvey merged commit 906c39a into main Apr 24, 2024
@jculvey jculvey deleted the c3-fix-hono-bindings-type branch April 24, 2024 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants