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

IMAGES-1525: Add Images binding support to vitest-pool-workers #8362

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

Conversation

ns476
Copy link
Contributor

@ns476 ns476 commented Mar 5, 2025

Fixes IMAGES-1525

Adds support for the Images binding to vitest-pool-workers


Copy link

changeset-bot bot commented Mar 5, 2025

🦋 Changeset detected

Latest commit: 8e48658

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

This PR includes changesets to release 1 package
Name Type
@cloudflare/vitest-pool-workers Minor

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

@ns476 ns476 changed the title Nskehin/images tests IMAGES-1525: Add Images binding support to vitest-pool-workers Mar 5, 2025
@ns476 ns476 force-pushed the nskehin/images-tests branch from 27f1bca to 9755631 Compare March 5, 2025 18:48
Copy link
Contributor

github-actions bot commented Mar 5, 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/13726137416/npm-package-wrangler-8362

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

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

Or you can use npx with this latest build directly:

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

cloudflare-workers-bindings-extension:

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

create-cloudflare:

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

@cloudflare/kv-asset-handler:

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

miniflare:

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

@cloudflare/pages-shared:

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

@cloudflare/unenv-preset:

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

@cloudflare/vite-plugin:

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

@cloudflare/vitest-pool-workers:

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

@cloudflare/workers-editor-shared:

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

@cloudflare/workers-shared:

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

@cloudflare/workflows-shared:

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

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.

@ns476 ns476 force-pushed the nskehin/images-tests branch from 9755631 to 321e40e Compare March 5, 2025 21:21
@@ -50,6 +50,7 @@ const WorkersPoolOptionsSchema = z.object({
miniflare: z
.object({
workers: z.array(z.object({}).passthrough()).optional(),
experimentalImagesLocalMode: z.oboolean(),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if this is the best place for this to live - it could just as well be somewhere else

@ns476 ns476 force-pushed the nskehin/images-tests branch from 321e40e to e078316 Compare March 5, 2025 21:44
@ns476 ns476 marked this pull request as ready for review March 5, 2025 22:02
@ns476 ns476 requested a review from a team as a code owner March 5, 2025 22:02
@penalosa
Copy link
Contributor

penalosa commented Mar 5, 2025

This should be rebased on top of #8273

Additionally, I think (at least for now) we should force local mode to true? Vitest tests should be fully offline and shouldn't access the API

@ns476 ns476 force-pushed the nskehin/images-tests branch from e078316 to e7a1bb3 Compare March 7, 2025 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Approved
Development

Successfully merging this pull request may close these issues.

2 participants