@@ -135,15 +135,8 @@ Relative paths are NOT yet supported by the CLI flag.
135
135
The initializer module also needs to be allowed. Consider the following example:
136
136
.Bd -literal
137
137
$ node --experimental-permission t.js
138
- node:internal/modules/cjs/loader:162
139
- const result = internalModuleStat(receiver, filename);
140
- ^
141
138
142
139
Error: Access to this API has been restricted
143
- at stat (node:internal/modules/cjs/loader:162:18)
144
- at Module._findPath (node:internal/modules/cjs/loader:640:16)
145
- at resolveMainPath (node:internal/modules/run_main:15:25)
146
- at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:53:24)
147
140
at node:internal/main/run_main_module:23:47 {
148
141
code: 'ERR_ACCESS_DENIED',
149
142
permission: 'FileSystemRead',
@@ -190,18 +183,8 @@ new WASI({
190
183
.Ed
191
184
.Bd -literal
192
185
$ node --experimental-permission --allow-fs-read=* index.js
193
- node:wasi:99
194
- const wrap = new _WASI(args, env, preopens, stdio);
195
- ^
196
186
197
187
Error: Access to this API has been restricted
198
- at new WASI (node:wasi:99:18)
199
- at Object.<anonymous> (/home/index.js:3:1)
200
- at Module._compile (node:internal/modules/cjs/loader:1476:14)
201
- at Module._extensions..js (node:internal/modules/cjs/loader:1555:10)
202
- at Module.load (node:internal/modules/cjs/loader:1288:32)
203
- at Module._load (node:internal/modules/cjs/loader:1104:12)
204
- at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:191:14)
205
188
at node:internal/main/run_main_module:30:49 {
206
189
code: 'ERR_ACCESS_DENIED',
207
190
permission: 'WASI',
@@ -221,18 +204,8 @@ new Worker(__filename);
221
204
.Ed
222
205
.Bd -literal
223
206
$ node --experimental-permission --allow-fs-read=* index.js
224
- node:internal/worker:188
225
- this[kHandle] = new WorkerImpl(url,
226
- ^
227
207
228
208
Error: Access to this API has been restricted
229
- at new Worker (node:internal/worker:188:21)
230
- at Object.<anonymous> (/home/index.js.js:3:1)
231
- at Module._compile (node:internal/modules/cjs/loader:1120:14)
232
- at Module._extensions..js (node:internal/modules/cjs/loader:1174:10)
233
- at Module.load (node:internal/modules/cjs/loader:998:32)
234
- at Module._load (node:internal/modules/cjs/loader:839:12)
235
- at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
236
209
at node:internal/main/run_main_module:17:47 {
237
210
code: 'ERR_ACCESS_DENIED',
238
211
permission: 'WorkerThreads'
@@ -552,14 +525,6 @@ and \fB"\fR are usable.
552
525
It is possible to run code containing inline types by passing
553
526
\fB --experimental-strip-types \fR .
554
527
.
555
- .It Fl -experimental-async-context-frame
556
- Enables the use of \fB AsyncLocalStorage \fR backed by \fB AsyncContextFrame \fR rather
557
- than the default implementation which relies on async_hooks. This new model is
558
- implemented very differently and so could have differences in how context data
559
- flows within the application. As such, it is presently recommended to be sure
560
- your application behaviour is unaffected by this change before using it in
561
- production.
562
- .
563
528
.It Fl -experimental-default-type Ns = Ns Ar type
564
529
Define which module system, \fB module \fR or \fB commonjs \fR , to use for the following:
565
530
.Bl -bullet
@@ -817,15 +782,15 @@ Allow spaces to be present after a chunk size and before \fB\\r\\n\fR.
817
782
All the above will expose your application to request smuggling
818
783
or poisoning attack. Avoid using this option.
819
784
.
820
- .It Fl -inspect[ Ns = Ns Ar [host:]port
785
+ .It Fl -inspect Ns = Ns Ar [[ host:]port]
821
786
Activate inspector on \fB host:port \fR . Default is \fB 127.0.0.1:9229 \fR . If port \fB 0 \fR is
822
787
specified, a random available port will be used.
823
788
V8 inspector integration allows tools such as Chrome DevTools and IDEs to debug
824
789
and profile Node.js instances. The tools attach to Node.js instances via a
825
790
tcp port and communicate using the Chrome DevTools Protocol.
826
791
See V8 Inspector integration for Node.js for further explanation on Node.js debugger.
827
792
.
828
- .It Fl -inspect-brk[ Ns = Ns Ar [host:]port
793
+ .It Fl -inspect-brk Ns = Ns Ar [[ host:]port]
829
794
Activate inspector on \fB host:port \fR and break at start of user script.
830
795
Default \fB host:port \fR is \fB 127.0.0.1:9229 \fR . If port \fB 0 \fR is specified,
831
796
a random available port will be used.
@@ -844,7 +809,7 @@ Specify ways of the inspector web socket url exposure.
844
809
By default inspector websocket url is available in stderr and under \fB /json/list \fR
845
810
endpoint on \fB http://host:port/json/list \fR .
846
811
.
847
- .It Fl -inspect-wait[ Ns = Ns Ar [host:]port
812
+ .It Fl -inspect-wait Ns = Ns Ar [[ host:]port]
848
813
Activate inspector on \fB host:port \fR and wait for debugger to be attached.
849
814
Default \fB host:port \fR is \fB 127.0.0.1:9229 \fR . If port \fB 0 \fR is specified,
850
815
a random available port will be used.
@@ -879,6 +844,12 @@ Disable the \fBnode-addons\fR exports condition as well as disable loading
879
844
native addons. When \fB --no-addons \fR is specified, calling \fB process.dlopen \fR or
880
845
requiring a native C++ addon will fail and throw an exception.
881
846
.
847
+ .It Fl -no-async-context-frame
848
+ Disables the use of \fB AsyncLocalStorage \fR backed by \fB AsyncContextFrame \fR and
849
+ uses the prior implementation which relied on async_hooks. The previous model
850
+ is retained for compatibility with Electron and for cases where the context
851
+ flow may differ. However, if a difference in flow is found please report it.
852
+ .
882
853
.It Fl -no-deprecation
883
854
Silence deprecation warnings.
884
855
.
@@ -1026,6 +997,14 @@ human consumption.
1026
997
.It Fl -report-dir Ns = Ns Ar directory , Fl eport-directory Ns = Ns Ar directory
1027
998
Location at which the report will be generated.
1028
999
.
1000
+ .It Fl -report-exclude-env
1001
+ When \fB --report-exclude-env \fR is passed the diagnostic report generated will not
1002
+ contain the \fB environmentVariables \fR data.
1003
+ .
1004
+ .It Fl -report-exclude-network
1005
+ Exclude \fB header.networkInterfaces \fR from the diagnostic report. By default
1006
+ this is not set and the network interfaces are included.
1007
+ .
1029
1008
.It Fl -report-filename Ns = Ns Ar filename
1030
1009
Name of the file to which the report will be written.
1031
1010
If the filename is set to \fB 'stdout' \fR or \fB 'stderr' \fR , the report is written to
@@ -1052,10 +1031,6 @@ Enables report to be generated when the process exits due to an uncaught
1052
1031
exception. Useful when inspecting the JavaScript stack in conjunction with
1053
1032
native stack and other runtime environment data.
1054
1033
.
1055
- .It Fl -report-exclude-network
1056
- Exclude \fB header.networkInterfaces \fR from the diagnostic report. By default
1057
- this is not set and the network interfaces are included.
1058
- .
1059
1034
.It Fl r , Fl -require Ar module
1060
1035
Preload the specified module at startup.
1061
1036
Follows \fB require() \fR 's module resolution
@@ -1528,8 +1503,6 @@ one is included in the list below.
1528
1503
.It
1529
1504
\fB --experimental-abortcontroller \fR
1530
1505
.It
1531
- \fB --experimental-async-context-frame \fR
1532
- .It
1533
1506
\fB --experimental-default-type \fR
1534
1507
.It
1535
1508
\fB --experimental-detect-module \fR
@@ -1620,6 +1593,8 @@ one is included in the list below.
1620
1593
.It
1621
1594
\fB --no-addons \fR
1622
1595
.It
1596
+ \fB --no-async-context-frame \fR
1597
+ .It
1623
1598
\fB --no-deprecation \fR
1624
1599
.It
1625
1600
\fB --no-experimental-global-navigator \fR
@@ -1660,6 +1635,8 @@ one is included in the list below.
1660
1635
.It
1661
1636
\fB --report-dir \fR , \fB --report-directory \fR
1662
1637
.It
1638
+ \fB --report-exclude-env \fR
1639
+ .It
1663
1640
\fB --report-exclude-network \fR
1664
1641
.It
1665
1642
\fB --report-filename \fR
@@ -1911,8 +1888,10 @@ reason any of these APIs takes a long time, other (seemingly unrelated) APIs
1911
1888
that run in libuv's threadpool will experience degraded performance. In order to
1912
1889
mitigate this issue, one potential solution is to increase the size of libuv's
1913
1890
threadpool by setting the \fB 'UV_THREADPOOL_SIZE' \fR environment variable to a value
1914
- greater than \fB 4 \fR (its current default value). For more information, see the
1915
- libuv threadpool documentation.
1891
+ greater than \fB 4 \fR (its current default value). However, setting this from inside
1892
+ the process using \fB process.env.UV_THREADPOOL_SIZE=size \fR is not guranteed to work
1893
+ as the threadpool would have been created as part of the runtime initialisation
1894
+ much before user code is run. For more information, see the libuv threadpool documentation.
1916
1895
.
1917
1896
1918
1897
.El
0 commit comments