17
17
errors of the real Workers runtime, so you'll know before you deploy if
18
18
things are going to break.
19
19
20
- Check out the [ migration guide] ( https://v2.miniflare.dev/migrating.html ) if
21
- you're upgrading from version 1.
20
+ Check out the [ migration guide] ( https://v2.miniflare.dev/get-started/ migrating )
21
+ if you're upgrading from version 1.
22
22
23
23
### Notable Changes
24
24
@@ -54,13 +54,13 @@ you're upgrading from version 1.
54
54
- Correctly implement the Durable Object ` script_name ` option. In Miniflare 1,
55
55
this incorrectly expected a script path instead of a script name. This now
56
56
relies on mounting the other worker. See
57
- [ 📌 Durable Objects] ( https://v2.miniflare.dev/durable-objects.html #using-a-class-exported-by-another-script )
57
+ [ 📌 Durable Objects] ( https://v2.miniflare.dev/storage/ durable-objects#using-a-class-exported-by-another-script )
58
58
for more details.
59
59
- Removed the non-standard ` DurableObjectStub#storage() ` method. To access
60
60
Durable Object storage outside a worker, use the new
61
61
` Miniflare#getDurableObjectStorage(id) ` method, passing a ` DurableObjectId `
62
62
obtained from a stub. See
63
- [ 📌 Durable Objects] ( https://v2.miniflare.dev/durable-objects.html #manipulating-outside-workers )
63
+ [ 📌 Durable Objects] ( https://v2.miniflare.dev/storage/ durable-objects#manipulating-outside-workers )
64
64
for more details.
65
65
- Renamed the ` --disable-cache ` /` disableCache: true ` option to
66
66
` --no-cache ` /` cache: false `
@@ -93,7 +93,9 @@ you're upgrading from version 1.
93
93
instead of ` miniflare.wasm_bindings ` .
94
94
95
95
``` toml
96
- # wrangler.toml
96
+ ---
97
+ filename: wrangler.toml
98
+ ---
97
99
[miniflare ]
98
100
wasm_bindings = [
99
101
{ name = " MODULE1" , path =" module1.wasm" },
@@ -104,7 +106,9 @@ you're upgrading from version 1.
104
106
...should now be...
105
107
106
108
``` toml
107
- # wrangler.toml
109
+ ---
110
+ filename: wrangler.toml
111
+ ---
108
112
[wasm_modules ]
109
113
MODULE1 = " module1.wasm"
110
114
MODULE2 = " module2.wasm"
@@ -119,14 +123,11 @@ you're upgrading from version 1.
119
123
then reloads the worker.
120
124
- Replaced the ` Miniflare#getCache() ` method the ` Miniflare#getCaches() ` method.
121
125
This returns the global ` caches ` object. See
122
- [ ✨ Cache ] ( https://v2.miniflare.dev/cache.html #manipulating-outside-workers ) .
126
+ [ ✨ Cache ] ( https://v2.miniflare.dev/storage/ cache#manipulating-outside-workers ) .
123
127
- ` Miniflare#createServer() ` now always returns a ` Promise ` which you must await
124
128
to get a ` http.Server ` /` https.Server ` instance. You may want to check out the
125
129
new ` Miniflare#startServer() ` method which automatically starts a server using
126
130
the configured ` host ` and ` port ` .
127
- - Miniflare no longer includes CommonJS exports. You must use ES modules. If you
128
- need to import ` miniflare ` in a CommonJS file, use dynamic import:
129
- ` const { Miniflare } = await import("miniflare") ` .
130
131
- Redis support is no longer included by default. If you're persisting KV,
131
132
Durable Objects or cached responses in Redis, you must install the
132
133
` @miniflare/storage-redis ` optional peer dependency.
@@ -159,7 +160,7 @@ you're upgrading from version 1.
159
160
** Core:**
160
161
161
162
- ** Added support for running multiple workers** in the same Miniflare instance.
162
- See [ 🔌 Multiple Workers] ( https://v2.miniflare.dev/mount.html ) for more
163
+ See [ 🔌 Multiple Workers] ( https://v2.miniflare.dev/core/ mount ) for more
163
164
details.
164
165
- ** Added support for compatibility dates and flags** , specifically the flags
165
166
` durable_object_fetch_requires_full_url ` , ` fetch_refuses_unknown_protocols ` ,
@@ -168,8 +169,8 @@ you're upgrading from version 1.
168
169
to the standard keys in ` wrangler.toml ` . Closes
169
170
[ issue #48 ] ( https://github.com/cloudflare/miniflare/issues/48 ) , thanks
170
171
[ @PaganMuffin ] ( https://github.com/PaganMuffin ) . See
171
- [ 📅 Compatibility Dates ] ( https://v2.miniflare.dev/compatibility.html ) for
172
- more details.
172
+ [ 📅 Compatibility Dates] ( https://v2.miniflare.dev/core/ compatibility ) for more
173
+ details.
173
174
- ** Added a proper CommonJS module loader.** Workers built with Webpack will be
174
175
more likely to work with Miniflare now. Closes
175
176
[ issue #44 ] ( https://github.com/cloudflare/miniflare/issues/44 ) , thanks
@@ -343,7 +344,7 @@ you're upgrading from version 1.
343
344
when your worker reloads. For this to work, pass the ` --live-reload ` option,
344
345
and return an HTML response containing a ` <body> ` tag with the ` Content-Type `
345
346
set to ` text/html ` . See
346
- [ ⚡️ Live Reload ] ( https://v2.miniflare.dev/live-reload.html ) for more
347
+ [ ⚡️ Live Reload] ( https://v2.miniflare.dev/developing/ live-reload ) for more
347
348
details.
348
349
349
350
``` js
@@ -408,7 +409,7 @@ you're upgrading from version 1.
408
409
409
410
- Added a custom Jest test environment, allowing you to run unit tests in the
410
411
Miniflare sandbox, with isolated storage for each test. See
411
- [ 🤹 Jest Environment] ( https://v2.miniflare.dev/jest.html ) for more details.
412
+ [ 🤹 Jest Environment] ( https://v2.miniflare.dev/testing/ jest ) for more details.
412
413
413
414
** KV:**
414
415
@@ -507,7 +508,7 @@ you're upgrading from version 1.
507
508
[ issue #30 ] ( https://github.com/cloudflare/miniflare/issues/30 ) , thanks
508
509
[ @ItsWendell ] ( https://github.com/ItsWendell ) . Note you still need to use
509
510
` WebSocketPair ` and ` fetch ` to set up WebSocket connections. See
510
- [ ✉️ WebSockets] ( https://miniflare.dev/web-sockets.html ) for more details.
511
+ [ ✉️ WebSockets] ( https://v2. miniflare.dev/core/ web-sockets ) for more details.
511
512
- Fixed caching with ` URL ` request keys, closes
512
513
[ issue #33 ] ( https://github.com/cloudflare/miniflare/issues/33 ) , thanks
513
514
[ @TimTinkers ] ( https://github.com/TimTinkers )
@@ -522,7 +523,7 @@ you're upgrading from version 1.
522
523
- Added an option to disable default and named caches. When disabled, the caches
523
524
will still be available in the sandbox, they just won't cache anything. Thanks
524
525
[ @frandiox ] ( https://github.com/frandiox ) for the suggestion. See
525
- [ ✨ Cache] ( https://miniflare.dev/cache.html #disabling ) for more details.
526
+ [ ✨ Cache] ( https://v2. miniflare.dev/storage/ cache#disabling ) for more details.
526
527
- Added the corresponding ` wrangler.toml ` key for the ` --disable-updater ` flag:
527
528
` miniflare.disable_updater `
528
529
@@ -558,13 +559,14 @@ you're upgrading from version 1.
558
559
- Switched to a [ ` lol-html ` ] ( https://github.com/cloudflare/lol-html ) -based
559
560
WebAssembly implementation of ` HTMLRewriter ` for a more accurate simulation of
560
561
the real Workers environment. See
561
- [ 📄 HTMLRewriter] ( https://miniflare.dev/html-rewriter.html ) for more details.
562
+ [ 📄 HTMLRewriter] ( https://v2.miniflare.dev/core/html-rewriter ) for more
563
+ details.
562
564
- Added HTTPS support for local development, thanks
563
565
[ @RichiCoder1 ] ( https://github.com/RichiCoder1 ) for the
564
566
[ suggestion (#12 )] ( https://github.com/cloudflare/miniflare/issues/12 ) . See
565
- [ 💻 Using the CLI] ( https://miniflare.dev/cli.html #https-server ) and
566
- [ 🧰 Using the API] ( https://miniflare.dev/api.html #https-server ) for more
567
- details.
567
+ [ 💻 Using the CLI] ( https://v2. miniflare.dev/get-started/ cli#https-server ) and
568
+ [ 🧰 Using the API] ( https://v2. miniflare.dev/get-started/ api#https-server ) for
569
+ more details.
568
570
- When using the CLI, the ` --watch ` flag is now assumed if ` --build-watch-path `
569
571
is set, thanks [ @evanderkoogh ] ( https://github.com/evanderkoogh ) for the
570
572
[ PR (#8 )] ( https://github.com/cloudflare/miniflare/pull/8 )
@@ -586,22 +588,23 @@ you're upgrading from version 1.
586
588
### Features
587
589
588
590
- Added ** Redis** persistence support for
589
- [ 📦 KV] ( https://miniflare.dev/kv.html #persistence ) ,
590
- [ ✨ Cache] ( https://miniflare.dev/cache.html #persistence ) and
591
- [ 📌 Durable Objects] ( https://miniflare.dev/durable-objects.html #persistence )
591
+ [ 📦 KV] ( https://v2. miniflare.dev/storage/kv #persistence ) ,
592
+ [ ✨ Cache] ( https://v2. miniflare.dev/storage/ cache#persistence ) and
593
+ [ 📌 Durable Objects] ( https://v2. miniflare.dev/storage/ durable-objects#persistence )
592
594
- Added support for loading scripts from ` package.json ` , closes
593
595
[ issue #7 ] ( https://github.com/cloudflare/miniflare/issues/7 ) . See
594
- [ 💻 Using the CLI] ( https://miniflare.dev/cli.html#script-requirement ) and
595
- [ ⚡️ Developing with esbuild] ( https://miniflare.dev/recipes/esbuild.html#dependencies )
596
+ [ 💻 Using the CLI] ( https://v2.miniflare.dev/get-started/cli#script-requirement )
597
+ and
598
+ [ ⚡️ Developing with esbuild] ( https://v2.miniflare.dev/developing/esbuild#dependencies )
596
599
for more details.
597
600
- Added ` FormData ` to the sandbox, closes
598
601
[ issue #6 ] ( https://github.com/cloudflare/miniflare/issues/6 )
599
602
- Added an automatic update checker. See
600
- [ 💻 Using the CLI] ( https://miniflare.dev/cli.html #update-checker ) for more
601
- details.
602
- - [ 📚 Modules] ( https://miniflare.dev/modules.html ) mode is now always enabled
603
+ [ 💻 Using the CLI] ( https://v2. miniflare.dev/get-started/ cli#update-checker )
604
+ for more details.
605
+ - [ 📚 Modules] ( https://v2. miniflare.dev/core/ modules ) mode is now always enabled
603
606
when specifying
604
- [ 📌 Durable Objects] ( https://miniflare.dev/durable-objects.html ##objects )
607
+ [ 📌 Durable Objects] ( https://v2. miniflare.dev/storage/ durable-objects##objects )
605
608
bindings
606
609
607
610
### Fixes
@@ -618,7 +621,7 @@ you're upgrading from version 1.
618
621
### Features
619
622
620
623
- Added support for namespaced caches with ` caches.open ` . See
621
- [ ✨ Cache] ( https://miniflare.dev/cache.html ) for more details.
624
+ [ ✨ Cache] ( https://v2. miniflare.dev/storage/ cache ) for more details.
622
625
623
626
## 1.0.1
624
627
@@ -627,7 +630,8 @@ you're upgrading from version 1.
627
630
- Fixed
628
631
` /usr/bin/env: 'node --experimental-vm-modules': No such file or directory `
629
632
error when running the CLI in Linux. See
630
- [ 💻 Using the CLI] ( https://miniflare.dev/cli.html#usage ) for more details.
633
+ [ 💻 Using the CLI] ( https://v2.miniflare.dev/get-started/cli#usage ) for more
634
+ details.
631
635
632
636
## 1.0.0
633
637
@@ -673,16 +677,17 @@ you're upgrading from version 1.
673
677
674
678
### Features
675
679
676
- - Added support for [ 📚 Modules] ( https://miniflare.dev/modules.html ) (requires
677
- ` --experimental-vm-modules ` flag)
680
+ - Added support for [ 📚 Modules] ( https://v2. miniflare.dev/core/ modules )
681
+ (requires ` --experimental-vm-modules ` flag)
678
682
- Added support for
679
- [ 📌 Durable Objects] ( https://miniflare.dev/durable-objects.html )
680
- - Added support for [ ✉️ Web Sockets] ( https://miniflare.dev/web-sockets.html )
683
+ [ 📌 Durable Objects] ( https://v2. miniflare.dev/storage/ durable-objects )
684
+ - Added support for [ ✉️ Web Sockets] ( https://v2. miniflare.dev/core/ web-sockets )
681
685
(client and server)
682
- - Added support for [ 🛠 Builds] ( https://miniflare.dev/builds.html ) (custom builds
683
- and ` webpack ` /` rust ` Wrangler builds)
684
- - Added support for [ ⚙️ WebAssembly] ( https://miniflare.dev/web-assembly.html )
685
- - Added support for [ 📄 HTMLRewriter] ( https://miniflare.dev/html-rewriter.html )
686
+ - Added support for [ 🛠 Builds] ( https://v2.miniflare.dev/developing/builds )
687
+ (custom builds and ` webpack ` /` rust ` Wrangler builds)
688
+ - Added support for [ ⚙️ WebAssembly] ( https://v2.miniflare.dev/core/web-assembly )
689
+ - Added support for
690
+ [ 📄 HTMLRewriter] ( https://v2.miniflare.dev/core/html-rewriter )
686
691
- Made CLI ` script ` parameter optional, it can now be inferred in some cases
687
692
from ` wrangler.toml `
688
693
- Added ` host ` option (` --host ` /` -H ` flag) for restricting hosts the HTTP server
@@ -694,9 +699,9 @@ you're upgrading from version 1.
694
699
[ ` cf ` object] ( https://developers.cloudflare.com/workers/runtime-apis/request#incomingrequestcfproperties )
695
700
to HTTP server requests
696
701
- Added ` cron ` property to
697
- [ ⏰ Scheduled Events] ( https://miniflare.dev/scheduled.html )
702
+ [ ⏰ Scheduled Events] ( https://v2. miniflare.dev/core/ scheduled )
698
703
- Added manual triggering for
699
- [ ⏰ Scheduled Events] ( https://miniflare.dev/scheduled.html ) via
704
+ [ ⏰ Scheduled Events] ( https://v2. miniflare.dev/core/ scheduled ) via
700
705
` /.mf/scheduled ` HTTP endpoint
701
706
- Added pretty error page powered by [ Youch] ( https://github.com/poppinss/youch )
702
707
- Added many more tests
@@ -727,11 +732,13 @@ Initial Release
727
732
728
733
### Features
729
734
730
- - Added support for [ 📨 Fetch Events] ( https://miniflare.dev/fetch.html )
731
- - Added support for [ ⏰ Scheduled Events] ( https://miniflare.dev/scheduled.html )
735
+ - Added support for [ 📨 Fetch Events] ( https://v2.miniflare.dev/core/fetch )
736
+ - Added support for
737
+ [ ⏰ Scheduled Events] ( https://v2.miniflare.dev/core/scheduled )
738
+ - Added support for
739
+ [ 🔑 Variables and Secrets] ( https://v2.miniflare.dev/core/variables-secrets )
740
+ - Added support for [ 📦 KV] ( https://v2.miniflare.dev/storage/kv )
741
+ - Added support for [ ✨ Cache] ( https://v2.miniflare.dev/storage/cache )
742
+ - Added support for [ 🌐 Workers Sites] ( https://v2.miniflare.dev/storage/sites )
732
743
- Added support for
733
- [ 🔑 Variables and Secrets] ( https://miniflare.dev/variables-secrets.html )
734
- - Added support for [ 📦 KV] ( https://miniflare.dev/kv.html )
735
- - Added support for [ ✨ Cache] ( https://miniflare.dev/cache.html )
736
- - Added support for [ 🌐 Workers Sites] ( https://miniflare.dev/sites.html )
737
- - Added support for [ 🗺 Source Maps] ( https://miniflare.dev/source-maps.html )
744
+ [ 🗺 Source Maps] ( https://v2.miniflare.dev/developing/source-maps )
0 commit comments