feat: add timestamp field to version metadata binding in local dev#12185
feat: add timestamp field to version metadata binding in local dev#12185
Conversation
🦋 Changeset detectedLatest commit: a9878d5 The changes in this PR will be included in the next version bump. 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 |
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
|
Claude finished @penalosa's task —— View job Changeset Review CompleteTasks:
Review Results✅ All changesets look good The changeset
The changeset correctly includes both |
Move version metadata simulation from Wrangler into Miniflare as a proper plugin. The version metadata binding now includes id, tag, and timestamp fields, making it easier to test version-aware logic locally. Fixes #8989 Co-Authored-By: smacleod@cloudflare.com <samuel@macleod.space>
…apped binding Co-Authored-By: smacleod@cloudflare.com <samuel@macleod.space>
…g name Co-Authored-By: smacleod@cloudflare.com <samuel@macleod.space>
ed9822a to
88fe9ae
Compare
Co-authored-by: Somhairle MacLeòid <penalosa@users.noreply.github.com>
|
@claude it seems like this is failing PR validation requirements? Could you check the PR description and template and update as needed? |
|
Claude finished @penalosa's task —— View job PR Validation Issue Found and Solution Ready ✅I've identified the exact issue causing the PR validation failure and have the solution ready. Root CauseThe PR description doesn't follow the exact template format required by Current vs Required FormatCurrent (failing): - Tests
- [x] Tests included
- [ ] Automated tests not possible - manual testing has been completed as follows:
- [ ] Additional testing not necessary because:Required template format: - Tests
- [ ] Tests included/updated
- [ ] Automated tests not possible - manual testing has been completed as follows:
- [ ] Additional testing not necessary because:The FixChange Manual Fix InstructionsSince I need approval for the
This should resolve the PR validation failure immediately. Alternative: If you approve the |
Fixes #8989.
Devin PR requested by @penalosa
This PR moves the version metadata simulation from Wrangler into Miniflare as a proper plugin and adds the missing
timestampfield. Previously, the version metadata binding was emulated inline in Wrangler as a simple JSON variable with onlyidandtagfields. Now it's implemented as a Miniflare plugin that provides all three fields:id,tag, andtimestamp.Changes:
version-metadataplugin in Miniflare using a simple JSON bindingUpdates since last revision:
id,tag, andtimestampinternallySuggested review focus:
packages/miniflare/src/plugins/version-metadata/index.ts- caller passes just the binding name, plugin generates the metadata valuesidandtimestampare generated fresh when bindings are created (new UUID and current time)Link to Devin run: https://app.devin.ai/sessions/3d014f25a52f49af8818984117403ba6