-
Notifications
You must be signed in to change notification settings - Fork 92
chore(deps): update cloudflare-workers #6514
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
79efc1a
chore(deps): update cloudflare-workers
renovate-fullsend[bot] 8411d78
chore(mint-worker): migrate vitest config and tests for vitest-pool-w…
fullsend-ai-coder[bot] 3ee498c
fix(mint-worker): add ambient type declarations for vitest-pool-worke…
fullsend-ai-coder[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| // Ambient type declarations for the Cloudflare Worker test environment. | ||
| // | ||
| // @cloudflare/vitest-pool-workers v0.22+ moved the "cloudflare:test" module | ||
| // declaration to a separate export subpath ("./types"). The triple-slash | ||
| // reference below pulls it in so that test files can import | ||
| // createExecutionContext, waitOnExecutionContext, etc. | ||
| /// <reference types="@cloudflare/vitest-pool-workers/types" /> | ||
|
|
||
| // Declare the main module's exports so that | ||
| // import { exports } from "cloudflare:workers" | ||
| // resolves exports.default to the worker's default export handler. | ||
| // Required by @cloudflare/workers-types which derives Cloudflare.Exports | ||
| // from GlobalProps.mainModule (defaults to {} when undeclared). | ||
| declare namespace Cloudflare { | ||
| interface GlobalProps { | ||
| mainModule: typeof import("./src/index"); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,32 +1,31 @@ | ||
| import { defineWorkersConfig } from "@cloudflare/vitest-pool-workers/config"; | ||
| import { cloudflareTest } from "@cloudflare/vitest-pool-workers"; | ||
| import { defineConfig } from "vitest/config"; | ||
|
|
||
| export default defineWorkersConfig({ | ||
| test: { | ||
| poolOptions: { | ||
| workers: { | ||
| wrangler: { configPath: "./wrangler.toml" }, | ||
| miniflare: { | ||
| // Minimal env bindings for smoke testing. These satisfy | ||
| // the inline ROLE_APP_IDS presence check and mintcoreInitMint() | ||
| // so the WASM bridge can boot. "coder" is a canonical mintcore role — using a | ||
| // non-canonical name (e.g. "test") causes mintcoreInitMint | ||
| // to fail because HasRole() rejects unknown roles, and the | ||
| // ConfigError is cached permanently. | ||
| // PEM secrets are not needed for the /health and routing tests. | ||
| // | ||
| // ALLOWED_ORGS is intentionally omitted to verify the Worker | ||
| // boots without it (per-repo-only deployment parity with Go | ||
| // mintcore, which allows empty ALLOWED_ORGS since #5856). | ||
| // | ||
| // ALLOWED_WORKFLOW_FILES is set explicitly here (not via a | ||
| // production default). Production code defaults to "" (fail- | ||
| // closed) when the env var is absent — matching cmd/mint. | ||
| bindings: { | ||
| ROLE_APP_IDS: '{"coder":"12345"}', | ||
| ALLOWED_WORKFLOW_FILES: "*", | ||
| }, | ||
| export default defineConfig({ | ||
| plugins: [ | ||
| cloudflareTest({ | ||
| wrangler: { configPath: "./wrangler.toml" }, | ||
| miniflare: { | ||
| // Minimal env bindings for smoke testing. These satisfy | ||
| // the inline ROLE_APP_IDS presence check and mintcoreInitMint() | ||
| // so the WASM bridge can boot. "coder" is a canonical mintcore role — using a | ||
| // non-canonical name (e.g. "test") causes mintcoreInitMint | ||
| // to fail because HasRole() rejects unknown roles, and the | ||
| // ConfigError is cached permanently. | ||
| // PEM secrets are not needed for the /health and routing tests. | ||
| // | ||
| // ALLOWED_ORGS is intentionally omitted to verify the Worker | ||
| // boots without it (per-repo-only deployment parity with Go | ||
| // mintcore, which allows empty ALLOWED_ORGS since #5856). | ||
| // | ||
| // ALLOWED_WORKFLOW_FILES is set explicitly here (not via a | ||
| // production default). Production code defaults to "" (fail- | ||
| // closed) when the env var is absent — matching cmd/mint. | ||
| bindings: { | ||
| ROLE_APP_IDS: '{"coder":"12345"}', | ||
| ALLOWED_WORKFLOW_FILES: "*", | ||
| }, | ||
| }, | ||
| }, | ||
| }, | ||
| }), | ||
| ], | ||
| }); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.