@openedges/pkl-napi 0.32.0-rc.3 → 0.32.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +4 -4
- package/README.md +13 -9
- package/THIRD-PARTY-NOTICES.md +24 -8
- package/dist/index.cjs +586 -273
- package/dist/index.d.cts +547 -0
- package/dist/index.d.mts +575 -0
- package/dist/index.d.ts +38 -25
- package/dist/index.mjs +0 -5
- package/dist/testing.cjs +114 -0
- package/dist/testing.d.cts +29 -0
- package/dist/testing.d.mts +38 -0
- package/dist/testing.d.ts +29 -0
- package/dist/testing.mjs +14 -0
- package/native/pkl_napi.darwin-arm64.node +0 -0
- package/native/pkl_napi.darwin-x64.node +0 -0
- package/native/pkl_napi.linux-arm64-gnu.node +0 -0
- package/native/pkl_napi.linux-arm64-musl.node +0 -0
- package/native/pkl_napi.linux-x64-gnu.node +0 -0
- package/native/pkl_napi.linux-x64-musl.node +0 -0
- package/native/pkl_napi.win32-x64.node +0 -0
- package/package.json +20 -5
package/NOTICE
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
pkl-rs
|
|
2
2
|
Copyright 2025-2026 The pkl-rs Authors
|
|
3
3
|
|
|
4
|
-
An independent pure-Rust implementation targeting Apple Pkl 0.32.
|
|
4
|
+
An independent pure-Rust implementation targeting Apple Pkl 0.32.1 compatibility.
|
|
5
5
|
Repository: https://github.com/openedges/pkl-rs
|
|
6
6
|
|
|
7
7
|
TRADEMARK & NON-AFFILIATION NOTICE
|
|
@@ -15,10 +15,10 @@ This product includes or adapts software and assets from the following third-par
|
|
|
15
15
|
projects. Full license texts and dependency inventories are recorded in
|
|
16
16
|
THIRD-PARTY-NOTICES.md.
|
|
17
17
|
|
|
18
|
-
1. Apple Pkl 0.32.
|
|
18
|
+
1. Apple Pkl 0.32.1 (Apache License, Version 2.0)
|
|
19
19
|
Copyright © 2024-2026 Apple Inc. and the Pkl project authors.
|
|
20
20
|
- Standard library modules under crates/pkl-runtime/src/stdlib/ (all 23 `pkl:*`
|
|
21
|
-
`.pkl` modules, verbatim from Apple Pkl 0.32.
|
|
21
|
+
`.pkl` modules, verbatim from Apple Pkl 0.32.1 with original Apache-2.0
|
|
22
22
|
copyright headers retained).
|
|
23
23
|
- Rust adaptations of upstream diagnostic, value rendering, ANSI/syntax
|
|
24
24
|
highlighting, stack-frame compression, YAML resolver, and lexical path
|
|
@@ -80,5 +80,5 @@ THIRD-PARTY-NOTICES.md.
|
|
|
80
80
|
(OPENEDGES Technology Inc., originally recorded in 2025 as OpenEdges Inc.;
|
|
81
81
|
Apple Inc./Pkl project authors 2024-2025).
|
|
82
82
|
- Compatibility oracle fixtures under tests/fixtures/ originate from the
|
|
83
|
-
pinned Apple Pkl 0.32.
|
|
83
|
+
pinned Apple Pkl 0.32.1 test suite (Apache-2.0) and are excluded from
|
|
84
84
|
binary and npm distributions.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# `@openedges/pkl-napi`
|
|
2
2
|
|
|
3
|
-
Node.js N-API native bindings for the pure-Rust **Apple Pkl `0.32.
|
|
3
|
+
Node.js N-API native bindings for the pure-Rust **Apple Pkl `0.32.1`** engine (`pkl-runtime`, `pkl-host-native`, `pkl-lang`, and `pkl-formatter`) with zero Java runtime dependency.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -11,7 +11,7 @@ npm install @openedges/pkl-napi
|
|
|
11
11
|
### Requirements & Supported Platforms
|
|
12
12
|
|
|
13
13
|
- **Node.js**: `>= 18.0.0` (N-API v8)
|
|
14
|
-
- **Module formats**: Dual ESM (`import`) and CommonJS (`require`) with bundled TypeScript declarations (`dist/index.d.ts`).
|
|
14
|
+
- **Module formats**: Dual ESM (`import`) and CommonJS (`require`) with bundled TypeScript declarations (`dist/index.d.{ts,cts,mts}`).
|
|
15
15
|
- **Prebuilt native addons (7 targets)**:
|
|
16
16
|
- macOS: `darwin-arm64`, `darwin-x64`
|
|
17
17
|
- Linux (glibc `>= 2.28`): `linux-x64-gnu`, `linux-arm64-gnu`
|
|
@@ -50,20 +50,24 @@ console.log(format('x=1+2\n'));
|
|
|
50
50
|
```js
|
|
51
51
|
const { createEvaluatorSync, ModuleSource } = require('@openedges/pkl-napi');
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
async function main() {
|
|
54
|
+
const evaluator = createEvaluatorSync();
|
|
55
|
+
try {
|
|
56
|
+
console.log(evaluator.evaluateExpressionSync(ModuleSource.text('x = 20 + 22'), 'x'));
|
|
57
|
+
} finally {
|
|
58
|
+
await evaluator.close();
|
|
59
|
+
}
|
|
58
60
|
}
|
|
61
|
+
|
|
62
|
+
main();
|
|
59
63
|
```
|
|
60
64
|
|
|
61
65
|
## Compatibility & Versioning
|
|
62
66
|
|
|
63
|
-
Version `0.32.
|
|
67
|
+
Version `0.32.1` tracks the **Apple Pkl `0.32.1`** compatibility baseline (`PKL_VERSION === "0.32.1"`). See the [pkl-rs Versioning Guide](https://github.com/openedges/pkl-rs/blob/main/docs/versioning.md).
|
|
64
68
|
|
|
65
69
|
## License & Trademarks
|
|
66
70
|
|
|
67
|
-
Licensed under the [Apache License, Version 2.0](LICENSE) (Copyright 2025–2026 The pkl-rs Authors). Attribution and third-party notices are bundled in [NOTICE](NOTICE) and [THIRD-PARTY-NOTICES.md](THIRD-PARTY-NOTICES.md).
|
|
71
|
+
Licensed under the [Apache License, Version 2.0](https://github.com/openedges/pkl-rs/blob/main/LICENSE) (Copyright 2025–2026 The pkl-rs Authors). Attribution and third-party notices are bundled in [NOTICE](https://github.com/openedges/pkl-rs/blob/main/NOTICE) and [THIRD-PARTY-NOTICES.md](https://github.com/openedges/pkl-rs/blob/main/THIRD-PARTY-NOTICES.md).
|
|
68
72
|
|
|
69
73
|
`@openedges/pkl-napi` is part of the independent open-source `pkl-rs` project and is not affiliated with, sponsored by, or endorsed by Apple Inc. "Pkl" is referenced solely to describe language compatibility.
|
package/THIRD-PARTY-NOTICES.md
CHANGED
|
@@ -8,9 +8,9 @@ In addition to original code authored by the `pkl-rs` contributors, source and b
|
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
## 1. Embedded Apple Pkl 0.32.
|
|
11
|
+
## 1. Embedded Apple Pkl 0.32.1 Sources and Assets
|
|
12
12
|
|
|
13
|
-
- **Project**: [Apple Pkl](https://github.com/apple/pkl) (`0.32.
|
|
13
|
+
- **Project**: [Apple Pkl](https://github.com/apple/pkl) (`0.32.1`, commit `9ed02459c136435a50ea32619c33258c149cf95f`)
|
|
14
14
|
- **License**: Apache License, Version 2.0
|
|
15
15
|
- **Copyright**: Copyright © 2024–2026 Apple Inc. and the Pkl project authors
|
|
16
16
|
- **Included / adapted components**:
|
|
@@ -25,7 +25,7 @@ In addition to original code authored by the `pkl-rs` contributors, source and b
|
|
|
25
25
|
- `crates/pkl-runtime/src/vm/yaml_parser/backend/resolve.rs`
|
|
26
26
|
- Functional `pkldoc` web resources under `crates/pkl-doc/assets/`: `styles/pkldoc.css`, `scripts/pkldoc.js`, `scripts/search-worker.js`, and fonts listed in Section 5. *(All four icon files under `crates/pkl-doc/assets/images/` are original `pkl-rs` Apache-2.0 artwork, not Apple Pkl logos.)*
|
|
27
27
|
- `crates/pkl-cli/assets/completion_{bash,zsh,fish}.*`: Shell-completion scripts generated via [Clikt](https://github.com/ajalt/clikt) (Copyright © 2018 AJ Alt, Apache License 2.0).
|
|
28
|
-
- `crates/pkl-host-native/assets/PklCARoots.pem`: Bundled CA root certificate bundle matching Apple Pkl `0.32.
|
|
28
|
+
- `crates/pkl-host-native/assets/PklCARoots.pem`: Bundled CA root certificate bundle matching Apple Pkl `0.32.1`.
|
|
29
29
|
|
|
30
30
|
Upstream reference checkouts (`external/pkl`, `external/pkl-pantry`) are development/verification submodules and are not distributed inside prebuilt binary or npm release packages.
|
|
31
31
|
|
|
@@ -66,7 +66,7 @@ granted, provided that this notice is preserved.
|
|
|
66
66
|
|
|
67
67
|
## 5. Third-Party Web Assets Bundled in `pkldoc`
|
|
68
68
|
|
|
69
|
-
The standalone `pkldoc` binary embeds static resources required to generate Pkl `0.32.
|
|
69
|
+
The standalone `pkldoc` binary embeds static resources required to generate Pkl `0.32.1`-compatible HTML documentation sites (`crates/pkl-doc/assets/`):
|
|
70
70
|
|
|
71
71
|
### `scroll-into-view-if-needed` (`scroll-into-view.min.js`)
|
|
72
72
|
|
|
@@ -259,21 +259,36 @@ All **79 external Rust crates** locked in [Cargo.lock](Cargo.lock) (**67 runtime
|
|
|
259
259
|
|
|
260
260
|
| SPDX License Expression | Crate Count | Representative Crates |
|
|
261
261
|
| --- | ---: | --- |
|
|
262
|
-
| `MIT OR Apache-2.0` / `Apache-2.0 OR MIT` / `MIT/Apache-2.0` | 60 | `rustls`, `wasm-bindgen`, `js-sys`, `sha1`, `sha2`, `md-5`, `libc`, `syn`, `quote`, `time`, `semver`, `unicode-normalization`, `windows-*` |
|
|
263
|
-
| `MIT` | 8 | `napi`, `napi-derive`, `napi-
|
|
262
|
+
| `MIT OR Apache-2.0` / `Apache-2.0 OR MIT` / `MIT/Apache-2.0` | 60 | `rustls-pki-types`, `zeroize`, `bumpalo`, `wasm-bindgen`, `js-sys`, `sha1`, `sha2`, `md-5`, `libc`, `syn`, `quote`, `time`, `semver`, `unicode-normalization`, `windows-*` |
|
|
263
|
+
| `MIT` | 8 | `napi`, `napi-derive`, `napi-derive-backend`, `napi-build`, `napi-sys`, `libm`, `convert_case`, `pem` *(dev/test-only)* |
|
|
264
264
|
| `ISC` | 3 | `libloading`, `rustls-webpki`, `untrusted` |
|
|
265
|
-
| `Apache-2.0 OR ISC OR MIT` / `Apache-2.0 AND ISC` | 3 | `ring`, `rustls
|
|
265
|
+
| `Apache-2.0 OR ISC OR MIT` / `Apache-2.0 AND ISC` | 3 | `ring`, `rustls`, `rustls-pemfile` |
|
|
266
266
|
| `Zlib OR Apache-2.0 OR MIT` | 2 | `tinyvec`, `tinyvec_macros` |
|
|
267
267
|
| `BSD-3-Clause` | 1 | `subtle` |
|
|
268
268
|
| `(MIT OR Apache-2.0) AND Unicode-3.0` | 1 | `unicode-ident` |
|
|
269
269
|
| `Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT` | 1 | `wasi` |
|
|
270
270
|
|
|
271
|
+
### MIT License Copyright Holders (Statically Linked Crates)
|
|
272
|
+
|
|
273
|
+
The MIT license text in Section 5 applies to the following MIT-licensed crates included in distributions:
|
|
274
|
+
|
|
275
|
+
- **`libm`** (`0.2.16`, `MIT`): Copyright (c) 2018 Jorge Aparicio; Copyright © 2005–2020 Rich Felker, et al. (musl libc); portions Copyright © 1993, 2004 Sun Microsystems, David Schultz, Steven G. Kargl, Bruce D. Evans, Stephen L. Moshier, and Arm Limited.
|
|
276
|
+
- **`napi` / `napi-derive` / `napi-derive-backend` / `napi-sys`** (`3.x`, `MIT`) and **`napi-build`** (`2.2.4`, `MIT`, `@openedges/pkl-napi` only): Copyright (c) napi-rs contributors.
|
|
277
|
+
- **`convert_case`** (`0.8.0`, `MIT`): Copyright (c) 2025 rutrum.
|
|
278
|
+
- **`pem`** (`3.0.6`, `MIT`, dev/test-only): Copyright (c) 2016 Jonathan Creekmore.
|
|
279
|
+
- **`zeroize`** (`1.9.2`, `MIT OR Apache-2.0`): Copyright (c) 2018–2026 The RustCrypto Project Developers.
|
|
280
|
+
- **`bumpalo`** (`3.20.3`, `MIT OR Apache-2.0`): Copyright (c) 2019 Nick Fitzgerald.
|
|
281
|
+
|
|
271
282
|
### `ring` (`0.17.14`, `Apache-2.0 AND ISC`)
|
|
272
283
|
|
|
273
284
|
`ring` includes code derived from BoringSSL (Copyright Google Inc. and contributors, ISC-style / Apache-2.0) and portions of OpenSSL (Copyright 1995–2016 The OpenSSL Project / Eric Young, permissive OpenSSL/SSLeay terms). This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com).
|
|
274
285
|
|
|
275
286
|
### ISC License (Applies to `libloading`, `rustls-webpki`, `untrusted`, and `ring`)
|
|
276
287
|
|
|
288
|
+
- **`libloading`** (`0.8.9`, `ISC`): Copyright © 2015, Simonas Kazlauskas.
|
|
289
|
+
- **`rustls-webpki`** (`0.103.17`, `ISC`): Copyright 2015 Brian Smith.
|
|
290
|
+
- **`untrusted`** (`0.9.0`, `ISC`): Copyright 2015–2016 Brian Smith.
|
|
291
|
+
|
|
277
292
|
```text
|
|
278
293
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
279
294
|
purpose with or without fee is hereby granted, provided that the above
|
|
@@ -292,6 +307,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
292
307
|
|
|
293
308
|
```text
|
|
294
309
|
Copyright (c) 2016-2017 Isis Agora Lovecruft, Henry de Valence. All rights reserved.
|
|
310
|
+
Copyright (c) 2016-2024 Isis Agora Lovecruft. All rights reserved.
|
|
295
311
|
|
|
296
312
|
Redistribution and use in source and binary forms, with or without
|
|
297
313
|
modification, are permitted provided that the following conditions are
|
|
@@ -332,4 +348,4 @@ cargo metadata --format-version 1 --locked
|
|
|
332
348
|
## 8. Historical Test Fixtures (Development Repository Only)
|
|
333
349
|
|
|
334
350
|
- `tests/fixtures/rev1/`: Imported regression fixtures retaining original `LICENSE` (Apache-2.0) and `NOTICE` (OPENEDGES Technology Inc., originally recorded in 2025 as `OpenEdges Inc.`; Apple Inc. and Pkl project authors 2024–2025).
|
|
335
|
-
- `tests/fixtures/`: Compatibility verification fixtures derived from Apple Pkl `0.32.
|
|
351
|
+
- `tests/fixtures/`: Compatibility verification fixtures derived from Apple Pkl `0.32.1` (Apache-2.0). Test fixtures are excluded from binary and npm release packages.
|