]> git.kaiwu.me - njs.git/log
njs.git
12 months agoFixed building with --debug=YES after b28e50b1.
Dmitry Volyntsev [Thu, 1 May 2025 01:23:20 +0000 (18:23 -0700)]
Fixed building with --debug=YES after b28e50b1.

In file included from src/njs_main.h:37,
                 from src/njs_diyfp.c:12:
src/njs_atom.h: In function ‘njs_atom_to_value’:
src/njs_atom.h:54:31: error: invalid use of incomplete typedef
‘njs_flathsh_descr_t’ {aka ‘struct njs_flathsh_descr_s’}
   54 |         njs_assert(atom_id < h->elts_count);
      |                               ^~
src/njs_assert.h:14:15: note: in definition of macro ‘njs_assert’

12 months agoTests: improved js_body_filter.t tests.
Dmitry Volyntsev [Tue, 29 Apr 2025 01:34:29 +0000 (18:34 -0700)]
Tests: improved js_body_filter.t tests.

Dropping Content-Length header in locations where response body
length is modified.  This is not strictly needed for the test itself,
but can serve as an example for a typical body modification task.

12 months agoTests: fixed js_body_filter.t tests.
Dmitry Volyntsev [Tue, 29 Apr 2025 01:28:08 +0000 (18:28 -0700)]
Tests: fixed js_body_filter.t tests.

Previously, '|' was used incorrectly in test match pattern.

12 months agoIntroduced NJS_VMCODE_PROPERTY_ATOM_SET instruction.
Dmitry Volyntsev [Sat, 22 Mar 2025 05:52:55 +0000 (22:52 -0700)]
Introduced NJS_VMCODE_PROPERTY_ATOM_SET instruction.

12 months agoIntroduced NJS_VMCODE_PROPERTY_ATOM_GET instruction.
Dmitry Volyntsev [Wed, 26 Mar 2025 07:23:23 +0000 (00:23 -0700)]
Introduced NJS_VMCODE_PROPERTY_ATOM_GET instruction.

12 months agoRefactored working with built-in strings, symbols and small integers.
Vadim Zhestikov [Thu, 29 Aug 2024 05:03:14 +0000 (22:03 -0700)]
Refactored working with built-in strings, symbols and small integers.

- Implemented atom IDs for strings, symbols and small numbers, enabling
  equality checks via ID comparison
- Optimized string operations for faster property lookups and comparisons
- Removed short string inlining from njs_value_t structure

Performance improvements (arewefastyet/benchmarks/v8-v7 benchmark):
- Richards: +57% (631 → 989)
- Crypto: +7% (1445 → 1551)
- RayTrace: +37% (562 → 772)
- NavierStokes: +20% (2062 → 2465)
- Overall score: +29% (1014 → 1307)

In collaboration with Dmitry Volyntsev.

12 months agoTest262: fixed mktemp format on OpenBSD.
Dmitry Volyntsev [Mon, 21 Apr 2025 16:41:46 +0000 (09:41 -0700)]
Test262: fixed mktemp format on OpenBSD.

