From f5aabe0c292529b4e6ce3ebe4295ca1a6d3c8138 Mon Sep 17 00:00:00 2001 From: SheetJS Date: Mon, 9 Mar 2026 00:32:12 -0400 Subject: [PATCH] Demo refresh --- .../01-installation/07-bun.md | 4 +- docz/docs/03-demos/01-math/21-pandas.md | 20 ++-- docz/docs/03-demos/02-frontend/09-blazor.md | 4 +- docz/docs/03-demos/02-frontend/18-legacy.md | 4 +- .../docs/03-demos/03-net/08-headless/index.md | 6 +- docz/docs/03-demos/03-net/09-dom.md | 6 +- docz/docs/03-demos/19-desktop/01-electron.md | 2 +- docz/docs/03-demos/20-cli/03-nexe.md | 6 +- docz/docs/03-demos/20-cli/05-pkg.md | 6 +- docz/docs/03-demos/20-cli/08-boxednode.md | 4 +- docz/docs/03-demos/20-cli/11-nodesea.md | 6 +- docz/docs/03-demos/20-cli/12-bunsea.md | 8 +- docz/docs/03-demos/20-cli/13-denosea.md | 8 +- docz/docs/03-demos/20-cli/21-txiki.md | 2 +- docz/docs/03-demos/32-extensions/05-vscode.md | 2 +- docz/docs/03-demos/42-engines/01-duktape.md | 24 ++-- docz/docs/03-demos/42-engines/02-v8.md | 16 +-- docz/docs/03-demos/42-engines/05-jint.md | 2 +- docz/docs/03-demos/42-engines/06-goja.md | 6 +- docz/docs/03-demos/42-engines/08-quickjs.md | 16 +-- docz/docs/03-demos/42-engines/09-hermes.md | 10 +- docz/docs/03-demos/42-engines/15-rb.md | 6 +- docz/docs/03-demos/42-engines/20-chakra.md | 6 +- docz/docs/03-demos/42-engines/21-boa.md | 4 +- docz/docs/03-demos/42-engines/22-perl.md | 6 +- .../03-demos/42-engines/23-jerryscript.md | 18 ++- docz/docs/03-demos/42-engines/25-mujs.md | 4 +- docz/docs/03-demos/42-engines/26-jurassic.md | 6 +- docz/docs/09-miscellany/05-contributing.md | 2 +- docz/static/electron/package.json | 14 +-- docz/static/hermes/Makefile | 2 +- tests/dom/denodom.sh | 34 ++++++ tests/engines/chakracore.sh | 74 +++++++++++- tests/engines/clearscript.sh | 58 +++++++++ tests/engines/duktape-perl.sh | 11 +- tests/engines/duktape-python.sh | 2 +- tests/engines/duktape-zig.sh | 30 ++++- tests/engines/goja.ps1 | 28 +++++ tests/engines/hermes-cli.sh | 37 ++++++ tests/engines/jerryscript.sh | 2 +- tests/engines/quickjs.sh | 1 + tests/frontend/knockout.sh | 110 ++++++++++++++++++ tests/math/pandas.ps1 | 88 ++++++++++++++ tests/math/pandas.sh | 14 +-- tests/math/polars.ps1 | 95 +++++++++++++++ tests/math/polars.sh | 14 +-- 46 files changed, 690 insertions(+), 138 deletions(-) create mode 100755 tests/dom/denodom.sh create mode 100755 tests/engines/clearscript.sh create mode 100644 tests/engines/goja.ps1 create mode 100755 tests/engines/hermes-cli.sh create mode 100755 tests/frontend/knockout.sh create mode 100644 tests/math/pandas.ps1 create mode 100644 tests/math/polars.ps1 diff --git a/docz/docs/02-getting-started/01-installation/07-bun.md b/docz/docs/02-getting-started/01-installation/07-bun.md index d535f41..4980a6f 100644 --- a/docz/docs/02-getting-started/01-installation/07-bun.md +++ b/docz/docs/02-getting-started/01-installation/07-bun.md @@ -124,9 +124,9 @@ This demo was last tested in the following deployments: | `darwin-x64` | `1.3.6` | 2026-01-20 | | `darwin-arm` | `1.3.6` | 2026-01-19 | | `win11-x64` | `1.3.6` | 2026-01-28 | -| `win11-arm` | `1.2.3` | 2025-02-23 | +| `win11-arm` | `1.3.10` | 2026-03-07 | | `linux-x64` | `1.3.6` | 2026-01-18 | -| `linux-arm` | `1.2.2` | 2025-02-16 | +| `linux-arm` | `1.3.10` | 2026-03-07 | BunJS on Windows on ARM uses the X64 compatibility layer. diff --git a/docz/docs/03-demos/01-math/21-pandas.md b/docz/docs/03-demos/01-math/21-pandas.md index a2a7f75..b1c3207 100644 --- a/docz/docs/03-demos/01-math/21-pandas.md +++ b/docz/docs/03-demos/01-math/21-pandas.md @@ -40,12 +40,12 @@ This demo was tested in the following deployments: | Architecture | JS Engine | Pandas | Python | Date | |:-------------|:----------------|:-------|:-------|:-----------| -| `darwin-x64` | Duktape `2.7.0` | 2.2.3 | 3.13.1 | 2025-03-31 | +| `darwin-x64` | Duktape `2.7.0` | 3.0.1 | 3.13.7 | 2026-03-07 | | `darwin-arm` | Duktape `2.7.0` | 2.3.3 | 3.9.6 | 2026-01-25 | -| `win11-x64` | Duktape `2.7.0` | 2.2.3 | 3.11.9 | 2025-04-28 | -| `win11-arm` | Duktape `2.7.0` | 2.2.3 | 3.13.2 | 2025-02-23 | -| `linux-x64` | Duktape `2.7.0` | 2.1.4 | 3.12.3 | 2025-06-16 | -| `linux-arm` | Duktape `2.7.0` | 1.5.3 | 3.11.2 | 2025-02-16 | +| `win11-x64` | Duktape `2.7.0` | 3.0.1 | 3.11.9 | 2026-03-08 | +| `win11-arm` | Duktape `2.7.0` | 2.2.3 | 3.11.5 | 2026-03-07 | +| `linux-x64` | Duktape `2.7.0` | 3.0.1 | 3.13.9 | 2026-03-07 | +| `linux-arm` | Duktape `2.7.0` | 2.2.3 | 3.13.5 | 2026-03-07 | ::: @@ -544,12 +544,12 @@ This demo was tested in the following deployments: | Architecture | JS Engine | Polars | Python | Date | |:-------------|:----------------|:-------|:-------|:-----------| -| `darwin-x64` | Duktape `2.7.0` | 1.26.0 | 3.13.1 | 2025-03-31 | +| `darwin-x64` | Duktape `2.7.0` | 1.38.1 | 3.13.7 | 2026-03-07 | | `darwin-arm` | Duktape `2.7.0` | 1.36.1 | 3.9.6 | 2026-01-25 | -| `win11-x64` | Duktape `2.7.0` | 1.28.1 | 3.11.9 | 2025-04-28 | -| `win11-arm` | Duktape `2.7.0` | 1.23.0 | 3.13.2 | 2025-02-23 | -| `linux-x64` | Duktape `2.7.0` | 1.30.0 | 3.12.3 | 2025-06-16 | -| `linux-arm` | Duktape `2.7.0` | 1.22.0 | 3.11.2 | 2025-02-16 | +| `win11-x64` | Duktape `2.7.0` | 1.38.1 | 3.11.9 | 2026-03-08 | +| `win11-arm` | Duktape `2.7.0` | 1.23.0 | 3.11.5 | 2026-03-07 | +| `linux-x64` | Duktape `2.7.0` | 1.38.1 | 3.13.9 | 2026-03-07 | +| `linux-arm` | Duktape `2.7.0` | 1.38.1 | 3.13.5 | 2026-03-07 | ::: diff --git a/docz/docs/03-demos/02-frontend/09-blazor.md b/docz/docs/03-demos/02-frontend/09-blazor.md index 473f537..59e10eb 100644 --- a/docz/docs/03-demos/02-frontend/09-blazor.md +++ b/docz/docs/03-demos/02-frontend/09-blazor.md @@ -295,8 +295,8 @@ This demo was tested in the following deployments: | Architecture | Date | |:-------------|:-----------| -| `darwin-x64` | 2025-04-17 | -| `darwin-arm` | 2025-04-24 | +| `darwin-x64` | 2026-03-07 | +| `darwin-arm` | 2026-03-07 | | `win11-x64` | 2025-04-17 | | `win11-arm` | 2025-04-24 | diff --git a/docz/docs/03-demos/02-frontend/18-legacy.md b/docz/docs/03-demos/02-frontend/18-legacy.md index 10f5963..9b427d0 100644 --- a/docz/docs/03-demos/02-frontend/18-legacy.md +++ b/docz/docs/03-demos/02-frontend/18-legacy.md @@ -211,8 +211,8 @@ This demo was tested in the following environments: | KnockoutJS | Date | Live Demo | |:-----------|:-----------|:-----------------------------------------------| -| `3.5.0` | 2025-01-08 | [**KO3**](pathname:///knockout/knockout3.html) | -| `2.3.0` | 2025-01-08 | [**KO2**](pathname:///knockout/knockout2.html) | +| `3.5.0` | 2026-03-06 | [**KO3**](pathname:///knockout/knockout3.html) | +| `2.3.0` | 2026-03-06 | [**KO2**](pathname:///knockout/knockout2.html) | ::: diff --git a/docz/docs/03-demos/03-net/08-headless/index.md b/docz/docs/03-demos/03-net/08-headless/index.md index 96d5eeb..6871e23 100644 --- a/docz/docs/03-demos/03-net/08-headless/index.md +++ b/docz/docs/03-demos/03-net/08-headless/index.md @@ -333,9 +333,9 @@ This demo was tested in the following environments: | Architecture | PhantomJS | Date | |:-------------|:----------|:-----------| -| `darwin-x64` | `2.1.1` | 2025-03-31 | -| `win11-x64` | `2.1.1` | 2025-06-18 | -| `linux-x64` | `2.1.1` | 2025-06-16 | +| `darwin-x64` | `2.1.1` | 2026-03-07 | +| `win11-x64` | `2.1.1` | 2026-03-07 | +| `linux-x64` | `2.1.1` | 2026-03-07 | ::: diff --git a/docz/docs/03-demos/03-net/09-dom.md b/docz/docs/03-demos/03-net/09-dom.md index 011316b..e618bb2 100644 --- a/docz/docs/03-demos/03-net/09-dom.md +++ b/docz/docs/03-demos/03-net/09-dom.md @@ -374,12 +374,12 @@ This demo was tested in the following deployments: | Architecture | DenoDOM | Deno | Date | |:-------------|:--------|:-------|:-----------| -| `darwin-x64` | 0.1.48 | 2.2.6 | 2025-03-31 | +| `darwin-x64` | 0.1.48 | 2.7.4 | 2026-03-07 | | `darwin-arm` | 0.1.48 | 2.2.12 | 2025-04-24 | | `win11-x64` | 0.1.48 | 2.2.12 | 2025-04-28 | | `win11-arm` | 0.1.48 | 2.2.1 | 2025-02-23 | -| `linux-x64` | 0.1.48 | 2.3.6 | 2025-06-16 | -| `linux-arm` | 0.1.48 | 2.1.10 | 2025-02-16 | +| `linux-x64` | 0.1.48 | 2.7.4 | 2026-03-07 | +| `linux-arm` | 0.1.48 | 2.7.4 | 2026-03-07 | ::: diff --git a/docz/docs/03-demos/19-desktop/01-electron.md b/docz/docs/03-demos/19-desktop/01-electron.md index 6409158..208da20 100644 --- a/docz/docs/03-demos/19-desktop/01-electron.md +++ b/docz/docs/03-demos/19-desktop/01-electron.md @@ -238,7 +238,7 @@ This demo was tested in the following environments: | OS and Version | Architecture | Electron | Date | |:---------------|:-------------|:---------|:-----------| -| macOS 15.3 | `darwin-x64` | `35.1.2` | 2025-03-31 | +| macOS 15.7.4 | `darwin-x64` | `40.8.0` | 2026-03-08 | | macOS 14.5 | `darwin-arm` | `35.1.2` | 2025-08-30 | | Windows 11 | `win11-x64` | `33.2.1` | 2025-02-11 | | Windows 11 | `win11-arm` | `33.2.1` | 2025-02-23 | diff --git a/docz/docs/03-demos/20-cli/03-nexe.md b/docz/docs/03-demos/20-cli/03-nexe.md index 6136f7c..458fd5a 100644 --- a/docz/docs/03-demos/20-cli/03-nexe.md +++ b/docz/docs/03-demos/20-cli/03-nexe.md @@ -38,11 +38,11 @@ This demo was tested in the following deployments: | Architecture | Version | NodeJS | Source | Date | |:-------------|:---------------|:----------|:----------|:-----------| | `darwin-x64` | `5.0.0-beta.4` | `14.15.3` | Pre-built | 2026-01-21 | -| `darwin-arm` | `5.0.0-beta.4` | `22.14.0` | Compiled | 2025-06-18 | -| `win11-x64` | `5.0.0-beta.4` | `14.15.3` | Pre-built | 2025-05-07 | +| `darwin-arm` | `5.0.0-beta.4` | `20.18.0` | Compiled | 2026-03-07 | +| `win11-x64` | `5.0.0-beta.4` | `14.15.3` | Pre-built | 2026-03-08 | | `win11-arm` | `4.0.0-rc.6` | `22.14.0` | Compiled | 2025-02-23 | | `linux-x64` | `5.0.0-beta.4` | `14.15.3` | Pre-built | 2026-01-18 | -| `linux-arm` | `4.0.0-rc.6` | `22.13.0` | Compiled | 2025-02-15 | +| `linux-arm` | `5.0.0-beta.4` | `24.14.0` | Compiled | 2026-03-07 | ::: diff --git a/docz/docs/03-demos/20-cli/05-pkg.md b/docz/docs/03-demos/20-cli/05-pkg.md index c2579db..3e58a00 100644 --- a/docz/docs/03-demos/20-cli/05-pkg.md +++ b/docz/docs/03-demos/20-cli/05-pkg.md @@ -38,11 +38,11 @@ This demo was tested in the following deployments: | Architecture | Version | NodeJS | Date | |:-------------|:--------|:---------|:-----------| | `darwin-x64` | `5.8.1` | `18.5.0` | 2026-01-21 | -| `darwin-arm` | `5.8.1` | `18.5.0` | 2025-06-18 | -| `win11-x64` | `5.8.1` | `18.5.0` | 2025-05-07 | +| `darwin-arm` | `5.8.1` | `18.5.0` | 2026-03-07 | +| `win11-x64` | `5.8.1` | `18.5.0` | 2026-03-08 | | `win11-arm` | `5.8.1` | `18.5.0` | 2025-02-23 | | `linux-x64` | `5.8.1` | `18.5.0` | 2026-01-18 | -| `linux-arm` | `5.8.1` | `18.5.0` | 2025-02-15 | +| `linux-arm` | `5.8.1` | `18.5.0` | 2026-03-07 | ::: diff --git a/docz/docs/03-demos/20-cli/08-boxednode.md b/docz/docs/03-demos/20-cli/08-boxednode.md index ec17d6c..3b746d5 100644 --- a/docz/docs/03-demos/20-cli/08-boxednode.md +++ b/docz/docs/03-demos/20-cli/08-boxednode.md @@ -30,10 +30,10 @@ This demo was tested in the following deployments: | Architecture | Version | NodeJS | Date | |:-------------|:--------|:----------|:-----------| -| `darwin-x64` | `2.4.4` | `23.11.0` | 2025-04-21 | +| `darwin-x64` | `3.0.0` | `25.8.0` | 2026-03-08 | | `darwin-arm` | `2.4.4` | `23.11.0` | 2025-06-18 | | `win11-x64` | `2.4.4` | `16.20.2` | 2025-05-07 | -| `linux-x64` | `2.4.4` | `23.11.0` | 2025-04-21 | +| `linux-x64` | `3.0.0` | `25.8.0` | 2026-03-08 | | `linux-arm` | `2.4.4` | `23.8.0` | 2025-02-15 | ::: diff --git a/docz/docs/03-demos/20-cli/11-nodesea.md b/docz/docs/03-demos/20-cli/11-nodesea.md index 1c9d81b..e3dd945 100644 --- a/docz/docs/03-demos/20-cli/11-nodesea.md +++ b/docz/docs/03-demos/20-cli/11-nodesea.md @@ -160,10 +160,10 @@ This demo was tested in the following deployments: |:-------------|:----------|:-----------| | `darwin-x64` | `24.13.0` | 2026-01-21 | | `darwin-arm` | `24.2.0` | 2025-06-18 | -| `win11-x64` | `24.2.0` | 2025-06-17 | +| `win11-x64` | `24.13.0` | 2026-03-08 | | `win11-arm` | `22.14.0` | 2025-02-23 | -| `linux-x64` | `24.2.0` | 2025-06-16 | -| `linux-arm` | `22.13.0` | 2025-02-16 | +| `linux-x64` | `24.11.0` | 2026-03-08 | +| `linux-arm` | `24.14.0` | 2026-03-07 | ::: diff --git a/docz/docs/03-demos/20-cli/12-bunsea.md b/docz/docs/03-demos/20-cli/12-bunsea.md index b4e35d5..cfefeb5 100644 --- a/docz/docs/03-demos/20-cli/12-bunsea.md +++ b/docz/docs/03-demos/20-cli/12-bunsea.md @@ -80,11 +80,11 @@ This demo was last tested in the following deployments: | Architecture | BunJS | Date | |:-------------|:---------|:-----------| | `darwin-x64` | `1.3.6` | 2026-01-21 | -| `darwin-arm` | `1.2.16` | 2025-06-18 | -| `win11-x64` | `1.2.13` | 2025-05-07 | +| `darwin-arm` | `1.3.10` | 2026-03-07 | +| `win11-x64` | `1.3.10` | 2026-03-08 | | `win11-arm` | `1.2.3` | 2025-02-23 | -| `linux-x64` | `1.2.16` | 2025-06-16 | -| `linux-arm` | `1.2.2` | 2025-02-16 | +| `linux-x64` | `1.3.10` | 2026-03-08 | +| `linux-arm` | `1.3.10` | 2026-03-07 | ::: diff --git a/docz/docs/03-demos/20-cli/13-denosea.md b/docz/docs/03-demos/20-cli/13-denosea.md index 42a93c1..4c7a5c6 100644 --- a/docz/docs/03-demos/20-cli/13-denosea.md +++ b/docz/docs/03-demos/20-cli/13-denosea.md @@ -103,11 +103,11 @@ This demo was last tested in the following deployments: | Architecture | Deno | Date | |:-------------|:---------|:-----------| | `darwin-x64` | `2.6.5` | 2026-01-21 | -| `darwin-arm` | `2.3.6` | 2025-06-18 | -| `win11-x64` | `2.3.6` | 2025-06-17 | +| `darwin-arm` | `2.7.4` | 2026-03-07 | +| `win11-x64` | `2.7.4` | 2026-03-08 | | `win11-arm` | `2.2.1` | 2025-02-23 | -| `linux-x64` | `2.3.6` | 2025-06-16 | -| `linux-arm` | `2.1.10` | 2025-02-15 | +| `linux-x64` | `2.7.4` | 2026-03-08 | +| `linux-arm` | `2.7.4` | 2026-03-07 | ::: diff --git a/docz/docs/03-demos/20-cli/21-txiki.md b/docz/docs/03-demos/20-cli/21-txiki.md index 87ad091..7ca627c 100644 --- a/docz/docs/03-demos/20-cli/21-txiki.md +++ b/docz/docs/03-demos/20-cli/21-txiki.md @@ -92,7 +92,7 @@ This demo was tested in the following deployments: |:-------------|:----------|:----------|:-----------| | `darwin-x64` | `24.12.0` | `793dd9d` | 2026-01-21 | | `darwin-arm` | `24.12.0` | `793dd9d` | 2026-01-18 | -| `win11-x64` | `24.12.0` | | 2025-04-19 | +| `win11-x64` | `24.12.0` | | 2026-03-08 | | `win11-arm` | `24.12.0` | | 2025-04-19 | | `linux-x64` | `24.12.0` | `65e5595` | 2026-01-18 | | `linux-arm` | `24.12.0` | `65e5595` | 2026-01-21 | diff --git a/docz/docs/03-demos/32-extensions/05-vscode.md b/docz/docs/03-demos/32-extensions/05-vscode.md index a24cbb9..afb64f6 100644 --- a/docz/docs/03-demos/32-extensions/05-vscode.md +++ b/docz/docs/03-demos/32-extensions/05-vscode.md @@ -69,7 +69,7 @@ imported from any script in the extension. The SheetJS NodeJS module must be installed as a development dependency. If the module is installed as a normal dependency, the `vsce`[^3] command-line tool -will fail to package or publish the exxtension. +will fail to package or publish the extension. diff --git a/docz/docs/03-demos/42-engines/01-duktape.md b/docz/docs/03-demos/42-engines/01-duktape.md index 5caafc9..1c0c260 100644 --- a/docz/docs/03-demos/42-engines/01-duktape.md +++ b/docz/docs/03-demos/42-engines/01-duktape.md @@ -129,11 +129,11 @@ This demo was tested in the following deployments: | Architecture | Version | Date | |:-------------|:--------|:-----------| | `darwin-x64` | `2.7.0` | 2026-01-21 | -| `darwin-arm` | `2.7.0` | 2025-09-03 | +| `darwin-arm` | `2.7.0` | 2026-03-07 | | `win11-x64` | `2.7.0` | 2025-04-28 | | `win11-arm` | `2.7.0` | 2025-02-23 | | `linux-x64` | `2.7.0` | 2025-04-21 | -| `linux-arm` | `2.7.0` | 2025-02-15 | +| `linux-arm` | `2.7.0` | 2026-03-07 | ::: @@ -409,7 +409,7 @@ This demo was tested in the following deployments: | `darwin-x64` | `2.7.0` | `8.4.11` | 2026-01-21 | | `darwin-arm` | `2.7.0` | `8.4.8` | 2026-01-23 | | `linux-x64` | `2.7.0` | `8.3.6` | 2025-04-21 | -| `linux-arm` | `2.7.0` | `8.2.26` | 2025-02-15 | +| `linux-arm` | `2.7.0` | `8.4.16` | 2026-03-07 | ::: @@ -553,7 +553,7 @@ This demo was tested in the following deployments: | `win11-x64` | `2.7.0` | `3.11.9` | 2026-02-02 | | `win11-arm` | `2.7.0` | `3.11.9` | 2026-02-02 | | `linux-x64` | `2.7.0` | `3.12.3` | 2025-04-21 | -| `linux-arm` | `2.7.0` | `3.11.2` | 2025-02-15 | +| `linux-arm` | `2.7.0` | `3.13.5` | 2026-03-07 | ::: @@ -911,7 +911,7 @@ This demo was tested in the following deployments: | `win11-x64` | `2.7.0` | `0.14.0` | 2025-04-28 | | `win11-arm` | `2.7.0` | `0.13.0` | 2025-02-23 | | `linux-x64` | `2.7.0` | `0.14.0` | 2025-04-21 | -| `linux-arm` | `2.7.0` | `0.13.0` | 2025-02-15 | +| `linux-arm` | `2.7.0` | `0.15.2` | 2026-03-07 | On Windows, due to incompatibilities between WSL and PowerShell, some commands must be run in WSL Bash. @@ -960,9 +960,9 @@ tar -xf zig-linux-*.tar For AArch64 Linux: ```bash -curl -LO https://ziglang.org/download/0.13.0/zig-linux-aarch64-0.13.0.tar.xz -xz -d zig-linux-*.tar.xz -tar -xf zig-linux-*.tar +curl -LO https://ziglang.org/download/0.15.2/zig-aarch64-linux-0.15.2.tar.xz +xz -d zig-*.tar.xz +tar -xf zig-*.tar ``` @@ -1140,9 +1140,9 @@ This demo was tested in the following deployments: | Architecture | Version | Date | |:-------------|:--------|:-----------| | `darwin-x64` | `2.2.0` | 2026-01-21 | -| `darwin-arm` | `2.2.0` | 2026-01-23 | +| `darwin-arm` | `2.2.0` | 2026-03-07 | | `linux-x64` | `2.2.0` | 2025-04-21 | -| `linux-arm` | `2.2.0` | 2025-02-15 | +| `linux-arm` | `2.2.0` | 2026-03-07 | ::: @@ -1235,11 +1235,11 @@ This demo was tested in the following deployments: | Architecture | Version | Date | |:-------------|:--------|:-----------| | `darwin-x64` | `2.2.1` | 2026-01-21 | -| `darwin-arm` | `2.2.1` | 2026-01-23 | +| `darwin-arm` | `2.2.1` | 2026-03-07 | | `win11-x64` | `2.2.1` | 2026-02-02 | | `win11-arm` | `2.2.1` | 2026-02-02 | | `linux-x64` | `2.2.1` | 2026-01-08 | -| `linux-arm` | `2.2.1` | 2025-04-18 | +| `linux-arm` | `2.2.1` | 2026-03-07 | ::: diff --git a/docz/docs/03-demos/42-engines/02-v8.md b/docz/docs/03-demos/42-engines/02-v8.md index 92a5eda..e8e5ffb 100644 --- a/docz/docs/03-demos/42-engines/02-v8.md +++ b/docz/docs/03-demos/42-engines/02-v8.md @@ -1096,12 +1096,12 @@ This demo was last tested in the following deployments: | Architecture | V8 Crate | Date | |:-------------|:----------|:-----------| -| `darwin-x64` | `136.0.0` | 2025-04-21 | +| `darwin-x64` | `146.3.0` | 2026-03-08 | | `darwin-arm` | `134.3.0` | 2025-02-13 | | `win11-x64` | `137.1.0` | 2025-05-11 | | `win11-arm` | `145.0.0` | 2026-02-02 | | `linux-x64` | `142.2.0` | 2026-01-08 | -| `linux-arm` | `134.4.0` | 2025-02-15 | +| `linux-arm` | `146.3.0` | 2026-03-07 | ::: @@ -1445,12 +1445,12 @@ This demo was last tested in the following deployments: | Architecture | V8 Version | Date | |:-------------|:--------------|:-----------| -| `darwin-x64` | `13.3.415.23` | 2025-03-31 | -| `darwin-arm` | `13.3.415.23` | 2025-03-31 | +| `darwin-x64` | `13.3.415.23` | 2026-03-06 | +| `darwin-arm` | `13.3.415.23` | 2026-03-06 | | `win11-x64` | `13.3.415.23` | 2025-05-11 | | `win11-arm` | `12.3.219.12` | 2025-02-23 | -| `linux-x64` | `12.3.219.12` | 2025-06-16 | -| `linux-arm` | `12.3.219.12` | 2025-02-16 | +| `linux-x64` | `12.3.219.12` | 2026-03-06 | +| `linux-arm` | `13.3.415.23` | 2026-03-07 | ::: @@ -1738,11 +1738,11 @@ This demo was last tested in the following deployments: | Architecture | V8 Version | Crate | Date | |:-------------|:--------------|:----------|:-----------| -| `darwin-x64` | `13.5.212.10` | `136.0.0` | 2025-04-21 | +| `darwin-x64` | `13.5.212.10` | `136.0.0` | 2026-03-08 | | `darwin-arm` | `13.5.212.10` | `136.0.0` | 2025-04-24 | | `win11-x64` | `13.5.212.10` | `136.0.0` | 2025-05-11 | | `linux-x64` | `13.5.212.10` | `136.0.0` | 2025-06-16 | -| `linux-arm` | `13.4.114.9` | `134.4.0` | 2025-02-15 | +| `linux-arm` | `13.5.212.10` | `136.0.0` | 2026-03-07 | ::: diff --git a/docz/docs/03-demos/42-engines/05-jint.md b/docz/docs/03-demos/42-engines/05-jint.md index 400c806..cf5cdea 100644 --- a/docz/docs/03-demos/42-engines/05-jint.md +++ b/docz/docs/03-demos/42-engines/05-jint.md @@ -168,7 +168,7 @@ This demo was tested in the following deployments: | `win11-x64` | `4.2.2` | 2026-04-28 | | `win11-arm` | `4.2.0` | 2025-02-23 | | `linux-x64` | `4.2.2` | 2025-06-16 | -| `linux-arm` | `4.2.0` | 2025-02-15 | +| `linux-arm` | `4.5.0` | 2026-03-07 | ::: diff --git a/docz/docs/03-demos/42-engines/06-goja.md b/docz/docs/03-demos/42-engines/06-goja.md index 3383a52..dddaa1f 100644 --- a/docz/docs/03-demos/42-engines/06-goja.md +++ b/docz/docs/03-demos/42-engines/06-goja.md @@ -106,11 +106,11 @@ This demo was tested in the following deployments: | Architecture | Git Commit | Go version | Date | |:-------------|:-----------|:-----------|:-----------| | `darwin-x64` | `651366f` | `1.25.6` | 2026-01-21 | -| `darwin-arm` | `cb187b0` | `1.24.0` | 2025-06-18 | -| `win11-x64` | `bcd7cc6` | `1.24.2` | 2025-04-28 | +| `darwin-arm` | `6a7976c` | `1.24.0` | 2026-03-07 | +| `win11-x64` | `6a7976c` | `1.24.2` | 2026-03-08 | | `win11-arm` | `5ef83b8` | `1.24.0` | 2025-02-23 | | `linux-x64` | `cb187b0` | `1.22.2` | 2025-06-16 | -| `linux-arm` | `5ef83b8` | `1.19.8` | 2025-02-15 | +| `linux-arm` | `6a7976c` | `1.24.4` | 2026-03-07 | At the time of writing, Goja did not have proper version numbers. Versions are identified by Git commit hashes. diff --git a/docz/docs/03-demos/42-engines/08-quickjs.md b/docz/docs/03-demos/42-engines/08-quickjs.md index c6f0c7f..210c4b2 100644 --- a/docz/docs/03-demos/42-engines/08-quickjs.md +++ b/docz/docs/03-demos/42-engines/08-quickjs.md @@ -264,11 +264,11 @@ This demo was tested in the following deployments: | Architecture | Library | Git Commit | Date | |:-------------|:-----------|:-----------|:-----------| | `darwin-x64` | QuickJS | `f113949` | 2026-01-21 | -| `darwin-arm` | QuickJS | `3306254` | 2025-09-03 | -| `win11-x64` | QuickJS-NG | `865ba1f` | 2025-04-18 | +| `darwin-arm` | QuickJS | `f113949` | 2026-03-07 | +| `win11-x64` | QuickJS-NG | `4951c83` | 2025-04-18 | | `win11-arm` | QuickJS-NG | `865ba1f` | 2025-04-18 | -| `linux-x64` | QuickJS | `3306254` | 2025-06-18 | -| `linux-arm` | QuickJS | `6e2e68f` | 2025-02-15 | +| `linux-x64` | QuickJS | `f113949` | 2026-03-08 | +| `linux-arm` | QuickJS | `f113949` | 2026-03-07 | When the demo was tested, `f113949` was the HEAD commit on the `master` branch. @@ -369,7 +369,7 @@ cd sheetjs-quick ```bash git clone https://github.com/quickjs-ng/quickjs cd quickjs -git checkout 865ba1f1 +git checkout 4951c83 cmake -B build -DQJS_BUILD_EXAMPLES=ON cmake --build build --config Release build\Release\qjs.exe amalgam.js @@ -386,7 +386,7 @@ copy quickjs\quickjs.h . 3) Download [`sheetjs.quick.c`](pathname:///quickjs/sheetjs.quick.c): ```bash -curl -LO https://docs.sheetjs.com/quickjs/sheetjs.quick.c +curl.exe -LO https://docs.sheetjs.com/quickjs/sheetjs.quick.c ``` 4) Build the sample application: @@ -406,8 +406,8 @@ the project directory: {`\ -curl -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js -curl -LO https://docs.sheetjs.com/pres.numbers`} +curl.exe -LO https://cdn.sheetjs.com/xlsx-${current}/package/dist/xlsx.full.min.js +curl.exe -LO https://docs.sheetjs.com/pres.numbers`} 6) Run the test program: diff --git a/docz/docs/03-demos/42-engines/09-hermes.md b/docz/docs/03-demos/42-engines/09-hermes.md index ee475d1..09b4a1c 100644 --- a/docz/docs/03-demos/42-engines/09-hermes.md +++ b/docz/docs/03-demos/42-engines/09-hermes.md @@ -364,10 +364,10 @@ This demo was tested in the following deployments: | Architecture | Git Commit | Date | |:-------------|:-----------|:-----------| -| `darwin-x64` | `8ef11b4` | 2025-03-31 | +| `darwin-x64` | `f45c6bc` | 2026-03-06 | | `darwin-arm` | `f45c6bc` | 2026-01-23 | | `linux-x64` | `8ef11b4` | 2025-04-21 | -| `linux-arm` | `388376f` | 2025-02-15 | +| `linux-arm` | `f45c6bc` | 2026-03-07 | The main Hermes source tree does not have Windows support. The `hermes-windows` fork, which powers React Native for Windows, does have built-in support[^5] @@ -853,12 +853,12 @@ This demo was tested in the following deployments: | Architecture | Hermes | Date | |:-------------|:---------|:-----------| -| `darwin-x64` | `0.13.0` | 2025-03-31 | -| `darwin-arm` | `0.13.0` | 2026-01-23 | +| `darwin-x64` | `0.13.0` | 2026-03-06 | +| `darwin-arm` | `0.13.0` | 2026-03-06 | | `win11-x64` | `0.13.0` | 2025-04-28 | | `win11-arm` | `0.13.0` | 2025-02-23 | | `linux-x64` | `0.13.0` | 2025-04-21 | -| `linux-arm` | `0.13.0` | 2026-01-10 | +| `linux-arm` | `0.13.0` | 2026-03-07 | When this demo was last tested, `jsvu` did not install a native `linux-arm` binary. Nevertheless, the process was tested using `qemu-user` to simulate the diff --git a/docz/docs/03-demos/42-engines/15-rb.md b/docz/docs/03-demos/42-engines/15-rb.md index bfd5eb7..37bfd76 100644 --- a/docz/docs/03-demos/42-engines/15-rb.md +++ b/docz/docs/03-demos/42-engines/15-rb.md @@ -88,11 +88,11 @@ This demo was tested in the following deployments: | Platform | Ruby | ExecJS | Date | |:-------------|:---------|:---------|:-----------| | `darwin-x64` | `2.6.10` | `2.10.0` | 2026-01-21 | -| `darwin-arm` | `2.6.10` | `2.10.0` | 2025-09-03 | +| `darwin-arm` | `2.6.10` | `2.10.0` | 2026-03-07 | | `win11-x64` | `3.3.8` | `2.10.0` | 2025-04-28 | | `win11-arm` | `3.2.3` | `2.10.0` | 2025-02-23 | -| `linux-x64` | `3.2.3` | `2.10.0` | 2025-04-21 | -| `linux-arm` | `3.1.2` | `2.10.0` | 2025-02-15 | +| `linux-x64` | `3.3.8` | `2.10.0` | 2026-03-08 | +| `linux-arm` | `3.3.8` | `2.10.0` | 2026-03-07 | When the demo was last tested, there was no official Ruby release for Windows on ARM. The `win11-arm` test was run in WSL. diff --git a/docz/docs/03-demos/42-engines/20-chakra.md b/docz/docs/03-demos/42-engines/20-chakra.md index e15da43..add5af7 100644 --- a/docz/docs/03-demos/42-engines/20-chakra.md +++ b/docz/docs/03-demos/42-engines/20-chakra.md @@ -132,10 +132,10 @@ This demo was tested in the following deployments: | Architecture | Git Commit | Date | |:-------------|:-----------|:-----------| | `darwin-x64` | `792ee76` | 2026-01-20 | -| `darwin-arm` | `792ee76` | 2026-01-20 | +| `darwin-arm` | `792ee76` | 2026-03-08 | | `win11-x64` | `36becec` | 2025-04-28 | | `win11-arm` | `e26c81f` | 2025-02-23 | -| `linux-x64` | `36becec` | 2025-06-18 | +| `linux-x64` | `792ee76` | 2026-03-08 | | `linux-arm` | `792ee76` | 2026-01-10 | ::: @@ -233,7 +233,7 @@ This was fixed with a local symlink to the `icu4c` folder before the build step: cd ChakraCore mkdir -p usr/local/opt ln -s /opt/homebrew/opt/icu4c usr/local/opt/icu4c -./build.sh --static --icu=/usr/local/opt/icu4c/include --test-build -j=8 --system-icu --no-jit +./build.sh --static --icu=usr/local/opt/icu4c/include --test-build -j=8 --system-icu --no-jit cd .. ``` diff --git a/docz/docs/03-demos/42-engines/21-boa.md b/docz/docs/03-demos/42-engines/21-boa.md index d72e84d..11ce317 100644 --- a/docz/docs/03-demos/42-engines/21-boa.md +++ b/docz/docs/03-demos/42-engines/21-boa.md @@ -106,11 +106,11 @@ This demo was tested in the following deployments: | Architecture | Boa | Date | |:-------------|:---------|:-----------| | `darwin-x64` | `0.20.1` | 2026-01-21 | -| `darwin-arm` | `0.20.0` | 2025-09-03 | +| `darwin-arm` | `0.21.0` | 2026-03-07 | | `win11-x64` | `0.20.0` | 2025-04-28 | | `win11-arm` | `0.20.0` | 2025-02-23 | | `linux-x64` | `0.21.0` | 2026-01-08 | -| `linux-arm` | `0.20.0` | 2025-02-15 | +| `linux-arm` | `0.21.0` | 2026-03-07 | ::: diff --git a/docz/docs/03-demos/42-engines/22-perl.md b/docz/docs/03-demos/42-engines/22-perl.md index 81ca986..2578f5c 100644 --- a/docz/docs/03-demos/42-engines/22-perl.md +++ b/docz/docs/03-demos/42-engines/22-perl.md @@ -130,11 +130,11 @@ This demo was tested in the following deployments: | Architecture | Version | Date | |:-------------|:--------|:-----------| | `darwin-x64` | `0.066` | 2026-01-21 | -| `darwin-arm` | `0.066` | 2025-09-03 | +| `darwin-arm` | `0.066` | 2026-03-07 | | `win11-x64` | `0.066` | 2026-01-10 | | `win11-arm` | `0.066` | 2026-01-10 | -| `linux-x64` | `0.066` | 2025-06-16 | -| `linux-arm` | `0.066` | 2025-02-15 | +| `linux-x64` | `0.066` | 2026-03-07 | +| `linux-arm` | `0.066` | 2026-03-07 | The Windows tests were run in WSL. diff --git a/docz/docs/03-demos/42-engines/23-jerryscript.md b/docz/docs/03-demos/42-engines/23-jerryscript.md index dcf092d..aa07f55 100644 --- a/docz/docs/03-demos/42-engines/23-jerryscript.md +++ b/docz/docs/03-demos/42-engines/23-jerryscript.md @@ -37,11 +37,11 @@ This demo was tested in the following environments: | Architecture | Commit | Date | |:-------------|:----------|:-----------| | `darwin-x64` | `b706935` | 2026-01-21 | -| `darwin-arm` | `355ab24` | 2025-09-03 | +| `darwin-arm` | `b706935` | 2026-03-07 | | `win11-x64` | `5020015` | 2025-04-23 | | `win11-arm` | `5020015` | 2025-02-23 | -| `linux-x64` | `5020015` | 2025-04-21 | -| `linux-arm` | `5020015` | 2025-02-15 | +| `linux-x64` | `b706935` | 2026-03-07 | +| `linux-arm` | `b706935` | 2026-03-07 | The Windows tests were run in WSL. @@ -366,6 +366,18 @@ python3 tools/build.py --error-messages=ON --logging=ON --mem-heap=8192 --cpoint cd .. ``` +:::caution pass + +In some tests, the build step failed with compiler warnings treated as errors. +The flags `-Wno-error` and `-Wno-unterminated-string-initialization` should be +added to the build: + +```bash +python3 tools/build.py --error-messages=ON --logging=ON --mem-heap=8192 --cpointer-32bit=ON --compile-flag="-Wno-error" --compile-flag="-Wno-unterminated-string-initialization" +``` + +::: + 3) Download the SheetJS Standalone script, shim script and test file. Move all three files to the `SheetJSJerry` directory: diff --git a/docz/docs/03-demos/42-engines/25-mujs.md b/docz/docs/03-demos/42-engines/25-mujs.md index 03126d6..6a91aa9 100644 --- a/docz/docs/03-demos/42-engines/25-mujs.md +++ b/docz/docs/03-demos/42-engines/25-mujs.md @@ -324,9 +324,9 @@ This demo was tested in the following deployments: |:-------------|:--------|:-----------| | `darwin-x64` | `1.3.8` | 2026-01-20 | | `darwin-arm` | `1.3.8` | 2026-01-20 | -| `win11-x64` | `1.3.6` | 2025-04-23 | +| `win11-x64` | `1.3.8` | 2026-03-08 | | `win11-arm` | `1.3.5` | 2025-02-23 | -| `linux-x64` | `1.3.6` | 2025-06-16 | +| `linux-x64` | `1.3.8` | 2026-03-07 | | `linux-arm` | `1.3.8` | 2026-01-10 | ::: diff --git a/docz/docs/03-demos/42-engines/26-jurassic.md b/docz/docs/03-demos/42-engines/26-jurassic.md index 4927ebc..2d1f55d 100644 --- a/docz/docs/03-demos/42-engines/26-jurassic.md +++ b/docz/docs/03-demos/42-engines/26-jurassic.md @@ -177,11 +177,11 @@ This demo was tested in the following deployments: | Architecture | Jurassic | Date | |:-------------|:---------|:-----------| | `darwin-x64` | `3.2.9` | 2026-01-21 | -| `darwin-arm` | `3.2.9` | 2025-09-03 | +| `darwin-arm` | `3.2.9` | 2026-03-07 | | `win11-x64` | `3.2.9` | 2025-04-23 | | `win11-arm` | `3.2.9` | 2025-02-23 | -| `linux-x64` | `3.2.9` | 2025-06-16 | -| `linux-arm` | `3.2.9` | 2025-02-15 | +| `linux-x64` | `3.2.9` | 2026-03-07 | +| `linux-arm` | `3.2.9` | 2026-03-07 | ::: diff --git a/docz/docs/09-miscellany/05-contributing.md b/docz/docs/09-miscellany/05-contributing.md index 6cc17d8..3c9e855 100644 --- a/docz/docs/09-miscellany/05-contributing.md +++ b/docz/docs/09-miscellany/05-contributing.md @@ -46,7 +46,7 @@ These instructions were tested on the following platforms: | MacOS 15.6 (x64) | `darwin-x64` | 2026-01-21 | | MacOS 15.7 (ARM64) | `darwin-arm` | 2026-02-02 | | Windows 11 (x64) + WSL Ubuntu | `win11-x64` | 2025-06-20 | -| Windows 11 (ARM) + WSL Ubuntu | `win11-arm` | 2025-02-23 | +| Windows 11 (ARM) + WSL Ubuntu | `win11-arm` | 2026-03-08 | With some additional dependencies, the unminified scripts are reproducible and tests will pass in Windows XP with NodeJS 5.10.0. diff --git a/docz/static/electron/package.json b/docz/static/electron/package.json index 6a46726..42c2c4f 100644 --- a/docz/static/electron/package.json +++ b/docz/static/electron/package.json @@ -6,7 +6,7 @@ "version": "0.0.0", "main": "main.js", "dependencies": { - "@electron/remote": "2.1.2", + "@electron/remote": "2.1.3", "xlsx": "https://sheet.lol/balls/xlsx-0.20.3.tgz" }, "scripts": { @@ -15,12 +15,12 @@ "make": "electron-forge make" }, "devDependencies": { - "@electron-forge/cli": "7.8.0", - "@electron-forge/maker-deb": "7.8.0", - "@electron-forge/maker-rpm": "7.8.0", - "@electron-forge/maker-squirrel": "7.8.0", - "@electron-forge/maker-zip": "7.8.0", - "electron": "35.1.2" + "@electron-forge/cli": "7.11.1", + "@electron-forge/maker-deb": "7.11.1", + "@electron-forge/maker-rpm": "7.11.1", + "@electron-forge/maker-squirrel": "7.11.1", + "@electron-forge/maker-zip": "7.11.1", + "electron": "40.8.0" }, "config": { "forge": { diff --git a/docz/static/hermes/Makefile b/docz/static/hermes/Makefile index 362da32..a804cfa 100644 --- a/docz/static/hermes/Makefile +++ b/docz/static/hermes/Makefile @@ -45,8 +45,8 @@ sheetjs-hermes: sheetjs-hermes.cpp init -Lbuild_release/external/llvh/lib/Demangle/ -lLLVHDemangle \ -Lbuild_release/external/llvh/lib/Support/ -lLLVHSupport \ -Lbuild_release/jsi/ -ljsi \ - -Lbuild_release/lib/ -lhermesFrontend \ -Lbuild_release/lib/ -lhermesOptimizer \ + -Lbuild_release/lib/ -lhermesFrontend \ -Lbuild_release/lib/ADT -lhermesADT \ -Lbuild_release/lib/AST/ -lhermesAST \ -Lbuild_release/lib/AST2JS/ -lhermesAST2JS \ diff --git a/tests/dom/denodom.sh b/tests/dom/denodom.sh new file mode 100755 index 0000000..982d8b7 --- /dev/null +++ b/tests/dom/denodom.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# https://docs.sheetjs.com/docs/demos/net/dom#denodom + +set -e + +cd /tmp +rm -rf sheetjs-denodom +mkdir -p sheetjs-denodom +cd sheetjs-denodom + +# Create the TypeScript file +cat > SheetJSDenoDOM.ts << 'EOF' +// @deno-types="https://cdn.sheetjs.com/xlsx-0.20.3/package/types/index.d.ts" +import * as XLSX from 'https://cdn.sheetjs.com/xlsx-0.20.3/package/xlsx.mjs'; + +import { DOMParser } from 'https://deno.land/x/deno_dom@v0.1.48/deno-dom-wasm.ts'; + +const doc = new DOMParser().parseFromString( + await (await fetch('https://docs.sheetjs.com/dom/SheetJSTable.html')).text(), + "text/html", +)!; +const tbl = doc.querySelector("table"); + +/* patch DenoDOM element */ +tbl.rows = tbl.querySelectorAll("tr"); +tbl.rows.forEach(row => row.cells = row.querySelectorAll("td, th")) + +/* generate workbook */ +const workbook = XLSX.utils.table_to_book(tbl); +XLSX.writeFile(workbook, "SheetJSDenoDOM.xlsx"); +EOF + +deno run --allow-net --allow-write --allow-import SheetJSDenoDOM.ts +npx -y xlsx-cli SheetJSDenoDOM.xlsx diff --git a/tests/engines/chakracore.sh b/tests/engines/chakracore.sh index 46e2817..7579ec0 100755 --- a/tests/engines/chakracore.sh +++ b/tests/engines/chakracore.sh @@ -1,9 +1,22 @@ #!/bin/bash # https://docs.sheetjs.com/docs/demos/engines/chakra +OS=$(uname -s) +ARCH=$(uname -m) + +case "$OS" in + Darwin|Linux) ;; + *) echo "Unsupported OS: $OS"; exit 1 ;; +esac + +case "$ARCH" in + x86_64) ARCH="x64" ;; + arm64|aarch64) ARCH="arm64" ;; + *) echo "Unsupported architecture: $ARCH"; exit 1 ;; +esac + cd /tmp rm -rf sheetjs-chakra - mkdir sheetjs-chakra cd sheetjs-chakra @@ -13,12 +26,65 @@ git checkout 792ee76 cd .. cd ChakraCore -./build.sh --static --icu=/usr/local/opt/icu4c/include --test-build -j=8 --no-jit +case "$OS" in + Darwin) + BREW_PREFIX=$(brew --prefix) + + # Check for required commands + if ! command -v cmake &> /dev/null; then + echo "cmake not found. Please install cmake (e.g., brew install cmake)" + exit 1 + fi + if ! brew list icu4c &> /dev/null; then + echo "icu4c not found. Please install icu4c (e.g., brew install icu4c)" + exit 1 + fi + + if [ ! -d usr/local/opt ] && [ -d "${BREW_PREFIX}/opt/icu4c" ]; then + mkdir -p usr/local/opt + ln -sf "${BREW_PREFIX}/opt/icu4c" usr/local/opt/icu4c + fi + + for f in CMakeLists.txt pal/CMakeLists.txt pal/src/CMakeLists.txt lib/wabt/CMakeLists.txt; do + if [ -f "$f" ] && grep -q "cmake_minimum_required(VERSION 3.2)" "$f"; then + sed -i '' 's/cmake_minimum_required(VERSION 3.2)/cmake_minimum_required(VERSION 4.0)/g' "$f" + fi + done + + if [ "$ARCH" = "arm64" ]; then + if grep -q "^operator new(" lib/Common/Memory/Allocator.h 2>/dev/null; then + sed -i '' ':a;N;$!ba;s/#ifndef __PLACEMENT_NEW_INLINE.*#endif/#include /g' lib/Common/Memory/Allocator.h + fi + + ./build.sh --static --no-icu --test-build -j=8 --no-jit + else + ./build.sh --static --icu=${BREW_PREFIX}/opt/icu4c/include --test-build -j=8 --system-icu --no-jit + fi + ;; + + Linux) + # Check for required commands + if ! command -v cmake &> /dev/null; then + echo "cmake not found. Please install cmake (e.g., sudo apt-get install cmake or sudo pacman -S cmake)" + exit 1 + fi + if ! command -v clang++ &> /dev/null; then + echo "clang++ not found. Please install clang (e.g., sudo apt-get install clang or sudo pacman -S clang)" + exit 1 + fi + + ./build.sh --static --embed-icu --test-build -j=8 --no-jit + ;; +esac cd .. curl -L -O https://docs.sheetjs.com/chakra/sheetjs.ch.cpp curl -L -O https://docs.sheetjs.com/chakra/Makefile +if [[ "$OS" == "Darwin" && "$ARCH" == "x64" && ! -d /usr/local/opt/icu4c ]]; then + sudo mkdir -p /usr/local/opt 2>/dev/null || true + sudo ln -sf "${BREW_PREFIX}/opt/icu4c" /usr/local/opt 2>/dev/null || true +fi make curl -L -O https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js @@ -30,11 +96,11 @@ cp ChakraCore/out/Test/ch . node -e "fs.writeFileSync('payload.js', 'var payload = \"' + fs.readFileSync('pres.numbers').toString('base64') + '\";')" -cat <global.js +cat >global.js <<'EOF' var global = (function(){ return this; }).call(null); EOF -cat <chakra.js +cat >chakra.js <<'EOF' var wb = XLSX.read(payload, {type:'base64'}); console.log(XLSX.utils.sheet_to_csv(wb.Sheets[wb.SheetNames[0]])); EOF diff --git a/tests/engines/clearscript.sh b/tests/engines/clearscript.sh new file mode 100755 index 0000000..8e43d66 --- /dev/null +++ b/tests/engines/clearscript.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# https://docs.sheetjs.com/docs/demos/engines/v8#c + +set -e + +cd /tmp +rm -rf SheetJSClearScript +mkdir -p SheetJSClearScript +cd SheetJSClearScript + +# Disable .NET telemetry +export DOTNET_CLI_TELEMETRY_OPTOUT=1 + +# Create new console project +dotnet new console +dotnet run + +# Add ClearScript package +dotnet add package Microsoft.ClearScript.Complete --version 7.5.0 + +# Download SheetJS and test file +curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js +curl -LO https://docs.sheetjs.com/pres.xlsx + +# Replace Program.cs with the demo code +cat > Program.cs << 'EOF' +using Microsoft.ClearScript.JavaScript; +using Microsoft.ClearScript.V8; + +/* initialize ClearScript */ +var engine = new V8ScriptEngine(); + +/* Load SheetJS Scripts */ +engine.Evaluate(File.ReadAllText("xlsx.full.min.js")); +Console.WriteLine("SheetJS version {0}", engine.Evaluate("XLSX.version")); + +/* Read and Parse File */ +byte[] filedata = File.ReadAllBytes(args[0]); +engine.Script.buf = engine.Script.Array.from(filedata); +engine.Evaluate("var wb = XLSX.read(buf, {type: 'array'});"); + +/* Print CSV of first worksheet */ +engine.Evaluate("var ws = wb.Sheets[wb.SheetNames[0]];"); +var csv = engine.Evaluate("XLSX.utils.sheet_to_csv(ws)"); +Console.Write(csv); + +/* Generate XLSB file and save to SheetJSClearScript.xlsb */ +var xlsb = (ITypedArray)engine.Evaluate("XLSX.write(wb, {bookType: 'xlsb', type: 'buffer'})"); +File.WriteAllBytes("SheetJSClearScript.xlsb", xlsb.ToArray()); + +Console.WriteLine("\nOutput saved to SheetJSClearScript.xlsb"); +EOF + +# Run the program +dotnet run pres.xlsx + +# Verify the XLSB file is valid +npx -y xlsx-cli SheetJSClearScript.xlsb diff --git a/tests/engines/duktape-perl.sh b/tests/engines/duktape-perl.sh index 1e5bb3c..fbbd7fb 100755 --- a/tests/engines/duktape-perl.sh +++ b/tests/engines/duktape-perl.sh @@ -13,4 +13,13 @@ curl -LO https://docs.sheetjs.com/pres.xlsx perl SheetJSDuk.pl pres.xlsx; echo $? -npx -y xlsx-cli SheetJSDuk.xlsb \ No newline at end of file +npx -y xlsx-cli SheetJSDuk.xlsb +cat < build.zig.tmp && mv build.zig.tmp build.zig ./zig-*/zig build run -- pres.numbers; echo $? diff --git a/tests/engines/goja.ps1 b/tests/engines/goja.ps1 new file mode 100644 index 0000000..279b701 --- /dev/null +++ b/tests/engines/goja.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +# https://docs.sheetjs.com/docs/demos/engines/goja + +$ErrorActionPreference = "Stop" + +$oldDir = Get-Location +$tempDir = Join-Path -Path $env:TEMP -ChildPath "SheetGoja" +if (Test-Path -Path $tempDir) { Remove-Item -Path $tempDir -Recurse -Force } +New-Item -ItemType Directory -Path $tempDir | Out-Null +Set-Location -Path $tempDir + +go mod init SheetGoja +go get github.com/dop251/goja + +Invoke-WebRequest -Uri "https://cdn.sheetjs.com/xlsx-latest/package/dist/shim.min.js" -OutFile "shim.min.js" +Invoke-WebRequest -Uri "https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js" -OutFile "xlsx.full.min.js" +Invoke-WebRequest -Uri "https://sheetjs.com/pres.numbers" -OutFile "pres.numbers" + +Invoke-WebRequest -Uri "https://docs.sheetjs.com/goja/SheetGoja.go" -OutFile "SheetGoja.go" + +go build SheetGoja.go +if ($LASTEXITCODE -ne 0) { throw "Build failed" } + +.\SheetGoja.exe pres.numbers +if ($LASTEXITCODE -ne 0) { throw "Execution failed" } + +Set-Location $oldDir +Remove-Item -Path $tempDir -Recurse -Force diff --git a/tests/engines/hermes-cli.sh b/tests/engines/hermes-cli.sh new file mode 100755 index 0000000..d716739 --- /dev/null +++ b/tests/engines/hermes-cli.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# https://docs.sheetjs.com/docs/demos/engines/hermes#cli-test + +set -e + +HERMES_VERSION="0.13.0" + +cd /tmp +rm -rf sheetjs-hermes-cli +mkdir -p sheetjs-hermes-cli +cd sheetjs-hermes-cli + +npx -y jsvu hermes@${HERMES_VERSION} + +HERMES_BIN=$(find ~/.jsvu/engines/hermes-${HERMES_VERSION} -name "hermes-${HERMES_VERSION}" -type f | head -1) +if [ -z "$HERMES_BIN" ]; then echo "Failed to find Hermes binary"; exit 1; fi + +cp "$HERMES_BIN" . + +curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js +curl -LO https://docs.sheetjs.com/pres.numbers + +node -e "fs.writeFileSync('payload.js', 'var payload = \"' + fs.readFileSync('pres.numbers').toString('base64') + '\";')" + +cat > global.js << 'EOF' +var global = (function(){ return this; }).call(null); +var console = { log: function(x) { print(x); } }; +EOF + +cat > hermes.js << 'EOF' +var wb = XLSX.read(payload, {type:'base64'}); +console.log(XLSX.utils.sheet_to_csv(wb.Sheets[wb.SheetNames[0]])); +EOF + +cat global.js xlsx.full.min.js payload.js hermes.js > sheetjs.hermes.js + +./hermes-${HERMES_VERSION} sheetjs.hermes.js diff --git a/tests/engines/jerryscript.sh b/tests/engines/jerryscript.sh index 9d5c940..f699375 100755 --- a/tests/engines/jerryscript.sh +++ b/tests/engines/jerryscript.sh @@ -7,7 +7,7 @@ cd SheetJSJerry git clone --depth=1 https://github.com/jerryscript-project/jerryscript.git cd jerryscript -python3 tools/build.py --error-messages=ON --logging=ON --mem-heap=8192 --cpointer-32bit=ON +python3 tools/build.py --error-messages=ON --logging=ON --mem-heap=8192 --cpointer-32bit=ON --compile-flag="-Wno-error" --compile-flag="-Wno-unterminated-string-initialization" cd .. curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js diff --git a/tests/engines/quickjs.sh b/tests/engines/quickjs.sh index 6d8af58..07baa20 100755 --- a/tests/engines/quickjs.sh +++ b/tests/engines/quickjs.sh @@ -1,5 +1,6 @@ #!/bin/bash # https://docs.sheetjs.com/docs/demos/engines/quickjs + cd /tmp rm -rf sheetjs-quickjs mkdir -p sheetjs-quickjs diff --git a/tests/frontend/knockout.sh b/tests/frontend/knockout.sh new file mode 100755 index 0000000..17cf909 --- /dev/null +++ b/tests/frontend/knockout.sh @@ -0,0 +1,110 @@ +#!/bin/bash +# https://docs.sheetjs.com/docs/demos/frontend/legacy#knockoutjs +# Tests both Knockout 2 and Knockout 3 + +cd /tmp +rm -rf sheetjs-knockout-tests +mkdir -p sheetjs-knockout-tests +cd sheetjs-knockout-tests + +cat >test.cjs <<'EOF' +const puppeteer = require('puppeteer'); +const express = require('express'); +const fs = require('fs'); + +(async() => { + const app = express(); + app.use(express.static('./')); + const server = app.listen(7263, async() => { + console.log('[START] Server on port 7263'); + + const browser = await puppeteer.launch({ headless: 'new', args: ['--no-sandbox'] }); + const page = await browser.newPage(); + page.on('console', msg => console.log('PAGE:', msg.text())); + + await page.setViewport({ width: 1920, height: 1080 }); + + const cdp = await page.target().createCDPSession(); + await cdp.send('Browser.setDownloadBehavior', { behavior: 'allow', downloadPath: process.cwd() }); + + await page.goto('http://localhost:7263/', { waitUntil: 'networkidle0' }); + + /* Verify Knockout binding */ + const hasBinding = await page.$('table[data-bind]'); + if(!hasBinding) throw new Error('Knockout binding not found'); + + /* Verify initial data */ + const initialRows = await page.$$eval('table tr', rs => rs.length); + if(initialRows !== 3) throw new Error('Expected 3 rows, got ' + initialRows); + + /* Verify SheetJS loaded */ + const hasXLSX = await page.evaluate(() => typeof XLSX !== 'undefined'); + if(!hasXLSX) throw new Error('SheetJS not loaded'); + + /* Test file import */ + const buf = fs.readFileSync('./pres.xlsx'); + await page.evaluate((b64) => { + const input = document.getElementById('xlf'); + const bytes = Uint8Array.from(atob(b64), c => c.charCodeAt(0)); + const file = new File([bytes], 'pres.xlsx', { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }); + const dt = new DataTransfer(); + dt.items.add(file); + input.files = dt.files; + input.dispatchEvent(new Event('change', { bubbles: true })); + }, buf.toString('base64')); + + await new Promise(r => setTimeout(r, 2000)); + const importedRows = await page.$$eval('table tr', rs => rs.length); + if(importedRows <= 3) throw new Error('Import failed: ' + importedRows + ' rows'); + + /* Cell mutation test */ + await page.evaluate(() => { + const input = document.querySelector('table input'); + if(input) { input.value = 'MODIFIED_TEST_VALUE'; input.dispatchEvent(new Event('change', { bubbles: true })); } + }); + + /* Export test */ + const exportPath = './SheetJSKnockoutDemo.xlsx'; + if(fs.existsSync(exportPath)) fs.unlinkSync(exportPath); + + await page.click('#export'); + for(let i = 0; i < 10 && !fs.existsSync(exportPath); ++i) await new Promise(r => setTimeout(r, 500)); + if(!fs.existsSync(exportPath)) throw new Error('Export failed'); + + const stats = fs.statSync(exportPath); + if(stats.size < 100) throw new Error('Export file too small: ' + stats.size); + + console.log('[PASS] All tests passed (' + stats.size + ' bytes)'); + await browser.close(); + server.close(); + process.exit(0); + }); +})(); +EOF + +curl -LO https://docs.sheetjs.com/pres.xlsx + +npm init -y +npm install --save puppeteer express@4 + +for KNOCKOUT_VERSION in knockout{2,3}; do + curl -L -o index.html "https://docs.sheetjs.com/knockout/${KNOCKOUT_VERSION}.html" + + node test.cjs + TEST_EXIT=$? + + if [ $TEST_EXIT -ne 0 ]; then echo "Puppeteer tests failed with exit code $TEST_EXIT"; exit $TEST_EXIT; fi + + if [ -f "./SheetJSKnockoutDemo.xlsx" ]; then + OUTPUT=$(npx -y xlsx-cli SheetJSKnockoutDemo.xlsx) + echo "$OUTPUT" + + if echo "$OUTPUT" | grep -q "MODIFIED_TEST_VALUE"; then + rm SheetJSKnockoutDemo.xlsx + else + echo "ERROR: Exported file does not contain MODIFIED_TEST_VALUE"; exit 1 + fi + else + echo "ERROR: Exported file not found"; exit 1 + fi +done diff --git a/tests/math/pandas.ps1 b/tests/math/pandas.ps1 new file mode 100644 index 0000000..0d56c74 --- /dev/null +++ b/tests/math/pandas.ps1 @@ -0,0 +1,88 @@ +#!/usr/bin/env pwsh +# https://docs.sheetjs.com/docs/demos/math/pandas + +$oldDir = Get-Location +$tempDir = Join-Path -Path $env:TEMP -ChildPath "sheetjs-pandas" +if (Test-Path -Path $tempDir) { Remove-Item -Path $tempDir -Recurse -Force } +New-Item -ItemType Directory -Path $tempDir | Out-Null +Set-Location -Path $tempDir + +Invoke-WebRequest -Uri "https://www.7-zip.org/a/7z2501-extra.7z" -OutFile "7z2501-extra.7z" +$7zrPath = "7zr.exe" +if (-not (Test-Path $7zrPath)) { + Invoke-WebRequest -Uri "https://www.7-zip.org/a/7zr.exe" -OutFile $7zrPath +} +.\7zr.exe x 7z2501-extra.7z -y -o"7za" | Out-Null +Move-Item -Path "7za\7za.exe" -Destination "7za.exe" -Force +Remove-Item -Path "7z2501-extra.7z" -Force +Remove-Item -Path "7za" -Recurse -Force + +Invoke-WebRequest -Uri "https://duktape.org/duktape-2.7.0.tar.xz" -OutFile "duktape-2.7.0.tar.xz" + +.\7za.exe x duktape-2.7.0.tar.xz -y | Out-Null +.\7za.exe x duktape-2.7.0.tar -y | Out-Null + +$vsVersions = @("2022\Community", "2022\Professional", "2022\Enterprise", "2019\Community") +foreach ($vsVersion in $vsVersions) { + $vcvarsPath = "${env:ProgramFiles}\Microsoft Visual Studio\$vsVersion\VC\Auxiliary\Build\vcvars64.bat" + if (Test-Path -Path $vcvarsPath) { break } +} + +$tempEnvFile = [System.IO.Path]::GetTempFileName() +$vcvarsArg = if ($env:PROCESSOR_ARCHITECTURE -eq 'ARM64') { 'arm64' } else { '' } + +Push-Location "$vcvarsPath\..\.." +if ($vcvarsArg) { + cmd.exe /c "`"$vcvarsPath`" $vcvarsArg && set > `"$tempEnvFile`"" +} else { + cmd.exe /c "`"$vcvarsPath`" && set > `"$tempEnvFile`"" +} +Pop-Location + +Get-Content "$tempEnvFile" | ForEach-Object { if ($_ -match '^([^=]+)=(.*)$') { + $name = $matches[1] + $value = $matches[2] + if ($name -ne 'PATH') { + Set-Item -Path "Env:$name" -Value $value + } else { + $env:PATH = "$value;$env:PATH" + } +} } +Remove-Item "$tempEnvFile" -Force -ErrorAction SilentlyContinue + +$dukSrcDir = Join-Path -Path (Join-Path -Path $tempDir -ChildPath "duktape-2.7.0") -ChildPath "src" +$dukConfigPath = Join-Path -Path $dukSrcDir -ChildPath "duk_config.h" +$dukConfigContent = [System.IO.File]::ReadAllText($dukConfigPath) +$exportDefs = "`n`n#define DUK_EXTERNAL_DECL extern __declspec(dllexport)`n#define DUK_EXTERNAL __declspec(dllexport)`n" +$dukConfigContent += $exportDefs +[System.IO.File]::WriteAllText($dukConfigPath, $dukConfigContent) + +$dukBuildDir = Join-Path -Path $tempDir -ChildPath "duktape-2.7.0" +$dukDllPath = Join-Path -Path $dukBuildDir -ChildPath "duktape.dll" +cl /O2 /W3 /I"$dukSrcDir" /LD /DDUK_SINGLE_FILE /DDUK_F_DLL_BUILD /DDUK_F_WINDOWS /DDUK_COMPILING_DUKTAPE "/Fe:$dukDllPath" "$dukSrcDir\duktape.c" +Copy-Item $dukDllPath -Destination $tempDir + +Invoke-WebRequest -Uri "https://cdn.sheetjs.com/xlsx-latest/package/dist/shim.min.js" -OutFile "shim.min.js" +Invoke-WebRequest -Uri "https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js" -OutFile "xlsx.full.min.js" + +Invoke-WebRequest -Uri "https://docs.sheetjs.com/pres.numbers" -OutFile "pres.numbers" +Invoke-WebRequest -Uri "https://docs.sheetjs.com/pandas/sheetjs.py" -OutFile "sheetjs.py" +Invoke-WebRequest -Uri "https://docs.sheetjs.com/pandas/SheetJSPandas.py" -OutFile "SheetJSPandas.py" + +$sheetjspy = Get-Content "sheetjs.py" -Raw +$sheetjspy = $sheetjspy -replace 'libduktape\.207\.20700\.so', '.\\duktape.dll' +$sheetjspy = $sheetjspy -replace 'with open\(path, "r"\)', 'with open(path, "rb")' +$sheetjspy = $sheetjspy -replace 'def str_to_c\(s\):\r?\n b = s\.encode\("utf8"\)\r?\n return \[c_char_p\(b\), len\(b\)\]', "def str_to_c(s):`r`n if type(s) == bytes:`r`n b = s`r`n else:`r`n b = s.encode(`"utf8`")`r`n return [c_char_p(b), len(b)]" +$sheetjspy | Set-Content "sheetjs.py" + +$pandasInstalled = Get-Module -ListAvailable -Name pandas -ErrorAction SilentlyContinue +if (-not $pandasInstalled) { pip install pandas } + +python SheetJSPandas.py pres.numbers + +npm init -y +npm i --save xlsx-cli +.\node_modules\.bin\xlsx-cli SheetJSPandas.xlsb + +Set-Location $oldDir +Remove-Item -Path $tempDir -Recurse -Force diff --git a/tests/math/pandas.sh b/tests/math/pandas.sh index 2e6f4af..ea0cf21 100755 --- a/tests/math/pandas.sh +++ b/tests/math/pandas.sh @@ -3,6 +3,12 @@ OS=$(uname -s) +case "$OS" in + Darwin) LIB_NAME="libduktape.207.20700.so" ;; + Linux) LIB_NAME="./libduktape.so.207.20700" ;; + *) echo "Unsupported OS: $OS"; exit 1 ;; +esac + cd /tmp rm -rf sheetjs-pandas mkdir sheetjs-pandas @@ -14,14 +20,6 @@ cd duktape-2.7.0 make -f Makefile.sharedlibrary cd .. -OS="$(uname -s)" - -case "$OS" in - Darwin) LIB_NAME="libduktape.207.20700.so" ;; - Linux) LIB_NAME="libduktape.so.207.20700" ;; - *) echo "Unsupported OS: $OS"; exit 1 ;; -esac - cp "duktape-2.7.0/$LIB_NAME" . curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/shim.min.js diff --git a/tests/math/polars.ps1 b/tests/math/polars.ps1 new file mode 100644 index 0000000..1736b0c --- /dev/null +++ b/tests/math/polars.ps1 @@ -0,0 +1,95 @@ +#!/usr/bin/env pwsh +# https://docs.sheetjs.com/docs/demos/math/pandas + +$oldDir = Get-Location +$tempDir = Join-Path -Path $env:TEMP -ChildPath "sheetjs-polars" +if (Test-Path -Path $tempDir) { Remove-Item -Path $tempDir -Recurse -Force } +New-Item -ItemType Directory -Path $tempDir | Out-Null +Set-Location -Path $tempDir + +Invoke-WebRequest -Uri "https://www.7-zip.org/a/7z2501-extra.7z" -OutFile "7z2501-extra.7z" +$7zrPath = "7zr.exe" +if (-not (Test-Path $7zrPath)) { + Invoke-WebRequest -Uri "https://www.7-zip.org/a/7zr.exe" -OutFile $7zrPath +} +.\7zr.exe x 7z2501-extra.7z -y -o"7za" | Out-Null +Move-Item -Path "7za\7za.exe" -Destination "7za.exe" -Force +Remove-Item -Path "7z2501-extra.7z" -Force +Remove-Item -Path "7za" -Recurse -Force + +Invoke-WebRequest -Uri "https://duktape.org/duktape-2.7.0.tar.xz" -OutFile "duktape-2.7.0.tar.xz" + +.\7za.exe x duktape-2.7.0.tar.xz -y | Out-Null +.\7za.exe x duktape-2.7.0.tar -y | Out-Null + +$vsVersions = @("2022\Community", "2022\Professional", "2022\Enterprise", "2019\Community") +foreach ($vsVersion in $vsVersions) { + $vcvarsPath = "${env:ProgramFiles}\Microsoft Visual Studio\$vsVersion\VC\Auxiliary\Build\vcvars64.bat" + if (Test-Path -Path $vcvarsPath) { break } +} + +$tempEnvFile = [System.IO.Path]::GetTempFileName() +$vcvarsArg = if ($env:PROCESSOR_ARCHITECTURE -eq 'ARM64') { 'arm64' } else { '' } + +Push-Location "$vcvarsPath\..\.." +if ($vcvarsArg) { + cmd.exe /c "`"$vcvarsPath`" $vcvarsArg && set > `"$tempEnvFile`"" +} else { + cmd.exe /c "`"$vcvarsPath`" && set > `"$tempEnvFile`"" +} +Pop-Location + +Get-Content "$tempEnvFile" | ForEach-Object { if ($_ -match '^([^=]+)=(.*)$') { + $name = $matches[1] + $value = $matches[2] + if ($name -ne 'PATH') { + Set-Item -Path "Env:$name" -Value $value + } else { + $env:PATH = "$value;$env:PATH" + } +} } +Remove-Item "$tempEnvFile" -Force -ErrorAction SilentlyContinue + +$dukSrcDir = Join-Path -Path (Join-Path -Path $tempDir -ChildPath "duktape-2.7.0") -ChildPath "src" +$dukConfigPath = Join-Path -Path $dukSrcDir -ChildPath "duk_config.h" +$dukConfigContent = [System.IO.File]::ReadAllText($dukConfigPath) +$exportDefs = "`n`n#define DUK_EXTERNAL_DECL extern __declspec(dllexport)`n#define DUK_EXTERNAL __declspec(dllexport)`n" +$dukConfigContent += $exportDefs +[System.IO.File]::WriteAllText($dukConfigPath, $dukConfigContent) + +$dukBuildDir = Join-Path -Path $tempDir -ChildPath "duktape-2.7.0" +$dukDllPath = Join-Path -Path $dukBuildDir -ChildPath "duktape.dll" +cl /O2 /W3 /I"$dukSrcDir" /LD /DDUK_SINGLE_FILE /DDUK_F_DLL_BUILD /DDUK_F_WINDOWS /DDUK_COMPILING_DUKTAPE "/Fe:$dukDllPath" "$dukSrcDir\duktape.c" +Copy-Item $dukDllPath -Destination $tempDir + +Invoke-WebRequest -Uri "https://cdn.sheetjs.com/xlsx-latest/package/dist/shim.min.js" -OutFile "shim.min.js" +Invoke-WebRequest -Uri "https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js" -OutFile "xlsx.full.min.js" + +Invoke-WebRequest -Uri "https://docs.sheetjs.com/pres.numbers" -OutFile "pres.numbers" +Invoke-WebRequest -Uri "https://docs.sheetjs.com/pandas/sheetjs.py" -OutFile "sheetjs.py" +Invoke-WebRequest -Uri "https://docs.sheetjs.com/pandas/SheetJSPandas.py" -OutFile "SheetJSPandas.py" + +$sheetjspy = Get-Content "sheetjs.py" -Raw +$sheetjspy = $sheetjspy -replace 'libduktape\.207\.20700\.so', '.\\duktape.dll' +$sheetjspy = $sheetjspy -replace 'with open\(path, "r"\)', 'with open(path, "rb")' +$sheetjspy = $sheetjspy -replace 'def str_to_c\(s\):\r?\n b = s\.encode\("utf8"\)\r?\n return \[c_char_p\(b\), len\(b\)\]', "def str_to_c(s):`r`n if type(s) == bytes:`r`n b = s`r`n else:`r`n b = s.encode(`"utf8`")`r`n return [c_char_p(b), len(b)]" +$sheetjspy = $sheetjspy -replace 'from pandas import read_csv', 'from polars import read_csv' +$sheetjspy = $sheetjspy -replace 'json = df\.to_json\(orient="records"\)', 'json = df.write_json()' +$sheetjspy | Set-Content "sheetjs.py" + +$sheetJsPandasContent = Get-Content "SheetJSPandas.py" -Raw +$sheetJsPandasContent = $sheetJsPandasContent -replace 'print\(df\.info\(\)\)', 'print(df)' +$sheetJsPandasContent = $sheetJsPandasContent -replace 'SheetJSPandas\.xlsb', 'SheetJSPolars.xlsb' +$sheetJsPandasContent | Set-Content "SheetJSPandas.py" + +$polarsInstalled = Get-Module -ListAvailable -Name polars -ErrorAction SilentlyContinue +if (-not $polarsInstalled) { pip install polars } + +python SheetJSPandas.py pres.numbers + +npm init -y +npm i --save xlsx-cli +.\node_modules\.bin\xlsx-cli SheetJSPolars.xlsb + +Set-Location $oldDir +Remove-Item -Path $tempDir -Recurse -Force diff --git a/tests/math/polars.sh b/tests/math/polars.sh index 19a59be..46ce6f1 100755 --- a/tests/math/polars.sh +++ b/tests/math/polars.sh @@ -3,6 +3,12 @@ OS=$(uname -s) +case "$OS" in + Darwin) LIB_NAME="libduktape.207.20700.so" ;; + Linux) LIB_NAME="./libduktape.so.207.20700" ;; + *) echo "Unsupported OS: $OS"; exit 1 ;; +esac + cd /tmp rm -rf sheetjs-polars mkdir sheetjs-polars @@ -14,14 +20,6 @@ cd duktape-2.7.0 make -f Makefile.sharedlibrary cd .. -OS="$(uname -s)" - -case "$OS" in - Darwin) LIB_NAME="libduktape.207.20700.so" ;; - Linux) LIB_NAME="libduktape.so.207.20700" ;; - *) echo "Unsupported OS: $OS"; exit 1 ;; -esac - cp "duktape-2.7.0/$LIB_NAME" . curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/shim.min.js