doc,src,lib: clarify experimental status of Web Storage support · nodejs/node@ca878bc · GitHub
Skip to content

Commit ca878bc

Browse files
committed
doc,src,lib: clarify experimental status of Web Storage support
PR-URL: #60708 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it>
1 parent a4dee61 commit ca878bc

5 files changed

Lines changed: 42 additions & 22 deletions

File tree

doc/api/cli.md

Lines changed: 17 additions & 10 deletions

doc/api/globals.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -644,13 +644,23 @@ A browser-compatible implementation of {Headers}.
644644

645645
<!-- YAML
646646
added: v22.4.0
647+
changes:
648+
- version: v25.0.0
649+
pr-url: https://github.com/nodejs/node/pull/57666
650+
description: When webstorage is enabled and `--localstorage-file` is not
651+
provided, accessing the `localStorage` global now returns an
652+
empty object.
653+
- version: v25.0.0
654+
pr-url: https://github.com/nodejs/node/pull/57666
655+
description: This API is no longer behind `--experimental-webstorage` runtime flag.
647656
-->
648657

658+
> Stability: 1.2 - Release candidate. Disable this API with [`--no-experimental-webstorage`][].
659+
649660
A browser-compatible implementation of [`localStorage`][]. Data is stored
650661
unencrypted in the file specified by the [`--localstorage-file`][] CLI flag.
651662
The maximum amount of data that can be stored is 10 MB.
652663
Any modification of this data outside of the Web Storage API is not supported.
653-
Disable this API with the [`--no-webstorage`][] (or its alias `--no-experimental-webstorage`) CLI flag.
654664
`localStorage` data is not stored per user or per request when used in the context
655665
of a server, it is shared across all users and requests.
656666

@@ -1073,9 +1083,13 @@ A browser-compatible implementation of {Request}.
10731083

10741084
<!-- YAML
10751085
added: v22.4.0
1086+
changes:
1087+
- version: v25.0.0
1088+
pr-url: https://github.com/nodejs/node/pull/57666
1089+
description: This API is no longer behind `--experimental-webstorage` runtime flag.
10761090
-->
10771091

1078-
> Stability: 1.0 - Early development.
1092+
> Stability: 1.2 - Release candidate. Disable this API with [`--no-experimental-webstorage`][].
10791093
10801094
A browser-compatible implementation of [`sessionStorage`][]. Data is stored in
10811095
memory, with a storage quota of 10 MB. `sessionStorage` data persists only within
@@ -1111,10 +1125,9 @@ added: v0.0.1
11111125
added: v22.4.0
11121126
-->
11131127

1114-
> Stability: 1.0 - Early development.
1128+
> Stability: 1.2 - Release candidate. Disable this API with [`--no-experimental-webstorage`][].
11151129
1116-
A browser-compatible implementation of {Storage}. Disable this API with the
1117-
[`--no-webstorage`][] (or its alias `--no-experimental-webstorage`) CLI flag.
1130+
A browser-compatible implementation of {Storage}.
11181131

11191132
## `structuredClone(value[, options])`
11201133

@@ -1328,7 +1341,7 @@ A browser-compatible implementation of [`WritableStreamDefaultWriter`][].
13281341
[`--localstorage-file`]: cli.md#--localstorage-filefile
13291342
[`--no-experimental-global-navigator`]: cli.md#--no-experimental-global-navigator
13301343
[`--no-experimental-websocket`]: cli.md#--no-experimental-websocket
1331-
[`--no-webstorage`]: cli.md#--no-webstorage
1344+
[`--no-experimental-webstorage`]: cli.md#--no-experimental-webstorage
13321345
[`ByteLengthQueuingStrategy`]: webstreams.md#class-bytelengthqueuingstrategy
13331346
[`CompressionStream`]: webstreams.md#class-compressionstream
13341347
[`CountQueuingStrategy`]: webstreams.md#class-countqueuingstrategy

doc/node.1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ Enable experimental support for the EventSource Web API.
207207
.It Fl -no-experimental-websocket
208208
Disable experimental support for the WebSocket API.
209209
.
210-
.It Fl -no-webstorage
211-
Disable webstorage.
210+
.It Fl -no-experimental-webstorage
211+
Disable experimental support for the Web Storage API.
212212
.
213213
.It Fl -no-experimental-repl-await
214214
Disable top-level await keyword support in REPL.

lib/internal/process/pre_execution.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ function setupQuic() {
398398

399399
function setupWebStorage() {
400400
if (getEmbedderOptions().noBrowserGlobals ||
401-
!getOptionValue('--webstorage')) {
401+
!getOptionValue('--experimental-webstorage')) {
402402
return;
403403
}
404404

src/node_options.cc

Lines changed: 3 additions & 3 deletions

0 commit comments

Comments
 (0)