Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .changeset/c3-frameworks-update-15265.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"create-cloudflare": patch
---

Update dependencies of "create-cloudflare"

The following dependency versions have been updated:

| Dependency | From | To |
| ------------ | ------ | ------ |
| create-solid | 0.10.0 | 0.11.0 |
7 changes: 7 additions & 0 deletions .changeset/deep-icons-appear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@cloudflare/deploy-helpers": patch
---

Refactor triggers deploy validation and dry-run

Move more logic into the deploy-helpers package for easy reuse by `cf`.
13 changes: 13 additions & 0 deletions .changeset/dependabot-update-15260.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"miniflare": patch
"wrangler": patch
---

Update dependencies of "miniflare", "wrangler"

The following dependency versions have been updated:

| Dependency | From | To |
| ------------------------- | ------------- | ------------- |
| @cloudflare/workers-types | ^5.20260815.1 | ^5.20260816.1 |
| workerd | 1.20260815.1 | 1.20260816.1 |
7 changes: 7 additions & 0 deletions .changeset/fix-esm-only-package-resolution.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@cloudflare/workers-utils": patch
---

Fix ESM-only packages missing from deploy metadata

ESM-only package dependencies (such as `@cloudflare/think`) were silently omitted from the package dependency metadata reported during `wrangler deploy` and `wrangler versions upload`. These packages are now correctly detected and included.
11 changes: 11 additions & 0 deletions .changeset/workflows-instances-delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@cloudflare/workflows-shared": minor
"wrangler": minor
"miniflare": minor
---

Add individual and batch Workflow instance deletion to the runtime and SDK.

- `WorkflowInstance.delete()` deletes one instance. Self-deletion stops the current execution.
- `env.MY_WORKFLOW.deleteBatch(instanceIds)` deletes up to 100 instances and returns `{ deleted, errors }` per input position.
- `wrangler workflows instances delete <name> [id..]` deletes instances remotely or with `--local`; IDs can also come from a JSON array passed with `--filename`, with a combined limit of 100.
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ updates:
schedule:
interval: "daily"
time: "06:00"
# These packages are published by Cloudflare and can be updated immediately.
cooldown:
exclude:
- "workerd"
- "@cloudflare/workers-types"
versioning-strategy: increase
labels:
- "package:miniflare"
Expand Down
2 changes: 1 addition & 1 deletion packages/create-cloudflare/src/frameworks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"create-qwik": "1.20.0",
"create-react-router": "8.3.0",
"create-rwsdk": "3.1.3",
"create-solid": "0.10.0",
"create-solid": "0.11.0",
"create-vike": "0.0.675",
"create-vinext-app": "1.0.0-beta.2",
"create-vite": "9.1.2",
Expand Down
3 changes: 2 additions & 1 deletion packages/deploy-helpers/src/deploy/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -751,10 +751,11 @@ export default async function deploy(
accountId,
scriptName,
workerTag,
env: props.env,
crons: props.triggers,
firstDeploy: !workerExists,
routes: props.routes,
validated: true,
dryRun: false,
});

logger.log("Current Version ID:", versionId);
Expand Down
5 changes: 3 additions & 2 deletions packages/deploy-helpers/src/shared/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,12 @@ export interface TriggerDeployment {

export type TriggerProps = {
config: Config;
accountId: string;
accountId: string | undefined;
scriptName: string;
workerTag?: string | null;
env: string | undefined;
crons: string[] | undefined;
routes: Route[];
firstDeploy: boolean;
dryRun: boolean;
validated: boolean;
};
25 changes: 22 additions & 3 deletions packages/deploy-helpers/src/triggers/deploy.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import assert from "node:assert";
import {
APIError,
formatTime,
Expand All @@ -16,7 +17,10 @@ import {
publishRoutes,
renderRoute,
} from "./publish-routes";
import { updateQueueConsumers } from "./queue-consumers";
import {
ensureQueuesExistByConfig,
updateQueueConsumers,
} from "./queue-consumers";
import { getWorkersDevSubdomain } from "./subdomain";
import { getZoneForRoute } from "./zones";
import type { TriggerDeployment, TriggerProps } from "../shared/types";
Expand All @@ -26,8 +30,23 @@ import type { Config, Route } from "@cloudflare/workers-utils";
export async function triggersDeploy(
props: TriggerProps
): Promise<string[] | void> {
const { config, accountId, scriptName, routes, crons } = props;
validateEventTriggerTargets(config, scriptName);
const { config, scriptName, routes, crons } = props;

if (props.validated !== true) {
validateEventTriggerTargets(config, scriptName);
}

if (props.dryRun) {
logger.log(`--dry-run: exiting now.`);
return;
}

const { accountId } = props;
assert(accountId);

if (props.validated !== true) {
await ensureQueuesExistByConfig(config, accountId, true, scriptName);
}

const routesOnly: Array<Route> = [];
const customDomainsOnly: Array<RouteObject> = [];
Expand Down
49 changes: 49 additions & 0 deletions packages/deploy-helpers/tests/package-dependencies.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,55 @@ describe("collectPackageDependencies", () => {
});
});

it("should collect ESM-only package dependencies", async ({ expect }) => {
const nodeModulesPath = path.join(process.cwd(), "node_modules");
const pkgPath = path.join(nodeModulesPath, "@cloudflare", "think");
fs.mkdirSync(pkgPath, { recursive: true });
fs.writeFileSync(path.join(pkgPath, "index.mjs"), "export default {}");
fs.writeFileSync(
path.join(pkgPath, "package.json"),
JSON.stringify(
{
name: "@cloudflare/think",
version: "0.0.8",
type: "module",
exports: {
".": {
types: "./dist/think.d.ts",
import: "./dist/think.js",
},
},
},
null,
2
)
);

fs.writeFileSync(
"package.json",
JSON.stringify(
{
name: "test-project",
dependencies: {
"@cloudflare/think": "^0.0.8",
},
},
null,
2
)
);

const result = await collectPackageDependencies(process.cwd());

expect(result).toEqual([
{
name: "@cloudflare/think",
packageJsonVersion: "^0.0.8",
installedVersion: "0.0.8",
},
]);
});

it("should use devDependencies version when duplicate exists in dependencies", async ({
expect,
}) => {
Expand Down
Loading
Loading