Skip to content

Commit 33202b7

Browse files
committed
src: add JSON Schema validation for node.config.json
Add ata (v0.8.0) as a bundled dependency for JSON Schema Draft 2020-12 validation. Config files are now validated against a generated schema before option parsing, providing clear type error messages to users. - deps: add ata v0.8.0 JSON Schema validator - src: validate config after simdjson parse, before option loop - build: add shared library support and nix fileset for ata - test: add schema validation and process.versions.ata tests
1 parent fd9eecf commit 33202b7

File tree

17 files changed

+4395
-265
lines changed

17 files changed

+4395
-265
lines changed

LICENSE

Lines changed: 228 additions & 204 deletions
Large diffs are not rendered by default.

configure.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,28 @@
554554
help='a directory to search for the shared simdjson DLL')
555555

556556

557+
shared_optgroup.add_argument('--shared-ata',
558+
action='store_true',
559+
dest='shared_ata',
560+
default=None,
561+
help='link to a shared ata DLL instead of static linking')
562+
563+
shared_optgroup.add_argument('--shared-ata-includes',
564+
action='store',
565+
dest='shared_ata_includes',
566+
help='directory containing ata header files')
567+
568+
shared_optgroup.add_argument('--shared-ata-libname',
569+
action='store',
570+
dest='shared_ata_libname',
571+
default='ata',
572+
help='alternative lib name to link to [default: %(default)s]')
573+
574+
shared_optgroup.add_argument('--shared-ata-libpath',
575+
action='store',
576+
dest='shared_ata_libpath',
577+
help='a directory to search for the shared ata DLL')
578+
557579
shared_optgroup.add_argument('--shared-simdutf',
558580
action='store_true',
559581
dest='shared_simdutf',
@@ -2625,6 +2647,7 @@ def make_bin_override():
26252647
configure_library('libuv', output)
26262648
configure_library('ada', output)
26272649
configure_library('simdjson', output)
2650+
configure_library('ata', output)
26282651
configure_library('simdutf', output)
26292652
configure_library('brotli', output, pkgname=['libbrotlidec', 'libbrotlienc'])
26302653
configure_library('cares', output, pkgname='libcares')

deps/ata/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Mert Can Altin
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)