Skip to content

Commit 60308d1

Browse files
Version Packages (#8148)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 1d2d236 commit 60308d1

File tree

23 files changed

+355
-328
lines changed

23 files changed

+355
-328
lines changed

.changeset/dependabot-update-8171.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

.changeset/fresh-doors-cheat.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/good-plants-stare.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/hot-ravens-roll.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/loud-ants-prove.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/olive-gifts-flash.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/wild-kiwis-behave.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages/create-cloudflare/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# create-cloudflare
22

3+
## 2.38.1
4+
5+
### Patch Changes
6+
7+
- [#8152](https://github.com/cloudflare/workers-sdk/pull/8152) [`ed3bc2f`](https://github.com/cloudflare/workers-sdk/commit/ed3bc2f3be45be55d20299ed3f481e75c63ba285) Thanks [@Cherry](https://github.com/Cherry)! - fix: generated wrangler.json and wrangler.jsonc files will now be formatted with tabs, to match the rest of the generated files
8+
39
## 2.38.0
410

511
### Minor Changes

packages/create-cloudflare/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-cloudflare",
3-
"version": "2.38.0",
3+
"version": "2.38.1",
44
"description": "A CLI for creating and deploying new applications to Cloudflare.",
55
"keywords": [
66
"cloudflare",

packages/miniflare/CHANGELOG.md

Lines changed: 106 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# miniflare
22

3+
## 3.20250214.0
4+
5+
### Patch Changes
6+
7+
- [#8171](https://github.com/cloudflare/workers-sdk/pull/8171) [`5e06177`](https://github.com/cloudflare/workers-sdk/commit/5e06177861b29aa9b114f9ecb50093190af94f4b) Thanks [@dependabot](https://github.com/apps/dependabot)! - chore: update dependencies of "miniflare" package
8+
9+
The following dependency versions have been updated:
10+
11+
| Dependency | From | To |
12+
| ------------------------- | ------------- | ------------- |
13+
| workerd | 1.20250204.0 | 1.20250214.0 |
14+
| @cloudflare/workers-types | ^4.20250204.0 | ^4.20250214.0 |
15+
316
## 3.20250204.1
417

518
### Patch Changes
@@ -567,20 +580,20 @@
567580
import { Miniflare } from "miniflare";
568581

569582
const mf = new Miniflare({
570-
workers: [
571-
{
572-
wrappedBindings: {
573-
Greeter: {
574-
scriptName: "impl",
575-
},
576-
},
577-
modules: true,
578-
script: `export default { fetch(){ return new Response(''); } }`,
579-
},
580-
{
581-
modules: true,
582-
name: "impl",
583-
script: `
583+
workers: [
584+
{
585+
wrappedBindings: {
586+
Greeter: {
587+
scriptName: "impl",
588+
},
589+
},
590+
modules: true,
591+
script: `export default { fetch(){ return new Response(''); } }`,
592+
},
593+
{
594+
modules: true,
595+
name: "impl",
596+
script: `
584597
class Greeter {
585598
sayHello(name) {
586599
return "Hello " + name;
@@ -591,8 +604,8 @@
591604
return new Greeter();
592605
}
593606
`,
594-
},
595-
],
607+
},
608+
],
596609
});
597610

598611
const { Greeter } = await mf.getBindings();
@@ -612,21 +625,21 @@
612625
import { Miniflare } from "miniflare";
613626

614627
const mf = new Miniflare({
615-
workers: [
616-
{
617-
modules: true,
618-
script: `export default { fetch() { return new Response(''); } }`,
619-
serviceBindings: {
620-
SUM: {
621-
name: "sum-worker",
622-
entrypoint: "SumEntrypoint",
623-
},
624-
},
625-
},
626-
{
627-
modules: true,
628-
name: "sum-worker",
629-
script: `
628+
workers: [
629+
{
630+
modules: true,
631+
script: `export default { fetch() { return new Response(''); } }`,
632+
serviceBindings: {
633+
SUM: {
634+
name: "sum-worker",
635+
entrypoint: "SumEntrypoint",
636+
},
637+
},
638+
},
639+
{
640+
modules: true,
641+
name: "sum-worker",
642+
script: `
630643
import { WorkerEntrypoint } from 'cloudflare:workers';
631644
632645
export default { fetch() { return new Response(''); } }
@@ -637,8 +650,8 @@
637650
}
638651
}
639652
`,
640-
},
641-
],
653+
},
654+
],
642655
});
643656

644657
const { SUM } = await mf.getBindings();
@@ -704,17 +717,17 @@
704717
import { kCurrentWorker, Miniflare } from "miniflare";
705718

706719
const mf = new Miniflare({
707-
workers: [
708-
{
709-
name: "a",
710-
serviceBindings: {
711-
A_RPC_SERVICE: { name: kCurrentWorker, entrypoint: "RpcEntrypoint" },
712-
A_NAMED_SERVICE: { name: "a", entrypoint: "namedEntrypoint" },
713-
B_NAMED_SERVICE: { name: "b", entrypoint: "anotherNamedEntrypoint" },
714-
},
715-
compatibilityFlags: ["rpc"],
716-
modules: true,
717-
script: `
720+
workers: [
721+
{
722+
name: "a",
723+
serviceBindings: {
724+
A_RPC_SERVICE: { name: kCurrentWorker, entrypoint: "RpcEntrypoint" },
725+
A_NAMED_SERVICE: { name: "a", entrypoint: "namedEntrypoint" },
726+
B_NAMED_SERVICE: { name: "b", entrypoint: "anotherNamedEntrypoint" },
727+
},
728+
compatibilityFlags: ["rpc"],
729+
modules: true,
730+
script: `
718731
import { WorkerEntrypoint } from "cloudflare:workers";
719732
720733
export class RpcEntrypoint extends WorkerEntrypoint {
@@ -727,17 +740,17 @@
727740
728741
...
729742
`,
730-
},
731-
{
732-
name: "b",
733-
modules: true,
734-
script: `
743+
},
744+
{
745+
name: "b",
746+
modules: true,
747+
script: `
735748
export const anotherNamedEntrypoint = {
736749
fetch(request, env, ctx) { return new Response("b:named:pong"); }
737750
};
738751
`,
739-
},
740-
],
752+
},
753+
],
741754
});
742755
```
743756

@@ -855,12 +868,12 @@
855868
import { Miniflare, Response } from "miniflare";
856869

857870
const mf = new Miniflare({
858-
serviceBindings: {
859-
SERVICE(request, instance) {
860-
assert(instance === mf);
861-
return new Response();
862-
},
863-
},
871+
serviceBindings: {
872+
SERVICE(request, instance) {
873+
assert(instance === mf);
874+
return new Response();
875+
},
876+
},
864877
});
865878
```
866879

@@ -880,27 +893,27 @@
880893
import { Miniflare } from "miniflare";
881894

882895
const mf1 = new Miniflare({
883-
scriptPath: "index.mjs",
896+
scriptPath: "index.mjs",
884897
});
885898

886899
const mf2 = new Miniflare({
887-
rootPath: "a/b",
888-
scriptPath: "c/index.mjs",
900+
rootPath: "a/b",
901+
scriptPath: "c/index.mjs",
889902
});
890903

891904
const mf3 = new Miniflare({
892-
rootPath: "/a/b",
893-
workers: [
894-
{
895-
name: "1",
896-
rootPath: "c",
897-
scriptPath: "index.mjs",
898-
},
899-
{
900-
name: "2",
901-
scriptPath: "index.mjs",
902-
},
903-
],
905+
rootPath: "/a/b",
906+
workers: [
907+
{
908+
name: "1",
909+
rootPath: "c",
910+
scriptPath: "index.mjs",
911+
},
912+
{
913+
name: "2",
914+
scriptPath: "index.mjs",
915+
},
916+
],
904917
});
905918
```
906919

@@ -916,11 +929,11 @@
916929
import { kCurrentWorker, Miniflare } from "miniflare";
917930

918931
const mf = new Miniflare({
919-
serviceBindings: {
920-
SELF: kCurrentWorker,
921-
},
922-
modules: true,
923-
script: `export default {
932+
serviceBindings: {
933+
SELF: kCurrentWorker,
934+
},
935+
modules: true,
936+
script: `export default {
924937
fetch(request, env, ctx) {
925938
const { pathname } = new URL(request.url);
926939
if (pathname === "/recurse") {
@@ -945,9 +958,9 @@
945958

946959
```js
947960
const mf = new Miniflare({
948-
modules: true,
949-
modulesRoot: "..",
950-
scriptPath: "../worker.mjs",
961+
modules: true,
962+
modulesRoot: "..",
963+
scriptPath: "../worker.mjs",
951964
});
952965
```
953966

@@ -1005,15 +1018,15 @@
10051018

10061019
```js
10071020
const mf = new Miniflare({
1008-
modules: [
1009-
{
1010-
type: "PythonModule",
1011-
path: "index",
1012-
contents:
1013-
"from js import Response;\ndef fetch(request):\n return Response.new('hello')",
1014-
},
1015-
],
1016-
compatibilityFlags: ["experimental"],
1021+
modules: [
1022+
{
1023+
type: "PythonModule",
1024+
path: "index",
1025+
contents:
1026+
"from js import Response;\ndef fetch(request):\n return Response.new('hello')",
1027+
},
1028+
],
1029+
compatibilityFlags: ["experimental"],
10171030
});
10181031
```
10191032

@@ -1150,17 +1163,17 @@
11501163

11511164
```ts
11521165
const mf = new Miniflare({
1153-
log,
1154-
modules: true,
1155-
script: `
1166+
log,
1167+
modules: true,
1168+
script: `
11561169
export default {
11571170
fetch(req, env, ctx) {
11581171
const two = env.UNSAFE_EVAL.eval('1+1');
11591172
return new Response('two = ' + two); // returns 'two = 2'
11601173
}
11611174
}
11621175
`,
1163-
unsafeEvalBinding: "UNSAFE_EVAL",
1176+
unsafeEvalBinding: "UNSAFE_EVAL",
11641177
});
11651178
```
11661179

0 commit comments

Comments
 (0)