Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ca878bc

Browse filesBrowse 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
Copy full SHA for ca878bc

File tree

Expand file treeCollapse file tree

5 files changed

+42
-22
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

5 files changed

+42
-22
lines changed
Open diff view settings
Collapse file

‎doc/api/cli.md‎

Copy file name to clipboardExpand all lines: doc/api/cli.md
+17-10Lines changed: 17 additions & 10 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1741,10 +1741,11 @@ surface on other platforms, but the performance impact may be severe.
17411741
added: v22.4.0
17421742
-->
17431743

1744+
> Stability: 1.2 - Release candidate.
1745+
17441746
The file used to store `localStorage` data. If the file does not exist, it is
17451747
created the first time `localStorage` is accessed. The same file may be shared
1746-
between multiple Node.js processes concurrently. This flag is a no-op if
1747-
Node.js is started with the `--no-webstorage` (or `--no-experimental-webstorage`) flag.
1748+
between multiple Node.js processes concurrently.
17481749

17491750
### `--max-http-header-size=size`
17501751

@@ -1906,6 +1907,20 @@ added: v22.0.0
19061907

19071908
Disable exposition of {WebSocket} on the global scope.
19081909

1910+
### `--no-experimental-webstorage`
1911+
1912+
<!-- YAML
1913+
added: v22.4.0
1914+
changes:
1915+
- version: v25.0.0
1916+
pr-url: https://github.com/nodejs/node/pull/57666
1917+
description: The feature is now enabled by default.
1918+
-->
1919+
1920+
> Stability: 1.2 - Release candidate.
1921+
1922+
Disable [`Web Storage`][] support.
1923+
19091924
### `--no-extra-info-on-fatal-exception`
19101925

19111926
<!-- YAML
@@ -1973,14 +1988,6 @@ added: v6.0.0
19731988

19741989
Silence all process warnings (including deprecations).
19751990

1976-
### `--no-webstorage`
1977-
1978-
<!-- YAML
1979-
added: v25.0.0
1980-
-->
1981-
1982-
Disable [`Web Storage`][] support.
1983-
19841991
### `--node-memory-debug`
19851992

19861993
<!-- YAML
Collapse file

‎doc/api/globals.md‎

Copy file name to clipboardExpand all lines: doc/api/globals.md
+19-6Lines changed: 19 additions & 6 deletions
  • Display the source diff
  • Display the rich diff
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
Collapse file

‎doc/node.1‎

Copy file name to clipboardExpand all lines: doc/node.1
+2-2Lines 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.
Collapse file

‎lib/internal/process/pre_execution.js‎

Copy file name to clipboardExpand all lines: lib/internal/process/pre_execution.js
+1-1Lines 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

Collapse file

‎src/node_options.cc‎

Copy file name to clipboardExpand all lines: src/node_options.cc
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -567,12 +567,12 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
567567
NoOp{},
568568
#endif
569569
kAllowedInEnvvar);
570-
AddOption("--webstorage",
571-
"Web Storage API",
570+
AddOption("--experimental-webstorage",
571+
"experimental Web Storage API",
572572
&EnvironmentOptions::webstorage,
573573
kAllowedInEnvvar,
574574
true);
575-
AddAlias("--experimental-webstorage", "--webstorage");
575+
AddAlias("--webstorage", "--experimental-webstorage");
576576
AddOption("--localstorage-file",
577577
"file used to persist localStorage data",
578578
&EnvironmentOptions::localstorage_file,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.