mktemp: insufficient number of Xs in template `/tmp/njs_test.XXX'

12 months agoReplaced vm with mp in NJS_CHB_MP_INIT().
Zhidao HONG [Mon, 21 Apr 2025 15:37:49 +0000 (23:37 +0800)]
Replaced vm with mp in NJS_CHB_MP_INIT().

13 months agoFetch: refactored out ngx_js_http_resolve().
Zhidao HONG [Fri, 11 Apr 2025 14:43:31 +0000 (22:43 +0800)]
Fetch: refactored out ngx_js_http_resolve().

13 months agoFetch: refactored out ngx_js_http_close_peer().
Zhidao HONG [Fri, 11 Apr 2025 14:02:16 +0000 (22:02 +0800)]
Fetch: refactored out ngx_js_http_close_peer().

13 months agoFetch: refactored out ngx_js_http_resolve_done().
Zhidao HONG [Fri, 11 Apr 2025 13:59:16 +0000 (21:59 +0800)]
Fetch: refactored out ngx_js_http_resolve_done().

13 months agoFetch: renamed njs_js_http_destructor() as ngx_js_http_destructor().
Zhidao HONG [Fri, 11 Apr 2025 13:57:02 +0000 (21:57 +0800)]
Fetch: renamed njs_js_http_destructor() as ngx_js_http_destructor().

13 months agoFetch: generalize ngx_js_http_error().
Zhidao HONG [Fri, 11 Apr 2025 13:47:52 +0000 (21:47 +0800)]
Fetch: generalize ngx_js_http_error().

Refactored to support both njs and QuickJS, which have different error
formats when throwing exceptions.

13 months agoFetch: remove unused parameter in ngx_js_http_error().
Zhidao HONG [Tue, 8 Apr 2025 15:00:42 +0000 (23:00 +0800)]
Fetch: remove unused parameter in ngx_js_http_error().

No functional changes.

13 months agoFixed typo in stream event handler debug message.
Dmitry Volyntsev [Thu, 10 Apr 2025 00:19:37 +0000 (17:19 -0700)]
Fixed typo in stream event handler debug message.

13 months agoVersion bump.
Dmitry Volyntsev [Thu, 10 Apr 2025 00:18:53 +0000 (17:18 -0700)]
Version bump.

13 months agoVersion 0.8.10. 0.8.10
Dmitry Volyntsev [Tue, 8 Apr 2025 01:53:52 +0000 (18:53 -0700)]
Version 0.8.10.

13 months agoQuickJS: ignoring rejected promises while destroying context.
Dmitry Volyntsev [Tue, 8 Apr 2025 01:28:50 +0000 (18:28 -0700)]
QuickJS: ignoring rejected promises while destroying context.

13 months agoQuickJS: added xml to nginx modules.
Dmitry Volyntsev [Thu, 3 Apr 2025 00:47:10 +0000 (17:47 -0700)]
QuickJS: added xml to nginx modules.

Missed in cec9a1650.

13 months agoQuickJS: fix exception handling during configuration phase.
Zhidao HONG [Thu, 3 Apr 2025 03:44:57 +0000 (11:44 +0800)]
QuickJS: fix exception handling during configuration phase.

The issue was introduced in 9010aee (not released yet).

13 months agoQuickJS: fixed ngx_qjs_external_resolver().
Zhidao HONG [Sat, 29 Mar 2025 14:02:19 +0000 (22:02 +0800)]
QuickJS: fixed ngx_qjs_external_resolver().

13 months agoQuickJS: fixed compatibility issues with QuickJS-NG 0.9.0.
Dmitry Volyntsev [Thu, 27 Mar 2025 05:13:22 +0000 (22:13 -0700)]
QuickJS: fixed compatibility issues with QuickJS-NG 0.9.0.

This fixes #872 on Github.

13 months agoQuickJS: added xml module.
Dmitry Volyntsev [Tue, 18 Mar 2025 23:22:53 +0000 (16:22 -0700)]
QuickJS: added xml module.

13 months agoXML: allowing to remove the property $text for XMLNode.
Dmitry Volyntsev [Tue, 4 Mar 2025 01:07:59 +0000 (17:07 -0800)]
XML: allowing to remove the property $text for XMLNode.

13 months agoXML: fixed serializeToString().
Dmitry Volyntsev [Thu, 27 Feb 2025 06:12:31 +0000 (22:12 -0800)]
XML: fixed serializeToString().

Previously, serializeToString() was exclusiveC14n() which returned
string instead of Buffer. According to the published documentation it
should be c14n().

13 months agoTest262: improved compatibility with node.js for fs/methods.t.mjs.
Dmitry Volyntsev [Wed, 26 Feb 2025 07:05:31 +0000 (23:05 -0800)]
Test262: improved compatibility with node.js for fs/methods.t.mjs.

13 months agoQuickJS: fixed compatibility with recent change in upstream.
Dmitry Volyntsev [Wed, 26 Mar 2025 00:08:09 +0000 (17:08 -0700)]
QuickJS: fixed compatibility with recent change in upstream.

JS_VALUE_GET_OBJ(v) was made hidden in 156d981.

13 months agoQuickJS: introduced qjs_promise_result().
Dmitry Volyntsev [Tue, 25 Mar 2025 00:39:06 +0000 (08:39 +0800)]
QuickJS: introduced qjs_promise_result().

13 months agoQuickJS: added missed JS_NewClass() for the SharedDictError class.
hongzhidao [Mon, 24 Mar 2025 07:40:15 +0000 (15:40 +0800)]
QuickJS: added missed JS_NewClass() for the SharedDictError class.

13 months agoQuickJS: using JS_AddIntrinsicBigInt() if detected.
Vadim Zhestikov [Wed, 19 Mar 2025 16:12:45 +0000 (09:12 -0700)]
QuickJS: using JS_AddIntrinsicBigInt() if detected.

13 months agoQuickJS: calling njs_chb_destroy() in qjs_string_create_chb() internally.
hongzhidao [Tue, 18 Mar 2025 13:34:59 +0000 (21:34 +0800)]
QuickJS: calling njs_chb_destroy() in qjs_string_create_chb() internally.

No functional changes.

13 months agoQuickJS: fixed ngx_qjs_string() to handle strings containing "\0".
hongzhidao [Wed, 19 Mar 2025 05:47:07 +0000 (13:47 +0800)]
QuickJS: fixed ngx_qjs_string() to handle strings containing "\0".

13 months agoQuickJS: fixed njs_qjs_object_completions().
hongzhidao [Wed, 19 Mar 2025 03:18:41 +0000 (11:18 +0800)]
QuickJS: fixed njs_qjs_object_completions().

This commit also exposed qjs_free_prop_enum() as public.

13 months agoQuickJS: added error checks in modules initialization.
Vadim Zhestikov [Tue, 18 Mar 2025 17:40:24 +0000 (10:40 -0700)]
QuickJS: added error checks in modules initialization.

13 months agoQuickJS: crypto module.
Vadim Zhestikov [Thu, 6 Mar 2025 02:54:41 +0000 (18:54 -0800)]
QuickJS: crypto module.

13 months agoTest262: allowing to omit empty default option argument.
Dmitry Volyntsev [Wed, 26 Feb 2025 06:44:39 +0000 (22:44 -0800)]
Test262: allowing to omit empty default option argument.

13 months agoTest262: using default prepare_args() where appropriate.
Dmitry Volyntsev [Wed, 26 Feb 2025 06:35:55 +0000 (22:35 -0800)]
Test262: using default prepare_args() where appropriate.

13 months agoQuickJS: making ngx_qjs_*() functions consistent with ngx_js_*().
hongzhidao [Mon, 17 Mar 2025 06:40:49 +0000 (14:40 +0800)]
QuickJS: making ngx_qjs_*() functions consistent with ngx_js_*().

14 months agoQuickJS: using helper to declare Symbol.toStringTag properties.
Dmitry Volyntsev [Thu, 6 Feb 2025 00:47:03 +0000 (16:47 -0800)]
QuickJS: using helper to declare Symbol.toStringTag properties.

14 months agoQuickJS: removed unused variable casts introduced in 75ca26f.
Dmitry Volyntsev [Thu, 6 Feb 2025 00:26:40 +0000 (16:26 -0800)]
QuickJS: removed unused variable casts introduced in 75ca26f.

These casts were added to suppress compiler warnings during development
but are no longer needed.

14 months agoFetch: accepting response headers with underscore characters.
Dmitry Volyntsev [Sat, 22 Feb 2025 07:03:46 +0000 (23:03 -0800)]
Fetch: accepting response headers with underscore characters.

This fixes #856 on Github.

14 months agoTests: making fetch test portable by removing njs.dump().
Dmitry Volyntsev [Sat, 22 Feb 2025 06:54:00 +0000 (22:54 -0800)]
Tests: making fetch test portable by removing njs.dump().

14 months agoFixed typo introduced in 75ca26f.
Dmitry Volyntsev [Sat, 22 Feb 2025 06:10:07 +0000 (22:10 -0800)]
Fixed typo introduced in 75ca26f.

14 months agoModules: improved reporting of unhandled promise rejections.
Dmitry Volyntsev [Sat, 22 Feb 2025 04:40:14 +0000 (20:40 -0800)]
Modules: improved reporting of unhandled promise rejections.

Previously, some promise rejections were not reported.

For example:

async function timeout(ms) {
    return new Promise((resolve, reject) => {
        setTimeout(() => {
            reject(new Error('timeout'));
        }, ms);
    });
}

async function handler(r) {
    let v = await timeout(1000);
    r.return(200);
}

14 months agoTests: splitting js_periodic tests into multiple files.
Dmitry Volyntsev [Wed, 19 Feb 2025 06:53:54 +0000 (22:53 -0800)]
Tests: splitting js_periodic tests into multiple files.

14 months agoQuickJS: fixed memory leak in js_periodic handler.
Dmitry Volyntsev [Thu, 20 Feb 2025 01:36:46 +0000 (17:36 -0800)]
QuickJS: fixed memory leak in js_periodic handler.

14 months agoQuickJS: fixed SharedDict.incr() with empty init argument.
Dmitry Volyntsev [Thu, 20 Feb 2025 00:50:15 +0000 (16:50 -0800)]
QuickJS: fixed SharedDict.incr() with empty init argument.

14 months agoQuickJS: added WebCrypto import tests forgotten in 75ca26f.
Dmitry Volyntsev [Thu, 13 Feb 2025 02:07:26 +0000 (18:07 -0800)]
QuickJS: added WebCrypto import tests forgotten in 75ca26f.

Import related tests are consolidated from other WebCrypto tests.

14 months agoQuickJS: added missed OPENSSL context for errors in WebCrypto.
Dmitry Volyntsev [Thu, 13 Feb 2025 02:13:54 +0000 (18:13 -0800)]
QuickJS: added missed OPENSSL context for errors in WebCrypto.

14 months agoQuickJS: fixed key usage processing with invalid values in WebCrypto.
Dmitry Volyntsev [Thu, 13 Feb 2025 02:12:38 +0000 (18:12 -0800)]
QuickJS: fixed key usage processing with invalid values in WebCrypto.

14 months agoQuickJS: fixed non-NULL terminated strings formatting in exceptions.
Dmitry Volyntsev [Thu, 13 Feb 2025 03:11:08 +0000 (19:11 -0800)]
QuickJS: fixed non-NULL terminated strings formatting in exceptions.

When "%*s" is specified, the first integer is interpreted as width.
Width specifies *minimum* number of characters to output. The next
string is expected to be NULL-terminated.

When "%.*s" is specified, the first integer is interpreted as precision.
Precision specifies *maximum* number of characters to output.

14 months agoFixed access to uninitialized alg in SubtleCrypto.import().
Dmitry Volyntsev [Wed, 12 Feb 2025 00:41:56 +0000 (16:41 -0800)]
Fixed access to uninitialized alg in SubtleCrypto.import().

Found by GCC:
In function ‘qjs_import_jwk_oct’,
external/qjs_webcrypto_module.c:3116:13: error: ‘alg.start’ may be used uninitialized [-Werror=maybe-uninitialized]
 3116 |             JS_ThrowTypeError(cx, "key size and \"alg\" value \"%s\" mismatch",

The similar place in the NJS module was also fixed.

14 months agoAdd missed syntax error for await in template literal.
Vadim Zhestikov [Tue, 11 Feb 2025 23:39:29 +0000 (15:39 -0800)]
Add missed syntax error for await in template literal.

This fixes issues #836 on github.

14 months agoModules: fixed name corruption in variable and header processing.
Dmitry Volyntsev [Sat, 8 Feb 2025 01:23:09 +0000 (17:23 -0800)]
Modules: fixed name corruption in variable and header processing.

The HTTP and Stream JS modules were performing in-place lowercasing of
variable and header names, which could inadvertently overwrite the
original data.

In the NJS engine, the problem did not manifest itself for strings up to
14 bytes long because they are inlined into the value.

15 months agoQuickJS: added querystring module.
Dmitry Volyntsev [Thu, 30 Jan 2025 05:35:08 +0000 (21:35 -0800)]
QuickJS: added querystring module.

15 months agoQuickJS: fixed shared dict in stream module.
Dmitry Volyntsev [Mon, 3 Feb 2025 17:07:22 +0000 (09:07 -0800)]
QuickJS: fixed shared dict in stream module.

The change was missed in 352c2e59 (0.8.8).

15 months agoTests262: fixed merge() with null values.
Dmitry Volyntsev [Fri, 31 Jan 2025 03:10:29 +0000 (19:10 -0800)]
Tests262: fixed merge() with null values.

15 months agoHTTP: reading r.requestText or r.requestBuffer from a temp file.
Dmitry Volyntsev [Wed, 29 Jan 2025 03:11:48 +0000 (19:11 -0800)]
HTTP: reading r.requestText or r.requestBuffer from a temp file.

Previously, an exception was thrown when accessing r.requestText or
r.requestBuffer if a client request body size exceeded
client_body_buffer_size.

15 months agoQuickJS: added WebCrypto module.
Dmitry Volyntsev [Fri, 10 Jan 2025 03:25:58 +0000 (19:25 -0800)]
QuickJS: added WebCrypto module.

15 months agoCI: added test with QuickJS-NG in check-pr job.
Dmitry Volyntsev [Thu, 23 Jan 2025 02:03:55 +0000 (18:03 -0800)]
CI: added test with QuickJS-NG in check-pr job.

15 months agoQuickJS: added support for QuickJS-NG library.
Dmitry Volyntsev [Wed, 22 Jan 2025 01:09:06 +0000 (17:09 -0800)]
QuickJS: added support for QuickJS-NG library.

15 months agoQuickJS: correctly handling value len for empty query params.
Dmitry Volyntsev [Thu, 23 Jan 2025 01:44:11 +0000 (17:44 -0800)]
QuickJS: correctly handling value len for empty query params.

15 months agoQuickJS: reimplemented process.argv.
Dmitry Volyntsev [Wed, 22 Jan 2025 02:07:53 +0000 (18:07 -0800)]
QuickJS: reimplemented process.argv.

Without using JS_SetOpaque(), because in QuickJS-NG opaque pointer
cannot be set for internal classes, including ordinary objects.

15 months agoVersion bump.
Dmitry Volyntsev [Thu, 23 Jan 2025 23:45:43 +0000 (15:45 -0800)]
Version bump.

15 months agoQuickJS: fixed Buffer.concat() with a single argument.
Dmitry Volyntsev [Fri, 17 Jan 2025 01:36:44 +0000 (17:36 -0800)]
QuickJS: fixed Buffer.concat() with a single argument.

15 months agoQuickJS: added TextDecoder and TextEncoder.
Dmitry Volyntsev [Sat, 11 Jan 2025 07:20:36 +0000 (23:20 -0800)]
QuickJS: added TextDecoder and TextEncoder.

15 months agoQuickJS: accept ArrayBuffer as an arument for qjs_typed_array_data().
Dmitry Volyntsev [Tue, 14 Jan 2025 06:00:10 +0000 (22:00 -0800)]
QuickJS: accept ArrayBuffer as an arument for qjs_typed_array_data().

15 months agoTests: moving request body tests to js_request_body.t.
Dmitry Volyntsev [Sat, 18 Jan 2025 01:19:00 +0000 (17:19 -0800)]
Tests: moving request body tests to js_request_body.t.

15 months agoTests: added request body test when body is in a file.
Dmitry Volyntsev [Sat, 18 Jan 2025 01:03:08 +0000 (17:03 -0800)]
Tests: added request body test when body is in a file.

15 months agoVersion 0.8.9. 0.8.9
Dmitry Volyntsev [Mon, 13 Jan 2025 22:56:10 +0000 (14:56 -0800)]
Version 0.8.9.

15 months ago2025 year.
Dmitry Volyntsev [Mon, 13 Jan 2025 22:58:28 +0000 (14:58 -0800)]
2025 year.

16 months agoModules: removed extra VM creation per server.
Dmitry Volyntsev [Sat, 4 Jan 2025 06:25:15 +0000 (22:25 -0800)]
Modules: removed extra VM creation per server.

Previously, when js_import was declared in http or stream blocks, an extra
copy of the VM instance was created for each server block. This was not
needed and consumed a lot of memory for configurations with many server
blocks.

This issue was introduced in 9b674412 (0.8.6) and was
partially fixed for location blocks only in 685b64f0 (0.8.7).

16 months agoVersion bump.
Dmitry Volyntsev [Mon, 6 Jan 2025 17:09:43 +0000 (09:09 -0800)]
Version bump.

16 months agoQuickJS: added fs module.
Dmitry Volyntsev [Thu, 5 Dec 2024 01:31:23 +0000 (17:31 -0800)]
QuickJS: added fs module.

16 months agoTest262: running tests within their own directory.
Dmitry Volyntsev [Sat, 14 Dec 2024 06:43:25 +0000 (22:43 -0800)]
Test262: running tests within their own directory.

16 months agoTest262: skipping individual tests.
Dmitry Volyntsev [Fri, 6 Dec 2024 03:53:11 +0000 (19:53 -0800)]
Test262: skipping individual tests.

16 months agoTest262: collecting all tests results before exiting.
Dmitry Volyntsev [Fri, 6 Dec 2024 00:09:38 +0000 (16:09 -0800)]
Test262: collecting all tests results before exiting.

16 months agoTest262: renaming fs tests.
Dmitry Volyntsev [Thu, 5 Dec 2024 02:00:57 +0000 (18:00 -0800)]
Test262: renaming fs tests.

16 months agoTest262: making "fs" module required.
Dmitry Volyntsev [Thu, 5 Dec 2024 01:07:22 +0000 (17:07 -0800)]
Test262: making "fs" module required.

16 months agoTest262: fixed check for crypto object.
Dmitry Volyntsev [Thu, 5 Dec 2024 01:52:32 +0000 (17:52 -0800)]
Test262: fixed check for crypto object.

16 months agoTests: skipping stream_js_periodic.t for QuickJS engine.
Dmitry Volyntsev [Sat, 7 Dec 2024 01:37:22 +0000 (17:37 -0800)]
Tests: skipping stream_js_periodic.t for QuickJS engine.

17 months agoVersion 0.8.8. 0.8.8
Dmitry Volyntsev [Mon, 9 Dec 2024 22:27:30 +0000 (14:27 -0800)]
Version 0.8.8.

17 months agoFetch: optimized use of SSL contexts.
Dmitry Volyntsev [Tue, 3 Dec 2024 02:46:45 +0000 (18:46 -0800)]
Fetch: optimized use of SSL contexts.

To ensure optimal use of memory, SSL contexts for ngx.fetch() are now
inherited from previous levels as long as relevant js_fetch_* directives
are not redefined.

17 months agoHTTP: fixed limit rated output.
Dmitry Volyntsev [Tue, 26 Nov 2024 05:43:44 +0000 (21:43 -0800)]
HTTP: fixed limit rated output.

Previously, when r.return(code, body) was called from a subrequest
handler with a body size larger than the sendfile_max_chunk value
connection hanging might occur.

17 months agoModules: refactored preloading.
Dmitry Volyntsev [Thu, 14 Nov 2024 06:03:14 +0000 (22:03 -0800)]
Modules: refactored preloading.

17 months agoAllow to execute some code before cloning.
Dmitry Volyntsev [Wed, 13 Nov 2024 22:50:20 +0000 (14:50 -0800)]
Allow to execute some code before cloning.

17 months agoFixed absolute scope in cloned VMs.
Dmitry Volyntsev [Thu, 14 Nov 2024 05:14:34 +0000 (21:14 -0800)]
Fixed absolute scope in cloned VMs.

17 months agoThrowing exception when prototype is not found.
Dmitry Volyntsev [Wed, 13 Nov 2024 06:57:48 +0000 (22:57 -0800)]
Throwing exception when prototype is not found.

18 months agoFixed resolving when Promise is inherited.
Dmitry Volyntsev [Fri, 8 Nov 2024 02:41:41 +0000 (18:41 -0800)]
Fixed resolving when Promise is inherited.

Previously, njs_promise_resolve() might return njs_object_t instead of
njs_promise_t. Later an instance of njs_object_t was put into a
NJS_PROMISE value. Whereas njs_promise_t is always expected to be inside
of a NJS_PROMISE value.

This closes #813 issue on Github.

18 months agoAdded missing steps for building with QuickJS to README.
Dmitry Volyntsev [Thu, 7 Nov 2024 23:26:39 +0000 (15:26 -0800)]
Added missing steps for building with QuickJS to README.

18 months agoXML: improved XMLNode.$tags handler.
Dmitry Volyntsev [Thu, 7 Nov 2024 06:15:22 +0000 (22:15 -0800)]
XML: improved XMLNode.$tags handler.

18 months agoXML: fixed tests with libxml2 2.13 and later.
Dmitry Volyntsev [Thu, 7 Nov 2024 06:08:21 +0000 (22:08 -0800)]
XML: fixed tests with libxml2 2.13 and later.

This fixes #812 issue on Github.

18 months agoFixed building by Clang.
Dmitry Volyntsev [Wed, 6 Nov 2024 23:59:32 +0000 (15:59 -0800)]
Fixed building by Clang.

src/qjs.c:347:19: error: variable 'signo' may be uninitialized when used
here [-Werror,-Wconditional-uninitialized]
  347 |     if (kill(pid, signo) < 0) {
      |                   ^~~~~
src/qjs.c:294:31: note: initialize the variable 'signo' to silence this
warning
  294 |     int                  signo, pid;
      |                               ^
      |                                = 0
1 error generated.

18 months agoFS: removed fs.promises.readSync() added by mistake.
Dmitry Volyntsev [Wed, 6 Nov 2024 03:01:52 +0000 (19:01 -0800)]
FS: removed fs.promises.readSync() added by mistake.

This closes #810 issue on Github.

18 months agoModules: fixed process.env object.
Dmitry Volyntsev [Wed, 6 Nov 2024 02:19:48 +0000 (18:19 -0800)]
Modules: fixed process.env object.

Previously, it ignored changes to environment variables introduced
with "env" directive.

18 months agoIntroduced process.kill() function.
Stefan Sundin [Fri, 25 Oct 2024 19:50:45 +0000 (12:50 -0700)]
Introduced process.kill() function.

18 months agoQuickJS: introduced process.kill().
Dmitry Volyntsev [Fri, 1 Nov 2024 01:15:22 +0000 (18:15 -0700)]
QuickJS: introduced process.kill().

18 months agoQuickJS: reworked process object.
Dmitry Volyntsev [Fri, 1 Nov 2024 00:47:41 +0000 (17:47 -0700)]
QuickJS: reworked process object.

18 months agoModules: added js_shared_dict_zone support in QuickJS engine.
Dmitry Volyntsev [Fri, 25 Oct 2024 02:00:41 +0000 (19:00 -0700)]
Modules: added js_shared_dict_zone support in QuickJS engine.

18 months agoTests: removed njs specific code from js_shared_dict.t.
Dmitry Volyntsev [Tue, 29 Oct 2024 00:08:40 +0000 (17:08 -0700)]
Tests: removed njs specific code from js_shared_dict.t.