Skip to content

feat(miniflare): Implement KV/Assets plugin and Workers Assets simulator#6403

Merged
CarmenPopoviciu merged 1 commit intomainfrom
carmen/dev-with-assets
Aug 15, 2024
Merged

feat(miniflare): Implement KV/Assets plugin and Workers Assets simulator#6403
CarmenPopoviciu merged 1 commit intomainfrom
carmen/dev-with-assets

Conversation

@CarmenPopoviciu
Copy link
Copy Markdown
Contributor

@CarmenPopoviciu CarmenPopoviciu commented Aug 2, 2024

What this PR solves / how to test

This commit extends Miniflare's KV plugin's behaviour to support Workers assets, and therefore enables the emulation of Workers with assets in local development.

Fixes WC-2394

Author has addressed the following

  • Tests
    • TODO (before merge)
    • Included
    • Not necessary because:
  • E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required / Maybe required
    • Not required because: miniflare changes
  • Changeset (Changeset guidelines)
    • TODO (before merge)
    • Included
    • Not necessary because:
  • Public documentation
    • TODO (before merge)
    • Cloudflare docs PR(s):
    • Not necessary because: experimental feature

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Aug 2, 2024

🦋 Changeset detected

Latest commit: 9c0098e

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

This PR includes changesets to release 5 packages
Name Type
miniflare Minor
@cloudflare/workers-shared Minor
@cloudflare/pages-shared Patch
@cloudflare/vitest-pool-workers Patch
wrangler 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 Aug 2, 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/10401949551/npm-package-wrangler-6403

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

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

Or you can use npx with this latest build directly:

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

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


wrangler@3.71.0 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20240806.0
workerd 1.20240806.0 1.20240806.0
workerd --version 1.20240806.0 2024-08-06

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

@CarmenPopoviciu CarmenPopoviciu force-pushed the carmen/dev-with-assets branch 2 times, most recently from 04d2d43 to 909d11f Compare August 5, 2024 08:56
@CarmenPopoviciu CarmenPopoviciu marked this pull request as ready for review August 5, 2024 08:57
@CarmenPopoviciu CarmenPopoviciu requested a review from a team as a code owner August 5, 2024 08:57
@CarmenPopoviciu CarmenPopoviciu force-pushed the carmen/dev-with-assets branch from 909d11f to 7b670cb Compare August 5, 2024 11:35
@CarmenPopoviciu CarmenPopoviciu force-pushed the carmen/dev-with-assets branch 4 times, most recently from 13c9577 to 28e2453 Compare August 6, 2024 07:30
@CarmenPopoviciu CarmenPopoviciu force-pushed the carmen/dev-with-assets branch 3 times, most recently from 3d31814 to 72bd983 Compare August 12, 2024 20:54
@CarmenPopoviciu CarmenPopoviciu force-pushed the carmen/dev-with-assets branch 3 times, most recently from 5510317 to 9af15dc Compare August 14, 2024 16:03
@CarmenPopoviciu
Copy link
Copy Markdown
Contributor Author

@petebacondarwin this is ready to re-review

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

Let's get this in and iterate next week.

This commit adds a new KV/Assets plugin and an Assets Worker
in Miniflare, that are meant to emulate Workers with Assets in
local development.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants