Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
nginx
GitHub Repository: nginx/nginx.org
Path: blob/main/xml/en/docs/njs/changes.xml
1 views
1
<?xml version="1.0"?>
2
3
<!--
4
Copyright (C) Nginx, Inc.
5
-->
6
7
<!DOCTYPE article SYSTEM "../../../../dtd/article.dtd">
8
9
<article name="Changes"
10
link="/en/docs/njs/changes.html"
11
lang="en"
12
rev="86"
13
toc="no">
14
15
<section id="njs0.9.9" name="Changes with njs 0.9.9">
16
17
<para>
18
Release Date:
19
19 May 2026
20
</para>
21
22
<para>
23
nginx modules:
24
<list type="bullet">
25
26
<listitem>
27
<para>
28
Security:
29
a heap buffer overflow might occur in a worker process
30
when the
31
<link doc="../http/ngx_http_js_module.xml" id="js_fetch_proxy">
32
js_fetch_proxy</link>
33
directive value contains nginx variables derived from the client request
34
(<link doc="../http/ngx_http_core_module.xml" id="var_http_">
35
<literal>$http_*</literal></link>,
36
<link doc="../http/ngx_http_core_module.xml" id="var_arg_">
37
<literal>$arg_*</literal></link>,
38
<link doc="../http/ngx_http_core_module.xml" id="var_cookie_">
39
<literal>$cookie_*</literal></link>,
40
etc.) and the location's JS handler invokes
41
<link doc="reference.xml" id="ngx_fetch">ngx.fetch()</link>
42
(<link url="https://www.cve.org/CVERecord?id=CVE-2026-8711">CVE-2026-8711</link>).
43
The issue was introduced in
44
<link url="https://github.com/nginx/njs/commit/dea83189">dea83189</link>
45
(<link doc="changes.xml" id="njs0.9.4">0.9.4</link>).
46
</para>
47
</listitem>
48
49
<listitem>
50
<para>
51
Feature:
52
added
53
<link doc="../http/ngx_http_js_module.xml" id="js_access">js_access</link>
54
directive.
55
</para>
56
</listitem>
57
58
<listitem>
59
<para>
60
Feature:
61
added
62
<link doc="reference.xml" id="r_read_request_text">r.readRequestText()</link>,
63
<link doc="reference.xml" id="r_read_request_array_buffer">
64
r.readRequestArrayBuffer()</link>,
65
and
66
<link doc="reference.xml" id="r_read_request_json">r.readRequestJSON()</link>
67
async methods that read the request body, available in
68
<link doc="../http/ngx_http_js_module.xml" id="js_access">js_access</link>
69
and
70
<link doc="../http/ngx_http_js_module.xml" id="js_content">js_content</link>
71
directives.
72
</para>
73
</listitem>
74
75
<listitem>
76
<para>
77
Feature:
78
added
79
<link doc="reference.xml" id="r_read_request_form">r.readRequestForm()</link>
80
async method that parses the request body submitted from an HTML form
81
(<literal>application/x-www-form-urlencoded</literal> and
82
<literal>multipart/form-data</literal>) and returns a structured accessor
83
object.
84
The method is available in
85
<link doc="../http/ngx_http_js_module.xml" id="js_access">js_access</link>
86
and
87
<link doc="../http/ngx_http_js_module.xml" id="js_content">js_content</link>
88
directives.
89
</para>
90
</listitem>
91
92
<listitem>
93
<para>
94
Feature:
95
added
96
<link doc="reference.xml" id="r_js_var_names">jsVarNames()</link>
97
method.
98
The method returns the names of variables declared with
99
<link doc="../http/ngx_http_js_module.xml" id="js_var">js_var</link>.
100
</para>
101
</listitem>
102
103
</list>
104
</para>
105
106
<para>
107
Core:
108
<list type="bullet">
109
110
<listitem>
111
<para>
112
Bugfix:
113
fixed evaluation order of call arguments with side effects.
114
Previously, an earlier argument could observe a later argument's mutation,
115
e.g. <literal>f(a, a = 2)</literal> passed <literal>2</literal> as both
116
arguments.
117
The issue was introduced in
118
<link url="https://github.com/nginx/njs/commit/fd5e523f">fd5e523f</link>
119
(<link doc="changes.xml" id="njs0.9.7">0.9.7</link>).
120
</para>
121
</listitem>
122
123
</list>
124
</para>
125
126
</section>
127
128
129
<section id="njs0.9.8" name="Changes with njs 0.9.8">
130
131
<para>
132
Release Date:
133
23 April 2026
134
</para>
135
136
<para>
137
nginx modules:
138
<list type="bullet">
139
140
<listitem>
141
<para>
142
Bugfix:
143
fixed loading of the built-in <literal>crypto</literal> module.
144
The issue was introduced in
145
<link url="https://github.com/nginx/njs/commit/3185ce81">3185ce81</link>
146
(<link doc="changes.xml" id="njs0.9.7">0.9.7</link>).
147
</para>
148
</listitem>
149
150
</list>
151
</para>
152
153
</section>
154
155
156
<section id="njs0.9.7" name="Changes with njs 0.9.7">
157
158
<para>
159
Release Date:
160
21 April 2026
161
</para>
162
163
<para>
164
nginx modules:
165
<list type="bullet">
166
167
<listitem>
168
<para>
169
Feature:
170
<link url="https://github.com/nginx/njs/commit/98342797">improved</link>
171
<link doc="../http/ngx_http_js_module.xml" id="js_shared_dict_zone">shared dict</link>
172
eviction strategy.
173
</para>
174
</listitem>
175
176
<listitem>
177
<para>
178
Feature:
179
added
180
<link doc="reference.xml" id="dict_ttl">ttl()</link>
181
method to
182
<link doc="../http/ngx_http_js_module.xml" id="js_shared_dict_zone">shared dictionaries</link>.
183
</para>
184
</listitem>
185
186
<listitem>
187
<para>
188
Bugfix:
189
removed spurious <literal>js vm init</literal> notice log emitted during
190
configuration parsing.
191
</para>
192
</listitem>
193
194
<listitem>
195
<para>
196
Bugfix:
197
removed
198
<link doc="../http/ngx_http_js_module.xml" id="js_shared_dict_zone">shared dict</link>
199
expiration from read-locked paths.
200
</para>
201
</listitem>
202
203
<listitem>
204
<para>
205
Bugfix:
206
fixed double-free in
207
<link doc="../http/ngx_http_js_module.xml" id="js_shared_dict_zone">shared dict</link>
208
update with eviction.
209
</para>
210
</listitem>
211
212
<listitem>
213
<para>
214
Bugfix:
215
fixed per-entry TTL reset on
216
<link doc="reference.xml" id="dict_incr">incr()</link>
217
calls.
218
</para>
219
</listitem>
220
221
</list>
222
</para>
223
224
<para>
225
Core:
226
<list type="bullet">
227
228
<listitem>
229
<para>
230
Feature:
231
added Ed25519 and X25519 support for
232
<link doc="reference.xml" id="builtin_crypto">WebCrypto</link>.
233
</para>
234
</listitem>
235
236
<listitem>
237
<para>
238
Feature:
239
added
240
<link doc="reference.xml" id="crypto_subtle_wrap_key">wrapKey()</link>
241
and
242
<link doc="reference.xml" id="crypto_subtle_unwrap_key">unwrapKey()</link>
243
support for
244
<link doc="reference.xml" id="builtin_crypto">WebCrypto</link>.
245
</para>
246
</listitem>
247
248
<listitem>
249
<para>
250
Feature:
251
added
252
<link doc="reference.xml" id="crypto_random_uuid">crypto.randomUUID()</link>.
253
</para>
254
</listitem>
255
256
<listitem>
257
<para>
258
Feature:
259
allowed <literal>await</literal> expressions in tagged templates
260
and as call arguments.
261
</para>
262
</listitem>
263
264
<listitem>
265
<para>
266
Improvement:
267
switched to OpenSSL EVP for hashing in the built-in
268
<link doc="reference.xml" id="crypto">crypto</link>
269
module.
270
</para>
271
</listitem>
272
273
<listitem>
274
<para>
275
Bugfix:
276
fixed call argument evaluation.
277
</para>
278
</listitem>
279
280
</list>
281
</para>
282
283
</section>
284
285
286
<section id="njs0.9.6" name="Changes with njs 0.9.6">
287
288
<para>
289
Release Date:
290
3 March 2026
291
</para>
292
293
<para>
294
nginx modules:
295
<list type="bullet">
296
297
<listitem>
298
<para>
299
Bugfix:
300
fixed expire field truncation in
301
<link doc="../http/ngx_http_js_module.xml" id="js_shared_dict_zone">shared dict</link>
302
state files.
303
Millisecond timestamps were silently truncated to 10 digits,
304
making restored entries appear expired on restart.
305
</para>
306
</listitem>
307
308
<listitem>
309
<para>
310
Bugfix:
311
suppressed slab log_nomem for evict
312
<link doc="../http/ngx_http_js_module.xml" id="js_shared_dict_zone">shared dict</link>
313
zones.
314
When evict is enabled, memory allocation failures are expected
315
and handled by evicting old entries.
316
</para>
317
</listitem>
318
319
<listitem>
320
<para>
321
Bugfix:
322
fixed stack trace for
323
<link doc="reference.xml" id="ngx_fetch">ngx.fetch()</link>
324
exceptions
325
for <link doc="engine.xml" id="quickjs_engine">qjs</link> engine.
326
</para>
327
</listitem>
328
329
</list>
330
</para>
331
332
<para>
333
Core:
334
<list type="bullet">
335
336
<listitem>
337
<para>
338
Feature:
339
added optional chaining support.
340
</para>
341
</listitem>
342
343
<listitem>
344
<para>
345
Feature:
346
added nullish coalescing assignment operator
347
(<literal>??=</literal>).
348
</para>
349
</listitem>
350
351
<listitem>
352
<para>
353
Feature:
354
added logical assignment operators
355
(<literal>||=</literal> and <literal>&amp;&amp;=</literal>).
356
</para>
357
</listitem>
358
359
<listitem>
360
<para>
361
Improvement:
362
aligned <literal>SyntaxError</literal> reporting with other JS engines.
363
Previously, file name was a part of the error message.
364
Now it is reported as "stack" property.
365
</para>
366
</listitem>
367
368
<listitem>
369
<para>
370
Improvement:
371
improved <literal>Error.stack</literal> traces.
372
Stack traces are now attached in error constructors.
373
Performance of <literal>Error.stack</literal> is improved by ~100 times.
374
</para>
375
</listitem>
376
377
<listitem>
378
<para>
379
Bugfix:
380
fixed string offset map corruption in scope values hash.
381
The issue caused SEGV/SIGBUS crashes for multi-byte UTF-8 string
382
constants with more than 32 characters when accessing a character
383
at index >= 32 (e.g. via <literal>.replace()</literal> or bracket notation).
384
The issue was introduced in
385
<link url="https://github.com/nginx/njs/commit/e7caa46d">e7caa46d</link>
386
(<link doc="changes.xml" id="njs0.9.5">0.9.5</link>).
387
</para>
388
</listitem>
389
390
<listitem>
391
<para>
392
Bugfix:
393
fixed heap-buffer-overflow in atom hash caused by
394
<literal>Symbol()</literal>.
395
</para>
396
</listitem>
397
398
<listitem>
399
<para>
400
Bugfix:
401
fixed WebCrypto
402
<link doc="reference.xml" id="crypto_subtle_import_key">importKey()</link>
403
crash with mismatched JWK key type.
404
</para>
405
</listitem>
406
407
<listitem>
408
<para>
409
Bugfix:
410
fixed interactive mode detection for piped stdin.
411
</para>
412
</listitem>
413
414
<listitem>
415
<para>
416
Bugfix:
417
fixed build on MacOS.
418
</para>
419
</listitem>
420
421
<listitem>
422
<para>
423
Bugfix:
424
fixed PTR macro compatibility with newer BFD library.
425
</para>
426
</listitem>
427
428
<listitem>
429
<para>
430
Bugfix:
431
auto/cc: use portable <literal>command -v</literal>
432
instead of <literal>which</literal>.
433
Thanks to Zurab Kvachadze.
434
</para>
435
</listitem>
436
437
</list>
438
</para>
439
440
</section>
441
442
443
<section id="njs0.9.5" name="Changes with njs 0.9.5">
444
445
<para>
446
Release Date:
447
13 January 2026
448
</para>
449
450
<para>
451
nginx modules:
452
<list type="bullet">
453
454
<listitem>
455
<para>
456
Feature:
457
added native module support for
458
<link doc="engine.xml" id="quickjs_engine">qjs</link> engine
459
for
460
<link doc="../http/ngx_http_js_module.xml" id="js_load_http_native_module">http</link>
461
and
462
<link doc="../stream/ngx_stream_js_module.xml" id="js_load_stream_native_module">stream</link>.
463
</para>
464
</listitem>
465
466
<listitem>
467
<para>
468
Bugfix:
469
fixed
470
<link doc="../http/ngx_http_js_module.xml" id="js_body_filter">js_body_filter</link>
471
with multiple chunks
472
for <link doc="engine.xml" id="quickjs_engine">qjs</link> engine.
473
</para>
474
</listitem>
475
476
<listitem>
477
<para>
478
Bugfix:
479
fixed <literal>buffer_type</literal> inheritance in if blocks for
480
<link doc="../http/ngx_http_js_module.xml" id="js_body_filter">js_body_filter</link>.
481
Previously, when <literal>js_body_filter</literal> was used inside an if block,
482
the data parameter received <literal>Buffer</literal> type
483
instead of the expected <literal>String</literal> type.
484
</para>
485
</listitem>
486
487
<listitem>
488
<para>
489
Bugfix:
490
fixed <link doc="../http/ngx_http_js_module.xml" id="js_body_filter">js_body_filter</link>
491
when data is not in memory.
492
Previously, when upstream data was delivered from nginx cache,
493
<literal>js_body_filter</literal> was not able to process it correctly.
494
</para>
495
</listitem>
496
497
<listitem>
498
<para>
499
Bugfix:
500
improved
501
<link doc="reference.xml" id="subrequest">r.subrequest()</link> error handling.
502
Fixed a problem of a lost write event when the njs handler
503
making <literal>r.subrequest()</literal> is called from a lua handler as a
504
subrequest.
505
</para>
506
</listitem>
507
508
</list>
509
</para>
510
511
<para>
512
Core:
513
<list type="bullet">
514
515
<listitem>
516
<para>
517
Bugfix:
518
fixed <literal>XMLAttr</literal> object.
519
Pointer to <literal>xmlAttr</literal> could become invalid
520
when the parent <literal>XMLNode</literal> was modified.
521
</para>
522
</listitem>
523
524
<listitem>
525
<para>
526
Bugfix:
527
fixed <literal>XMLNode</literal> update.
528
</para>
529
</listitem>
530
531
<listitem>
532
<para>
533
Bugfix:
534
fixed <literal>ArrayBuffer</literal> with detached buffers.
535
</para>
536
</listitem>
537
538
<listitem>
539
<para>
540
Bugfix:
541
added missing detached array checks.
542
</para>
543
</listitem>
544
545
<listitem>
546
<para>
547
Bugfix:
548
fixed <link doc="reference.xml" id="fs_mkdir">fs.mkdir()</link> and friends.
549
</para>
550
</listitem>
551
552
<listitem>
553
<para>
554
Bugfix:
555
fixed path restoration in
556
<link doc="reference.xml" id="fs_mkdir">fs.mkdir()</link>
557
and friends on error.
558
</para>
559
</listitem>
560
561
<listitem>
562
<para>
563
Bugfix:
564
fixed missed allocation check in promise code.
565
</para>
566
</listitem>
567
568
</list>
569
</para>
570
571
</section>
572
573
574
<section id="njs0.9.4" name="Changes with njs 0.9.4">
575
576
<para>
577
Release Date:
578
28 October 2025
579
</para>
580
581
<para>
582
nginx modules:
583
<list type="bullet">
584
585
<listitem>
586
<para>
587
Feature:
588
added HTTP forward proxy support for
589
<link doc="reference.xml" id="ngx_fetch">ngx.fetch()</link> API.
590
</para>
591
</listitem>
592
593
</list>
594
</para>
595
596
<para>
597
Core:
598
<list type="bullet">
599
600
<listitem>
601
<para>
602
Bugfix:
603
fixed <link doc="reference.xml" id="subrequest">r.subrequest()</link>
604
to a location with JS handler for QuickJS.
605
The bug became visible after
606
<link url="https://github.com/bellard/quickjs/commit/42eb2795">bellard/quickjs@42eb2795</link>.
607
</para>
608
</listitem>
609
610
</list>
611
</para>
612
613
</section>
614
615
616
<section id="njs0.9.3" name="Changes with njs 0.9.3">
617
618
<para>
619
Release Date:
620
07 October 2025
621
</para>
622
623
<para>
624
nginx modules:
625
<list type="bullet">
626
627
<listitem>
628
<para>
629
Bugfix:
630
fixed heap-use-after-free while module loading.
631
</para>
632
633
</listitem>
634
635
<listitem>
636
<para>
637
Bugfix:
638
fixed heap-use-after-free in <literal>js_set</literal> handler used in log phase.
639
The issue was introduced in
640
<link url="https://github.com/nginx/njs/commit/04f6dfb">04f6dfb</link>
641
(<link doc="changes.xml" id="njs0.9.2">0.9.2</link>).
642
</para>
643
</listitem>
644
645
</list>
646
</para>
647
648
</section>
649
650
651
<section id="njs0.9.2" name="Changes with njs 0.9.2">
652
653
<para>
654
Release Date:
655
23 September 2025
656
</para>
657
658
<para>
659
nginx modules:
660
<list type="bullet">
661
662
<listitem>
663
<para>
664
Feature:
665
added HTTP keepalive support for
666
<link doc="reference.xml" id="ngx_fetch"><literal>ngx.fetch()</literal></link>
667
API.
668
</para>
669
</listitem>
670
671
<listitem>
672
<para>
673
Improvement:
674
added configure time check when
675
the <literal>js_import</literal> directive is not specified for
676
<link doc="../http/ngx_http_js_module.xml" id="js_import">http</link> or
677
<link doc="../stream/ngx_stream_js_module.xml" id="js_import">stream</link>.
678
</para>
679
</listitem>
680
681
<listitem>
682
<para>
683
Bugfix:
684
fixed merging of <literal>js_path</literal> directives for
685
<link doc="../http/ngx_http_js_module.xml" id="js_path">http</link> and
686
<link doc="../stream/ngx_stream_js_module.xml" id="js_path">stream</link>.
687
688
</para>
689
</listitem>
690
691
<listitem>
692
<para>
693
Bugfix:
694
fixed building when the
695
<link doc="../http/ngx_http_ssl_module.xml">ngx_http_ssl_module</link>
696
and
697
<link doc="../stream/ngx_stream_ssl_module.xml">ngx_stream_ssl_module</link>
698
modules are unavailable.
699
</para>
700
</listitem>
701
702
</list>
703
</para>
704
705
<para>
706
Core:
707
<list type="bullet">
708
709
<listitem>
710
<para>
711
Change:
712
increased the default stack size to 160k for njs VM.
713
</para>
714
</listitem>
715
716
<listitem>
717
<para>
718
Feature:
719
added <literal>njs.on('exit')</literal> API
720
for the <link doc="engine.xml" id="quickjs_engine">qjs</link> engine.
721
</para>
722
</listitem>
723
724
<listitem>
725
<para>
726
Improvement:
727
optimized memory consumption while streaming
728
in <link doc="engine.xml" id="quickjs_engine">qjs</link>.
729
</para>
730
</listitem>
731
732
<listitem>
733
<para>
734
Bugfix:
735
fixed building <link doc="engine.xml" id="quickjs_engine">qjs</link> engine with clang 19.
736
</para>
737
</listitem>
738
739
<listitem>
740
<para>
741
Bugfix:
742
fixed building with GCC 15 and O3 optimization level.
743
</para>
744
</listitem>
745
746
</list>
747
</para>
748
749
</section>
750
751
752
<section id="njs0.9.1" name="Changes with njs 0.9.1">
753
754
<para>
755
Release Date:
756
10 Jul 2025
757
</para>
758
759
<para>
760
nginx modules:
761
<list type="bullet">
762
763
<listitem>
764
<para>
765
Feature:
766
added <link doc="reference.xml" id="ngx_fetch">Fetch API</link>
767
for <link doc="engine.xml">QuickJS</link> engine.
768
</para>
769
</listitem>
770
771
<listitem>
772
<para>
773
Feature:
774
added state file for a
775
<link doc="../http/ngx_http_js_module.xml" id="js_shared_dict_zone">shared dictionary</link>.
776
</para>
777
</listitem>
778
779
<listitem>
780
<para>
781
Bugfix:
782
fixed handling of Content-Length header when a body is provided in
783
<link doc="reference.xml" id="ngx_fetch">Fetch API</link>.
784
</para>
785
</listitem>
786
787
<listitem>
788
<para>
789
Bugfix:
790
fixed <link doc="engine.xml">qjs</link> engine after
791
<link url="https://github.com/bellard/quickjs/commit/458c34d">bellard/quickjs@458c34d2</link>.
792
</para>
793
</listitem>
794
795
<listitem>
796
<para>
797
Bugfix:
798
fixed NULL pointer dereference when processing
799
<literal>If-Match</literal> and <literal>If-Unmodified-Since</literal> headers.
800
</para>
801
</listitem>
802
803
</list>
804
</para>
805
806
<para>
807
Core:
808
<list type="bullet">
809
810
<listitem>
811
<para>
812
Feature:
813
added ECDH support for
814
<link doc="reference.xml" id="builtin_crypto">WebCrypto</link>.
815
</para>
816
</listitem>
817
818
<listitem>
819
<para>
820
Improvement:
821
reduced memory consumption by the object hash.
822
The new hash uses 42% less memory per element.
823
</para>
824
</listitem>
825
826
<listitem>
827
<para>
828
Improvement:
829
reduced memory consumption for concatenation of numbers and strings.
830
</para>
831
</listitem>
832
833
<listitem>
834
<para>
835
Improvement:
836
reduced memory consumption of
837
<literal>String.prototype.concat()</literal> with scalar values.
838
</para>
839
</listitem>
840
841
<listitem>
842
<para>
843
Bugfix:
844
fixed segfault in <literal>njs_property_query()</literal>.
845
The issue was introduced in
846
<link url="https://github.com/nginx/njs/commit/b28e50b1">b28e50b1</link>
847
(0.9.0).
848
</para>
849
</listitem>
850
851
<listitem>
852
<para>
853
Bugfix:
854
fixed Function constructor template injection.
855
</para>
856
</listitem>
857
858
<listitem>
859
<para>
860
Bugfix:
861
fixed GCC compilation with O3 optimization level.
862
</para>
863
</listitem>
864
865
<listitem>
866
<para>
867
Bugfix:
868
fixed <literal>constant is too large</literal>
869
for 'long' warning on MIPS <literal>-mabi=n32</literal>.
870
</para>
871
</listitem>
872
873
<listitem>
874
<para>
875
Bugfix:
876
fixed compilation with GCC 4.1.
877
</para>
878
</listitem>
879
880
<listitem>
881
<para>
882
Bugfix:
883
fixed <literal>%TypedArray%.from()</literal> with the buffer is detached
884
by the mapper.
885
</para>
886
</listitem>
887
888
<listitem>
889
<para>
890
Bugfix:
891
fixed <literal>%TypedArray%.prototype.slice()</literal> with overlapping
892
buffers.
893
</para>
894
</listitem>
895
896
<listitem>
897
<para>
898
Bugfix:
899
fixed handling of detached buffers for typed arrays.
900
</para>
901
</listitem>
902
903
<listitem>
904
<para>
905
Bugfix:
906
fixed frame saving for async functions with closures.
907
</para>
908
</listitem>
909
910
<listitem>
911
<para>
912
Bugfix:
913
fixed RegExp compilation of patterns with escaped '[' characters.
914
</para>
915
</listitem>
916
917
</list>
918
</para>
919
920
</section>
921
922
923
<section id="njs0.9.0" name="Changes with njs 0.9.0">
924
925
<para>
926
Release Date:
927
06 May 2025
928
</para>
929
930
<para>
931
Core:
932
<list type="bullet">
933
934
<listitem>
935
<para>
936
Feature:
937
refactored handling of built-in strings, symbols, and small integers.
938
Performance improvements (arewefastyet/benchmarks/v8-v7 benchmark):
939
<list type="bullet">
940
941
<listitem>
942
<para>
943
Richards: +57% (631 → 989)
944
</para>
945
</listitem>
946
947
<listitem>
948
<para>
949
Crypto: +7% (1445 → 1551)
950
</para>
951
</listitem>
952
953
<listitem>
954
<para>
955
RayTrace: +37% (562 → 772)
956
</para>
957
</listitem>
958
959
<listitem>
960
<para>
961
NavierStokes: +20% (2062 → 2465)
962
</para>
963
</listitem>
964
965
<listitem>
966
<para>
967
Overall score: +29% (1014 → 1307)
968
</para>
969
</listitem>
970
971
</list>
972
</para>
973
</listitem>
974
975
<listitem>
976
<para>
977
Bugfix:
978
fixed handling of undefined values of a captured group
979
in <literal>RegExp.prototype[Symbol.split]()</literal>.
980
</para>
981
</listitem>
982
983
<listitem>
984
<para>
985
Bugfix:
986
fixed <literal>GCC 15</literal> build error with
987
<literal>-Wunterminated-string-initialization</literal>.
988
</para>
989
</listitem>
990
991
</list>
992
</para>
993
994
</section>
995
996
997
<section id="njs0.8.10" name="Changes with njs 0.8.10">
998
999
<para>
1000
Release Date:
1001
08 April 2025
1002
</para>
1003
1004
<para>
1005
nginx modules:
1006
<list type="bullet">
1007
1008
<listitem>
1009
<para>
1010
Feature:
1011
reading <link doc="reference.xml" id="r_request_text"><literal>r.requestText</literal></link>
1012
or
1013
<link doc="reference.xml" id="r_request_buffer"><literal>r.requestBuffer</literal></link>
1014
from a temporary file.
1015
Previously, an exception was thrown when accessing
1016
<link doc="reference.xml" id="r_request_text"><literal>r.requestText</literal></link>
1017
or
1018
<link doc="reference.xml" id="r_request_buffer"><literal>r.requestBuffer</literal></link>
1019
if the size of the client request body exceeded
1020
<link doc="../http/ngx_http_core_module.xml" id="client_body_buffer_size"><literal>client_body_buffer_size</literal></link>.
1021
</para>
1022
</listitem>
1023
1024
<listitem>
1025
<para>
1026
Improvement:
1027
improved reporting of unhandled promise rejections.
1028
</para>
1029
</listitem>
1030
1031
<listitem>
1032
<para>
1033
Bugfix:
1034
fixed name corruption in variables and headers processing.
1035
</para>
1036
</listitem>
1037
1038
<listitem>
1039
<para>
1040
Bugfix:
1041
fixed <link doc="reference.xml" id="dict_incr"><literal>incr()</literal></link>
1042
method of a shared dictionary with an empty init argument for the
1043
<link doc="engine.xml">QuickJS</link> engine.
1044
</para>
1045
</listitem>
1046
1047
<listitem>
1048
<para>
1049
Bugfix:
1050
accepting response headers with underscore characters in
1051
<link doc="reference.xml" id="ngx_fetch">Fetch API</link>.
1052
</para>
1053
</listitem>
1054
1055
</list>
1056
</para>
1057
1058
<para>
1059
Core:
1060
<list type="bullet">
1061
1062
<listitem>
1063
<para>
1064
Change:
1065
fixed
1066
<link doc="reference.xml" id="xml_serialize_tostring"><literal>serializeToString()</literal></link>.
1067
Previously, <link doc="reference.xml" id="xml_serialize_tostring"><literal>serializeToString()</literal></link> was
1068
<link doc="reference.xml" id="xml_exclusivec14n"><literal>exclusiveC14n()</literal></link>
1069
which returned a string instead of Buffer.
1070
According to the published documentation, it
1071
should be <link doc="reference.xml" id="xml_c14n"><literal>c14n()</literal></link>.
1072
</para>
1073
</listitem>
1074
1075
<listitem>
1076
<para>
1077
Feature:
1078
added
1079
<link doc="reference.xml" id="builtin_crypto"><literal>WebCrypto</literal></link>
1080
API for the
1081
<link doc="engine.xml">QuickJS</link> engine.
1082
</para>
1083
</listitem>
1084
1085
<listitem>
1086
<para>
1087
Feature:
1088
added <link doc="reference.xml" id="textencoder"><literal>TextEncoder</literal></link>
1089
and
1090
<link doc="reference.xml" id="textdecoder"><literal>TextDecoder</literal></link>
1091
for the
1092
<link doc="engine.xml">QuickJS</link> engine.
1093
</para>
1094
</listitem>
1095
1096
<listitem>
1097
<para>
1098
Feature:
1099
added <link doc="reference.xml" id="querystring"><literal>querystring</literal></link>
1100
module for the
1101
<link doc="engine.xml">QuickJS</link> engine.
1102
</para>
1103
</listitem>
1104
1105
<listitem>
1106
<para>
1107
Feature:
1108
added <link doc="reference.xml" id="crypto"><literal>crypto</literal></link>
1109
module for the
1110
<link doc="engine.xml">QuickJS</link> engine.
1111
</para>
1112
</listitem>
1113
1114
<listitem>
1115
<para>
1116
Feature:
1117
added <link doc="reference.xml" id="xml"><literal>xml</literal></link> module
1118
for the
1119
<link doc="engine.xml">QuickJS</link> engine.
1120
</para>
1121
</listitem>
1122
1123
<listitem>
1124
<para>
1125
Feature:
1126
added support for the <literal>QuickJS-NG</literal> library.
1127
</para>
1128
</listitem>
1129
1130
<listitem>
1131
<para>
1132
Bugfix:
1133
fixed
1134
<link doc="reference.xml" id="buffer_concat"><literal>Buffer.concat()</literal></link>
1135
with a single argument in <link doc="engine.xml">QuickJS</link>.
1136
</para>
1137
</listitem>
1138
1139
<listitem>
1140
<para>
1141
Bugfix:
1142
added missed syntax error for <literal>await</literal> in template literal.
1143
</para>
1144
</listitem>
1145
1146
<listitem>
1147
<para>
1148
Bugfix:
1149
fixed non-NULL terminated strings formatting in exceptions for the
1150
<link doc="engine.xml">QuickJS</link> engine.
1151
</para>
1152
</listitem>
1153
1154
<listitem>
1155
<para>
1156
Bugfix:
1157
fixed compatibility with recent change in <link doc="engine.xml">QuickJS</link>
1158
and <literal>QuickJS-NG</literal>.
1159
</para>
1160
</listitem>
1161
1162
</list>
1163
</para>
1164
1165
</section>
1166
1167
1168
<section id="njs0.8.9" name="Changes with njs 0.8.9">
1169
1170
<para>
1171
Release Date:
1172
14 January 2025
1173
</para>
1174
1175
<para>
1176
nginx modules:
1177
<list type="bullet">
1178
1179
<listitem>
1180
<para>
1181
Bugfix: removed extra VM creation per server.
1182
Previously, when <literal>js_import</literal> was declared in
1183
<link doc="../http/ngx_http_js_module.xml" id="js_import">http</link> or
1184
<link doc="../stream/ngx_stream_js_module.xml" id="js_import">stream</link>
1185
blocks, an extra copy of the VM instance was created for each server block.
1186
This was not needed and consumed a lot of memory for configurations with many
1187
server blocks.
1188
This issue was introduced in <link id="njs0.8.6">0.8.6</link> and was
1189
partially fixed for location blocks only in <link id="njs0.8.7">0.8.7</link>.
1190
</para>
1191
</listitem>
1192
1193
</list>
1194
</para>
1195
1196
<para>
1197
Core:
1198
<list type="bullet">
1199
1200
<listitem>
1201
<para>
1202
Feature:
1203
implemented <link doc="reference.xml" id="njs_api_fs">fs</link>
1204
for the <link doc="../njs/engine.xml">QuickJS</link> engine.
1205
</para>
1206
</listitem>
1207
1208
</list>
1209
</para>
1210
1211
</section>
1212
1213
1214
<section id="njs0.8.8" name="Changes with njs 0.8.8">
1215
1216
<para>
1217
Release Date:
1218
10 December 2024
1219
</para>
1220
1221
<para>
1222
nginx modules:
1223
<list type="bullet">
1224
1225
<listitem>
1226
<para>
1227
Feature:
1228
implemented <link doc="reference.xml" id="ngx_shared">shared dictionary</link>
1229
for the <link doc="../njs/engine.xml">QuickJS</link> engine.
1230
</para>
1231
</listitem>
1232
1233
<listitem>
1234
<para>
1235
Improvement:
1236
<link doc="../http/ngx_http_js_module.xml" id="js_preload_object">js_preload_object</link>
1237
is refactored.
1238
</para>
1239
</listitem>
1240
1241
<listitem>
1242
<para>
1243
Bugfix: fixed limit rated output.
1244
</para>
1245
</listitem>
1246
1247
<listitem>
1248
<para>
1249
Bugfix: optimized use of SSL contexts for the
1250
<link doc="../http/ngx_http_js_module.xml" id="js_fetch_trusted_certificate">js_fetch_trusted_certificate</link>
1251
directive.
1252
</para>
1253
</listitem>
1254
1255
</list>
1256
</para>
1257
1258
<para>
1259
Core:
1260
<list type="bullet">
1261
1262
<listitem>
1263
<para>
1264
Feature:
1265
implemented <link doc="reference.xml" id="process">process object</link>
1266
for the <link doc="../njs/engine.xml">QuickJS</link> engine.
1267
</para>
1268
</listitem>
1269
1270
<listitem>
1271
<para>
1272
Feature:
1273
implemented the
1274
<link doc="reference.xml" id="process_kill">process.kill()</link> method.
1275
</para>
1276
</listitem>
1277
1278
<listitem>
1279
<para>
1280
Bugfix: fixed XML tests with
1281
<link url="https://gitlab.gnome.org/GNOME/libxml2">libxml2</link> 2.13
1282
and later.
1283
</para>
1284
</listitem>
1285
1286
<listitem>
1287
<para>
1288
Bugfix: fixed promise resolving when Promise is inherited.
1289
</para>
1290
</listitem>
1291
1292
<listitem>
1293
<para>
1294
Bugfix: fixed absolute scope in cloned VMs.
1295
</para>
1296
</listitem>
1297
1298
</list>
1299
</para>
1300
1301
</section>
1302
1303
1304
<section id="njs0.8.7" name="Changes with njs 0.8.7">
1305
1306
<para>
1307
Release Date:
1308
22 October 2024
1309
</para>
1310
1311
<para>
1312
nginx modules:
1313
<list type="bullet">
1314
1315
<listitem>
1316
<para>
1317
Bugfix: eliminated unnecessary VM creation.
1318
Previously, njs consumed
1319
memory proportionally to the number of nginx locations.
1320
The issue was introduced in <link id="njs0.8.6">0.8.6</link>.
1321
</para>
1322
</listitem>
1323
1324
<listitem>
1325
<para>
1326
Improvement: added strict syntax validation for
1327
<link doc="../http/ngx_http_js_module.xml" id="js_body_filter"/>.
1328
</para>
1329
</listitem>
1330
1331
<listitem>
1332
<para>
1333
Improvement: improved error messages for module loading failures.
1334
</para>
1335
</listitem>
1336
1337
</list>
1338
</para>
1339
1340
<para>
1341
Core:
1342
<list type="bullet">
1343
1344
<listitem>
1345
<para>
1346
Feature: implemented
1347
<link doc="reference.xml" id="fs_readlinksync"><literal>fs.readlinkSync()</literal></link>.
1348
</para>
1349
</listitem>
1350
1351
<listitem>
1352
<para>
1353
Improvement: implemented lazy stack symbolization.
1354
</para>
1355
</listitem>
1356
1357
<listitem>
1358
<para>
1359
Bugfix: fixed heap-buffer-overflow in
1360
<literal>Buffer.prototype.indexOf()</literal>.
1361
The issue was introduced in <link id="njs0.8.6">0.8.6</link>.
1362
</para>
1363
</listitem>
1364
1365
<listitem>
1366
<para>
1367
Bugfix: fixed <literal>Buffer.prototype.lastIndexOf()</literal> when `from` is
1368
provided.
1369
</para>
1370
</listitem>
1371
1372
</list>
1373
</para>
1374
1375
</section>
1376
1377
1378
<section id="njs0.8.6" name="Changes with njs 0.8.6">
1379
1380
<para>
1381
Release Date:
1382
02 October 2024
1383
</para>
1384
1385
<para>
1386
nginx modules:
1387
<list type="bullet">
1388
1389
<listitem>
1390
<para>
1391
Feature:
1392
introduced the <link doc="../njs/engine.xml">QuickJS</link> engine.
1393
</para>
1394
</listitem>
1395
1396
<listitem>
1397
<para>
1398
Feature:
1399
added optional <literal>nocache</literal> flag for the
1400
<literal>js_set</literal> directive for
1401
<link doc="../http/ngx_http_js_module.xml" id="js_set">http</link>
1402
and
1403
<link doc="../stream/ngx_stream_js_module.xml" id="js_set">stream</link>.
1404
Thanks to Thomas P.
1405
</para>
1406
</listitem>
1407
1408
<listitem>
1409
<para>
1410
Feature:
1411
exposed
1412
<link doc="reference.xml" id="r_variables">capture group variables</link>
1413
in the HTTP module.
1414
Thanks to Thomas P.
1415
</para>
1416
</listitem>
1417
1418
</list>
1419
</para>
1420
1421
<para>
1422
Core:
1423
<list type="bullet">
1424
1425
<listitem>
1426
<para>
1427
Feature:
1428
added <literal>Buffer</literal> module for the QuickJS engine.
1429
</para>
1430
</listitem>
1431
1432
<listitem>
1433
<para>
1434
Bugfix:
1435
fixed handling of empty labelled statement in a function.
1436
</para>
1437
</listitem>
1438
1439
<listitem>
1440
<para>
1441
Bugfix:
1442
fixed <literal>Function</literal> constructor handling when called without
1443
arguments.
1444
</para>
1445
</listitem>
1446
1447
<listitem>
1448
<para>
1449
Bugfix:
1450
fixed <literal>Buffer.prototype.writeInt8()</literal> and friends.
1451
</para>
1452
</listitem>
1453
1454
<listitem>
1455
<para>
1456
Bugfix:
1457
fixed <literal>Buffer.prototype.writeFloat()</literal> and friends.
1458
</para>
1459
</listitem>
1460
1461
<listitem>
1462
<para>
1463
Bugfix:
1464
fixed <literal>Buffer.prototype.lastIndexOf()</literal>.
1465
</para>
1466
</listitem>
1467
1468
<listitem>
1469
<para>
1470
Bugfix:
1471
fixed <literal>Buffer.prototype.write()</literal>.
1472
</para>
1473
</listitem>
1474
1475
<listitem>
1476
<para>
1477
Bugfix:
1478
fixed maybe-uninitialized warnings in error creation.
1479
</para>
1480
</listitem>
1481
1482
<listitem>
1483
<para>
1484
Bugfix:
1485
fixed <literal>ctx.codepoint</literal> initialization in UTF-8 decoding.
1486
</para>
1487
</listitem>
1488
1489
<listitem>
1490
<para>
1491
Bugfix:
1492
fixed <literal>length</literal> initialization in
1493
<literal>Array.prototype.pop()</literal>.
1494
</para>
1495
</listitem>
1496
1497
<listitem>
1498
<para>
1499
Bugfix:
1500
fixed handling of <literal>encode</literal> arg in
1501
<literal>fs.readdir()</literal> and
1502
<literal>fs.realpath()</literal>.
1503
</para>
1504
</listitem>
1505
1506
</list>
1507
</para>
1508
1509
</section>
1510
1511
1512
<section id="njs0.8.5" name="Changes with njs 0.8.5">
1513
1514
<para>
1515
Release Date:
1516
25 June 2024
1517
</para>
1518
1519
<para>
1520
nginx modules:
1521
<list type="bullet">
1522
1523
<listitem>
1524
<para>
1525
Change:
1526
bytes invalid in UTF-8 encoding are converted into the replacement character in:
1527
<list type="bullet">
1528
1529
<listitem>
1530
<para>
1531
<link doc="reference.xml" id="r_variables"><literal>r.variables.var</literal></link>,
1532
<link doc="reference.xml" id="r_request_text"><literal>r.requestText</literal></link>,
1533
<link doc="reference.xml" id="r_response_text"><literal>r.responseText</literal></link>,
1534
<link doc="reference.xml" id="s_variables"><literal>s.variables.var</literal></link>,
1535
</para>
1536
</listitem>
1537
1538
<listitem>
1539
<para>
1540
the
1541
<literal>data</literal> argument of the
1542
<link doc="reference.xml" id="s_on"><literal>s.on()</literal></link> callback
1543
with <literal>upload</literal> or <literal>download</literal> event types,
1544
</para>
1545
</listitem>
1546
1547
<listitem>
1548
<para>
1549
the <literal>data</literal> argument of the
1550
<link doc="../http/ngx_http_js_module.xml" id="js_body_filter"><literal>js_body_filter</literal></link>
1551
directive.
1552
</para>
1553
</listitem>
1554
1555
</list>
1556
When working with binary data, use:
1557
<list type="bullet">
1558
1559
<listitem>
1560
<para>
1561
<link doc="reference.xml" id="r_raw_variables"><literal>r.rawVariables.var</literal></link>,
1562
<link doc="reference.xml" id="r_request_buffer"><literal>r.requestBuffer</literal></link>,
1563
<link doc="reference.xml" id="r_response_buffer"><literal>r.responseBuffer</literal></link>,
1564
<link doc="reference.xml" id="s_raw_variables"><literal>s.rawVariables.var</literal></link>,
1565
</para>
1566
</listitem>
1567
1568
<listitem>
1569
<para>
1570
the <literal>upstream</literal> or <literal>downstream</literal> event type
1571
for
1572
<link doc="reference.xml" id="s_on"><literal>s.on()</literal></link>,
1573
</para>
1574
</listitem>
1575
1576
<listitem>
1577
<para>
1578
<literal>buffer_type</literal>=<value>buffer</value> for
1579
<link doc="../http/ngx_http_js_module.xml" id="js_body_filter"><literal>js_body_filter</literal></link>.
1580
</para>
1581
</listitem>
1582
1583
</list>
1584
1585
</para>
1586
</listitem>
1587
1588
<listitem>
1589
<para>
1590
Feature:
1591
added <literal>timeout</literal> argument for
1592
<link doc="reference.xml" id="dict_add"><literal>add()</literal></link>,
1593
<link doc="reference.xml" id="dict_set"><literal>set()</literal></link>, and
1594
<link doc="reference.xml" id="dict_incr"><literal>incr()</literal></link>
1595
methods of a shared dictionary.
1596
</para>
1597
</listitem>
1598
1599
<listitem>
1600
<para>
1601
Bugfix:
1602
fixed checking for duplicate
1603
<link doc="../http/ngx_http_js_module.xml" id="js_set"><literal>js_set</literal></link>
1604
variables.
1605
</para>
1606
</listitem>
1607
1608
<listitem>
1609
<para>
1610
Bugfix:
1611
fixed request <literal>Host</literal> header when the port is non-standard.
1612
</para>
1613
</listitem>
1614
1615
<listitem>
1616
<para>
1617
Bugfix:
1618
fixed handling of a zero-length request body in
1619
<link doc="reference.xml" id="ngx_fetch"><literal>ngx.fetch()</literal></link>
1620
and
1621
<link doc="reference.xml" id="r_subrequest"><literal>r.subrequest()</literal></link>.
1622
</para>
1623
</listitem>
1624
1625
<listitem>
1626
<para>
1627
Bugfix:
1628
fixed heap-buffer-overflow in <literal>Headers.get()</literal>.
1629
</para>
1630
</listitem>
1631
1632
<listitem>
1633
<para>
1634
Bugfix:
1635
fixed
1636
<link doc="reference.xml" id="r_subrequest"><literal>r.subrequest()</literal></link>
1637
error handling.
1638
</para>
1639
</listitem>
1640
1641
</list>
1642
</para>
1643
1644
<para>
1645
Core:
1646
<list type="bullet">
1647
1648
<listitem>
1649
<para>
1650
Feature:
1651
added <literal>zlib</literal> module for <literal>QuickJS</literal> engine.
1652
</para>
1653
</listitem>
1654
1655
<listitem>
1656
<para>
1657
Bugfix:
1658
fixed
1659
<link doc="reference.xml" id="zlib_inflatesync"><literal>zlib.inflate()</literal></link>.
1660
</para>
1661
</listitem>
1662
1663
<listitem>
1664
<para>
1665
Bugfix:
1666
fixed <literal>String.prototype.replaceAll()</literal>
1667
with a zero-length argument.
1668
</para>
1669
</listitem>
1670
1671
<listitem>
1672
<para>
1673
Bugfix:
1674
fixed <literal>retval</literal> handling after an exception in
1675
<literal>Array.prototype.toSpliced()</literal>,
1676
<literal>Array.prototype.toReversed()</literal>,
1677
<literal>Array.prototype.toSorted()</literal>.
1678
</para>
1679
</listitem>
1680
1681
<listitem>
1682
<para>
1683
Bugfix:
1684
fixed <literal>RegExp.prototype[@@replace]()</literal> with replacements
1685
containing <literal>$'</literal>, <literal>$`</literal>
1686
and strings with Unicode characters.
1687
</para>
1688
</listitem>
1689
1690
<listitem>
1691
<para>
1692
Bugfix:
1693
fixed a one-byte overread in
1694
<literal>decodeURI()</literal> and
1695
<literal>decodeURIComponent()</literal>.
1696
</para>
1697
</listitem>
1698
1699
<listitem>
1700
<para>
1701
Bugfix:
1702
fixed tracking of argument scope.
1703
</para>
1704
</listitem>
1705
1706
<listitem>
1707
<para>
1708
Bugfix:
1709
fixed integer overflow in <literal>Date.parse()</literal>.
1710
</para>
1711
</listitem>
1712
1713
</list>
1714
</para>
1715
1716
</section>
1717
1718
1719
<section id="njs0.8.4" name="Changes with njs 0.8.4">
1720
1721
<para>
1722
Release Date:
1723
16 April 2024
1724
</para>
1725
1726
<para>
1727
nginx modules:
1728
<list type="bullet">
1729
1730
<listitem>
1731
<para>
1732
Feature:
1733
the <literal>Server</literal> header for outgoing header can be set.
1734
</para>
1735
</listitem>
1736
1737
<listitem>
1738
<para>
1739
Improvement:
1740
validating URI and args arguments in
1741
<link doc="reference.xml" id="r_subrequest"><literal>r.subrequest()</literal></link>.
1742
</para>
1743
</listitem>
1744
1745
<listitem>
1746
<para>
1747
Improvement:
1748
checking for duplicate
1749
<link doc="../http/ngx_http_js_module.xml" id="js_set"/> variables.
1750
</para>
1751
</listitem>
1752
1753
<listitem>
1754
<para>
1755
Bugfix:
1756
fixed
1757
<link doc="reference.xml" id="dict_clear"><literal>clear()</literal></link>
1758
method of a shared dictionary without a timeout
1759
introduced in <link id="njs0.8.3">0.8.3</link>.
1760
</para>
1761
</listitem>
1762
1763
<listitem>
1764
<para>
1765
Bugfix:
1766
fixed
1767
<link doc="reference.xml" id="r_send"><literal>r.send()</literal></link>
1768
method of a shared dictionary without a timeout
1769
with <literal>Buffer</literal> argument.
1770
</para>
1771
</listitem>
1772
1773
</list>
1774
</para>
1775
1776
<para>
1777
Core:
1778
<list type="bullet">
1779
1780
<listitem>
1781
<para>
1782
Feature:
1783
added <literal>QuickJS</literal> engine support in CLI.
1784
</para>
1785
</listitem>
1786
1787
<listitem>
1788
<para>
1789
Bugfix:
1790
fixed
1791
<link doc="reference.xml" id="atob"><literal>atob()</literal></link>
1792
with non-padded <literal>base64</literal> strings.
1793
</para>
1794
</listitem>
1795
1796
</list>
1797
</para>
1798
1799
</section>
1800
1801
1802
<section id="njs0.8.3" name="Changes with njs 0.8.3">
1803
1804
<para>
1805
Release Date:
1806
07 February 2024
1807
</para>
1808
1809
<para>
1810
nginx modules:
1811
<list type="bullet">
1812
1813
<listitem>
1814
<para>
1815
Bugfix:
1816
fixed
1817
<link doc="reference.xml" id="headers_set"><literal>Headers.set()</literal></link>.
1818
</para>
1819
</listitem>
1820
1821
<listitem>
1822
<para>
1823
Bugfix:
1824
fixed
1825
<link doc="../http/ngx_http_js_module.xml" id="js_set"/>
1826
with <literal>Buffer</literal> values.
1827
</para>
1828
</listitem>
1829
1830
<listitem>
1831
<para>
1832
Bugfix:
1833
fixed
1834
<link doc="reference.xml" id="dict_clear"><literal>clear()</literal></link>
1835
method of a shared dictionary when a timeout is not specified.
1836
</para>
1837
</listitem>
1838
1839
<listitem>
1840
<para>
1841
Bugfix:
1842
fixed
1843
<link doc="../http/ngx_http_stub_status_module.xml">stub_status</link>
1844
statistics when
1845
<link doc="../http/ngx_http_js_module.xml" id="js_periodic">js_periodic</link>
1846
is enabled.
1847
</para>
1848
</listitem>
1849
1850
</list>
1851
</para>
1852
1853
<para>
1854
Core:
1855
<list type="bullet">
1856
1857
<listitem>
1858
<para>
1859
Bugfix:
1860
fixed building with
1861
<link url="https://gitlab.gnome.org/GNOME/libxml2">libxml2</link> 2.12
1862
and later.
1863
</para>
1864
</listitem>
1865
1866
<listitem>
1867
<para>
1868
Bugfix:
1869
fixed <literal>Date</literal> constructor for overflows
1870
and with <literal>NaN</literal> values.
1871
</para>
1872
</listitem>
1873
1874
<listitem>
1875
<para>
1876
Bugfix:
1877
fixed underflow in
1878
<link doc="reference.xml" id="querystring_parse"><literal>querystring.parse()</literal></link>.
1879
</para>
1880
</listitem>
1881
1882
<listitem>
1883
<para>
1884
Bugfix:
1885
fixed potential buffer overread in
1886
<literal>String.prototype.match()</literal>.
1887
</para>
1888
</listitem>
1889
1890
<listitem>
1891
<para>
1892
Bugfix:
1893
fixed parsing of <literal>for-in</literal> loops.
1894
</para>
1895
</listitem>
1896
1897
<listitem>
1898
<para>
1899
Bugfix:
1900
fixed parsing of
1901
hexadecimal, octal, and binary literals with no digits.
1902
</para>
1903
</listitem>
1904
1905
</list>
1906
</para>
1907
1908
</section>
1909
1910
1911
<section id="njs0.8.2" name="Changes with njs 0.8.2">
1912
1913
<para>
1914
Release Date:
1915
24 October 2023
1916
</para>
1917
1918
<para>
1919
nginx modules:
1920
<list type="bullet">
1921
1922
<listitem>
1923
<para>
1924
Feature:
1925
introduced
1926
<link doc="reference.xml" id="console">console</link> object.
1927
The following methods were introduced:
1928
<link doc="reference.xml" id="console_error"><literal>error()</literal></link>,
1929
<link doc="reference.xml" id="console_info"><literal>info()</literal></link>,
1930
<link doc="reference.xml" id="console_log"><literal>log()</literal></link>,
1931
<link doc="reference.xml" id="console_time"><literal>time()</literal></link>,
1932
<link doc="reference.xml" id="console_time_end"><literal>timeEnd()</literal></link>,
1933
<link doc="reference.xml" id="console_warn"><literal>warn()</literal></link>.
1934
</para>
1935
</listitem>
1936
1937
<listitem>
1938
<para>
1939
Bugfix:
1940
fixed
1941
<literal>HEAD</literal> response handling with large Content-Length in
1942
<link doc="reference.xml" id="ngx_fetch">Fetch API</link>.
1943
</para>
1944
</listitem>
1945
1946
<listitem>
1947
<para>
1948
Bugfix:
1949
fixed
1950
<link doc="reference.xml" id="dict_items"><literal>items()</literal></link>
1951
method for a shared dictionary.
1952
</para>
1953
</listitem>
1954
1955
<listitem>
1956
<para>
1957
Bugfix:
1958
fixed
1959
<link doc="reference.xml" id="dict_delete"><literal>delete()</literal></link>
1960
method for a shared dictionary.
1961
</para>
1962
</listitem>
1963
1964
</list>
1965
</para>
1966
1967
<para>
1968
Core:
1969
<list type="bullet">
1970
1971
<listitem>
1972
<para>
1973
Feature:
1974
extended
1975
<link doc="reference.xml" id="njs_api_fs"><literal>fs</literal></link> module.
1976
Added
1977
<link doc="reference.xml" id="fs_existssync"><literal>fs.existsSync()</literal></link>.
1978
</para>
1979
</listitem>
1980
1981
<listitem>
1982
<para>
1983
Bugfix:
1984
fixed
1985
<link doc="reference.xml" id="xml"><literal>xml</literal></link> module.
1986
Broken XML exception handling in
1987
<link doc="reference.xml" id="xml_parse"><literal>xml.parse()</literal></link>
1988
method was fixed.
1989
</para>
1990
</listitem>
1991
1992
<listitem>
1993
<para>
1994
Bugfix:
1995
fixed
1996
<literal>Regexp.prototype.exec()</literal> with global regexp and Unicode input.
1997
</para>
1998
</listitem>
1999
2000
</list>
2001
</para>
2002
2003
</section>
2004
2005
2006
<section id="njs0.8.1" name="Changes with njs 0.8.1">
2007
2008
<para>
2009
Release Date:
2010
12 September 2023
2011
</para>
2012
2013
<para>
2014
nginx modules:
2015
<list type="bullet">
2016
2017
<listitem>
2018
<para>
2019
Feature:
2020
introduced the <literal>js_periodic</literal> directive for
2021
<link doc="../http/ngx_http_js_module.xml" id="js_periodic">http</link>
2022
and
2023
<link doc="../stream/ngx_stream_js_module.xml" id="js_periodic">stream</link>
2024
that allows specifying a JS handler to run at regular intervals.
2025
</para>
2026
</listitem>
2027
2028
<listitem>
2029
<para>
2030
Feature:
2031
implemented
2032
<link doc="reference.xml" id="dict_items"><literal>items()</literal></link>
2033
method of a
2034
<link doc="reference.xml" id="ngx_shared">shared dictionary</link>.
2035
The method returns all the non-expired key-value pairs.
2036
</para>
2037
</listitem>
2038
2039
<listitem>
2040
<para>
2041
Bugfix:
2042
fixed
2043
<link doc="reference.xml" id="dict_size"><literal>size()</literal></link>
2044
and
2045
<link doc="reference.xml" id="dict_keys"><literal>keys()</literal></link>
2046
methods of a
2047
<link doc="reference.xml" id="ngx_shared">shared dictionary</link>.
2048
</para>
2049
</listitem>
2050
2051
<listitem>
2052
<para>
2053
Bugfix:
2054
fixed erroneous exception in
2055
<link doc="reference.xml" id="r_internal_redirect"><literal>r.internalRedirect()</literal></link>
2056
introduced in <link id="njs0.8.0">0.8.0</link>.
2057
</para>
2058
</listitem>
2059
2060
</list>
2061
</para>
2062
2063
<para>
2064
Core:
2065
<list type="bullet">
2066
2067
<listitem>
2068
<para>
2069
Bugfix:
2070
fixed incorrect order of keys in
2071
<literal>Object.getOwnPropertyNames()</literal>.
2072
</para>
2073
</listitem>
2074
2075
</list>
2076
</para>
2077
2078
</section>
2079
2080
2081
<section id="njs0.8.0" name="Changes with njs 0.8.0">
2082
2083
<para>
2084
Release Date:
2085
06 July 2023
2086
</para>
2087
2088
<para>
2089
nginx modules:
2090
<list type="bullet">
2091
2092
<listitem>
2093
<para>
2094
Change:
2095
removed special treatment of forbidden headers in
2096
<link doc="reference.xml" id="ngx_fetch">Fetch API</link>
2097
introduced in <link id="njs0.7.10">0.7.10</link>.
2098
</para>
2099
</listitem>
2100
2101
<listitem>
2102
<para>
2103
Change:
2104
removed deprecated since <link id="njs0.5.0">0.5.0</link>
2105
<link doc="reference.xml" id="r_request_body"><literal>r.requestBody</literal></link>
2106
and
2107
<link doc="reference.xml" id="r_response_body"><literal>r.responseBody</literal></link>
2108
in
2109
<link doc="../http/ngx_http_js_module.xml"><literal>http</literal></link>
2110
module.
2111
</para>
2112
</listitem>
2113
2114
<listitem>
2115
<para>
2116
Change:
2117
throwing an exception in
2118
<link doc="reference.xml" id="r_internal_redirect"><literal>r.internalRedirect()</literal></link>
2119
while filtering in
2120
<link doc="../http/ngx_http_js_module.xml"><literal>http</literal></link>
2121
module.
2122
</para>
2123
</listitem>
2124
2125
<listitem>
2126
<para>
2127
Feature:
2128
introduced more global
2129
<link doc="reference.xml" id="ngx"><literal>nginx</literal></link> properties:
2130
<link doc="reference.xml" id="ngx_build"><literal>ngx.build</literal></link>,
2131
<link doc="reference.xml" id="ngx_conf_file_path"><literal>ngx.conf_file_path</literal></link>,
2132
<link doc="reference.xml" id="ngx_error_log_path"><literal>ngx.error_log_path</literal></link>,
2133
<link doc="reference.xml" id="ngx_prefix"><literal>ngx.prefix</literal></link>,
2134
<link doc="reference.xml" id="ngx_version"><literal>ngx.version</literal></link>,
2135
<link doc="reference.xml" id="ngx_version_number"><literal>ngx.version_number</literal></link>,
2136
and
2137
<link doc="reference.xml" id="ngx_worker_id"><literal>ngx.worker_id</literal></link>.
2138
</para>
2139
</listitem>
2140
2141
<listitem>
2142
<para>
2143
Feature:
2144
introduced the <literal>js_shared_dict_zone</literal> directive for
2145
<link doc="../http/ngx_http_js_module.xml" id="js_shared_dict_zone">http</link>
2146
and
2147
<link doc="../stream/ngx_stream_js_module.xml" id="js_shared_dict_zone">stream</link>
2148
that allows declaring a dictionary shared between worker processes.
2149
</para>
2150
</listitem>
2151
2152
<listitem>
2153
<para>
2154
Feature:
2155
introduced global
2156
<link doc="reference.xml" id="ngx_shared"><literal>nginx.shared</literal></link>
2157
methods and properties for working with shared dictionaries.
2158
</para>
2159
</listitem>
2160
2161
<listitem>
2162
<para>
2163
Improvement:
2164
added compile-time options to disable njs modules.
2165
For example, to disable libxslt-related code:
2166
<example>
2167
NJS_LIBXSLT=NO ./configure .. --add-module=/path/to/njs/module
2168
</example>
2169
</para>
2170
</listitem>
2171
2172
<listitem>
2173
<para>
2174
Bugfix:
2175
fixed
2176
<link doc="reference.xml" id="r_status"><literal>r.status</literal></link>
2177
setter when filtering in
2178
<link doc="../http/ngx_http_js_module.xml"><literal>http</literal></link>
2179
module.
2180
</para>
2181
</listitem>
2182
2183
<listitem>
2184
<para>
2185
Bugfix:
2186
fixed setting of Location header in
2187
<link doc="../http/ngx_http_js_module.xml"><literal>http</literal></link>
2188
module.
2189
</para>
2190
</listitem>
2191
2192
</list>
2193
</para>
2194
2195
<para>
2196
Core:
2197
<list type="bullet">
2198
2199
<listitem>
2200
<para>
2201
Change:
2202
native methods are provided with <literal>retval</literal> argument.
2203
This change breaks compatibility with C extension for njs
2204
requiring the modification of the code.
2205
</para>
2206
</listitem>
2207
2208
<listitem>
2209
<para>
2210
Change:
2211
non-compliant deprecated String methods were removed.
2212
The following methods were removed:
2213
<link doc="reference.xml" id="string_bytesfrom"><literal>String.bytesFrom()</literal></link>,
2214
<link doc="reference.xml" id="string_frombytes"><literal>String.prototype.fromBytes()</literal></link>,
2215
<link doc="reference.xml" id="string_fromutf8"><literal>String.prototype.fromUTF8()</literal></link>,
2216
<link doc="reference.xml" id="string_tobytes"><literal>String.prototype.toBytes()</literal></link>,
2217
<link doc="reference.xml" id="string_toutf8"><literal>String.prototype.toUTF8()</literal></link>,
2218
<link doc="reference.xml" id="string_toutf8"><literal>String.prototype.toString(<value>encoding</value>)</literal></link>.
2219
</para>
2220
</listitem>
2221
2222
<listitem>
2223
<para>
2224
Change:
2225
removed support for building with GNU readline.
2226
</para>
2227
</listitem>
2228
2229
<listitem>
2230
<para>
2231
Feature:
2232
added ES13-compliant <literal>Array</literal> methods:
2233
<literal>Array.from()</literal>,
2234
<literal>Array.prototype.toSorted()</literal>,
2235
<literal>Array.prototype.toSpliced()</literal>,
2236
<literal>Array.prototype.toReversed()</literal>.
2237
</para>
2238
</listitem>
2239
2240
<listitem>
2241
<para>
2242
Feature:
2243
added ES13-compliant <literal>TypedArray</literal> methods:
2244
<literal>%TypedArray%.prototype.toSorted()</literal>,
2245
<literal>%TypedArray%.prototype.toSpliced()</literal>,
2246
<literal>%TypedArray%.prototype.toReversed()</literal>.
2247
</para>
2248
</listitem>
2249
2250
<listitem>
2251
<para>
2252
Feature:
2253
added
2254
<link doc="reference.xml" id="cryptokey"><literal>CryptoKey</literal></link>
2255
properties in
2256
<link doc="reference.xml" id="builtin_crypto">WebCrypto API</link>.
2257
The following properties were added:
2258
<link doc="reference.xml" id="cryptokey_alg"><literal>algorithm</literal></link>,
2259
<link doc="reference.xml" id="cryptokey_extractable"><literal>extractable</literal></link>,
2260
<link doc="reference.xml" id="cryptokey_type"><literal>type</literal></link>,
2261
<link doc="reference.xml" id="cryptokey_usages"><literal>usages</literal></link>.
2262
</para>
2263
</listitem>
2264
2265
<listitem>
2266
<para>
2267
Bugfix:
2268
fixed <literal>retval</literal> of
2269
<link doc="reference.xml" id="crypto_get_random_values"><literal>сrypto.getRandomValues()</literal></link>.
2270
</para>
2271
</listitem>
2272
2273
<listitem>
2274
<para>
2275
Bugfix:
2276
fixed evaluation of computed property names with function expressions.
2277
</para>
2278
</listitem>
2279
2280
<listitem>
2281
<para>
2282
Bugfix:
2283
fixed implicit name for a function expression declared in arrays.
2284
</para>
2285
</listitem>
2286
2287
<listitem>
2288
<para>
2289
Bugfix:
2290
fixed parsing of <literal>for-in</literal> loops.
2291
</para>
2292
</listitem>
2293
2294
<listitem>
2295
<para>
2296
Bugfix:
2297
fixed
2298
<literal>Date.parse()</literal> with ISO-8601 format and UTC time offset.
2299
</para>
2300
</listitem>
2301
2302
</list>
2303
</para>
2304
2305
</section>
2306
2307
2308
<section id="njs0.7.12" name="Changes with njs 0.7.12">
2309
2310
<para>
2311
Release Date:
2312
10 April 2023
2313
</para>
2314
2315
<para>
2316
nginx modules:
2317
<list type="bullet">
2318
2319
<listitem>
2320
<para>
2321
Bugfix:
2322
fixed <literal>Headers()</literal> constructor in
2323
<link doc="reference.xml" id="ngx_fetch">Fetch API</link>.
2324
</para>
2325
</listitem>
2326
2327
</list>
2328
</para>
2329
2330
<para>
2331
Core:
2332
<list type="bullet">
2333
2334
<listitem>
2335
<para>
2336
Feature:
2337
added
2338
<link doc="reference.xml" id="crypto_hash_copy"><literal>Hash.copy()</literal></link>
2339
method in
2340
<link doc="reference.xml" id="crypto">crypto</link> module.
2341
</para>
2342
</listitem>
2343
2344
<listitem>
2345
<para>
2346
Feature:
2347
added
2348
<link doc="reference.xml" id="zlib">zlib</link>
2349
module.
2350
</para>
2351
</listitem>
2352
2353
<listitem>
2354
<para>
2355
Improvement:
2356
added support for
2357
<literal>export {name as default}</literal> statement.
2358
</para>
2359
</listitem>
2360
2361
<listitem>
2362
<para>
2363
Bugfix:
2364
fixed <literal>Number</literal> constructor according to the spec.
2365
</para>
2366
</listitem>
2367
2368
</list>
2369
</para>
2370
2371
</section>
2372
2373
2374
<section id="njs0.7.11" name="Changes with njs 0.7.11">
2375
2376
<para>
2377
Release Date:
2378
09 March 2023
2379
</para>
2380
2381
<para>
2382
nginx modules:
2383
<list type="bullet">
2384
2385
<listitem>
2386
<para>
2387
Bugfix:
2388
added missed linking with
2389
<link url="https://gitlab.gnome.org/GNOME/libxml2">libxml2</link>
2390
for the dynamic module.
2391
The bug was introduced in <link id="njs0.7.10">0.7.10</link>.
2392
</para>
2393
</listitem>
2394
2395
</list>
2396
</para>
2397
2398
<para>
2399
Core:
2400
<list type="bullet">
2401
2402
<listitem>
2403
<para>
2404
Feature:
2405
added
2406
<link doc="reference.xml" id="xml_node">XMLNode API</link>
2407
to modify XML documents.
2408
</para>
2409
</listitem>
2410
2411
<listitem>
2412
<para>
2413
Change:
2414
removed <literal>XML_PARSE_DTDVALID</literal> during parsing of an XML document
2415
due to security implications.
2416
The issue was introduced in <link id="njs0.7.10">0.7.10</link>.
2417
When <literal>XML_PARSE_DTDVALID</literal> is enabled,
2418
<link url="https://gitlab.gnome.org/GNOME/libxml2">libxml2</link>
2419
parses and executes external entities present inside an XML document.
2420
</para>
2421
</listitem>
2422
2423
<listitem>
2424
<para>
2425
Bugfix:
2426
fixed the detection of <literal>await</literal> in arguments.
2427
</para>
2428
</listitem>
2429
2430
<listitem>
2431
<para>
2432
Bugfix:
2433
fixed <literal>Error()</literal> instance dumping
2434
when “<literal>name</literal>” prop is not primitive.
2435
</para>
2436
</listitem>
2437
2438
<listitem>
2439
<para>
2440
Bugfix:
2441
fixed array instance with a <literal>getter</literal> property dumping.
2442
</para>
2443
</listitem>
2444
2445
<listitem>
2446
<para>
2447
Bugfix:
2448
fixed <literal>njs_object_property()</literal> with
2449
<literal>NJS_WHITEOUT</literal> properties.
2450
</para>
2451
</listitem>
2452
2453
<listitem>
2454
<para>
2455
Bugfix:
2456
fixed <literal>func</literal> instance dumping
2457
with “<literal>name</literal>” as getter.
2458
</para>
2459
</listitem>
2460
2461
<listitem>
2462
<para>
2463
Bugfix:
2464
fixed attaching of a stack to an error object.
2465
</para>
2466
</listitem>
2467
2468
<listitem>
2469
<para>
2470
Bugfix:
2471
fixed <literal>String.prototype.replace()</literal> with replacement
2472
containing “<literal>$'</literal>”, “<literal>$`</literal>”.
2473
</para>
2474
</listitem>
2475
2476
</list>
2477
</para>
2478
2479
</section>
2480
2481
2482
<section id="njs0.7.10" name="Changes with njs 0.7.10">
2483
2484
<para>
2485
Release Date:
2486
07 February 2023
2487
</para>
2488
2489
<para>
2490
nginx modules:
2491
<list type="bullet">
2492
2493
<listitem>
2494
<para>
2495
Feature:
2496
added
2497
<link doc="reference.xml" id="request"><literal>Request</literal></link>,
2498
<link doc="reference.xml" id="response"><literal>Response</literal></link>,
2499
and
2500
<link doc="reference.xml" id="headers"><literal>Headers</literal></link>
2501
ctors in
2502
<link doc="reference.xml" id="ngx_fetch">Fetch API</link>.
2503
</para>
2504
</listitem>
2505
2506
<listitem>
2507
<para>
2508
Bugfix:
2509
fixed nginx logger callback for calls in the master process.
2510
</para>
2511
</listitem>
2512
2513
</list>
2514
</para>
2515
2516
<para>
2517
Core:
2518
<list type="bullet">
2519
2520
<listitem>
2521
<para>
2522
Feature:
2523
added signal support in CLI.
2524
</para>
2525
</listitem>
2526
2527
<listitem>
2528
<para>
2529
Feature:
2530
added
2531
<link doc="reference.xml" id="xml"><literal>xml</literal></link>
2532
module for working with XML documents.
2533
</para>
2534
</listitem>
2535
2536
<listitem>
2537
<para>
2538
Feature:
2539
extended support for symmetric and asymmetric keys in WebCrypto.
2540
Most notably <literal>JWK</literal> format for
2541
<link doc="reference.xml" id="crypto_subtle_import_key"><literal>importKey()</literal></link>
2542
was added.
2543
</para>
2544
</listitem>
2545
2546
<listitem>
2547
<para>
2548
Feature:
2549
extended support for symmetric and asymmetric keys in
2550
<link doc="reference.xml" id="builtin_crypto">WebCrypto API</link>.
2551
Most notably <literal>JWK</literal> format for
2552
<link doc="reference.xml" id="crypto_subtle_import_key"><literal>importKey()</literal></link>
2553
was added.
2554
<link doc="reference.xml" id="crypto_subtle_generate_key"><literal>generateKey()</literal></link>
2555
and
2556
<link doc="reference.xml" id="crypto_subtle_export_key"><literal>exportKey()</literal></link>
2557
were also implemented.
2558
</para>
2559
</listitem>
2560
2561
<listitem>
2562
<para>
2563
Feature:
2564
added
2565
<literal>String.prototype.replaceAll()</literal>.
2566
</para>
2567
</listitem>
2568
2569
<listitem>
2570
<para>
2571
Bugfix:
2572
fixed <literal>for(expr1;</literal> conditional syntax error handling.
2573
</para>
2574
</listitem>
2575
2576
<listitem>
2577
<para>
2578
Bugfix:
2579
<literal>Object.values()</literal>
2580
and
2581
<literal>Object.entries()</literal>
2582
with external objects.
2583
</para>
2584
</listitem>
2585
2586
<listitem>
2587
<para>
2588
Bugfix:
2589
fixed <literal>RegExp.prototype[@@replace]()</literal>.
2590
</para>
2591
</listitem>
2592
2593
</list>
2594
</para>
2595
2596
</section>
2597
2598
2599
<section id="njs0.7.9" name="Changes with njs 0.7.9">
2600
2601
<para>
2602
Release Date:
2603
17 November 2022
2604
</para>
2605
2606
<para>
2607
nginx modules:
2608
<list type="bullet">
2609
2610
<listitem>
2611
<para>
2612
Bugfix:
2613
fixed
2614
<link doc="reference.xml" id="ngx_fetch"><literal>Fetch</literal></link>
2615
Response prototype reinitialization.
2616
When at least one <literal>js_import</literal> directive was declared in both
2617
<link doc="../http/ngx_http_js_module.xml" id="js_import">HTTP</link>
2618
and
2619
<link doc="../stream/ngx_stream_js_module.xml" id="js_import">Stream</link>,
2620
<link doc="reference.xml" id="ngx_fetch"><literal>ngx.fetch()</literal></link>
2621
returned inapproriate response in Stream.
2622
The bug was introduced in <link id="njs0.7.7">0.7.7</link>.
2623
</para>
2624
</listitem>
2625
2626
</list>
2627
</para>
2628
2629
<para>
2630
Core:
2631
<list type="bullet">
2632
2633
<listitem>
2634
<para>
2635
Bugfix:
2636
fixed <literal>String.prototype.replace(re)</literal>
2637
if <literal>re.exec()</literal> returns non-flat array.
2638
</para>
2639
</listitem>
2640
2641
<listitem>
2642
<para>
2643
Bugfix:
2644
fixed <literal>Array.prototype.fill()</literal>
2645
when <literal>start</literal> object changes <literal>this</literal>.
2646
</para>
2647
</listitem>
2648
2649
<listitem>
2650
<para>
2651
Bugfix:
2652
fixed description for
2653
<link doc="reference.xml" id="fs_mkdirsync"><literal>fs.mkdir()</literal></link>
2654
and
2655
<link doc="reference.xml" id="fs_rmdirsync"><literal>fs.rmdir()</literal></link>
2656
methods.
2657
</para>
2658
</listitem>
2659
2660
<listitem>
2661
<para>
2662
Bugfix:
2663
fixed <literal>%TypedArray%.prototype.set(s)</literal>
2664
when <literal>s</literal> element changes <literal>this</literal>.
2665
</para>
2666
</listitem>
2667
2668
<listitem>
2669
<para>
2670
Bugfix:
2671
fixed <literal>Array.prototype.splice(s,d)</literal>
2672
when <literal>d</literal> resizes <literal>this</literal> during eval.
2673
</para>
2674
</listitem>
2675
2676
<listitem>
2677
<para>
2678
Bugfix:
2679
fixed <literal>for-in</literal> loop with left and right hand side expressions.
2680
</para>
2681
</listitem>
2682
2683
</list>
2684
</para>
2685
2686
</section>
2687
2688
2689
<section id="njs0.7.8" name="Changes with njs 0.7.8">
2690
2691
<para>
2692
Release Date:
2693
25 October 2022
2694
</para>
2695
2696
<para>
2697
nginx modules:
2698
<list type="bullet">
2699
2700
<listitem>
2701
<para>
2702
Feature:
2703
added
2704
<link doc="../http/ngx_http_js_module.xml" id="js_preload_object"/> directive.
2705
</para>
2706
</listitem>
2707
2708
<listitem>
2709
<para>
2710
Feature:
2711
added
2712
<link doc="reference.xml" id="ngx_conf_prefix"><literal>ngx.conf_prefix</literal></link><literal></literal>
2713
property.
2714
</para>
2715
</listitem>
2716
2717
<listitem>
2718
<para>
2719
Feature:
2720
added
2721
<link doc="reference.xml" id="s_send_upstream"><literal>s.sendUpstream()</literal></link>
2722
and
2723
<link doc="reference.xml" id="s_send_downstream"><literal>s.sendDownstream()</literal></link>
2724
in
2725
<link doc="../stream/ngx_stream_js_module.xml">stream</link> module.
2726
</para>
2727
</listitem>
2728
2729
<listitem>
2730
<para>
2731
Feature:
2732
added support for <literal>HEAD</literal> method in
2733
<link doc="reference.xml" id="ngx_fetch">Fetch API</link>.
2734
</para>
2735
</listitem>
2736
2737
<listitem>
2738
<para>
2739
Improvement:
2740
improved <literal>async</literal> callback support for
2741
<link doc="reference.xml" id="s_send"><literal>s.send()</literal></link>
2742
in
2743
<link doc="../stream/ngx_stream_js_module.xml">stream</link> module.
2744
</para>
2745
</listitem>
2746
2747
</list>
2748
</para>
2749
2750
<para>
2751
Core:
2752
<list type="bullet">
2753
2754
<listitem>
2755
<para>
2756
Feature:
2757
added <literal>name</literal> instance property for a function object.
2758
</para>
2759
</listitem>
2760
2761
<listitem>
2762
<para>
2763
Feature:
2764
added
2765
<link doc="reference.xml" id="njs_memory_stats"><literal>njs.memoryStats</literal></link>
2766
object.
2767
</para>
2768
</listitem>
2769
2770
<listitem>
2771
<para>
2772
Bugfix:
2773
fixed
2774
<literal>String.prototype.trimEnd()</literal>
2775
with unicode string.
2776
</para>
2777
</listitem>
2778
2779
<listitem>
2780
<para>
2781
Bugfix:
2782
fixed <literal>Object.freeze()</literal> with fast arrays.
2783
</para>
2784
</listitem>
2785
2786
<listitem>
2787
<para>
2788
Bugfix:
2789
fixed <literal>Object.defineProperty()</literal> with fast arrays.
2790
</para>
2791
</listitem>
2792
2793
<listitem>
2794
<para>
2795
Bugfix:
2796
fixed <literal>async</literal> token as a property name of an object.
2797
</para>
2798
</listitem>
2799
2800
<listitem>
2801
<para>
2802
Bugfix:
2803
fixed property set instruction when key modifies base binding.
2804
</para>
2805
</listitem>
2806
2807
<listitem>
2808
<para>
2809
Bugfix:
2810
fixed complex assignments.
2811
</para>
2812
</listitem>
2813
2814
<listitem>
2815
<para>
2816
Bugfix:
2817
fixed handling of unhandled promise rejection.
2818
</para>
2819
</listitem>
2820
2821
<listitem>
2822
<para>
2823
Bugfix:
2824
fixed process.env
2825
when duplicate environ variables are present.
2826
</para>
2827
</listitem>
2828
2829
<listitem>
2830
<para>
2831
Bugfix:
2832
fixed double declaration detection in modules.
2833
</para>
2834
</listitem>
2835
2836
<listitem>
2837
<para>
2838
Bugfix:
2839
fixed bound function calls according to the spec.
2840
</para>
2841
</listitem>
2842
2843
<listitem>
2844
<para>
2845
Bugfix:
2846
fixed break label for <literal>if</literal> statement.
2847
</para>
2848
</listitem>
2849
2850
<listitem>
2851
<para>
2852
Bugfix:
2853
fixed labeled empty statements.
2854
</para>
2855
</listitem>
2856
2857
</list>
2858
</para>
2859
2860
</section>
2861
2862
2863
<section id="njs0.7.7" name="Changes with njs 0.7.7">
2864
2865
<para>
2866
Release Date:
2867
30 August 2022
2868
</para>
2869
2870
<para>
2871
nginx modules:
2872
<list type="bullet">
2873
2874
<listitem>
2875
<para>
2876
Feature:
2877
the number of nginx configuration contexts where
2878
js directives can be specified is extended.
2879
2880
<list type="bullet">
2881
2882
<listitem id="contexts">
2883
<para>
2884
HTTP:
2885
the <link doc="../http/ngx_http_js_module.xml" id="js_import"/>,
2886
<link doc="../http/ngx_http_js_module.xml" id="js_path"/>,
2887
<link doc="../http/ngx_http_js_module.xml" id="js_set"/>, and
2888
<link doc="../http/ngx_http_js_module.xml" id="js_var"/> directives
2889
are allowed in
2890
<literal>server</literal> and <literal>location</literal> contexts.
2891
The <link doc="../http/ngx_http_js_module.xml" id="js_content"/>,
2892
<link doc="../http/ngx_http_js_module.xml" id="js_body_filter"/> and
2893
<link doc="../http/ngx_http_js_module.xml" id="js_header_filter"/>
2894
are allowed in
2895
<link doc="../http/ngx_http_rewrite_module.xml" id="if"/> context.
2896
</para>
2897
</listitem>
2898
2899
<listitem>
2900
<para>
2901
Stream:
2902
the <link doc="../http/ngx_http_js_module.xml" id="js_import"/>,
2903
<link doc="../http/ngx_http_js_module.xml" id="js_path"/>,
2904
<link doc="../http/ngx_http_js_module.xml" id="js_set"/>, and
2905
<link doc="../http/ngx_http_js_module.xml" id="js_var"/>
2906
are allowed in
2907
<literal>server</literal> context.
2908
</para>
2909
</listitem>
2910
2911
</list>
2912
2913
</para>
2914
</listitem>
2915
2916
<listitem>
2917
<para>
2918
Feature:
2919
added
2920
<link doc="reference.xml" id="r_internal"><literal>r.internal</literal></link>
2921
property.
2922
</para>
2923
</listitem>
2924
2925
<listitem>
2926
<para>
2927
Bugfix:
2928
fixed reading response body in
2929
<link doc="reference.xml" id="ngx_fetch">Fetch API</link>.
2930
</para>
2931
</listitem>
2932
2933
<listitem>
2934
<para>
2935
Bugfix:
2936
fixed
2937
<link doc="../stream/ngx_stream_js_module.xml" id="js_fetch_timeout"/>
2938
in <link doc="../stream/ngx_stream_js_module.xml">stream</link>.
2939
</para>
2940
</listitem>
2941
2942
<listitem>
2943
<para>
2944
Bugfix:
2945
fixed socket leak with <literal>0</literal> fetch timeout.
2946
</para>
2947
</listitem>
2948
2949
</list>
2950
</para>
2951
2952
<para>
2953
Core:
2954
<list type="bullet">
2955
2956
<listitem>
2957
<para>
2958
Feature:
2959
extended
2960
<link doc="reference.xml" id="njs_api_fs"><literal>fs</literal></link> module.
2961
Added
2962
<link doc="reference.xml" id="fs_opensync"><literal>fs.openSync()</literal></link>,
2963
<link doc="reference.xml" id="fs_promises_open"><literal>fs.promises.open()</literal></link>,
2964
<link doc="reference.xml" id="fs_fstatsync"><literal>fs.fstatSync()</literal></link>,
2965
<link doc="reference.xml" id="fs_readsync"><literal>fs.readSync()</literal></link>,
2966
<link doc="reference.xml" id="fs_writesync_buf"><literal>fs.writeSync()</literal></link>.
2967
</para>
2968
2969
<para>
2970
The following properties of
2971
<link doc="reference.xml" id="fs_filehandle"><literal>FileHandle</literal></link>
2972
are implemented:
2973
<literal>fd</literal>,
2974
<literal>read()</literal>,
2975
<literal>stat()</literal>,
2976
<literal>write()</literal>,
2977
<literal>close()</literal>.
2978
</para>
2979
</listitem>
2980
2981
<listitem>
2982
<para>
2983
Bugfix:
2984
fixed <literal>parseInt()</literal>,
2985
<literal>parseFloat()</literal>,
2986
<literal>Symbol.for()</literal>
2987
with no arguments.
2988
</para>
2989
</listitem>
2990
2991
</list>
2992
</para>
2993
2994
</section>
2995
2996
2997
<section id="njs0.7.6" name="Changes with njs 0.7.6">
2998
2999
<para>
3000
Release Date:
3001
19 July 2022
3002
</para>
3003
3004
<para>
3005
nginx modules:
3006
<list type="bullet">
3007
3008
<listitem>
3009
<para>
3010
Feature:
3011
improved
3012
<link doc="reference.xml" id="r_args"><literal>r.args{}</literal></link> object.
3013
Added support for multiple arguments with the same key.
3014
Added case sensitivity for keys.
3015
Keys and values are percent-decoded now.
3016
</para>
3017
</listitem>
3018
3019
<listitem>
3020
<para>
3021
Bugfix:
3022
fixed
3023
<link doc="reference.xml" id="r_headers_out"><literal>r.headersOut{}</literal></link>
3024
setter for special headers.
3025
</para>
3026
</listitem>
3027
3028
</list>
3029
</para>
3030
3031
<para>
3032
Core:
3033
<list type="bullet">
3034
3035
<listitem>
3036
<para>
3037
Feature:
3038
added <literal>Symbol.for()</literal> and <literal>Symbol.keyfor()</literal>.
3039
</para>
3040
</listitem>
3041
3042
<listitem>
3043
<para>
3044
Feature:
3045
added
3046
<link doc="reference.xml" id="atob"><literal>atob()</literal></link>
3047
and
3048
<link doc="reference.xml" id="btoa"><literal>btoa()</literal></link>
3049
from
3050
<link url="https://html.spec.whatwg.org">WHATWG</link> spec.
3051
</para>
3052
</listitem>
3053
3054
<listitem>
3055
<para>
3056
Bugfix:
3057
fixed large non-decimal literals.
3058
</para>
3059
</listitem>
3060
3061
<listitem>
3062
<para>
3063
Bugfix:
3064
fixed Unicode argument trimming in <literal>parseInt()</literal>.
3065
</para>
3066
</listitem>
3067
3068
<listitem>
3069
<para>
3070
Bugfix:
3071
fixed <literal>break</literal> instruction
3072
in <literal>try-catch</literal> block.
3073
</para>
3074
</listitem>
3075
3076
<listitem>
3077
<para>
3078
Bugfix:
3079
fixed <literal>async</literal> function declaration in CLI.
3080
</para>
3081
</listitem>
3082
3083
</list>
3084
</para>
3085
3086
</section>
3087
3088
3089
<section id="njs0.7.5" name="Changes with njs 0.7.5">
3090
3091
<para>
3092
Release Date:
3093
21 June 2022
3094
</para>
3095
3096
<para>
3097
nginx modules:
3098
<list type="bullet">
3099
3100
<listitem>
3101
<para>
3102
Change:
3103
adapting to changes in nginx header structures.
3104
</para>
3105
</listitem>
3106
3107
<listitem>
3108
<para>
3109
Bugfix:
3110
fixed
3111
<link doc="reference.xml" id="r_headers_out"><literal>r.headersOut{}</literal></link>
3112
special getters when value is absent.
3113
</para>
3114
</listitem>
3115
3116
<listitem>
3117
<para>
3118
Change:
3119
returning undefined value instead of an empty string for
3120
<literal>Content-Type</literal> when the header is absent.
3121
</para>
3122
</listitem>
3123
3124
</list>
3125
</para>
3126
3127
<para>
3128
Core:
3129
<list type="bullet">
3130
3131
<listitem>
3132
<para>
3133
Bugfix:
3134
fixed catching of the exception thrown from an awaited function.
3135
</para>
3136
</listitem>
3137
3138
<listitem>
3139
<para>
3140
Bugfix:
3141
fixed function value initialization.
3142
</para>
3143
</listitem>
3144
3145
<listitem>
3146
<para>
3147
Bugfix:
3148
fixed interpreter when await fails.
3149
</para>
3150
</listitem>
3151
3152
<listitem>
3153
<para>
3154
Bugfix:
3155
fixed typed-array constructor when source array is changed while iterating.
3156
</para>
3157
</listitem>
3158
3159
<listitem>
3160
<para>
3161
Bugfix:fixed
3162
<literal>String.prototype.replace()</literal>
3163
with byte strings.
3164
</para>
3165
</listitem>
3166
3167
<listitem>
3168
<para>
3169
Bugfix:
3170
fixed template literal from producing byte-strings.
3171
</para>
3172
</listitem>
3173
3174
<listitem>
3175
<para>
3176
Bugfix:
3177
fixed array iterator with sparse arrays.
3178
</para>
3179
</listitem>
3180
3181
<listitem>
3182
<para>
3183
Bugfix:
3184
fixed memory free while converting a flat array to a slow array.
3185
</para>
3186
</listitem>
3187
3188
<listitem>
3189
<para>
3190
Bugfix:
3191
properly handling <literal>NJS_DECLINE</literal> in
3192
<literal>promise</literal> native functions.
3193
</para>
3194
</listitem>
3195
3196
<listitem>
3197
<para>
3198
Bugfix:
3199
fixed working with an array-like object in
3200
<literal>Promise.all()</literal>
3201
and friends.
3202
</para>
3203
</listitem>
3204
3205
</list>
3206
</para>
3207
3208
</section>
3209
3210
3211
<section id="njs0.7.4" name="Changes with njs 0.7.4">
3212
3213
<para>
3214
Release Date:
3215
24 May 2022
3216
</para>
3217
3218
<para>
3219
nginx modules:
3220
<list type="bullet">
3221
3222
<listitem>
3223
<para>
3224
Feature:
3225
added extended directives for configuring
3226
<link doc="reference.xml" id="ngx_fetch">Fetch API</link>.
3227
The following directives were added for
3228
<link doc="../http/ngx_http_js_module.xml">http</link> and
3229
<link doc="../stream/ngx_stream_js_module.xml">stream</link>:
3230
<list type="bullet">
3231
3232
<listitem>
3233
<para>
3234
<link doc="../http/ngx_http_js_module.xml" id="js_fetch_timeout"/>,
3235
</para>
3236
</listitem>
3237
3238
<listitem>
3239
<para>
3240
<link doc="../http/ngx_http_js_module.xml" id="js_fetch_verify"/>,
3241
</para>
3242
</listitem>
3243
3244
<listitem>
3245
<para>
3246
<link doc="../http/ngx_http_js_module.xml" id="js_fetch_buffer_size"/>,
3247
</para>
3248
</listitem>
3249
3250
<listitem>
3251
<para>
3252
<link doc="../http/ngx_http_js_module.xml" id="js_fetch_max_response_buffer_size"/>.
3253
</para>
3254
</listitem>
3255
3256
</list>
3257
3258
</para>
3259
</listitem>
3260
3261
<listitem>
3262
<para>
3263
Change:
3264
<link doc="reference.xml" id="r_internal_redirect"><literal>r.internalRedirect()</literal></link> now accepts escaped URIs.
3265
</para>
3266
</listitem>
3267
3268
<listitem>
3269
<para>
3270
Bugfix:
3271
fixed
3272
<link doc="reference.xml" id="response">Response</link> parsing
3273
with more than 8 headers in
3274
<link doc="reference.xml" id="ngx_fetch">Fetch API</link>.
3275
</para>
3276
</listitem>
3277
3278
</list>
3279
</para>
3280
3281
<para>
3282
Core:
3283
<list type="bullet">
3284
3285
<listitem>
3286
<para>
3287
Feature:
3288
added
3289
<link doc="reference.xml" id="njs_version_number"><literal>njs.version_number</literal></link> property.
3290
</para>
3291
</listitem>
3292
3293
<listitem>
3294
<para>
3295
Feature:
3296
added compatibility with BoringSSL for
3297
<link doc="reference.xml" id="builtin_crypto">WebCrypto API</link>.
3298
</para>
3299
</listitem>
3300
3301
<listitem>
3302
<para>
3303
Bugfix:
3304
fixed
3305
<literal>Array.prototype.sort()</literal>
3306
when arr size is changed in a comparator.
3307
</para>
3308
</listitem>
3309
3310
<listitem>
3311
<para>
3312
Bugfix:
3313
fixed
3314
<literal>Array.prototype.slice()</literal>
3315
with slow <literal>this</literal> argument.
3316
</para>
3317
</listitem>
3318
3319
<listitem>
3320
<para>
3321
Bugfix:
3322
fixed aggregation methods of <literal>Promise</literal> ctor
3323
with array-like object.
3324
</para>
3325
</listitem>
3326
3327
<listitem>
3328
<para>
3329
Bugfix:
3330
fixed <literal>String.prototype.lastIndexOf()</literal>
3331
with Unicode string as <literal>this</literal>.
3332
</para>
3333
</listitem>
3334
3335
<listitem>
3336
<para>
3337
Bugfix:
3338
fixed
3339
<literal>JSON.parse()</literal>
3340
when <literal>reviver</literal> function is provided.
3341
</para>
3342
</listitem>
3343
3344
<listitem>
3345
<para>
3346
Bugfix:
3347
fixed
3348
<literal>Object.defineProperty()</literal>
3349
when a recursive descriptor is provided.
3350
</para>
3351
</listitem>
3352
3353
<listitem>
3354
<para>
3355
Bugfix:
3356
fixed <literal>Array.prototype.fill()</literal> for typed-arrays.
3357
</para>
3358
</listitem>
3359
3360
<listitem>
3361
<para>
3362
Bugfix:
3363
making function expression binding immutable according to the specs.
3364
</para>
3365
</listitem>
3366
3367
<listitem>
3368
<para>
3369
Bugfix:
3370
fixed redefinition of special props in
3371
<literal>Object.defineProperty()</literal>.
3372
</para>
3373
</listitem>
3374
3375
</list>
3376
</para>
3377
3378
</section>
3379
3380
3381
3382
<section id="njs0.7.3" name="Changes with njs 0.7.3">
3383
3384
<para>
3385
Release Date:
3386
12 April 2022
3387
</para>
3388
3389
<para>
3390
Core:
3391
<list type="bullet">
3392
3393
<listitem>
3394
<para>
3395
Feature:
3396
added support of module resolution callback.
3397
This feature allows the host environment to control
3398
how imported modules are loaded.
3399
</para>
3400
</listitem>
3401
3402
<listitem>
3403
<para>
3404
Bugfix:
3405
fixed backtraces while traversing imported user modules.
3406
</para>
3407
</listitem>
3408
3409
<listitem>
3410
<para>
3411
Bugfix:
3412
fixed
3413
<literal>Array.prototype.concat()</literal>
3414
when <literal>this</literal> is a slow array.
3415
</para>
3416
</listitem>
3417
3418
<listitem>
3419
<para>
3420
Bugfix:
3421
fixed frame allocation from an awaited frame.
3422
</para>
3423
</listitem>
3424
3425
<listitem>
3426
<para>
3427
Bugfix:
3428
fixed allocation of large array literals.
3429
</para>
3430
</listitem>
3431
3432
<listitem>
3433
<para>
3434
Bugfix:
3435
fixed interpreter when <literal>toString</literal> conversion fails.
3436
</para>
3437
</listitem>
3438
3439
</list>
3440
</para>
3441
3442
</section>
3443
3444
3445
<section id="njs0.7.2" name="Changes with njs 0.7.2">
3446
3447
<para>
3448
Release Date:
3449
25 January 2022
3450
</para>
3451
3452
<para>
3453
Core:
3454
<list type="bullet">
3455
3456
<listitem>
3457
<para>
3458
Bugfix:
3459
fixed
3460
<literal>Array.prototype.join()</literal>
3461
when array is changed while iterating.
3462
</para>
3463
</listitem>
3464
3465
<listitem>
3466
<para>
3467
Bugfix:
3468
fixed
3469
<literal>Array.prototype.slice()</literal>
3470
when array is changed while iterating.
3471
</para>
3472
</listitem>
3473
3474
<listitem>
3475
<para>
3476
Bugfix:
3477
fixed
3478
<literal>Array.prototype.concat()</literal>
3479
when array is changed while iterating.
3480
</para>
3481
</listitem>
3482
3483
<listitem>
3484
<para>
3485
Bugfix:
3486
fixed
3487
<literal>Array.prototype.reverse()</literal>
3488
when array is changed while iterating.
3489
</para>
3490
</listitem>
3491
3492
<listitem>
3493
<para>
3494
Bugfix:
3495
fixed
3496
<literal>Buffer.concat()</literal>
3497
with subarrays.
3498
Thanks to Sylvain Etienne.
3499
</para>
3500
</listitem>
3501
3502
<listitem>
3503
<para>
3504
Bugfix:
3505
fixed
3506
type confusion bug while resolving promises.
3507
</para>
3508
</listitem>
3509
3510
<listitem>
3511
<para>
3512
Bugfix:
3513
fixed
3514
<literal>Function.prototype.apply()</literal>
3515
with large array arguments.
3516
</para>
3517
</listitem>
3518
3519
<listitem>
3520
<para>
3521
Bugfix:
3522
fixed recursive <literal>async</literal> function calls.
3523
</para>
3524
</listitem>
3525
3526
<listitem>
3527
<para>
3528
Bugfix:
3529
fixed function redeclaration.
3530
The bug was introduced in
3531
<link id="njs0.7.0">0.7.0</link>.
3532
</para>
3533
</listitem>
3534
3535
</list>
3536
</para>
3537
3538
</section>
3539
3540
3541
<section id="njs0.7.1" name="Changes with njs 0.7.1">
3542
3543
<para>
3544
Release Date:
3545
28 December 2021
3546
</para>
3547
3548
<para>
3549
nginx modules:
3550
<list type="bullet">
3551
3552
<listitem>
3553
<para>
3554
Change:
3555
the <link doc="../http/ngx_http_js_module.xml" id="js_include"/> directive
3556
deprecated since <link id="njs0.4.0">0.4.0</link> was removed.
3557
</para>
3558
</listitem>
3559
3560
<listitem>
3561
<para>
3562
Change:
3563
PCRE/PCRE2-specific code was moved to the modules.
3564
This ensures that njs uses the same RegExp library as nginx.
3565
</para>
3566
</listitem>
3567
3568
</list>
3569
</para>
3570
3571
<para>
3572
Core:
3573
<list type="bullet">
3574
3575
<listitem>
3576
<para>
3577
Bugfix:
3578
fixed
3579
<literal>decodeURI()</literal> and
3580
<literal>decodeURIComponent()</literal>
3581
with invalid byte strings.
3582
The bug was introduced in
3583
<link id="njs0.4.3">0.4.3</link>.
3584
</para>
3585
</listitem>
3586
3587
<listitem>
3588
<para>
3589
Bugfix:
3590
fixed heap-use-after-free in <literal>await</literal> frame.
3591
The bug was introduced in
3592
<link id="njs0.7.0">0.7.0</link>.
3593
</para>
3594
</listitem>
3595
3596
<listitem>
3597
<para>
3598
Bugfix:
3599
fixed WebCrypto <literal>sign()</literal> and
3600
<literal>verify()</literal> methods with OpenSSL 3.0.
3601
</para>
3602
</listitem>
3603
3604
<listitem>
3605
<para>
3606
Bugfix:
3607
fixed exception throwing when RegExp match fails.
3608
The bug was introduced in
3609
<link id="njs0.1.15">0.1.15</link>.
3610
</para>
3611
</listitem>
3612
3613
<listitem>
3614
<para>
3615
Bugfix:
3616
fixed catching of exception thrown in <literal>try</literal> block
3617
of <literal>async</literal> function.
3618
The bug was introduced in
3619
<link id="njs0.7.0">0.7.0</link>.
3620
</para>
3621
</listitem>
3622
3623
<listitem>
3624
<para>
3625
Bugfix:
3626
fixed execution of <literal>async</literal> function in synchronous context.
3627
The bug was introduced in
3628
<link id="njs0.7.0">0.7.0</link>.
3629
</para>
3630
</listitem>
3631
3632
<listitem>
3633
<para>
3634
Bugfix:
3635
fixed function redeclaration in CLI when interactive mode is on.
3636
The bug was introduced in
3637
<link id="njs0.6.2">0.6.2</link>.
3638
</para>
3639
</listitem>
3640
3641
<listitem>
3642
<para>
3643
Bugfix:
3644
fixed <literal>typeof</literal> operator with
3645
<literal>DataView</literal> object.
3646
</para>
3647
</listitem>
3648
3649
<listitem>
3650
<para>
3651
Bugfix: eliminated information leak in <literal>Buffer.from()</literal>.
3652
</para>
3653
</listitem>
3654
3655
</list>
3656
3657
</para>
3658
3659
</section>
3660
3661
3662
<section id="njs0.7.0" name="Changes with njs 0.7.0">
3663
3664
<para>
3665
Release Date:
3666
19 October 2021
3667
</para>
3668
3669
<para>
3670
nginx modules:
3671
<list type="bullet">
3672
3673
<listitem>
3674
<para>
3675
Feature:
3676
Added
3677
<link doc="../http/ngx_http_js_module.xml" id="js_fetch_protocols">HTTPS</link>
3678
support for
3679
<link doc="reference.xml" id="ngx_fetch">Fetch API</link>.
3680
</para>
3681
</listitem>
3682
3683
<listitem>
3684
<para>
3685
Feature:
3686
Added
3687
<literal>setReturnValue()</literal> method for
3688
<link doc="reference.xml" id="r_set_return_value">http</link> and
3689
<link doc="reference.xml" id="s_set_return_value">stream</link>.
3690
</para>
3691
</listitem>
3692
3693
</list>
3694
</para>
3695
3696
<para>
3697
Core:
3698
<list type="bullet">
3699
3700
<listitem>
3701
<para>
3702
Feature:
3703
introduced <literal>Async/Await</literal> implementation.
3704
</para>
3705
</listitem>
3706
3707
<listitem>
3708
<para>
3709
Feature:
3710
added
3711
<link doc="reference.xml" id="builtin_crypto">WebCrypto API</link>
3712
implementation.
3713
</para>
3714
</listitem>
3715
3716
<listitem>
3717
<para>
3718
Bugfix:
3719
fixed copying of closures for declared functions.
3720
The bug was introduced in
3721
<link id="njs0.6.0">0.6.0</link>.
3722
</para>
3723
</listitem>
3724
3725
<listitem>
3726
<para>
3727
Bugfix:
3728
fixed unhandled <literal>promise</literal> rejection in handle events.
3729
</para>
3730
</listitem>
3731
3732
<listitem>
3733
<para>
3734
Bugfix:
3735
fixed Response.headers getter in Fetch API.
3736
</para>
3737
</listitem>
3738
3739
</list>
3740
3741
</para>
3742
3743
</section>
3744
3745
3746
<section id="njs0.6.2" name="Changes with njs 0.6.2">
3747
3748
<para>
3749
Release Date:
3750
31 August 2021
3751
</para>
3752
3753
<para>
3754
nginx modules:
3755
<list type="bullet">
3756
3757
<listitem>
3758
<para>
3759
Bugfix:
3760
fixed CPU hog when
3761
<literal>js_filter</literal> is registered in both directions.
3762
</para>
3763
</listitem>
3764
3765
</list>
3766
</para>
3767
3768
<para>
3769
Core:
3770
<list type="bullet">
3771
3772
<listitem>
3773
<para>
3774
Feature:
3775
introduced <literal>AggregateError</literal> implementation.
3776
</para>
3777
</listitem>
3778
3779
<listitem>
3780
<para>
3781
Feature:
3782
added remaining <literal>Promise</literal> constructor methods.
3783
The following methods were added:
3784
<literal>Promise.all()</literal>,
3785
<literal>Promise.allSettled()</literal>,
3786
<literal>Promise.any()</literal>,
3787
<literal>Promise.race()</literal>.
3788
</para>
3789
</listitem>
3790
3791
<listitem>
3792
<para>
3793
Improvement:
3794
removed recursion from code generator.
3795
</para>
3796
</listitem>
3797
3798
<listitem>
3799
<para>
3800
Bugfix:
3801
fixed rest parameter parsing without binding identifier.
3802
</para>
3803
</listitem>
3804
3805
<listitem>
3806
<para>
3807
Bugfix:
3808
fixed resolve/reject callback for
3809
<literal>Promise.prototype.finally()</literal> .
3810
</para>
3811
</listitem>
3812
3813
<listitem>
3814
<para>
3815
Bugfix:
3816
fixed <literal>%TypedArray%.prototype.join()</literal>
3817
with detached buffer.
3818
</para>
3819
</listitem>
3820
3821
<listitem>
3822
<para>
3823
Bugfix:
3824
fixed memory leak in interactive shell.
3825
</para>
3826
</listitem>
3827
</list>
3828
3829
</para>
3830
3831
</section>
3832
3833
3834
<section id="njs0.6.1" name="Changes with njs 0.6.1">
3835
3836
<para>
3837
Release Date:
3838
29 June 2021
3839
</para>
3840
3841
<para>
3842
<list type="bullet">
3843
3844
<listitem>
3845
<para>
3846
Bugfix:
3847
fixed <literal>RegExpBuiltinExec()</literal> with UTF-8 only regexps.
3848
The bug was introduced in <link id="njs0.4.2">0.4.2</link>.
3849
</para>
3850
</listitem>
3851
3852
<listitem>
3853
<para>
3854
Bugfix:
3855
fixed parsing of export default declaration with non-assignment expressions.
3856
Thanks to Artem S. Povalyukhin.
3857
</para>
3858
</listitem>
3859
3860
</list>
3861
</para>
3862
3863
</section>
3864
3865
3866
<section id="njs0.6.0" name="Changes with njs 0.6.0">
3867
3868
<para>
3869
Release Date:
3870
15 June 2021
3871
</para>
3872
3873
<para>
3874
Core:
3875
<list type="bullet">
3876
3877
<listitem>
3878
<para>
3879
Feature:
3880
added
3881
<literal>let</literal> and
3882
<literal>const</literal> declaration support.
3883
</para>
3884
</listitem>
3885
3886
<listitem>
3887
<para>
3888
Feature:
3889
added <literal>RegExp.prototype[Symbol.split]</literal>.
3890
</para>
3891
</listitem>
3892
3893
<listitem>
3894
<para>
3895
Feature:
3896
added sticky flag support for RegExp.
3897
</para>
3898
</listitem>
3899
3900
<listitem>
3901
<para>
3902
Bugfix:
3903
fixed heap-buffer-overflow in
3904
<literal>String.prototype.lastIndexOf()</literal>.
3905
</para>
3906
</listitem>
3907
3908
<listitem>
3909
<para>
3910
Bugfix:
3911
fixed
3912
<literal>RegExp.prototype.test()</literal>
3913
according to the specification.
3914
</para>
3915
</listitem>
3916
3917
<listitem>
3918
<para>
3919
Bugfix:
3920
fixed
3921
<literal>String.prototype.split()</literal>
3922
according to the specification.
3923
</para>
3924
</listitem>
3925
3926
<listitem>
3927
<para>
3928
Bugfix:
3929
fixed use-of-uninitialized-value while tracking rejected promises.
3930
</para>
3931
</listitem>
3932
3933
<listitem>
3934
<para>
3935
Bugfix:
3936
fixed <literal>njs.dump()</literal> for objects with circular references.
3937
</para>
3938
</listitem>
3939
3940
</list>
3941
</para>
3942
3943
</section>
3944
3945
3946
<section id="njs0.5.3" name="Changes with njs 0.5.3">
3947
3948
<para>
3949
Release Date:
3950
30 March 2021
3951
</para>
3952
3953
<para>
3954
nginx modules:
3955
<list type="bullet">
3956
3957
<listitem>
3958
<para>
3959
Feature:
3960
added the <literal>js_var</literal> directive for
3961
<link doc="../http/ngx_http_js_module.xml" id="js_var">http</link> and
3962
<link doc="../stream/ngx_stream_js_module.xml" id="js_var">stream</link>.
3963
</para>
3964
</listitem>
3965
3966
</list>
3967
</para>
3968
3969
</section>
3970
3971
3972
<section id="njs0.5.2" name="Changes with njs 0.5.2">
3973
3974
<para>
3975
Release Date:
3976
09 March 2021
3977
</para>
3978
3979
<para>
3980
nginx modules:
3981
<list type="bullet">
3982
3983
<listitem>
3984
<para>
3985
Feature:
3986
added the
3987
<link doc="../http/ngx_http_js_module.xml" id="js_body_filter"><literal>js_body_filter</literal></link>
3988
directive.
3989
</para>
3990
</listitem>
3991
3992
<listitem>
3993
<para>
3994
Feature:
3995
introduced the
3996
<link doc="reference.xml" id="s_status"><literal>s.status</literal></link>
3997
property for
3998
<link doc="reference.xml" id="stream">Stream Session</link>
3999
object.
4000
</para>
4001
</listitem>
4002
4003
</list>
4004
</para>
4005
4006
<para>
4007
Core:
4008
<list type="bullet">
4009
4010
<listitem>
4011
<para>
4012
Feature:
4013
added
4014
<link doc="reference.xml" id="njs_on"><literal>njs.on</literal></link>
4015
(<literal>exit</literal>) callback support.
4016
</para>
4017
</listitem>
4018
4019
<listitem>
4020
<para>
4021
Bugfix:
4022
fixed property descriptor reuse for not extensible objects.
4023
Thanks to Artem S. Povalyukhin.
4024
</para>
4025
</listitem>
4026
4027
<listitem>
4028
<para>
4029
Bugfix:
4030
fixed <literal>Object.freeze()</literal> and friends
4031
according to the specification.
4032
Thanks to Artem S. Povalyukhin.
4033
</para>
4034
</listitem>
4035
4036
<listitem>
4037
<para>
4038
Bugfix:
4039
fixed <literal>Function()</literal> in CLI mode.
4040
</para>
4041
</listitem>
4042
4043
<listitem>
4044
<para>
4045
Bugfix:
4046
fixed <literal>for-in</literal> iteration of typed array values.
4047
Thanks to Artem S. Povalyukhin.
4048
</para>
4049
</listitem>
4050
4051
</list>
4052
</para>
4053
4054
</section>
4055
4056
4057
<section id="njs0.5.1" name="Changes with njs 0.5.1">
4058
4059
<para>
4060
Release Date:
4061
16 February 2021
4062
</para>
4063
4064
<para>
4065
nginx modules:
4066
<list type="bullet">
4067
4068
<listitem>
4069
<para>
4070
Feature:
4071
introduced
4072
<link doc="reference.xml" id="ngx_fetch"><literal>ngx.fetch()</literal></link>
4073
method implementing Fetch API.
4074
</para>
4075
4076
<para>
4077
The following properties and methods of
4078
<link doc="reference.xml" id="response"><literal>Response</literal></link>
4079
object are implemented:
4080
<link doc="reference.xml" id="response_arraybuffer"><literal>arrayBuffer()</literal></link>,
4081
<link doc="reference.xml" id="response_bodyused"><literal>bodyUsed</literal></link>,
4082
<link doc="reference.xml" id="response_json"><literal>json()</literal></link>,
4083
<link doc="reference.xml" id="response_headers"><literal>headers</literal></link>,
4084
<link doc="reference.xml" id="response_ok"><literal>ok</literal></link>,
4085
<link doc="reference.xml" id="response_redirect"><literal>redirect</literal></link>,
4086
<link doc="reference.xml" id="response_status"><literal>status</literal></link>,
4087
<link doc="reference.xml" id="response_statustext"><literal>statusText</literal></link>,
4088
<link doc="reference.xml" id="response_text"><literal>text()</literal></link>,
4089
<link doc="reference.xml" id="response_type"><literal>type</literal></link>,
4090
<link doc="reference.xml" id="response_url"><literal>url</literal></link>.
4091
</para>
4092
4093
<para>
4094
Notable limitations:
4095
only the <literal>http://</literal> scheme is supported,
4096
redirects are not handled.
4097
</para>
4098
4099
<para>
4100
In collaboration with 洪志道 (Hong Zhi Dao).
4101
</para>
4102
</listitem>
4103
4104
<listitem>
4105
<para>
4106
Feature:
4107
added the
4108
<link doc="../http/ngx_http_js_module.xml" id="js_header_filter"><literal>js_header_filter</literal></link>
4109
directive.
4110
</para>
4111
</listitem>
4112
4113
<listitem>
4114
<para>
4115
Bugfix:
4116
fixed processing buffered data in body filter in
4117
<link doc="../stream/ngx_stream_js_module.xml">stream</link> module.
4118
</para>
4119
</listitem>
4120
4121
</list>
4122
</para>
4123
4124
<para>
4125
Core:
4126
<list type="bullet">
4127
4128
<listitem>
4129
<para>
4130
Bugfix:
4131
fixed safe mode bypass in <literal>Function</literal> constructor.
4132
</para>
4133
</listitem>
4134
4135
<listitem>
4136
<para>
4137
Bugfix:
4138
fixed <literal>Date.prototype.toISOString()</literal> with invalid date values.
4139
</para>
4140
</listitem>
4141
4142
</list>
4143
</para>
4144
4145
</section>
4146
4147
4148
<section id="njs0.5.0" name="Changes with njs 0.5.0">
4149
4150
<para>
4151
Release Date:
4152
01 December 2020
4153
</para>
4154
4155
<para>
4156
nginx modules:
4157
<list type="bullet">
4158
4159
<listitem>
4160
<para>
4161
Feature:
4162
introduced global
4163
<link doc="reference.xml" id="ngx"><literal>ngx</literal></link> object.
4164
</para>
4165
4166
<para>
4167
The following methods were added:
4168
<list type="bullet">
4169
4170
<listitem>
4171
<para>
4172
<link doc="reference.xml" id="ngx_log"><literal>ngx.log(level,
4173
message)</literal></link>
4174
</para>
4175
</listitem>
4176
4177
</list>
4178
</para>
4179
4180
<para>
4181
The following properties were added:
4182
<list type="bullet">
4183
4184
<listitem>
4185
<para>
4186
<literal>ngx.INFO</literal>,
4187
<literal>ngx.WARN</literal>,
4188
<literal>ngx.ERR</literal>.
4189
</para>
4190
</listitem>
4191
4192
</list>
4193
</para>
4194
4195
</listitem>
4196
4197
<listitem>
4198
<para>
4199
Feature:
4200
added support for
4201
<literal>Buffer</literal> object where string is expected.
4202
</para>
4203
</listitem>
4204
4205
<listitem>
4206
<para>
4207
Feature:
4208
added Buffer version of existing properties.
4209
</para>
4210
4211
<para>
4212
The following properties were added:
4213
<list type="bullet">
4214
4215
<listitem>
4216
<para>
4217
<link doc="reference.xml" id="r_request_buffer"><literal>r.requestBuffer</literal></link>
4218
(<link doc="reference.xml" id="r_request_body"><literal>r.requestBody</literal></link>),
4219
<link doc="reference.xml" id="r_response_buffer"><literal>r.responseBuffer</literal></link>
4220
(<link doc="reference.xml" id="r_response_body"><literal>r.responseBody</literal></link>),
4221
<link doc="reference.xml" id="r_raw_variables"><literal>r.rawVariables</literal></link>
4222
(<link doc="reference.xml" id="r_variables"><literal>r.variables</literal></link>),
4223
<link doc="reference.xml" id="s_raw_variables"><literal>s.rawVariables</literal></link>
4224
(<link doc="reference.xml" id="s_variables"><literal>s.variables</literal></link>).
4225
</para>
4226
</listitem>
4227
4228
</list>
4229
</para>
4230
4231
<para>
4232
The following events were added in the stream module:
4233
<list type="bullet">
4234
4235
<listitem>
4236
<para>
4237
<link doc="reference.xml" id="s_on"><literal>upstream</literal></link>
4238
(upload),
4239
<link doc="reference.xml" id="s_on"><literal>downstream</literal></link>
4240
(download).
4241
</para>
4242
</listitem>
4243
4244
</list>
4245
</para>
4246
4247
</listitem>
4248
4249
<listitem>
4250
<para>
4251
Improvement:
4252
added aliases to existing properties.
4253
</para>
4254
4255
<para>
4256
The following properties were added:
4257
<list type="bullet">
4258
4259
<listitem>
4260
<para>
4261
<link doc="reference.xml" id="r_request_text"><literal>r.requestText</literal></link>
4262
(<link doc="reference.xml" id="r_request_body"><literal>r.requestBody</literal></link>),
4263
<link doc="reference.xml" id="r_response_text"><literal>r.responseText</literal></link>
4264
(<link doc="reference.xml" id="r_response_body"><literal>r.responseBody</literal></link>).
4265
</para>
4266
</listitem>
4267
4268
</list>
4269
</para>
4270
4271
</listitem>
4272
4273
<listitem>
4274
<para>
4275
Improvement:
4276
throwing an exception in
4277
<link doc="reference.xml" id="r_internal_redirect"><literal>r.internalRedirect()</literal></link>
4278
for a subrequest.
4279
</para>
4280
</listitem>
4281
4282
<listitem>
4283
<para>
4284
Bugfix:
4285
fixed promise
4286
<link doc="reference.xml" id="r_subrequest"><literal>r.subrequest()</literal></link>
4287
with
4288
<link doc="../http/ngx_http_core_module.xml" id="error_page"><literal>error_page</literal></link>
4289
redirect.
4290
</para>
4291
</listitem>
4292
4293
<listitem>
4294
<para>
4295
Bugfix:
4296
fixed
4297
<literal>promise</literal> events handling.
4298
</para>
4299
</listitem>
4300
4301
</list>
4302
</para>
4303
4304
<para>
4305
Core:
4306
<list type="bullet">
4307
4308
<listitem>
4309
<para>
4310
Feature:
4311
added
4312
<literal>TypeScript</literal> definitions for built-in modules.
4313
Thanks to Jakub Jirutka.
4314
</para>
4315
</listitem>
4316
4317
<listitem>
4318
<para>
4319
Feature:
4320
tracking unhandled <literal>promise</literal> rejection.
4321
</para>
4322
</listitem>
4323
4324
<listitem>
4325
<para>
4326
Feature:
4327
added initial iterator support.
4328
Thanks to Artem S. Povalyukhin.
4329
</para>
4330
</listitem>
4331
4332
<listitem>
4333
<para>
4334
Improvement:
4335
<literal>TypeScript</literal> definitions are refactored.
4336
Thanks to Jakub Jirutka.
4337
</para>
4338
</listitem>
4339
4340
<listitem>
4341
<para>
4342
Improvement:
4343
added forgotten support for
4344
<literal>Object.prototype.valueOf()</literal>
4345
in
4346
<literal>Buffer.from()</literal>.
4347
</para>
4348
</listitem>
4349
4350
<listitem>
4351
<para>
4352
Bugfix:
4353
fixed heap-use-after-free in
4354
<literal>JSON.parse()</literal>.
4355
</para>
4356
</listitem>
4357
4358
<listitem>
4359
<para>
4360
Bugfix:
4361
fixed heap-use-after-free in
4362
<literal>JSON.stringify()</literal>.
4363
</para>
4364
</listitem>
4365
4366
<listitem>
4367
<para>
4368
Bugfix:
4369
fixed
4370
<literal>JSON.stringify()</literal> for arrays resizable via getters.
4371
</para>
4372
</listitem>
4373
4374
<listitem>
4375
<para>
4376
Bugfix:
4377
fixed heap-buffer-overflow for
4378
<literal>RegExp.prototype[Symbol.replace]</literal>.
4379
</para>
4380
</listitem>
4381
4382
<listitem>
4383
<para>
4384
Bugfix:
4385
fixed returned value for
4386
<literal>Buffer.prototype.write*</literal>
4387
functions.
4388
</para>
4389
</listitem>
4390
4391
<listitem>
4392
<para>
4393
Bugfix:
4394
fixed
4395
<link doc="reference.xml" id="querystring_stringify"><literal>querystring.stringify()</literal></link>.
4396
Thanks to Artem S. Povalyukhin.
4397
</para>
4398
</listitem>
4399
4400
<listitem>
4401
<para>
4402
Bugfix:
4403
fixed the catch handler for
4404
<literal>Promise.prototype.finally()</literal>.
4405
</para>
4406
</listitem>
4407
4408
<listitem>
4409
<para>
4410
Bugfix:
4411
fixed
4412
<link doc="reference.xml" id="querystring_parse"><literal>querystring.parse()</literal></link>.
4413
</para>
4414
</listitem>
4415
4416
</list>
4417
</para>
4418
4419
</section>
4420
4421
4422
<section id="njs0.4.4" name="Changes with njs 0.4.4">
4423
4424
<para>
4425
Release Date:
4426
29 September 2020
4427
</para>
4428
4429
<para>
4430
nginx modules:
4431
<list type="bullet">
4432
4433
<listitem>
4434
<para>
4435
Bugfix:
4436
fixed location merge.
4437
</para>
4438
</listitem>
4439
4440
<listitem>
4441
<para>
4442
Bugfix:
4443
fixed
4444
<link doc="reference.xml" id="r_http_version"><literal>r.httpVersion</literal></link>
4445
for HTTP/2.
4446
</para>
4447
</listitem>
4448
4449
</list>
4450
</para>
4451
4452
<para>
4453
Core:
4454
<list type="bullet">
4455
4456
<listitem>
4457
<para>
4458
Feature:
4459
added support for numeric separators (ES12).
4460
</para>
4461
</listitem>
4462
4463
<listitem>
4464
<para>
4465
Feature:
4466
added remaining methods for
4467
<literal>%TypedArray%.prototype</literal>.
4468
The following methods were added:
4469
<literal>every()</literal>,
4470
<literal>filter()</literal>,
4471
<literal>find()</literal>,
4472
<literal>findIndex()</literal>,
4473
<literal>forEach()</literal>,
4474
<literal>includes()</literal>,
4475
<literal>indexOf()</literal>,
4476
<literal>lastIndexOf()</literal>,
4477
<literal>map()</literal>,
4478
<literal>reduce()</literal>,
4479
<literal>reduceRight()</literal>,
4480
<literal>reverse()</literal>,
4481
<literal>some()</literal>.
4482
</para>
4483
</listitem>
4484
4485
<listitem>
4486
<para>
4487
Feature:
4488
added <literal>%TypedArray%</literal> remaining methods.
4489
The following methods were added:
4490
<literal>from()</literal>,
4491
<literal>of()</literal>.
4492
</para>
4493
</listitem>
4494
4495
<listitem>
4496
<para>
4497
Feature:
4498
added <literal>DataView</literal> object.
4499
</para>
4500
</listitem>
4501
<listitem>
4502
<para>
4503
Feature:
4504
added <literal>Buffer</literal> object implementation.
4505
</para>
4506
</listitem>
4507
4508
<listitem>
4509
<para>
4510
Feature:
4511
added support for <literal>ArrayBuffer</literal> in
4512
<link doc="reference.xml" id="textdecoder_decode"><literal>TextDecoder.prototype.decode()</literal></link>
4513
</para>
4514
</listitem>
4515
4516
<listitem>
4517
<para>
4518
Feature:
4519
added support for <literal>Buffer</literal> object in
4520
<link doc="reference.xml" id="crypto"><literal>crypto</literal></link>
4521
methods.
4522
</para>
4523
</listitem>
4524
4525
<listitem>
4526
<para>
4527
Feature:
4528
added support for <literal>Buffer</literal> object in
4529
<link doc="reference.xml" id="njs_api_fs"><literal>fs</literal></link>
4530
methods.
4531
</para>
4532
</listitem>
4533
4534
<listitem>
4535
<para>
4536
Change:
4537
<link doc="reference.xml" id="crypto_hash_digest"><literal>Hash.prototype.digest()</literal></link>
4538
and
4539
<link doc="reference.xml" id="crypto_hmac_digest"><literal>Hmac.prototype.digest()</literal></link>
4540
now return a <literal>Buffer</literal> instance instead of a byte string when
4541
encoding is not provided.
4542
</para>
4543
</listitem>
4544
4545
<listitem>
4546
<para>
4547
Change:
4548
<link doc="reference.xml" id="readfilesync"><literal>fs.readFile()</literal></link>
4549
and friends now return a <literal>Buffer</literal> instance
4550
instead of a byte string when encoding is not provided.
4551
</para>
4552
</listitem>
4553
4554
<listitem>
4555
<para>
4556
Bugfix:
4557
fixed function <literal>prototype</literal> property handler while setting.
4558
</para>
4559
</listitem>
4560
4561
<listitem>
4562
<para>
4563
Bugfix:
4564
fixed function <literal>constructor</literal> property handler while setting.
4565
</para>
4566
</listitem>
4567
4568
<listitem>
4569
<para>
4570
Bugfix:
4571
fixed <literal>String.prototype.indexOf()</literal>
4572
for byte strings.
4573
</para>
4574
</listitem>
4575
4576
<listitem>
4577
<para>
4578
Bugfix:
4579
fixed <literal>RegExpBuiltinExec()</literal>
4580
with a global flag and byte strings.
4581
</para>
4582
</listitem>
4583
4584
<listitem>
4585
<para>
4586
Bugfix:
4587
fixed <literal>RegExp.prototype[Symbol.replace]</literal>
4588
the when replacement value is a function.
4589
</para>
4590
</listitem>
4591
4592
<listitem>
4593
<para>
4594
Bugfix:
4595
fixed
4596
<link doc="reference.xml" id="textdecoder_decode"><literal>TextDecoder.prototype.decode()</literal></link>
4597
with non-zero <literal>TypedArray</literal> offset.
4598
</para>
4599
</listitem>
4600
4601
</list>
4602
</para>
4603
4604
</section>
4605
4606
4607
<section id="njs0.4.3" name="Changes with njs 0.4.3">
4608
4609
<para>
4610
Release Date:
4611
11 August 2020
4612
</para>
4613
4614
<para>
4615
Core:
4616
<list type="bullet">
4617
4618
<listitem>
4619
<para>
4620
Feature:
4621
added
4622
<link doc="reference.xml" id="querystring"><literal>Query String</literal></link>
4623
module.
4624
</para>
4625
</listitem>
4626
4627
<listitem>
4628
<para>
4629
Feature:
4630
improved
4631
<link doc="reference.xml" id="fs_mkdirsync"><literal>fs.mkdir()</literal></link>
4632
to support recursive directory creation.
4633
Thanks to Artem S. Povalyukhin.
4634
</para>
4635
</listitem>
4636
4637
<listitem>
4638
<para>
4639
Feature:
4640
improved
4641
<link doc="reference.xml" id="fs_rmdirsync"><literal>fs.rmdir()</literal></link>
4642
to support recursive directory removal.
4643
Thanks to Artem S. Povalyukhin.
4644
</para>
4645
</listitem>
4646
4647
<listitem>
4648
<para>
4649
Feature:
4650
introduced UTF-8 decoder according to
4651
<link url="https://encoding.spec.whatwg.org/">WHATWG</link> encoding spec.
4652
</para>
4653
</listitem>
4654
4655
<listitem>
4656
<para>
4657
Feature:
4658
added
4659
<link doc="reference.xml" id="textdecoder"><literal>TextDecoder()</literal></link>
4660
and
4661
<link doc="reference.xml" id="textencoder"><literal>TextEncoder()</literal></link>
4662
implementation.
4663
</para>
4664
</listitem>
4665
4666
<listitem>
4667
<para>
4668
Bugfix:
4669
fixed parsing return statement without semicolon.
4670
</para>
4671
</listitem>
4672
4673
<listitem>
4674
<para>
4675
Bugfix:
4676
fixed <literal>njs_number_to_int32()</literal> for big-endian platforms.
4677
</para>
4678
</listitem>
4679
4680
<listitem>
4681
<para>
4682
Bugfix:
4683
fixed unit test on big-endian platforms.
4684
</para>
4685
</listitem>
4686
4687
<listitem>
4688
<para>
4689
Bugfix:
4690
fixed regexp-literals parsing with “<literal>=</literal>” characters.
4691
</para>
4692
</listitem>
4693
4694
<listitem>
4695
<para>
4696
Bugfix:
4697
fixed pre/post increment/decrement in assignment operations.
4698
</para>
4699
</listitem>
4700
4701
</list>
4702
</para>
4703
4704
</section>
4705
4706
4707
<section id="njs0.4.2" name="Changes with njs 0.4.2">
4708
4709
<para>
4710
Release Date:
4711
07 July 2020
4712
</para>
4713
4714
<para>
4715
Core:
4716
<list type="bullet">
4717
4718
<listitem>
4719
<para>
4720
Feature:
4721
added <literal>RegExp.prototype[Symbol.replace]</literal>.
4722
</para>
4723
</listitem>
4724
4725
<listitem>
4726
<para>
4727
Feature:
4728
introduced line level backtrace.
4729
</para>
4730
</listitem>
4731
4732
<listitem>
4733
<para>
4734
Feature:
4735
added <literal>%TypedArray%.prototype.sort()</literal>.
4736
</para>
4737
</listitem>
4738
4739
<listitem>
4740
<para>
4741
Feature:
4742
extended
4743
<link doc="reference.xml" id="njs_api_fs"><literal>fs</literal></link> module.
4744
Added
4745
<link doc="reference.xml" id="fs_mkdirsync"><literal>mkdir()</literal></link>,
4746
<link doc="reference.xml" id="fs_readdirsync"><literal>readdir()</literal></link>,
4747
<link doc="reference.xml" id="fs_rmdirsync"><literal>rmdir()</literal></link>,
4748
and friends.
4749
</para>
4750
</listitem>
4751
4752
<listitem>
4753
<para>
4754
Improvement:
4755
parser refactoring.
4756
</para>
4757
</listitem>
4758
4759
<listitem>
4760
<para>
4761
Bugfix:
4762
fixed TypedScript API description for HTTP headers.
4763
</para>
4764
</listitem>
4765
4766
<listitem>
4767
<para>
4768
Bugfix:
4769
fixed TypedScript API description for <literal>NjsByteString</literal> type.
4770
</para>
4771
</listitem>
4772
4773
<listitem>
4774
<para>
4775
Bugfix:
4776
fixed
4777
<literal>String.prototype.repeat()</literal>
4778
according to the specification.
4779
</para>
4780
</listitem>
4781
4782
<listitem>
4783
<para>
4784
Bugfix:
4785
fixed
4786
<literal>String.prototype.replace()</literal>
4787
according to the specification.
4788
</para>
4789
</listitem>
4790
4791
<listitem>
4792
<para>
4793
Bugfix:
4794
fixed parsing of flags for regexp literals.
4795
</para>
4796
</listitem>
4797
4798
<listitem>
4799
<para>
4800
Bugfix:
4801
fixed index generation for global objects in generator.
4802
</para>
4803
</listitem>
4804
4805
<listitem>
4806
<para>
4807
Bugfix:
4808
fixed <literal>%TypedArray%.prototype.copyWithin()</literal>
4809
with nonzero byte offset.
4810
</para>
4811
</listitem>
4812
4813
<listitem>
4814
<para>
4815
Bugfix:
4816
fixed <literal>Array.prototype.splice()</literal>
4817
for sparse arrays.
4818
</para>
4819
</listitem>
4820
4821
<listitem>
4822
<para>
4823
Bugfix:
4824
fixed <literal>Array.prototype.reverse()</literal>
4825
for sparse arrays.
4826
</para>
4827
</listitem>
4828
4829
<listitem>
4830
<para>
4831
Bugfix:
4832
fixed <literal>Array.prototype.sort()</literal>
4833
for sparse arrays.
4834
</para>
4835
</listitem>
4836
4837
</list>
4838
</para>
4839
4840
</section>
4841
4842
4843
<section id="njs0.4.1" name="Changes with njs 0.4.1">
4844
4845
<para>
4846
Release Date:
4847
19 May 2020
4848
</para>
4849
4850
<para>
4851
nginx modules:
4852
<list type="bullet">
4853
4854
<listitem>
4855
<para>
4856
Feature:
4857
added support for multi-value headers in
4858
<link doc="reference.xml" id="r_headers_in"><literal>r.headersIn{}</literal></link>.
4859
</para>
4860
</listitem>
4861
4862
<listitem>
4863
<para>
4864
Feature:
4865
introduced <literal>raw headers</literal> API:
4866
<link doc="reference.xml" id="r_raw_headers_in"><literal>r.rawHeadersIn[]</literal></link>
4867
and
4868
<link doc="reference.xml" id="r_raw_headers_out"><literal>r.rawHeadersOut[]</literal></link>.
4869
</para>
4870
</listitem>
4871
4872
<listitem>
4873
<para>
4874
Feature:
4875
added <link doc="typescript.xml">TypeScript</link> API description.
4876
</para>
4877
</listitem>
4878
4879
</list>
4880
</para>
4881
4882
<para>
4883
Core:
4884
<list type="bullet">
4885
4886
<listitem>
4887
<para>
4888
Bugfix:
4889
fixed <literal>Array.prototype.slice()</literal> for sparse arrays.
4890
</para>
4891
</listitem>
4892
4893
</list>
4894
</para>
4895
4896
</section>
4897
4898
4899
<section id="njs0.4.0" name="Changes with njs 0.4.0">
4900
4901
<para>
4902
Release Date:
4903
23 April 2020
4904
</para>
4905
4906
<para>
4907
nginx modules:
4908
<list type="bullet">
4909
4910
<listitem>
4911
<para>
4912
Feature:
4913
added support for multi-value headers in
4914
<link doc="reference.xml" id="r_headers_out"><literal>r.headersOut{}</literal></link>.
4915
</para>
4916
</listitem>
4917
4918
<listitem>
4919
<para>
4920
Feature:
4921
added <literal>js_import</literal> directive for
4922
<link doc="../http/ngx_http_js_module.xml" id="js_import">http</link> and
4923
<link doc="../stream/ngx_stream_js_module.xml" id="js_import">stream</link>.
4924
</para>
4925
</listitem>
4926
4927
<listitem>
4928
<para>
4929
Improvement:
4930
improved iteration over
4931
<link doc="reference.xml" id="r_headers_out"><literal>r.headersOut{}</literal></link>
4932
with special headers.
4933
</para>
4934
</listitem>
4935
4936
<listitem>
4937
<para>
4938
Improvement:
4939
improved iteration over
4940
<link doc="reference.xml" id="r_headers_out"><literal>r.headersOut{}</literal></link>
4941
with duplicates.
4942
</para>
4943
</listitem>
4944
4945
<listitem>
4946
<para>
4947
Change:
4948
<link doc="reference.xml" id="r_response_body"><literal>r.responseBody</literal></link>
4949
property handler now returns
4950
<literal>undefined</literal>
4951
instead of throwing an exception if the response body is not available.
4952
</para>
4953
</listitem>
4954
4955
</list>
4956
</para>
4957
4958
<para>
4959
Core:
4960
<list type="bullet">
4961
4962
<listitem>
4963
<para>
4964
Feature:
4965
added script arguments support in CLI.
4966
</para>
4967
</listitem>
4968
4969
<listitem>
4970
<para>
4971
Feature:
4972
converting externals values to native js objects.
4973
</para>
4974
</listitem>
4975
4976
<listitem>
4977
<para>
4978
Bugfix:
4979
fixed NULL-pointer dereference
4980
in <literal>__proto__</literal> property handler.
4981
</para>
4982
</listitem>
4983
4984
<listitem>
4985
<para>
4986
Bugfix:
4987
fixed handling of no-newline at the end of the script.
4988
</para>
4989
</listitem>
4990
4991
<listitem>
4992
<para>
4993
Bugfix:
4994
fixed <literal>RegExp()</literal> constructor
4995
with empty pattern and non-empty flags.
4996
</para>
4997
</listitem>
4998
4999
<listitem>
5000
<para>
5001
Bugfix:
5002
fixed
5003
<literal>String.prototype.replace()</literal>
5004
when function returns non-string.
5005
</para>
5006
</listitem>
5007
5008
<listitem>
5009
<para>
5010
Bugfix:
5011
fixed reading of pseudofiles in
5012
<link doc="reference.xml" id="njs_api_fs"><literal>fs</literal></link>.
5013
</para>
5014
</listitem>
5015
5016
</list>
5017
</para>
5018
5019
</section>
5020
5021
5022
<section id="njs0.3.9" name="Changes with njs 0.3.9">
5023
5024
<para>
5025
Release Date:
5026
03 March 2020
5027
</para>
5028
5029
<para>
5030
nginx modules:
5031
<list type="bullet">
5032
5033
<listitem>
5034
<para>
5035
Feature:
5036
added detached mode for
5037
<link doc="reference.xml" id="r_subrequest"><literal>r.subrequest()</literal></link>.
5038
Responses to detached subrequests are ignored.
5039
Unlike ordinary subrequests,
5040
a detached subrequest can be created inside a variable handler.
5041
</para>
5042
</listitem>
5043
5044
</list>
5045
</para>
5046
5047
<para>
5048
Core:
5049
<list type="bullet">
5050
5051
<listitem>
5052
<para>
5053
Feature:
5054
added <literal>promises</literal> API for
5055
<link doc="reference.xml" id="njs_api_fs"><literal>fs</literal></link> module.
5056
Thanks to Artem S. Povalyukhin.
5057
</para>
5058
</listitem>
5059
5060
<listitem>
5061
<para>
5062
Feature:
5063
extended <link doc="reference.xml" id="njs_api_fs"><literal>fs</literal></link>
5064
module.
5065
Added
5066
<link doc="reference.xml" id="fs_accesssync"><literal>access()</literal></link>,
5067
<link doc="reference.xml" id="fs_symlinksync"><literal>symlink()</literal></link>,
5068
<link doc="reference.xml" id="fs_unlinksync"><literal>unlink()</literal></link>,
5069
<link doc="reference.xml" id="fs_realpathsync"><literal>realpath()</literal></link>,
5070
and friends.
5071
Thanks to Artem S. Povalyukhin.
5072
</para>
5073
</listitem>
5074
5075
<listitem>
5076
<para>
5077
Improvement:
5078
introduced memory-efficient ordinary arrays.
5079
</para>
5080
</listitem>
5081
5082
<listitem>
5083
<para>
5084
Improvement:
5085
lexer refactoring.
5086
</para>
5087
</listitem>
5088
5089
<listitem>
5090
<para>
5091
Bugfix:
5092
fixed matching of native functions in backtraces.
5093
</para>
5094
</listitem>
5095
5096
<listitem>
5097
<para>
5098
Bugfix:
5099
fixed callback invocations in
5100
<link doc="reference.xml" id="njs_api_fs"><literal>fs</literal></link> module.
5101
Thanks to Artem S. Povalyukhin.
5102
</para>
5103
</listitem>
5104
5105
<listitem>
5106
<para>
5107
Bugfix:
5108
fixed <literal>Object.getOwnPropertySymbols()</literal>.
5109
</para>
5110
</listitem>
5111
5112
<listitem>
5113
<para>
5114
Bugfix:
5115
fixed heap-buffer-overflow in
5116
<literal>njs_json_append_string()</literal>.
5117
</para>
5118
</listitem>
5119
5120
<listitem>
5121
<para>
5122
Bugfix:
5123
fixed
5124
<literal>encodeURI()</literal>
5125
and
5126
<literal>decodeURI()</literal>
5127
according to the specification.
5128
</para>
5129
</listitem>
5130
5131
<listitem>
5132
<para>
5133
Bugfix:
5134
fixed <literal>Number.prototype.toPrecision()</literal>.
5135
</para>
5136
</listitem>
5137
5138
<listitem>
5139
<para>
5140
Bugfix:
5141
fixed handling of space argument in
5142
<literal>JSON.stringify()</literal>.
5143
</para>
5144
</listitem>
5145
5146
<listitem>
5147
<para>
5148
Bugfix:
5149
fixed
5150
<literal>JSON.stringify()</literal>
5151
with
5152
<literal>Number()</literal> and
5153
<literal>String()</literal>
5154
objects.
5155
</para>
5156
</listitem>
5157
5158
<listitem>
5159
<para>
5160
Bugfix:
5161
fixed Unicode Escaping in
5162
<literal>JSON.stringify()</literal>
5163
according to specification.
5164
</para>
5165
</listitem>
5166
5167
<listitem>
5168
<para>
5169
Bugfix:
5170
fixed non-native module importing.
5171
Thanks to 洪志道 (Hong Zhi Dao).
5172
</para>
5173
</listitem>
5174
5175
<listitem>
5176
<para>
5177
Bugfix:
5178
fixed
5179
<literal>njs.dump()</literal> with the
5180
<literal>Date()</literal>
5181
instance in a container.
5182
</para>
5183
</listitem>
5184
5185
</list>
5186
</para>
5187
5188
</section>
5189
5190
5191
<section id="njs0.3.8" name="Changes with njs 0.3.8">
5192
5193
<para>
5194
Release Date:
5195
21 January 2020
5196
</para>
5197
5198
<para>
5199
nginx modules:
5200
<list type="bullet">
5201
5202
<listitem>
5203
<para>
5204
Feature:
5205
added <literal>Promise</literal> support for
5206
<link doc="reference.xml" id="r_subrequest"><literal>r.subrequest()</literal></link>.
5207
If a callback is not provided,
5208
<link doc="reference.xml" id="r_subrequest"><literal>r.subrequest()</literal></link>
5209
returns an ordinary
5210
<literal>Promise</literal> object
5211
that resolves to a subrequest response object.
5212
</para>
5213
</listitem>
5214
5215
<listitem>
5216
<para>
5217
Change:
5218
<link doc="reference.xml" id="r_parent"><literal>r.parent</literal></link>
5219
property handler now returns
5220
<literal>undefined</literal>
5221
instead of throwing an exception if a parent object is not available.
5222
</para>
5223
</listitem>
5224
5225
</list>
5226
</para>
5227
5228
<para>
5229
Core:
5230
<list type="bullet">
5231
5232
<listitem>
5233
<para>
5234
Feature:
5235
added <literal>Promise</literal> support.
5236
Implemented according to the specification without:
5237
<literal>Promise.all()</literal>,
5238
<literal>Promise.allSettled()</literal>,
5239
<literal>Promise.race()</literal>.
5240
</para>
5241
</listitem>
5242
5243
<listitem>
5244
<para>
5245
Feature:
5246
added initial Typed-arrays support.
5247
Thanks to Tiago Natel de Moura.
5248
</para>
5249
</listitem>
5250
5251
<listitem>
5252
<para>
5253
Feature:
5254
added <literal>ArrayBuffer</literal> support.
5255
Thanks to Tiago Natel de Moura.
5256
</para>
5257
</listitem>
5258
5259
<listitem>
5260
<para>
5261
Feature:
5262
added initial <literal>Symbol</literal> support.
5263
Thanks to Artem S. Povalyukhin.
5264
</para>
5265
</listitem>
5266
5267
<listitem>
5268
<para>
5269
Feature:
5270
added externals support for
5271
<literal>JSON.stringify()</literal>.
5272
</para>
5273
</listitem>
5274
5275
<listitem>
5276
<para>
5277
Feature:
5278
added <literal>Object.is()</literal>.
5279
Thanks to Artem S. Povalyukhin.
5280
</para>
5281
</listitem>
5282
5283
<listitem>
5284
<para>
5285
Feature:
5286
added <literal>Object.setPrototypeOf()</literal>.
5287
Thanks to Artem S. Povalyukhin.
5288
</para>
5289
</listitem>
5290
5291
<listitem>
5292
<para>
5293
Feature:
5294
introduced nullish coalescing operator.
5295
</para>
5296
</listitem>
5297
5298
<listitem>
5299
<para>
5300
Bugfix:
5301
fixed
5302
<literal>Object.getPrototypeOf()</literal>
5303
according to the specification.
5304
</para>
5305
</listitem>
5306
5307
<listitem>
5308
<para>
5309
Bugfix:
5310
fixed
5311
<literal>Object.prototype.valueOf()</literal>
5312
according to the specification.
5313
</para>
5314
</listitem>
5315
5316
<listitem>
5317
<para>
5318
Bugfix:
5319
fixed
5320
<literal>JSON.stringify()</literal>
5321
with unprintable values and replacer function.
5322
</para>
5323
</listitem>
5324
5325
<listitem>
5326
<para>
5327
Bugfix:
5328
fixed operator <literal>in</literal>
5329
according to the specification.
5330
</para>
5331
</listitem>
5332
5333
<listitem>
5334
<para>
5335
Bugfix:
5336
fixed
5337
<literal>Object.defineProperties()</literal>
5338
according to the specification.
5339
</para>
5340
</listitem>
5341
5342
<listitem>
5343
<para>
5344
Bugfix:
5345
fixed
5346
<literal>Object.create()</literal>
5347
according to the specification.
5348
Thanks to Artem S. Povalyukhin.
5349
</para>
5350
</listitem>
5351
5352
<listitem>
5353
<para>
5354
Bugfix:
5355
fixed
5356
<literal>Number.prototype.toString(radix)</literal>
5357
when fast-math is enabled.
5358
</para>
5359
</listitem>
5360
5361
<listitem>
5362
<para>
5363
Bugfix:
5364
fixed <literal>RegExp()</literal> instance properties.
5365
</para>
5366
</listitem>
5367
5368
<listitem>
5369
<para>
5370
Bugfix:
5371
fixed import segfault.
5372
Thanks to 洪志道 (Hong Zhi Dao).
5373
</para>
5374
</listitem>
5375
5376
</list>
5377
</para>
5378
5379
</section>
5380
5381
5382
<section id="njs0.3.7" name="Changes with njs 0.3.7">
5383
5384
<para>
5385
Release Date:
5386
19 November 2019
5387
</para>
5388
5389
<para>
5390
nginx modules:
5391
<list type="bullet">
5392
5393
<listitem>
5394
<para>
5395
Improvement:
5396
refactored iteration over external objects.
5397
</para>
5398
</listitem>
5399
5400
</list>
5401
</para>
5402
5403
<para>
5404
Core:
5405
<list type="bullet">
5406
5407
<listitem>
5408
<para>
5409
Feature:
5410
added <literal>Object.assign()</literal>.
5411
</para>
5412
</listitem>
5413
5414
<listitem>
5415
<para>
5416
Feature:
5417
added <literal>Array.prototype.copyWithin()</literal>.
5418
</para>
5419
</listitem>
5420
5421
<listitem>
5422
<para>
5423
Feature:
5424
added support for labels in <literal>console.time()</literal>.
5425
</para>
5426
</listitem>
5427
5428
<listitem>
5429
<para>
5430
Change:
5431
removed <literal>console.help()</literal> from CLI.
5432
</para>
5433
</listitem>
5434
5435
<listitem>
5436
<para>
5437
Improvement:
5438
moved constructors and top-level objects to global object.
5439
</para>
5440
</listitem>
5441
5442
<listitem>
5443
<para>
5444
Improvement:
5445
arguments validation for configure script.
5446
</para>
5447
</listitem>
5448
5449
<listitem>
5450
<para>
5451
Improvement:
5452
refactored JSON methods.
5453
</para>
5454
</listitem>
5455
5456
<listitem>
5457
<para>
5458
Bugfix:
5459
fixed heap-buffer-overflow in
5460
<literal>njs_array_reverse_iterator()</literal> function.
5461
The following functions were affected:
5462
<literal>Array.prototype.lastIndexOf()</literal>,
5463
<literal>Array.prototype.reduceRight()</literal>.
5464
</para>
5465
</listitem>
5466
5467
<listitem>
5468
<para>
5469
Bugfix:
5470
fixed
5471
<literal>[[Prototype]]</literal> slot of <literal>NativeErrors</literal>.
5472
</para>
5473
</listitem>
5474
5475
<listitem>
5476
<para>
5477
Bugfix:
5478
fixed
5479
<literal>NativeError.prototype.message</literal> properties.
5480
</para>
5481
</listitem>
5482
5483
<listitem>
5484
<para>
5485
Bugfix:
5486
added conversion of
5487
<literal>this</literal> value to object in
5488
<literal>Array.prototype functions</literal>.
5489
</para>
5490
</listitem>
5491
5492
<listitem>
5493
<para>
5494
Bugfix:
5495
fixed iterator for
5496
<literal>Array.prototype.find()</literal> and
5497
<literal>Array.prototype.findIndex()</literal>
5498
functions.
5499
</para>
5500
</listitem>
5501
5502
<listitem>
5503
<para>
5504
Bugfix:
5505
fixed
5506
<literal>Array.prototype.includes()</literal> and
5507
<literal>Array.prototype.join()</literal> with
5508
<literal>undefined</literal> argument.
5509
</para>
5510
</listitem>
5511
5512
<listitem>
5513
<para>
5514
Bugfix:
5515
fixed <literal>constructor</literal> property of
5516
<literal>Hash</literal> and
5517
<literal>Hmac</literal>
5518
objects.
5519
</para>
5520
</listitem>
5521
5522
<listitem>
5523
<para>
5524
Bugfix:
5525
fixed <literal>__proto__</literal> property of getters and setters.
5526
</para>
5527
</listitem>
5528
5529
<listitem>
5530
<para>
5531
Bugfix:
5532
fixed <literal>Date</literal> object string formatting.
5533
</para>
5534
</listitem>
5535
5536
<listitem>
5537
<para>
5538
Bugfix:
5539
fixed handling of
5540
<literal>NaN</literal> and <literal>-0</literal> arguments in
5541
<literal>Math.min()</literal> and
5542
<literal>Math.max()</literal>.
5543
</para>
5544
</listitem>
5545
5546
<listitem>
5547
<para>
5548
Bugfix:
5549
fixed <literal>Math.round()</literal>
5550
according to the specification.
5551
</para>
5552
</listitem>
5553
5554
<listitem>
5555
<para>
5556
Bugfix:
5557
reimplemented <literal>bound</literal> functions
5558
according to the specification.
5559
</para>
5560
</listitem>
5561
5562
</list>
5563
</para>
5564
5565
</section>
5566
5567
5568
<section id="njs0.3.6" name="Changes with njs 0.3.6">
5569
5570
<para>
5571
Release Date:
5572
22 October 2019
5573
</para>
5574
5575
<para>
5576
nginx modules:
5577
<list type="bullet">
5578
5579
<listitem>
5580
<para>
5581
Improvement:
5582
getting special headers from
5583
<link doc="reference.xml" id="r_headers_in"><literal>r.headersIn{}</literal></link>.
5584
</para>
5585
</listitem>
5586
5587
</list>
5588
</para>
5589
5590
<para>
5591
Core:
5592
<list type="bullet">
5593
5594
<listitem>
5595
<para>
5596
Feature:
5597
added new <literal>Function()</literal> support.
5598
</para>
5599
</listitem>
5600
5601
<listitem>
5602
<para>
5603
Feature:
5604
added <literal>Number.prototype.toFixed()</literal>.
5605
</para>
5606
</listitem>
5607
5608
<listitem>
5609
<para>
5610
Feature:
5611
added <literal>Number.prototype.toPrecision()</literal>.
5612
</para>
5613
</listitem>
5614
5615
<listitem>
5616
<para>
5617
Feature:
5618
added <literal>Number.prototype.toExponential()</literal>.
5619
</para>
5620
</listitem>
5621
5622
<listitem>
5623
<para>
5624
Improvement:
5625
making <literal>prototype</literal> property of function instances writable.
5626
</para>
5627
</listitem>
5628
5629
<listitem>
5630
<para>
5631
Improvement:
5632
limiting recursion depth while compiling.
5633
</para>
5634
</listitem>
5635
5636
<listitem>
5637
<para>
5638
Improvement:
5639
moving global functions to the global object.
5640
</para>
5641
</listitem>
5642
5643
<listitem>
5644
<para>
5645
Bugfix:
5646
fixed prototype mutation for object literals.
5647
</para>
5648
</listitem>
5649
5650
<listitem>
5651
<para>
5652
Bugfix:
5653
fixed heap-buffer-overflow while parsing regexp literals.
5654
</para>
5655
</listitem>
5656
5657
<listitem>
5658
<para>
5659
Bugfix:
5660
fixed integer-overflow while parsing exponent of number literals.
5661
</para>
5662
</listitem>
5663
5664
<listitem>
5665
<para>
5666
Bugfix:
5667
fixed <literal>parseFloat()</literal>.
5668
</para>
5669
</listitem>
5670
5671
<listitem>
5672
<para>
5673
Bugfix:
5674
fixed <literal>Array.prototype</literal> functions
5675
according to the specification.
5676
The following functions were fixed:
5677
<literal>every</literal>,
5678
<literal>includes</literal>,
5679
<literal>indexOf</literal>,
5680
<literal>filter</literal>,
5681
<literal>find</literal>,
5682
<literal>findIndex</literal>,
5683
<literal>forEach</literal>,
5684
<literal>lastIndexOf</literal>,
5685
<literal>map</literal>,
5686
<literal>pop</literal>,
5687
<literal>push</literal>,
5688
<literal>reduce</literal>,
5689
<literal>reduceRight</literal>,
5690
<literal>shift</literal>,
5691
<literal>some</literal>,
5692
<literal>unshift</literal>.
5693
</para>
5694
</listitem>
5695
5696
<listitem>
5697
<para>
5698
Bugfix:
5699
fixed handing of accessor descriptors in <literal>Object.freeze()</literal>.
5700
</para>
5701
</listitem>
5702
5703
<listitem>
5704
<para>
5705
Bugfix:
5706
fixed
5707
<literal>String.prototype.replace()</literal>
5708
when first argument is not a string.
5709
</para>
5710
</listitem>
5711
5712
<listitem>
5713
<para>
5714
Bugfix:
5715
fixed stack-use-after-scope in <literal>Array.prototype.map()</literal>.
5716
</para>
5717
</listitem>
5718
5719
<listitem>
5720
<para>
5721
Bugfix:
5722
<literal>Date.prototype.toUTCString()</literal>
5723
format was aligned to ES9.
5724
</para>
5725
</listitem>
5726
5727
<listitem>
5728
<para>
5729
Bugfix:
5730
fixed buffer overflow in
5731
<literal>Number.prototype.toString(radix)</literal>.
5732
</para>
5733
</listitem>
5734
5735
<listitem>
5736
<para>
5737
Bugfix:
5738
fixed
5739
<literal>Regexp.prototype.test()</literal>
5740
for regexps with backreferences.
5741
</para>
5742
</listitem>
5743
5744
<listitem>
5745
<para>
5746
Bugfix:
5747
fixed
5748
<literal>Array.prototype.map()</literal>
5749
for objects with nonexistent values.
5750
</para>
5751
</listitem>
5752
5753
<listitem>
5754
<para>
5755
Bugfix:
5756
fixed
5757
<literal>Array.prototype.pop()</literal> and
5758
<literal>shift()</literal> for sparse objects.
5759
</para>
5760
</listitem>
5761
5762
<listitem>
5763
<para>
5764
Bugfix:
5765
fixed
5766
<literal>Date.UTC()</literal>
5767
according to the specification.
5768
</para>
5769
</listitem>
5770
5771
<listitem>
5772
<para>
5773
Bugfix:
5774
fixed
5775
<literal>Date()</literal> constructor
5776
according to the specification.
5777
</para>
5778
</listitem>
5779
5780
<listitem>
5781
<para>
5782
Bugfix:
5783
fixed type of
5784
<literal>Date.prototype</literal>.
5785
Thanks to Artem S. Povalyukhin.
5786
</para>
5787
</listitem>
5788
5789
<listitem>
5790
<para>
5791
Bugfix:
5792
fixed
5793
<literal>Date.prototype.setTime()</literal>.
5794
Thanks to Artem S. Povalyukhin.
5795
</para>
5796
</listitem>
5797
5798
<listitem>
5799
<para>
5800
Bugfix:
5801
fixed default number of arguments expected by built-in functions.
5802
</para>
5803
</listitem>
5804
5805
<listitem>
5806
<para>
5807
Bugfix:
5808
fixed
5809
<literal>caller</literal> and
5810
<literal>arguments</literal>
5811
properties of a function instance.
5812
Thanks to Artem S. Povalyukhin.
5813
</para>
5814
</listitem>
5815
5816
</list>
5817
</para>
5818
5819
</section>
5820
5821
5822
<section id="njs0.3.5" name="Changes with njs 0.3.5">
5823
5824
<para>
5825
Release Date:
5826
15 August 2019
5827
</para>
5828
5829
<para>
5830
Core:
5831
<list type="bullet">
5832
5833
<listitem>
5834
<para>
5835
Bugfix:
5836
fixed module importing using <literal>require()</literal>.
5837
The bug was introduced in <link id="0.3.4"/>.
5838
</para>
5839
</listitem>
5840
5841
<listitem>
5842
<para>
5843
Bugfix:
5844
fixed
5845
<literal>[[SetPrototypeOf]]</literal>.
5846
</para>
5847
</listitem>
5848
5849
</list>
5850
</para>
5851
5852
</section>
5853
5854
5855
<section id="njs0.3.4" name="Changes with njs 0.3.4">
5856
5857
<para>
5858
Release Date:
5859
13 August 2019
5860
</para>
5861
5862
<para>
5863
Core:
5864
<list type="bullet">
5865
5866
<listitem>
5867
<para>
5868
Feature:
5869
added
5870
<literal>Object</literal>
5871
shorthand methods and computed property names.
5872
Thanks to 洪志道 (Hong Zhi Dao) and Artem S. Povalyukhin.
5873
</para>
5874
</listitem>
5875
5876
<listitem>
5877
<para>
5878
Feature:
5879
added getter/setter literal support.
5880
Thanks to 洪志道 (Hong Zhi Dao) and Artem S. Povalyukhin.
5881
</para>
5882
</listitem>
5883
5884
<listitem>
5885
<para>
5886
Feature:
5887
added
5888
<link doc="reference.xml" id="fs_renamesync"><literal>fs.renameSync()</literal></link>.
5889
</para>
5890
</listitem>
5891
5892
<listitem>
5893
<para>
5894
Feature:
5895
added
5896
<literal>String.prototype.trimEnd()</literal>
5897
and
5898
<literal>String.prototype.trimStart()</literal>.
5899
</para>
5900
</listitem>
5901
5902
<listitem>
5903
<para>
5904
Improvement:
5905
added memory-sanitizer support.
5906
</para>
5907
</listitem>
5908
5909
<listitem>
5910
<para>
5911
Improvement:
5912
Unicode case tables updated to version 12.1.
5913
</para>
5914
</listitem>
5915
5916
<listitem>
5917
<para>
5918
Improvement:
5919
added UTF8 validation for string literals.
5920
</para>
5921
</listitem>
5922
5923
<listitem>
5924
<para>
5925
Bugfix:
5926
fixed reading files with zero size in
5927
<link doc="reference.xml" id="readfilesync"><literal>fs.readFileSync()</literal></link>.
5928
</para>
5929
</listitem>
5930
5931
<listitem>
5932
<para>
5933
Bugfix:
5934
extended the list of space separators in
5935
<literal>String.prototype.trim()</literal>.
5936
</para>
5937
</listitem>
5938
5939
<listitem>
5940
<para>
5941
Bugfix:
5942
fixed using of uninitialized value in
5943
<literal>String.prototype.padStart()</literal>.
5944
</para>
5945
</listitem>
5946
5947
<listitem>
5948
<para>
5949
Bugfix:
5950
fixed
5951
<literal>String.prototype.replace()</literal>
5952
for <literal>$0</literal> and <literal>$&amp;</literal> replacement string.
5953
</para>
5954
</listitem>
5955
5956
<listitem>
5957
<para>
5958
Bugfix:
5959
fixed
5960
<literal>String.prototype.replace()</literal>
5961
for byte strings with regex argument.
5962
</para>
5963
</listitem>
5964
5965
<listitem>
5966
<para>
5967
Bugfix:
5968
fixed global match in
5969
<literal>String.prototype.replace()</literal>
5970
with regexp argument.
5971
</para>
5972
</listitem>
5973
5974
<listitem>
5975
<para>
5976
Bugfix:
5977
fixed
5978
<literal>Array.prototype.slice()</literal>
5979
for primitive types.
5980
</para>
5981
</listitem>
5982
5983
<listitem>
5984
<para>
5985
Bugfix:
5986
fixed heap-buffer-overflow while importing module.
5987
</para>
5988
</listitem>
5989
5990
<listitem>
5991
<para>
5992
Bugfix:
5993
fixed UTF-8 character escaping.
5994
</para>
5995
</listitem>
5996
5997
<listitem>
5998
<para>
5999
Bugfix:
6000
fixed
6001
<literal>Object.values()</literal>
6002
and
6003
<literal>Object.entries()</literal>
6004
for shared objects.
6005
</para>
6006
</listitem>
6007
6008
<listitem>
6009
<para>
6010
Bugfix:
6011
fixed uninitialized memory access in
6012
<literal>String.prototype.match()</literal>.
6013
</para>
6014
</listitem>
6015
6016
<listitem>
6017
<para>
6018
Bugfix:
6019
fixed
6020
<literal>String.prototype.match()</literal>
6021
for byte strings with regex argument.
6022
</para>
6023
</listitem>
6024
6025
<listitem>
6026
<para>
6027
Bugfix:
6028
fixed
6029
<literal>Array.prototype.lastIndexOf()</literal>
6030
with undefined arguments.
6031
</para>
6032
</listitem>
6033
6034
<listitem>
6035
<para>
6036
Bugfix:
6037
fixed
6038
<literal>String.prototype.substring()</literal>
6039
with empty substring.
6040
</para>
6041
</listitem>
6042
6043
<listitem>
6044
<para>
6045
Bugfix:
6046
fixed invalid memory access in
6047
<literal>String.prototype.substring()</literal>.
6048
</para>
6049
</listitem>
6050
6051
<listitem>
6052
<para>
6053
Bugfix:
6054
fixed
6055
<literal>String.fromCharCode()</literal>
6056
for code points more than <literal>65535</literal> and <literal>NaN</literal>.
6057
</para>
6058
</listitem>
6059
6060
<listitem>
6061
<para>
6062
Bugfix:
6063
fixed
6064
<literal>String.prototype.toLowerCase()</literal>
6065
and
6066
<literal>String.prototype.toUpperCase()</literal>.
6067
</para>
6068
</listitem>
6069
6070
<listitem>
6071
<para>
6072
Bugfix:
6073
fixed
6074
<literal>Error()</literal>
6075
constructor with no arguments.
6076
</para>
6077
</listitem>
6078
6079
<listitem>
6080
<para>
6081
Bugfix:
6082
fixed
6083
<literal>in</literal>
6084
operator for values with accessor descriptors.
6085
</para>
6086
</listitem>
6087
6088
<listitem>
6089
<para>
6090
Bugfix:
6091
fixed
6092
<literal>Object.defineProperty()</literal>
6093
for non-boolean descriptor props.
6094
</para>
6095
</listitem>
6096
6097
<listitem>
6098
<para>
6099
Bugfix:
6100
fixed
6101
<literal>Error.prototype.toString()</literal>
6102
with UTF8 string properties.
6103
</para>
6104
</listitem>
6105
6106
<listitem>
6107
<para>
6108
Bugfix:
6109
fixed
6110
<literal>Error.prototype.toString()</literal>
6111
with non-string values for <literal>name</literal> and <literal>message</literal>.
6112
</para>
6113
</listitem>
6114
6115
</list>
6116
</para>
6117
6118
</section>
6119
6120
6121
<section id="njs0.3.3" name="Changes with njs 0.3.3">
6122
6123
<para>
6124
Release Date:
6125
25 June 2019
6126
</para>
6127
6128
<para>
6129
nginx modules:
6130
<list type="bullet">
6131
6132
<listitem>
6133
<para>
6134
Improvement:
6135
getting of special response headers in
6136
<link doc="reference.xml" id="r_headers_out"><literal>r.headersOut{}</literal></link>.
6137
</para>
6138
</listitem>
6139
6140
<listitem>
6141
<para>
6142
Improvement:
6143
working with unknown methods in
6144
<link doc="reference.xml" id="r_subrequest"><literal>r.subrequest()</literal></link>.
6145
</para>
6146
</listitem>
6147
6148
<listitem>
6149
<para>
6150
Improvement:
6151
added support for null as a second argument of
6152
<link doc="reference.xml" id="r_subrequest"><literal>r.subrequest()</literal></link>.
6153
</para>
6154
</listitem>
6155
6156
<listitem>
6157
<para>
6158
Bugfix:
6159
fixed processing empty output chain in stream body filter.
6160
</para>
6161
</listitem>
6162
6163
</list>
6164
</para>
6165
6166
<para>
6167
Core:
6168
<list type="bullet">
6169
6170
<listitem>
6171
<para>
6172
Feature:
6173
added runtime support for property getter/setter.
6174
Thanks to 洪志道 (Hong Zhi Dao) and Artem S. Povalyukhin.
6175
</para>
6176
</listitem>
6177
6178
<listitem>
6179
<para>
6180
Feature:
6181
added
6182
<link doc="reference.xml" id="process"><literal>process</literal></link>
6183
global object.
6184
</para>
6185
</listitem>
6186
6187
<listitem>
6188
<para>
6189
Feature:
6190
writable most of built-in properties and methods.
6191
</para>
6192
</listitem>
6193
6194
<listitem>
6195
<para>
6196
Feature:
6197
added generic implementation of
6198
<literal>Array.prototype.fill()</literal>.
6199
</para>
6200
</listitem>
6201
6202
<listitem>
6203
<para>
6204
Bugfix:
6205
fixed integer-overflow in
6206
<literal>String.prototype.concat()</literal>.
6207
</para>
6208
</listitem>
6209
6210
<listitem>
6211
<para>
6212
Bugfix:
6213
fixed setting of object properties.
6214
</para>
6215
</listitem>
6216
6217
<listitem>
6218
<para>
6219
Bugfix:
6220
fixed
6221
<literal>Array.prototype.toString()</literal>.
6222
</para>
6223
</listitem>
6224
6225
<listitem>
6226
<para>
6227
Bugfix:
6228
fixed
6229
<literal>Date.prototype.toJSON()</literal>.
6230
</para>
6231
</listitem>
6232
6233
<listitem>
6234
<para>
6235
Bugfix:
6236
fixed overwriting “constructor” property of built-in prototypes.
6237
</para>
6238
</listitem>
6239
6240
<listitem>
6241
<para>
6242
Bugfix:
6243
fixed processing of invalid surrogate pairs in strings.
6244
</para>
6245
</listitem>
6246
6247
<listitem>
6248
<para>
6249
Bugfix:
6250
fixed processing of invalid surrogate pairs in JSON strings.
6251
</para>
6252
</listitem>
6253
6254
<listitem>
6255
<para>
6256
Bugfix:
6257
fixed heap-buffer-overflow in
6258
<literal>toUpperCase()</literal>
6259
and
6260
<literal>toLowerCase()</literal>.
6261
</para>
6262
</listitem>
6263
6264
<listitem>
6265
<para>
6266
Bugfix:
6267
fixed escaping lone closing square brackets in
6268
<literal>RegExp()</literal> constructor.
6269
</para>
6270
</listitem>
6271
6272
<listitem>
6273
<para>
6274
Bugfix:
6275
fixed handling zero byte characters inside RegExp pattern strings.
6276
</para>
6277
</listitem>
6278
6279
<listitem>
6280
<para>
6281
Bugfix:
6282
fixed
6283
<literal>String.prototype.toBytes()</literal>
6284
for ASCII strings.
6285
</para>
6286
</listitem>
6287
6288
<listitem>
6289
<para>
6290
Bugfix:
6291
fixed truth value of JSON numbers in
6292
<literal>JSON.parse()</literal>.
6293
</para>
6294
</listitem>
6295
6296
<listitem>
6297
<para>
6298
Bugfix:
6299
fixed use-of-uninitialized-value in
6300
<literal>njs_string_replace_join()</literal>.
6301
</para>
6302
</listitem>
6303
6304
<listitem>
6305
<para>
6306
Bugfix:
6307
fixed <literal>parseInt('-0')</literal>.
6308
Thanks to Artem S. Povalyukhin.
6309
</para>
6310
</listitem>
6311
6312
</list>
6313
</para>
6314
6315
</section>
6316
6317
6318
<section id="njs0.3.2" name="Changes with njs 0.3.2">
6319
6320
<para>
6321
Release Date:
6322
21 May 2019
6323
</para>
6324
6325
<para>
6326
Core:
6327
<list type="bullet">
6328
6329
<listitem>
6330
<para>
6331
Feature:
6332
added support for template literals.
6333
Thanks to 洪志道 (Hong Zhi Dao) and Artem S. Povalyukhin.
6334
</para>
6335
</listitem>
6336
6337
<listitem>
6338
<para>
6339
Feature:
6340
executing command from command line arguments.
6341
</para>
6342
</listitem>
6343
6344
<listitem>
6345
<para>
6346
Feature:
6347
added support for RegExp <literal>groups</literal> object (ES9).
6348
</para>
6349
</listitem>
6350
6351
<listitem>
6352
<para>
6353
Feature:
6354
added block scoped function definitions support.
6355
</para>
6356
</listitem>
6357
6358
<listitem>
6359
<para>
6360
Feature:
6361
added support for building with GNU Readline library.
6362
</para>
6363
</listitem>
6364
6365
<listitem>
6366
<para>
6367
Feature:
6368
made configurable
6369
<literal>length</literal>,
6370
<literal>name</literal>,
6371
and most of built-in methods.
6372
</para>
6373
</listitem>
6374
6375
<listitem>
6376
<para>
6377
Feature:
6378
made all constructor properties configurable.
6379
</para>
6380
</listitem>
6381
6382
<listitem>
6383
<para>
6384
Bugfix:
6385
fixed
6386
<literal>Regexp.prototype.exec()</literal>
6387
for Unicode-only regexps.
6388
</para>
6389
</listitem>
6390
6391
<listitem>
6392
<para>
6393
Bugfix:
6394
fixed
6395
<literal>njs_vm_value_dump()</literal>
6396
for empty string values.
6397
</para>
6398
</listitem>
6399
6400
<listitem>
6401
<para>
6402
Bugfix:
6403
fixed RegExp constructor for regexp value arguments.
6404
</para>
6405
</listitem>
6406
6407
<listitem>
6408
<para>
6409
Bugfix:
6410
fixed walking over prototypes chain during iteration over an object.
6411
</para>
6412
</listitem>
6413
6414
<listitem>
6415
<para>
6416
Bugfix:
6417
fixed overflow in
6418
<literal>Array.prototype.concat()</literal>.
6419
</para>
6420
</listitem>
6421
6422
<listitem>
6423
<para>
6424
Bugfix:
6425
fixed length calculation for UTF-8 string with escape characters.
6426
</para>
6427
</listitem>
6428
6429
<listitem>
6430
<para>
6431
Bugfix:
6432
fixed parsing surrogate pair presents as UTF-16 escape sequences.
6433
</para>
6434
</listitem>
6435
6436
<listitem>
6437
<para>
6438
Bugfix:
6439
fixed processing the “*” quantifier for
6440
<literal>String.prototype.match()</literal>.
6441
</para>
6442
</listitem>
6443
6444
<listitem>
6445
<para>
6446
Bugfix:
6447
fixed
6448
<literal>Date()</literal>
6449
constructor with one argument.
6450
</para>
6451
</listitem>
6452
6453
<listitem>
6454
<para>
6455
Bugfix:
6456
fixed arrays expansion.
6457
</para>
6458
</listitem>
6459
6460
<listitem>
6461
<para>
6462
Bugfix:
6463
fixed heap-buffer-overflow in
6464
<literal>String.prototype.replace()</literal>.
6465
</para>
6466
</listitem>
6467
6468
<listitem>
6469
<para>
6470
Bugfix:
6471
fixed heap-buffer-overflow in
6472
<literal>String.prototype.lastIndexOf()</literal>.
6473
</para>
6474
</listitem>
6475
6476
<listitem>
6477
<para>
6478
Bugfix:
6479
fixed regexp literals parsing with escaped backslash
6480
and backslash in square brackets.
6481
</para>
6482
</listitem>
6483
6484
<listitem>
6485
<para>
6486
Bugfix:
6487
fixed regexp literals with lone closing brackets.
6488
</para>
6489
</listitem>
6490
6491
<listitem>
6492
<para>
6493
Bugfix:
6494
fixed uninitialized-memory-access in
6495
<literal>Object.defineProperties()</literal>.
6496
</para>
6497
</listitem>
6498
6499
<listitem>
6500
<para>
6501
Bugfix:
6502
fixed processing the “*” quantifier for
6503
<literal>String.prototype.replace()</literal>.
6504
</para>
6505
</listitem>
6506
6507
<listitem>
6508
<para>
6509
Bugfix:
6510
fixed
6511
<literal>Array.prototype.slice()</literal>
6512
for UTF8-invalid byte strings.
6513
</para>
6514
</listitem>
6515
6516
<listitem>
6517
<para>
6518
Bugfix:
6519
fixed
6520
<literal>String.prototype.split()</literal>
6521
for UTF8-invalid byte strings.
6522
</para>
6523
</listitem>
6524
6525
<listitem>
6526
<para>
6527
Bugfix:
6528
fixed handling of empty block statements.
6529
</para>
6530
</listitem>
6531
6532
</list>
6533
</para>
6534
6535
</section>
6536
6537
6538
<section id="njs0.3.1" name="Changes with njs 0.3.1">
6539
6540
<para>
6541
Release Date:
6542
16 April 2019
6543
</para>
6544
6545
<para>
6546
Core:
6547
<list type="bullet">
6548
6549
<listitem>
6550
<para>
6551
Feature:
6552
added arrow functions support.
6553
Thanks to 洪志道 (Hong Zhi Dao) and Artem S. Povalyukhin.
6554
</para>
6555
</listitem>
6556
6557
<listitem>
6558
<para>
6559
Feature:
6560
added
6561
<literal>Object.getOwnPropertyNames()</literal>.
6562
Thanks to Artem S. Povalyukhin.
6563
</para>
6564
</listitem>
6565
6566
<listitem>
6567
<para>
6568
Feature:
6569
added
6570
<literal>Object.getOwnPropertyDescriptors()</literal>.
6571
Thanks to Artem S. Povalyukhin.
6572
</para>
6573
</listitem>
6574
6575
<listitem>
6576
<para>
6577
Feature:
6578
making <literal>__proto__</literal> accessor descriptor
6579
of <literal>Object</literal> instances mutable.
6580
</para>
6581
</listitem>
6582
6583
<listitem>
6584
<para>
6585
Feature:
6586
added shebang support in CLI.
6587
</para>
6588
</listitem>
6589
6590
<listitem>
6591
<para>
6592
Feature:
6593
added support for module mode execution in CLI.
6594
In module mode global, this is unavailable.
6595
</para>
6596
</listitem>
6597
6598
<listitem>
6599
<para>
6600
Bugfix:
6601
fixed editline detection.
6602
</para>
6603
</listitem>
6604
6605
<listitem>
6606
<para>
6607
Bugfix:
6608
fixed
6609
<literal>Function.prototype.bind()</literal>.
6610
Thanks to 洪志道 (Hong Zhi Dao).
6611
</para>
6612
</listitem>
6613
6614
<listitem>
6615
<para>
6616
Bugfix:
6617
fixed checking of duplication of parameters for functions.
6618
Thanks to 洪志道 (Hong Zhi Dao).
6619
</para>
6620
</listitem>
6621
6622
<listitem>
6623
<para>
6624
Bugfix:
6625
fixed function declaration with the same name as a variable.
6626
Thanks to 洪志道 (Hong Zhi Dao).
6627
</para>
6628
</listitem>
6629
6630
<listitem>
6631
<para>
6632
Improvement:
6633
code related to parsing of objects, variables and
6634
functions is refactored.
6635
Thanks to 洪志道 (Hong Zhi Dao).
6636
</para>
6637
</listitem>
6638
6639
<listitem>
6640
<para>
6641
Improvement:
6642
large-value output improved in <literal>console.log()</literal>.
6643
</para>
6644
</listitem>
6645
6646
<listitem>
6647
<para>
6648
Improvement:
6649
string output improved in <literal>console.log()</literal>
6650
in a compliant way (without escaping and quotes).
6651
</para>
6652
</listitem>
6653
6654
<listitem>
6655
<para>
6656
Improvement:
6657
using ES6 version of
6658
<literal>ToInt32()</literal>,
6659
<literal>ToUint32()</literal>,
6660
<literal>ToLength()</literal>.
6661
</para>
6662
</listitem>
6663
6664
</list>
6665
</para>
6666
6667
</section>
6668
6669
6670
<section id="njs0.3.0" name="Changes with njs 0.3.0">
6671
6672
<para>
6673
Release Date:
6674
26 March 2019
6675
</para>
6676
6677
<para>
6678
nginx modules:
6679
<list type="bullet">
6680
6681
<listitem>
6682
<para>
6683
Feature:
6684
added the <literal>js_path</literal> directive for
6685
<link doc="../http/ngx_http_js_module.xml" id="js_path">http</link> and
6686
<link doc="../stream/ngx_stream_js_module.xml" id="js_path">stream</link>.
6687
</para>
6688
</listitem>
6689
6690
<listitem>
6691
<para>
6692
Change:
6693
returning undefined value instead of empty strings
6694
for absent properties in the following objects:
6695
<link doc="reference.xml" id="r_args"><literal>r.args{}</literal></link>,
6696
<link doc="reference.xml" id="r_headers_in"><literal>r.headersIn{}</literal></link>,
6697
<link doc="reference.xml" id="r_headers_out"><literal>r.headersOut{}</literal></link>,
6698
<link doc="reference.xml" id="r_variables"><literal>r.variables{}</literal></link>,
6699
<link doc="reference.xml" id="s_variables"><literal>s.variables{}</literal></link>.
6700
</para>
6701
</listitem>
6702
6703
<listitem>
6704
<para>
6705
Change:
6706
returning undefined value instead of throwing an exception for
6707
<link doc="reference.xml" id="r_request_body"><literal>r.requestBody</literal></link>
6708
when request body is unavailable.
6709
</para>
6710
</listitem>
6711
6712
<listitem>
6713
<para>
6714
Bugfix:
6715
fixed crash while iterating over
6716
<link doc="reference.xml" id="r_args"><literal>r.args{}</literal></link>
6717
when a value is absent in a key-value pair.
6718
</para>
6719
</listitem>
6720
6721
</list>
6722
</para>
6723
6724
<para>
6725
Core:
6726
<list type="bullet">
6727
6728
<listitem>
6729
<para>
6730
Feature:
6731
added initial ES6 modules support.
6732
Default import and default export statements are supported.
6733
Thanks to 洪志道 (Hong Zhi Dao).
6734
</para>
6735
</listitem>
6736
6737
<listitem>
6738
<para>
6739
Feature:
6740
added
6741
<literal>Object.prototype.propertyIsEnumerable()</literal>.
6742
</para>
6743
</listitem>
6744
6745
<listitem>
6746
<para>
6747
Feature:
6748
reporting file name and function name in disassembler output.
6749
</para>
6750
</listitem>
6751
6752
<listitem>
6753
<para>
6754
Bugfix:
6755
fixed function redeclarations in interactive shell.
6756
Thanks to 洪志道 (Hong Zhi Dao).
6757
</para>
6758
</listitem>
6759
6760
<listitem>
6761
<para>
6762
Bugfix:
6763
fixed RegExp literals parsing.
6764
</para>
6765
</listitem>
6766
6767
<listitem>
6768
<para>
6769
Bugfix:
6770
fixed setting length of UTF8 string in
6771
<link doc="reference.xml" id="readfilesync"><literal>fs.readFileSync()</literal></link>.
6772
</para>
6773
</listitem>
6774
6775
<listitem>
6776
<para>
6777
Bugfix:
6778
fixed
6779
<literal>nxt_file_dirname()</literal> for paths with no dir component.
6780
</para>
6781
</listitem>
6782
6783
</list>
6784
</para>
6785
6786
</section>
6787
6788
6789
<section id="njs0.2.8" name="Changes with njs 0.2.8">
6790
6791
<para>
6792
Release Date:
6793
26 February 2019
6794
</para>
6795
6796
<para>
6797
nginx modules:
6798
<list type="bullet">
6799
6800
<listitem>
6801
<para>
6802
Change:
6803
properties of HTTP request deprecated in <link id="njs0.2.2">0.2.2</link>
6804
are removed.
6805
</para>
6806
</listitem>
6807
6808
<listitem>
6809
<para>
6810
Feature:
6811
added support for delete operation in
6812
<link doc="reference.xml" id="r_headers_out"><literal>r.headersOut{}</literal></link>.
6813
</para>
6814
</listitem>
6815
6816
<listitem>
6817
<para>
6818
Feature:
6819
added support for setting nginx variables.
6820
</para>
6821
</listitem>
6822
6823
<listitem>
6824
<para>
6825
Bugfix:
6826
fixed
6827
<link doc="reference.xml" id="r_subrequest"><literal>r.subrequest()</literal></link>
6828
for empty body value.
6829
</para>
6830
</listitem>
6831
6832
<listitem>
6833
<para>
6834
Improvement:
6835
setting special response headers in
6836
<link doc="reference.xml" id="r_headers_out"><literal>r.headersOut{}</literal></link>.
6837
</para>
6838
</listitem>
6839
6840
</list>
6841
</para>
6842
6843
<para>
6844
Core:
6845
<list type="bullet">
6846
6847
<listitem>
6848
<para>
6849
Feature:
6850
added labels support.
6851
</para>
6852
</listitem>
6853
6854
<listitem>
6855
<para>
6856
Feature:
6857
added
6858
<literal>setImmediate()</literal> method.
6859
</para>
6860
</listitem>
6861
6862
<listitem>
6863
<para>
6864
Feature:
6865
added support for shorthand property names for Object literals.
6866
</para>
6867
</listitem>
6868
6869
<listitem>
6870
<para>
6871
Bugfix:
6872
fixed
6873
<literal>Function.prototype.bind()</literal>.
6874
</para>
6875
</listitem>
6876
6877
<listitem>
6878
<para>
6879
Bugfix:
6880
fixed parsing of string literals containing newline characters.
6881
</para>
6882
</listitem>
6883
6884
<listitem>
6885
<para>
6886
Bugfix:
6887
fixed line number in reporting variable reference errors.
6888
</para>
6889
</listitem>
6890
6891
<listitem>
6892
<para>
6893
Bugfix:
6894
fixed creation of long UTF8 strings.
6895
</para>
6896
</listitem>
6897
6898
<listitem>
6899
<para>
6900
Bugfix:
6901
fixed
6902
setting special response headers in
6903
<literal>String.prototype.split()</literal>
6904
for Unicode strings.
6905
</para>
6906
</listitem>
6907
6908
<listitem>
6909
<para>
6910
Bugfix:
6911
fixed heap-buffer-overflow in
6912
<literal>String.prototype.split()</literal>.
6913
</para>
6914
</listitem>
6915
6916
<listitem>
6917
<para>
6918
Bugfix:
6919
fixed
6920
<literal>Array.prototype.fill()</literal>.
6921
Thanks to Artem S. Povalyukhin.
6922
</para>
6923
</listitem>
6924
6925
<listitem>
6926
<para>
6927
Improvement:
6928
code related to function invocation is refactored.
6929
Thanks to 洪志道 (Hong Zhi Dao).
6930
</para>
6931
</listitem>
6932
6933
<listitem>
6934
<para>
6935
Improvement:
6936
code related to variables is refactored.
6937
Thanks to 洪志道 (Hong Zhi Dao).
6938
</para>
6939
</listitem>
6940
6941
<listitem>
6942
<para>
6943
Improvement: parser is refactored.
6944
Thanks to 洪志道 (Hong Zhi Dao).
6945
</para>
6946
</listitem>
6947
6948
<listitem>
6949
<para>
6950
Improvement:
6951
reporting filenames in exceptions.
6952
</para>
6953
</listitem>
6954
6955
</list>
6956
</para>
6957
6958
</section>
6959
6960
6961
<section id="njs0.2.7" name="Changes with njs 0.2.7">
6962
6963
<para>
6964
Release Date:
6965
25 December 2018
6966
</para>
6967
6968
<para>
6969
Core:
6970
<list type="bullet">
6971
6972
<listitem>
6973
<para>
6974
Feature:
6975
rest parameters syntax (destructuring is not supported).
6976
Thanks to Alexander Pyshchev.
6977
</para>
6978
</listitem>
6979
6980
<listitem>
6981
<para>
6982
Feature:
6983
added
6984
<literal>Object.entries()</literal>
6985
method.
6986
</para>
6987
</listitem>
6988
6989
<listitem>
6990
<para>
6991
Feature:
6992
added
6993
<literal>Object.values()</literal>
6994
method.
6995
</para>
6996
</listitem>
6997
6998
<listitem>
6999
<para>
7000
Improvement:
7001
code generator refactored and simplified.
7002
</para>
7003
</listitem>
7004
7005
<listitem>
7006
<para>
7007
Bugfix:
7008
fixed automatic semicolon insertion.
7009
</para>
7010
</listitem>
7011
7012
<listitem>
7013
<para>
7014
Bugfix:
7015
fixed assignment expression from compound assignment.
7016
</para>
7017
</listitem>
7018
7019
<listitem>
7020
<para>
7021
Bugfix:
7022
fixed comparison of Byte and UTF8 strings.
7023
</para>
7024
</listitem>
7025
7026
<listitem>
7027
<para>
7028
Bugfix:
7029
fixed type of iteration variable in <literal>for-in</literal> with array values.
7030
</para>
7031
</listitem>
7032
7033
<listitem>
7034
<para>
7035
Bugfix:
7036
fixed building on platforms without librt.
7037
</para>
7038
</listitem>
7039
7040
<listitem>
7041
<para>
7042
Bugfix:
7043
miscellaneous bugs have been fixed.
7044
</para>
7045
</listitem>
7046
7047
</list>
7048
</para>
7049
7050
</section>
7051
7052
7053
<section id="njs0.2.6" name="Changes with njs 0.2.6">
7054
7055
<para>
7056
Release Date:
7057
27 November 2018
7058
</para>
7059
7060
<para>
7061
Core:
7062
<list type="bullet">
7063
7064
<listitem>
7065
<para>
7066
Feature:
7067
making built-in prototypes mutable.
7068
</para>
7069
</listitem>
7070
7071
<listitem>
7072
<para>
7073
Feature:
7074
making global object mutable.
7075
</para>
7076
</listitem>
7077
7078
<listitem>
7079
<para>
7080
Feature:
7081
<link doc="reference.xml" id="console_time"><literal>console.time()</literal></link>
7082
and
7083
<link doc="reference.xml" id="console_time_end"><literal>console.timeEnd()</literal></link>
7084
methods.
7085
</para>
7086
</listitem>
7087
7088
<listitem>
7089
<para>
7090
Feature:
7091
allowing variables and functions to be redeclared.
7092
</para>
7093
</listitem>
7094
7095
<listitem>
7096
<para>
7097
Feature:
7098
extending <literal>Object.defineProperty()</literal> spec conformance.
7099
</para>
7100
</listitem>
7101
7102
<listitem>
7103
<para>
7104
Feature:
7105
introduced quiet mode for CLI to handle simple expressions from stdin.
7106
</para>
7107
</listitem>
7108
7109
<listitem>
7110
<para>
7111
Feature:
7112
introduced compact form of backtraces to handle stack overflows.
7113
</para>
7114
</listitem>
7115
7116
<listitem>
7117
<para>
7118
Improvement:
7119
improved wording for various exceptions.
7120
</para>
7121
</listitem>
7122
7123
<listitem>
7124
<para>
7125
Bugfix:
7126
fixed closure values handling.
7127
</para>
7128
</listitem>
7129
7130
<listitem>
7131
<para>
7132
Bugfix:
7133
fixed equality operator for various value types.
7134
</para>
7135
</listitem>
7136
7137
<listitem>
7138
<para>
7139
Bugfix:
7140
fixed handling of <literal>this</literal> keyword in various scopes.
7141
</para>
7142
</listitem>
7143
7144
<listitem>
7145
<para>
7146
Bugfix:
7147
fixed handling non-object values in
7148
<literal>Object.keys()</literal>.
7149
</para>
7150
</listitem>
7151
7152
<listitem>
7153
<para>
7154
Bugfix:
7155
fixed parsing of throw statement inside
7156
<literal>if</literal> statement.
7157
</para>
7158
</listitem>
7159
7160
<listitem>
7161
<para>
7162
Bugfix:
7163
fixed parsing of newline after throw statement.
7164
</para>
7165
</listitem>
7166
7167
<listitem>
7168
<para>
7169
Bugfix:
7170
fixed parsing of statements in if statement without newline.
7171
</para>
7172
</listitem>
7173
7174
<listitem>
7175
<para>
7176
Bugfix:
7177
fixed size <literal>uint32_t</literal> overflow
7178
in <literal>njs_array_expand()</literal>.
7179
</para>
7180
</listitem>
7181
7182
<listitem>
7183
<para>
7184
Bugfix:
7185
fixed <literal>typeof</literal> operator
7186
for <literal>object_value</literal> type.
7187
</para>
7188
</listitem>
7189
7190
<listitem>
7191
<para>
7192
Bugfix:
7193
miscellaneous bugs have been fixed.
7194
</para>
7195
</listitem>
7196
7197
</list>
7198
</para>
7199
7200
</section>
7201
7202
7203
<section id="njs0.2.5" name="Changes with njs 0.2.5">
7204
7205
<para>
7206
Release Date:
7207
30 October 2018
7208
</para>
7209
7210
<para>
7211
nginx modules:
7212
<list type="bullet">
7213
7214
<listitem>
7215
<para>
7216
Bugfix:
7217
fixed counting pending events in stream module.
7218
</para>
7219
</listitem>
7220
7221
<listitem>
7222
<para>
7223
Bugfix:
7224
fixed
7225
<literal>s.off()</literal> in stream module.
7226
</para>
7227
</listitem>
7228
7229
<listitem>
7230
<para>
7231
Bugfix:
7232
fixed processing of data chunks in
7233
<literal>js_filter</literal> in stream module.
7234
</para>
7235
</listitem>
7236
7237
<listitem>
7238
<para>
7239
Bugfix:
7240
fixed http
7241
<literal>status</literal> and
7242
<literal>contentType</literal>
7243
getter in http module.
7244
</para>
7245
</listitem>
7246
7247
<listitem>
7248
<para>
7249
Bugfix:
7250
fixed http response and parent getters in http module.
7251
</para>
7252
</listitem>
7253
7254
</list>
7255
</para>
7256
7257
<para>
7258
Core:
7259
<list type="bullet">
7260
7261
<listitem>
7262
<para>
7263
Feature:
7264
arguments object support.
7265
</para>
7266
</listitem>
7267
7268
<listitem>
7269
<para>
7270
Feature:
7271
non-integer fractions support.
7272
</para>
7273
</listitem>
7274
7275
<listitem>
7276
<para>
7277
Improvement:
7278
handling non-array values in
7279
<literal>Array.prototype.slice()</literal>.
7280
</para>
7281
</listitem>
7282
7283
<listitem>
7284
<para>
7285
Bugfix:
7286
fixed
7287
<literal>Array.prototype.length</literal> setter
7288
</para>
7289
</listitem>
7290
7291
<listitem>
7292
<para>
7293
Bugfix:
7294
fixed
7295
<literal>njs_array_alloc()</literal> for length > 2**31.
7296
</para>
7297
</listitem>
7298
7299
<listitem>
7300
<para>
7301
Bugfix:
7302
handling int overflow in
7303
<literal>njs_array_alloc()</literal> on 32bit archs.
7304
</para>
7305
</listitem>
7306
7307
<listitem>
7308
<para>
7309
Bugfix:
7310
fixed code size mismatch error message.
7311
</para>
7312
</listitem>
7313
7314
<listitem>
7315
<para>
7316
Bugfix:
7317
fixed delete operator in a loop.
7318
</para>
7319
</listitem>
7320
7321
<listitem>
7322
<para>
7323
Bugfix:
7324
fixed
7325
<literal>Object.getOwnPropertyDescriptor()</literal>
7326
for complex object (inherited from
7327
<literal>Array</literal> and
7328
<literal>string</literal> values).
7329
</para>
7330
</listitem>
7331
7332
<listitem>
7333
<para>
7334
Bugfix:
7335
fixed
7336
<literal>Object.prototype.hasOwnProperty()</literal>
7337
for non-object properties
7338
</para>
7339
</listitem>
7340
7341
<listitem>
7342
<para>
7343
Bugfix:
7344
miscellaneous bugs have been fixed.
7345
</para>
7346
</listitem>
7347
7348
</list>
7349
</para>
7350
7351
</section>
7352
7353
7354
<section id="njs0.2.4" name="Changes with njs 0.2.4">
7355
7356
<para>
7357
Release Date:
7358
18 September 2018
7359
</para>
7360
7361
<para>
7362
nginx modules:
7363
<list type="bullet">
7364
7365
<listitem>
7366
<para>
7367
Change:
7368
stream module handlers refactored.
7369
</para>
7370
7371
<para>
7372
New methods and properties:
7373
<link doc="reference.xml" id="s_on"><literal>s.on()</literal></link>,
7374
<link doc="reference.xml" id="s_off"><literal>s.off()</literal></link>,
7375
<link doc="reference.xml" id="s_allow"><literal>s.allow()</literal></link>,
7376
<link doc="reference.xml" id="s_done"><literal>s.done()</literal></link>,
7377
<link doc="reference.xml" id="s_decline"><literal>s.decline()</literal></link>,
7378
<link doc="reference.xml" id="s_deny"><literal>s.deny()</literal></link>.
7379
</para>
7380
7381
<para>
7382
Removed properties of the
7383
<link doc="reference.xml" id="stream">Stream</link> object:
7384
<literal>s.OK</literal>,
7385
<literal>s.ABORT</literal>,
7386
<literal>s.AGAIN</literal>,
7387
<literal>s.DECLINED</literal>,
7388
<literal>s.ERROR</literal>
7389
(replaced with
7390
<link doc="reference.xml" id="s_allow"><literal>s.allow()</literal></link>,
7391
<link doc="reference.xml" id="s_done"><literal>s.done()</literal></link>,
7392
<link doc="reference.xml" id="s_deny"><literal>s.deny()</literal></link>).
7393
</para>
7394
7395
<para>
7396
<literal>s.buffer</literal>
7397
(for reading replaced with data argument of
7398
the corresponding callback, for writing use
7399
<link doc="reference.xml" id="s_send"><literal>s.send()</literal></link>).
7400
</para>
7401
7402
<para>
7403
<literal>s.fromUpstream</literal>
7404
(replaced with a callback for a corresponding event).
7405
</para>
7406
7407
<para>
7408
<literal>s.eof</literal>
7409
(replaced with <literal></literal>
7410
<link doc="reference.xml" id="s_on_callback_last"><literal>flags.last</literal></link>).
7411
</para>
7412
7413
</listitem>
7414
7415
</list>
7416
</para>
7417
7418
<para>
7419
Core:
7420
<list type="bullet">
7421
7422
<listitem>
7423
<para>
7424
Feature:
7425
added
7426
<literal>Function.prototype.length</literal>.
7427
</para>
7428
</listitem>
7429
7430
<listitem>
7431
<para>
7432
Feature:
7433
introduced sandboxing mode.
7434
</para>
7435
</listitem>
7436
7437
<listitem>
7438
<para>
7439
Improvement:
7440
added exception strings where appropriate.
7441
</para>
7442
</listitem>
7443
7444
<listitem>
7445
<para>
7446
Improvement:
7447
improved wording for primitive type conversion exception.
7448
</para>
7449
</listitem>
7450
7451
<listitem>
7452
<para>
7453
Bugfix:
7454
throwing <literal>TypeError</literal>
7455
for attempts to change frozen properties.
7456
</para>
7457
</listitem>
7458
7459
<listitem>
7460
<para>
7461
Bugfix:
7462
fixed
7463
<literal>Object.defineProperty()</literal> for existing properties.
7464
</para>
7465
</listitem>
7466
7467
<listitem>
7468
<para>
7469
Bugfix:
7470
respecting the enumerable attribute while iterating by for in.
7471
</para>
7472
</listitem>
7473
7474
<listitem>
7475
<para>
7476
Bugfix:
7477
respecting writable attribute for property handlers.
7478
</para>
7479
</listitem>
7480
7481
<listitem>
7482
<para>
7483
Bugfix:
7484
fixed exception handling in arguments of a function.
7485
</para>
7486
</listitem>
7487
7488
<listitem>
7489
<para>
7490
Bugfix:
7491
fixed
7492
<literal>Object.prototype.toString</literal>
7493
for different value types.
7494
</para>
7495
</listitem>
7496
7497
<listitem>
7498
<para>
7499
Bugfix:
7500
fixed
7501
<literal>Object()</literal>
7502
constructor for object types arguments.
7503
</para>
7504
</listitem>
7505
7506
<listitem>
7507
<para>
7508
Bugfix:
7509
fixed comparison of objects and strings.
7510
</para>
7511
</listitem>
7512
7513
<listitem>
7514
<para>
7515
Bugfix:
7516
fixed
7517
<literal>String.slice()</literal>
7518
for undefined arguments.
7519
</para>
7520
</listitem>
7521
7522
<listitem>
7523
<para>
7524
Bugfix:
7525
miscellaneous bugs have been fixed.
7526
</para>
7527
</listitem>
7528
7529
</list>
7530
</para>
7531
7532
</section>
7533
7534
7535
<section id="njs0.2.3" name="Changes with njs 0.2.3">
7536
7537
<para>
7538
Release Date:
7539
31 July 2018
7540
</para>
7541
7542
<para>
7543
nginx modules:
7544
<list type="bullet">
7545
7546
<listitem>
7547
<para>
7548
Bugfix:
7549
making a subrequest from a
7550
<literal>Reply</literal>
7551
object caused a segmentation fault.
7552
</para>
7553
</listitem>
7554
7555
<listitem>
7556
<para>
7557
Bugfix:
7558
getting the parent property of the main
7559
<link doc="reference.xml" id="http">HTTP Request</link>
7560
object caused a segmentation fault.
7561
</para>
7562
</listitem>
7563
7564
</list>
7565
</para>
7566
7567
<para>
7568
Core:
7569
<list type="bullet">
7570
7571
<listitem>
7572
<para>
7573
Feature:
7574
added the pretty string representation for values.
7575
</para>
7576
</listitem>
7577
7578
<listitem>
7579
<para>
7580
Feature:
7581
correctly printing floating point numbers.
7582
</para>
7583
</listitem>
7584
7585
<listitem>
7586
<para>
7587
Feature:
7588
correctly parsing floating point numbers.
7589
</para>
7590
</listitem>
7591
7592
<listitem>
7593
<para>
7594
Feature:
7595
<link doc="reference.xml" id="string_bytesfrom"><literal>String.bytesFrom()</literal></link> method
7596
(decoding <literal>hex</literal>,
7597
<literal>base64</literal>,
7598
<literal>base64url</literal> into a byte string).
7599
</para>
7600
</listitem>
7601
7602
<listitem>
7603
<para>
7604
Feature:
7605
<literal>String.padStart()</literal> and
7606
<literal>String.padEnd()</literal>
7607
methods.
7608
</para>
7609
</listitem>
7610
7611
<listitem>
7612
<para>
7613
Feature:
7614
added support of binary literals.
7615
</para>
7616
</listitem>
7617
7618
<listitem>
7619
<para>
7620
Improvement:
7621
added information about illegal token in number parsing.
7622
</para>
7623
</listitem>
7624
7625
<listitem>
7626
<para>
7627
Improvement:
7628
allowed uppercased <literal>O</literal> in octal literal values.
7629
</para>
7630
</listitem>
7631
7632
<listitem>
7633
<para>
7634
Improvement:
7635
added support for multiple arguments in <literal>console.log()</literal>.
7636
</para>
7637
</listitem>
7638
7639
<listitem>
7640
<para>
7641
Bugfix:
7642
fixed applying <literal>call()</literal> to methods of external values.
7643
</para>
7644
</listitem>
7645
7646
<listitem>
7647
<para>
7648
Bugfix:
7649
fixed addition operator applied to an object.
7650
</para>
7651
</listitem>
7652
7653
<listitem>
7654
<para>
7655
Bugfix:
7656
fixed exception handling in
7657
<literal>njs_vm_value_to_ext_string()</literal>.
7658
</para>
7659
</listitem>
7660
7661
<listitem>
7662
<para>
7663
Bugfix:
7664
fixed
7665
<literal>Number()</literal> with boolean, null and undefined arguments.
7666
</para>
7667
</listitem>
7668
7669
<listitem>
7670
<para>
7671
Bugfix:
7672
fixed error handling of setting non-numeric <literal>Array.length</literal>.
7673
</para>
7674
</listitem>
7675
7676
<listitem>
7677
<para>
7678
Bugfix:
7679
fixed autocompletion for global objects.
7680
</para>
7681
</listitem>
7682
7683
<listitem>
7684
<para>
7685
Bugfix:
7686
miscellaneous bugs have been fixed.
7687
</para>
7688
</listitem>
7689
7690
</list>
7691
</para>
7692
7693
</section>
7694
7695
7696
<section id="njs0.2.2" name="Changes with njs 0.2.2">
7697
7698
<para>
7699
Release Date:
7700
19 June 2018
7701
</para>
7702
7703
<para>
7704
nginx modules:
7705
<list type="bullet">
7706
7707
<listitem>
7708
<para>
7709
Change:
7710
merged HTTP <literal>Response</literal> and <literal>Reply</literal>
7711
into <link doc="reference.xml" id="http">HTTP Request</link>.
7712
New members of <literal>Request</literal>:
7713
7714
<list type="bullet">
7715
7716
<listitem>
7717
<para>
7718
<literal>req.status</literal> (<literal>res.status</literal>)
7719
</para>
7720
</listitem>
7721
7722
<listitem>
7723
<para>
7724
<literal>req.parent</literal> (<literal>reply.parent</literal>)
7725
</para>
7726
</listitem>
7727
7728
<listitem>
7729
<para>
7730
<literal>req.requestBody</literal> (<literal>req.body</literal>)
7731
</para>
7732
</listitem>
7733
7734
<listitem>
7735
<para>
7736
<literal>req.responseBody</literal> (<literal>reply.body</literal>)
7737
</para>
7738
</listitem>
7739
7740
<listitem>
7741
<para>
7742
<literal>req.headersIn</literal> (<literal>req.headers</literal>)
7743
</para>
7744
</listitem>
7745
7746
<listitem>
7747
<para>
7748
<literal>req.headersOut</literal> (<literal>res.headers</literal>)
7749
</para>
7750
</listitem>
7751
7752
<listitem>
7753
<para>
7754
<literal>req.sendHeader()</literal> (<literal>res.sendHeader()</literal>)
7755
</para>
7756
</listitem>
7757
7758
<listitem>
7759
<para>
7760
<literal>req.send()</literal> (<literal>res.send()</literal>)
7761
</para>
7762
</listitem>
7763
7764
<listitem>
7765
<para>
7766
<literal>req.finish()</literal> (<literal>res.finish()</literal>)
7767
</para>
7768
</listitem>
7769
7770
<listitem>
7771
<para>
7772
<literal>req.return()</literal> (<literal>res.return()</literal>)
7773
</para>
7774
</listitem>
7775
7776
</list>
7777
Deprecated members of <literal>Request</literal>:
7778
7779
<list type="bullet">
7780
7781
<listitem>
7782
<para>
7783
<literal>req.body</literal> (use <literal>req.requestBody</literal>
7784
or <literal>req.responseBody</literal>)
7785
</para>
7786
</listitem>
7787
7788
<listitem>
7789
<para>
7790
<literal>req.headers</literal> (use <literal>req.headersIn</literal>
7791
or <literal>req.headersOut</literal>)
7792
</para>
7793
</listitem>
7794
7795
<listitem>
7796
<para>
7797
<literal>req.response</literal>
7798
</para>
7799
</listitem>
7800
7801
</list>
7802
Deprecated members of <literal>Response</literal>:
7803
7804
<list type="bullet">
7805
7806
<listitem>
7807
<para>
7808
<literal>res.contentLength</literal> (use
7809
<link doc="reference.xml" id="r_headers_out"><literal>req.headersOut</literal></link><literal>['Content-Length']</literal>)
7810
</para>
7811
</listitem>
7812
7813
<listitem>
7814
<para>
7815
<literal>res.contentType</literal> (use <link doc="reference.xml" id="r_headers_out"><literal>req.headersOut</literal></link><literal>['Content-Type']</literal>)
7816
</para>
7817
</listitem>
7818
7819
</list>
7820
The deprecated properties will be removed in
7821
<link id="njs0.2.8">next</link> releases.
7822
</para>
7823
</listitem>
7824
7825
<listitem>
7826
<para>
7827
Feature:
7828
HTTP <link doc="reference.xml" id="r_internal_redirect">internalRedirect()</link>
7829
method.
7830
</para>
7831
</listitem>
7832
7833
</list>
7834
</para>
7835
7836
<para>
7837
Core:
7838
<list type="bullet">
7839
7840
<listitem>
7841
<para>
7842
Bugfix:
7843
fixed heap-buffer-overflow in
7844
<literal>crypto.createHmac()</literal>.
7845
</para>
7846
</listitem>
7847
7848
</list>
7849
</para>
7850
7851
</section>
7852
7853
7854
<section id="njs0.2.1" name="Changes with njs 0.2.1">
7855
7856
<para>
7857
Release Date:
7858
31 May 2018
7859
</para>
7860
7861
<para>
7862
nginx modules:
7863
<list type="bullet">
7864
7865
<listitem>
7866
<para>
7867
Feature:
7868
HTTP request body getter.
7869
</para>
7870
</listitem>
7871
7872
<listitem>
7873
<para>
7874
Improvement:
7875
moved njs vm to the <literal>main</literal> configuration.
7876
</para>
7877
</listitem>
7878
7879
<listitem>
7880
<para>
7881
Improvement:
7882
improved logging for
7883
<link doc="../http/ngx_http_js_module.xml" id="js_set"/> and
7884
<link doc="../http/ngx_http_js_module.xml" id="js_content"/> directives.
7885
</para>
7886
</listitem>
7887
7888
<listitem>
7889
<para>
7890
Improvement:
7891
setting status code to 500 by default in the
7892
<link doc="../http/ngx_http_js_module.xml" id="js_content"/> handler
7893
</para>
7894
</listitem>
7895
7896
<listitem>
7897
<para>
7898
Improvement:
7899
added the debug for the returned status code in
7900
<link doc="../http/ngx_http_js_module.xml" id="js_content"/> handler
7901
</para>
7902
</listitem>
7903
7904
<listitem>
7905
<para>
7906
Bugfix: fixed error logging in
7907
<link doc="../http/ngx_http_js_module.xml" id="js_include"/>.
7908
</para>
7909
</listitem>
7910
7911
</list>
7912
</para>
7913
7914
<para>
7915
Core:
7916
<list type="bullet">
7917
7918
<listitem>
7919
<para>
7920
Feature:
7921
added array length setter.
7922
</para>
7923
</listitem>
7924
7925
<listitem>
7926
<para>
7927
Improvement:
7928
public header <literal>cleanup. njscript.h</literal> is renamed to
7929
<literal>njs.h</literal>.
7930
</para>
7931
</listitem>
7932
7933
<listitem>
7934
<para>
7935
Bugfix:
7936
fixed crypto <literal>update()</literal> method after
7937
<literal>digest()</literal> is called.
7938
</para>
7939
</listitem>
7940
7941
<listitem>
7942
<para>
7943
Bugfix:
7944
fixed <literal>crypto.createHmac()</literal> for keys with size &lt;= alg size
7945
and &gt; 64.
7946
</para>
7947
</listitem>
7948
7949
<listitem>
7950
<para>
7951
Bugfix:
7952
fixed <literal>JSON.stringify()</literal> for arrays with empty cells.
7953
</para>
7954
</listitem>
7955
7956
<listitem>
7957
<para>
7958
Bugfix:
7959
fixed exception type for unsupported types in
7960
<literal>JSON.stringify()</literal>.
7961
</para>
7962
</listitem>
7963
7964
<listitem>
7965
<para>
7966
Bugfix:
7967
fixed handling of undefined arguments of functions.
7968
</para>
7969
</listitem>
7970
7971
<listitem>
7972
<para>
7973
Bugfix:
7974
fixed handling of missing <literal>arg</literal> of
7975
<literal>Object.getOwnPropertyDescriptor()</literal>.
7976
</para>
7977
</listitem>
7978
7979
<listitem>
7980
<para>
7981
Bugfix:
7982
fixed handling of properties in
7983
<literal>Object.getOwnPropertyDescriptor()</literal>.
7984
</para>
7985
</listitem>
7986
7987
<listitem>
7988
<para>
7989
Bugfix:
7990
fixed the writeable flag of <literal>Array.length</literal> property.
7991
</para>
7992
</listitem>
7993
7994
<listitem>
7995
<para>
7996
Bugfix: fixed return value type of <literal>clearTimeout()</literal>.
7997
</para>
7998
</listitem>
7999
8000
<listitem>
8001
<para>
8002
Bugfix:
8003
fixed <literal>njs_vm_external_bind()</literal>.
8004
</para>
8005
</listitem>
8006
8007
<listitem>
8008
<para>
8009
Bugfix:
8010
miscellaneous bugs have been fixed.
8011
</para>
8012
</listitem>
8013
8014
</list>
8015
</para>
8016
8017
</section>
8018
8019
8020
<section id="njs0.2.0" name="Changes with njs 0.2.0">
8021
8022
<para>
8023
Release Date:
8024
03 April 2018
8025
</para>
8026
8027
<para>
8028
<list type="bullet">
8029
8030
<listitem>
8031
<para>
8032
Feature:
8033
reporting njs version by CLI.
8034
</para>
8035
</listitem>
8036
8037
<listitem>
8038
<para>
8039
Feature:
8040
textual description for type converting exceptions.
8041
</para>
8042
</listitem>
8043
8044
<listitem>
8045
Feature:
8046
<literal>setTimeout()</literal> and
8047
<literal>clearTimeout()</literal> methods.
8048
</listitem>
8049
8050
<listitem>
8051
<para>
8052
Feature:
8053
Byte string to
8054
<literal>hex</literal>,
8055
<literal>base64</literal>,
8056
<literal>base64url</literal> encodings.
8057
</para>
8058
</listitem>
8059
8060
<listitem>
8061
<para>
8062
Feature:
8063
<link url="https://nodejs.org/api/crypto.html#crypto_class_hash">Node.js style</link>
8064
<literal>Crypto</literal> methods.
8065
</para>
8066
</listitem>
8067
8068
<listitem>
8069
<para>
8070
Feature:
8071
HTTP and stream
8072
<literal>warn()</literal> and
8073
<literal>error()</literal> methods.
8074
</para>
8075
</listitem>
8076
8077
<listitem>
8078
<para>
8079
Feature:
8080
HTTP <literal>subrequest()</literal> method.
8081
</para>
8082
</listitem>
8083
8084
<listitem>
8085
<para>
8086
Feature:
8087
HTTP <literal>return()</literal> method.
8088
</para>
8089
</listitem>
8090
8091
<listitem>
8092
<para>
8093
Bugfix:
8094
miscellaneous bugs have been fixed in the core and
8095
interactive shell.
8096
</para>
8097
</listitem>
8098
8099
</list>
8100
</para>
8101
8102
</section>
8103
8104
<section id="njs0.1.15" name="Changes with njs 0.1.15">
8105
8106
<para>
8107
Release Date:
8108
20 November 2017
8109
</para>
8110
8111
<para>
8112
<list type="bullet">
8113
8114
<listitem>
8115
<para>
8116
Feature:
8117
<literal>Error</literal>,
8118
<literal>EvalError</literal>,
8119
<literal>InternalError</literal>,
8120
<literal>RangeError</literal>,
8121
<literal>ReferenceError</literal>,
8122
<literal>SyntaxError</literal>,
8123
<literal>TypeError</literal>,
8124
<literal>URIError</literal> objects.
8125
</para>
8126
</listitem>
8127
8128
<listitem>
8129
<para>
8130
Feature:
8131
octal literals support.
8132
</para>
8133
</listitem>
8134
8135
<listitem>
8136
<para>
8137
Feature:
8138
<link url="https://nodejs.org/api/fs.html#fs_file_system">Node.js style</link>
8139
<literal>File system</literal> access methods:
8140
<literal>fs.readFile()</literal>,
8141
<literal>fs.readFileSync()</literal>,
8142
<literal>fs.appendFile()</literal>,
8143
<literal>fs.appendFileSync()</literal>,
8144
<literal>fs.writeFile()</literal>,
8145
<literal>fs.writeFileSync()</literal>.
8146
</para>
8147
</listitem>
8148
8149
<listitem>
8150
<para>
8151
Feature:
8152
nginx modules print backtrace on exception.
8153
</para>
8154
</listitem>
8155
8156
<listitem>
8157
<para>
8158
Bugfix:
8159
miscellaneous bugs have been fixed.
8160
</para>
8161
</listitem>
8162
8163
</list>
8164
</para>
8165
8166
</section>
8167
8168
8169
<section id="njs0.1.14" name="Changes with njs 0.1.14">
8170
8171
<para>
8172
Release Date:
8173
09 October 2017
8174
</para>
8175
8176
<para>
8177
<list type="bullet">
8178
8179
<listitem>
8180
<para>
8181
Feature:
8182
JSON object.
8183
</para>
8184
</listitem>
8185
8186
<listitem>
8187
<para>
8188
Feature:
8189
object level completions in interactive shell.
8190
</para>
8191
</listitem>
8192
8193
<listitem>
8194
<para>
8195
Feature:
8196
various configure improvements.
8197
</para>
8198
</listitem>
8199
8200
<listitem>
8201
<para>
8202
Bugfix:
8203
miscellaneous bugs have been fixed in the core and
8204
interactive shell.
8205
</para>
8206
</listitem>
8207
8208
</list>
8209
</para>
8210
8211
</section>
8212
8213
8214
<section id="njs0.1.13" name="Changes with njs 0.1.13">
8215
8216
<para>
8217
Release Date:
8218
31 August 2017
8219
</para>
8220
8221
<para>
8222
<list type="bullet">
8223
8224
<listitem>
8225
<para>
8226
Feature:
8227
<literal>console.log()</literal> and
8228
<literal>console.help()</literal>
8229
methods in interactive shell.
8230
</para>
8231
</listitem>
8232
8233
<listitem>
8234
<para>
8235
Feature:
8236
interactive shell prints backtrace on exception.
8237
</para>
8238
</listitem>
8239
8240
<listitem>
8241
<para>
8242
Feature:
8243
interactive shell by default
8244
if <literal>libedit</literal> is available.
8245
</para>
8246
</listitem>
8247
8248
<listitem>
8249
<para>
8250
Bugfix:
8251
processing of large files from
8252
<literal>stdin</literal> in command line mode.
8253
</para>
8254
</listitem>
8255
8256
<listitem>
8257
<para>
8258
Bugfix:
8259
improved <literal>editline</literal> detection.
8260
</para>
8261
</listitem>
8262
8263
</list>
8264
</para>
8265
8266
</section>
8267
8268
8269
<section id="njs0.1.12" name="Changes with njs 0.1.12">
8270
8271
<para>
8272
Release Date:
8273
08 August 2017
8274
</para>
8275
8276
<para>
8277
<list type="bullet">
8278
8279
<listitem>
8280
<para>
8281
Feature:
8282
Interactive shell.
8283
</para>
8284
</listitem>
8285
8286
<listitem>
8287
<para>
8288
Bugfix:
8289
in <literal>Object.isSealed()</literal>.
8290
</para>
8291
</listitem>
8292
8293
</list>
8294
</para>
8295
8296
</section>
8297
8298
8299
<section id="njs0.1.11" name="Changes with njs 0.1.11">
8300
8301
<para>
8302
Release Date:
8303
27 June 2017
8304
</para>
8305
8306
<para>
8307
<list type="bullet">
8308
8309
<listitem>
8310
<para>
8311
Feature:
8312
<literal>Object.keys()</literal>,
8313
<literal>Object.prototype.hasOwnProperty()</literal>
8314
methods.
8315
</para>
8316
</listitem>
8317
8318
<listitem>
8319
<para>
8320
Feature:
8321
<literal>Object.defineProperty()</literal>,
8322
<literal>Object.defineProperties()</literal>,
8323
<literal>Object.getOwnPropertyDescriptor()</literal>
8324
methods.
8325
</para>
8326
</listitem>
8327
8328
<listitem>
8329
<para>
8330
Feature:
8331
<literal>Object.getPrototypeOf()</literal>,
8332
<literal>Object.prototype.isPrototypeOf()</literal>
8333
methods.
8334
</para>
8335
</listitem>
8336
8337
<listitem>
8338
<para>
8339
Feature:
8340
<literal>Object.preventExtensions()</literal>,
8341
<literal>Object.isExtensible()</literal>,
8342
<literal>Object.freeze()</literal>,
8343
<literal>Object.isFrozen()</literal>,
8344
<literal>Object.seal()</literal>,
8345
<literal>Object.isSealed()</literal>
8346
methods.
8347
</para>
8348
</listitem>
8349
8350
<listitem>
8351
<para>
8352
Feature:
8353
scientific notation (<literal>3.35e10</literal>) literals support.
8354
</para>
8355
</listitem>
8356
8357
<listitem>
8358
<para>
8359
Feature:
8360
hexadecimal (<literal>0x1123</literal>) literals support.
8361
</para>
8362
</listitem>
8363
8364
<listitem>
8365
<para>
8366
Bugfix:
8367
processing of large array indexes.
8368
</para>
8369
</listitem>
8370
8371
<listitem>
8372
<para>
8373
Bugfix:
8374
in <literal>parseInt()</literal> and
8375
<literal>Date.parse()</literal>.
8376
</para>
8377
</listitem>
8378
8379
</list>
8380
</para>
8381
8382
</section>
8383
8384
8385
<section id="njs0.1.10" name="Changes with njs 0.1.10">
8386
8387
<para>
8388
Release Date:
8389
04 April 2017
8390
</para>
8391
8392
<para>
8393
<list type="bullet">
8394
8395
<listitem>
8396
<para>
8397
Feature:
8398
nested functions and function closures.
8399
</para>
8400
</listitem>
8401
8402
<listitem>
8403
<para>
8404
Feature:
8405
<literal>Array.of()</literal>,
8406
<literal>Array.prototype.fill()</literal>,
8407
<literal>Array.prototype.find()</literal>,
8408
<literal>Array.prototype.findIndex()</literal>
8409
methods.
8410
</para>
8411
</listitem>
8412
8413
<listitem>
8414
<para>
8415
Bugfix:
8416
miscellaneous bugs and segmentation faults have been fixed.
8417
</para>
8418
</listitem>
8419
8420
</list>
8421
</para>
8422
8423
</section>
8424
8425
8426
<section id="njs0.1.9" name="Changes with njs 0.1.9">
8427
8428
<para>
8429
Release Date:
8430
01 February 2017
8431
</para>
8432
8433
<para>
8434
<list type="bullet">
8435
8436
<listitem>
8437
<para>
8438
Bugfix:
8439
global variables were not initialized when njs was used
8440
in nginx.
8441
</para>
8442
</listitem>
8443
8444
</list>
8445
</para>
8446
8447
</section>
8448
8449
8450
<section id="njs0.1.8" name="Changes with njs 0.1.8">
8451
8452
<para>
8453
Release Date:
8454
24 January 2017
8455
</para>
8456
8457
<para>
8458
<list type="bullet">
8459
8460
<listitem>
8461
<para>
8462
Change:
8463
the <literal>strict</literal> mode is enforced,
8464
variables must be explicitly declared.
8465
</para>
8466
</listitem>
8467
8468
8469
<listitem>
8470
<para>
8471
Feature:
8472
<literal>for</literal> and
8473
<literal>for-in</literal> loops support variable declaration.
8474
</para>
8475
</listitem>
8476
8477
<listitem>
8478
<para>
8479
Bugfix:
8480
global and function scopes have been fixed.
8481
</para>
8482
</listitem>
8483
8484
<listitem>
8485
<para>
8486
Bugfix:
8487
now <literal>for-in</literal> loop does not discard the last value
8488
of property variable.
8489
</para>
8490
</listitem>
8491
8492
<listitem>
8493
<para>
8494
Bugfix:
8495
miscellaneous bugs and segmentation faults have been fixed.
8496
</para>
8497
</listitem>
8498
8499
</list>
8500
</para>
8501
8502
</section>
8503
8504
8505
<section id="njs0.1.7" name="Changes with njs 0.1.7">
8506
8507
<para>
8508
Release Date:
8509
27 December 2016
8510
</para>
8511
8512
<para>
8513
<list type="bullet">
8514
8515
<listitem>
8516
<para>
8517
Change:
8518
the <link doc="../http/ngx_http_js_module.xml" id="js_include"/> directive
8519
has been disabled at server and location levels.
8520
</para>
8521
</listitem>
8522
8523
<listitem>
8524
<para>
8525
Feature:
8526
exponentiation operators.
8527
</para>
8528
</listitem>
8529
8530
<listitem>
8531
<para>
8532
Bugfix:
8533
miscellaneous bugs and segmentation faults have been fixed.
8534
</para>
8535
</listitem>
8536
8537
</list>
8538
</para>
8539
8540
</section>
8541
8542
8543
<section id="njs0.1.6" name="Changes with njs 0.1.6">
8544
8545
<para>
8546
Release Date:
8547
13 December 2016
8548
</para>
8549
8550
<para>
8551
<list type="bullet">
8552
8553
<listitem>
8554
<para>
8555
Change:
8556
the <link doc="../http/ngx_http_js_module.xml" id="js_set"/> directive
8557
has been disabled at server and location levels.
8558
</para>
8559
</listitem>
8560
8561
<listitem>
8562
<para>
8563
Feature:
8564
ES6 <literal>Math</literal> methods.
8565
</para>
8566
</listitem>
8567
8568
<listitem>
8569
<para>
8570
Bugfix:
8571
miscellaneous bugs and segmentation faults have been fixed.
8572
</para>
8573
</listitem>
8574
8575
</list>
8576
</para>
8577
8578
</section>
8579
8580
</article>
8581
8582