This repository was archived by the owner on Mar 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -14,9 +14,9 @@ import { ShadowStorage } from "./shadow";
1414
1515const MAX_KEYS = 128 ;
1616const MAX_KEY_SIZE = 2048 ; /* 2KiB */
17- const MAX_VALUE_SIZE = 32 * 1024 ; /* 32KiB */
17+ const MAX_VALUE_SIZE = 128 * 1024 ; /* 128KiB */
1818// As V8 serialisation adds some tagging information, Workers actually allows
19- // values to be 32 bytes greater than the advertised limit. This allows 32KiB
19+ // values to be 32 bytes greater than the advertised limit. This allows 128KiB
2020// byte arrays to be stored for example.
2121const ENFORCED_MAX_VALUE_SIZE = MAX_VALUE_SIZE + 32 ;
2222
Original file line number Diff line number Diff line change @@ -404,15 +404,15 @@ test("put: validates values", async (t) => {
404404 } ;
405405 const largeValueSingleExpectation : ThrowsExpectation = {
406406 instanceOf : RangeError ,
407- message : "Values cannot be larger than 32768 bytes." ,
407+ message : "Values cannot be larger than 131072 bytes." ,
408408 } ;
409409 const largeValueManyExpectation : ThrowsExpectation = {
410410 instanceOf : RangeError ,
411- message : 'Value for key "large" is above the limit of 32768 bytes.' ,
411+ message : 'Value for key "large" is above the limit of 131072 bytes.' ,
412412 } ;
413413
414- const maxValue = new Uint8Array ( 32 * 1024 ) ; // This should be storable
415- const largeValue = new Uint8Array ( 32 * 1024 + 32 ) ;
414+ const maxValue = new Uint8Array ( 128 * 1024 ) ; // This should be storable
415+ const largeValue = new Uint8Array ( 128 * 1024 + 32 ) ;
416416
417417 // Note we're checking put throws synchronously
418418 t . throws ( ( ) => storage . put ( "key" , undefined ) , undefinedExpectation ) ;
You can’t perform that action at this time.
0 commit comments