From 4c2fe5f75f2b15f7a2982c03dbb104ea56ca4b39 Mon Sep 17 00:00:00 2001 From: SheetJS Date: Fri, 20 Dec 2024 22:32:22 -0500 Subject: [PATCH] Windows x64 migration from Win10 to Win11 --- .../01-installation/07-bun.md | 30 +++++++- .../02-examples/06-loader.md | 14 ++-- .../03-demos/03-net/03-server/04-drash.md | 17 ++++- .../docs/03-demos/03-net/03-server/07-hono.md | 8 +- .../03-demos/03-net/03-server/09-elysia.md | 24 +++++- .../docs/03-demos/03-net/08-headless/index.md | 1 - docz/docs/03-demos/03-net/09-dom.md | 2 +- docz/docs/03-demos/19-desktop/01-electron.md | 3 +- docz/docs/03-demos/19-desktop/02-nwjs.md | 14 +++- .../docs/03-demos/19-desktop/05-neutralino.md | 9 ++- .../03-demos/19-desktop/06-reactnative.md | 1 - docz/docs/03-demos/20-cli/03-nexe.md | 2 +- docz/docs/03-demos/20-cli/05-pkg.md | 2 +- docz/docs/03-demos/20-cli/08-boxednode.md | 8 +- docz/docs/03-demos/20-cli/11-nodesea.md | 7 +- docz/docs/03-demos/20-cli/12-bunsea.md | 14 ++-- docz/docs/03-demos/20-cli/13-denosea.md | 1 - .../03-demos/32-extensions/09-mathematica.md | 12 +-- docz/docs/03-demos/32-extensions/10-stata.md | 2 +- docz/docs/03-demos/32-extensions/12-maple.md | 2 +- docz/docs/03-demos/42-engines/01-duktape.md | 38 +++++----- docz/docs/03-demos/42-engines/02-v8.md | 69 +++++++++++------- docz/docs/03-demos/42-engines/05-jint.md | 24 +++--- docz/docs/03-demos/42-engines/06-goja.md | 29 ++++++-- docz/docs/03-demos/42-engines/08-quickjs.md | 4 +- docz/docs/03-demos/42-engines/09-hermes.md | 37 ++++++++-- docz/docs/03-demos/42-engines/15-rb.md | 2 +- docz/docs/03-demos/42-engines/20-chakra.md | 12 +-- docz/docs/03-demos/42-engines/21-boa.md | 2 +- .../03-demos/42-engines/23-jerryscript.md | 2 +- docz/docs/03-demos/42-engines/25-mujs.md | 8 +- docz/docs/03-demos/42-engines/26-jurassic.md | 2 +- docz/docs/09-miscellany/05-contributing.md | 21 +++++- docz/static/deno/s2c.ts | 6 +- docz/static/duk/main.zig | 2 +- docz/static/neu/{win10.png => win11.png} | Bin docz/static/v8/main.rs | 3 +- docz/version.js | 1 - index.html => misc/index.html | 0 39 files changed, 283 insertions(+), 152 deletions(-) rename docz/static/neu/{win10.png => win11.png} (100%) rename index.html => misc/index.html (100%) 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 ff7bc62..050dbe8 100644 --- a/docz/docs/02-getting-started/01-installation/07-bun.md +++ b/docz/docs/02-getting-started/01-installation/07-bun.md @@ -123,9 +123,12 @@ This demo was last tested in the following deployments: |:-------------|:---------|:-----------| | `darwin-x64` | `1.1.39` | 2024-12-17 | | `darwin-arm` | `1.1.10` | 2024-09-22 | -| `win10-x64` | `1.1.4` | 2024-04-19 | | `win11-x64` | `1.1.22` | 2024-08-11 | -| `linux-x64` | `1.1.4` | 2024-04-25 | +| `win11-arm` | `1.1.40` | 2024-12-19 | +| `linux-x64` | `1.1.40` | 2024-12-19 | +| `linux-arm` | `1.1.40` | 2024-12-19 | + +BunJS on Windows on ARM uses the X64 compatibility layer. ::: @@ -176,6 +179,22 @@ VSCodium will automatically re-save the file. bun install https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`} +:::caution pass + +In some test runs, the command failed with a module resolution error: + +{`\ +error: https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz failed to resolve`} + + +The workaround is to prepend `xlsx@` to the URL: + +{`\ +bun install xlsx@https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`} + + +::: + 2) Save the following script to `SheetJSBun.js`: ```js title="SheetJSBun.js" @@ -256,4 +275,9 @@ bun app.js ``` If the script succeeded, the file `Presidents.xlsx` will be created. That file -can be opened in a spreadsheet editor. +can be opened in a spreadsheet editor. If a spreadsheet editor is unavailable, +the contents can be displayed using the `xlsx-cli` tool: + +```bash +bunx xlsx-cli Presidents.xlsx +``` diff --git a/docz/docs/02-getting-started/02-examples/06-loader.md b/docz/docs/02-getting-started/02-examples/06-loader.md index 88ed0a0..948fc0d 100644 --- a/docz/docs/02-getting-started/02-examples/06-loader.md +++ b/docz/docs/02-getting-started/02-examples/06-loader.md @@ -33,13 +33,13 @@ SheetJS Loader to answer questions based on data from a XLS workbook. This demo was tested in the following configurations: -| Platform | Architecture | Date | -|:--------------------------------------------------------------|:-------------|:-----------| -| NVIDIA RTX 4090 (24 GB VRAM) + Ryzen Z1 Extreme (24 GB RAM) | `win11-x64` | 2024-11-09 | -| NVIDIA RTX 4080 SUPER (16 GB VRAM) + i9-10910 (128 GB RAM) | `win10-x64` | 2024-08-09 | -| AMD RX 7900 XTX (24 GB VRAM) + Ryzen Z1 Extreme (16 GB RAM) | `win11-x64` | 2024-09-21 | -| AMD RX 6800 XT (16 GB VRAM) + Ryzen Z1 Extreme (16 GB RAM) | `win11-x64` | 2024-10-07 | -| Apple M2 Max 12-Core CPU + 30-Core GPU (32 GB unified memory) | `darwin-arm` | 2024-11-04 | +| Platform | Architecture | Date | +|:------------------------------------------------------------------|:-------------|:-----------| +| NVIDIA RTX 4090 (24 GB VRAM) + Ryzen Z1 Extreme (16 GB RAM) | `win11-x64` | 2024-12-20 | +| NVIDIA RTX 4080 SUPER (16 GB VRAM) + Ryzen Z1 Extreme (16 GB RAM) | `win11-x64` | 2024-12-19 | +| AMD RX 7900 XTX (24 GB VRAM) + Ryzen Z1 Extreme (16 GB RAM) | `win11-x64` | 2024-09-21 | +| AMD RX 6800 XT (16 GB VRAM) + Ryzen Z1 Extreme (16 GB RAM) | `win11-x64` | 2024-10-07 | +| Apple M2 Max 12-Core CPU + 30-Core GPU (32 GB unified memory) | `darwin-arm` | 2024-11-04 | SheetJS users have verified this demo in other configurations: diff --git a/docz/docs/03-demos/03-net/03-server/04-drash.md b/docz/docs/03-demos/03-net/03-server/04-drash.md index e94ace5..68f23ba 100644 --- a/docz/docs/03-demos/03-net/03-server/04-drash.md +++ b/docz/docs/03-demos/03-net/03-server/04-drash.md @@ -22,7 +22,12 @@ The ["Complete Example"](#complete-example) section includes a complete server. :::note Tested Deployments -This demo was last tested on 2024 March 11 against Drash 2.8.1 and Deno 1.41.2. +This demo was tested in the following deployments: + +| Drash | Deno | Date | +|:--------|:-------|:-----------| +| `2.8.1` | 1.44.1 | 2024-12-19 | +| `2.8.1` | 2.1.4 | 2024-12-19 | ::: @@ -123,6 +128,16 @@ curl -LO https://docs.sheetjs.com/drash/SheetJSDrash.ts deno run --allow-net SheetJSDrash.ts ``` +:::caution pass + +Deno 2 requires the `--allow-import` entitlement: + +```bash +deno run --allow-net --allow-write --allow-import SheetJSDenoDOM.ts +``` + +::: + 3) Download the test file https://docs.sheetjs.com/pres.numbers 4) Open `http://localhost:7262/` in your browser. diff --git a/docz/docs/03-demos/03-net/03-server/07-hono.md b/docz/docs/03-demos/03-net/03-server/07-hono.md index ecc73bb..d3f6b8f 100644 --- a/docz/docs/03-demos/03-net/03-server/07-hono.md +++ b/docz/docs/03-demos/03-net/03-server/07-hono.md @@ -21,11 +21,11 @@ The ["Complete Example"](#complete-example) section includes a complete server. :::note Tested Deployments -This demo was last tested in the following deployments: +This demo was tested in the following deployments: -| Platform | HonoJS | Date | -|:---------------|:--------|:-----------| -| BunJS `1.1.21` | `4.5.1` | 2024-07-27 | +| Platform | HonoJS | Date | +|:---------------|:---------|:-----------| +| BunJS `1.1.40` | `4.6.14` | 2024-12-19 | ::: diff --git a/docz/docs/03-demos/03-net/03-server/09-elysia.md b/docz/docs/03-demos/03-net/03-server/09-elysia.md index 7e27f43..63c5978 100644 --- a/docz/docs/03-demos/03-net/03-server/09-elysia.md +++ b/docz/docs/03-demos/03-net/03-server/09-elysia.md @@ -8,7 +8,8 @@ pagination_next: demos/net/email/index import current from '/version.js'; import CodeBlock from '@theme/CodeBlock'; -[Elysia](https://elysiajs.com/) is a BunJS server-side framework. +[ElysiaJS](https://elysiajs.com/) is a server-side framework for +[BunJS](/docs/getting-started/installation/bun). [SheetJS](https://sheetjs.com) is a JavaScript library for reading and writing data from spreadsheets. @@ -21,7 +22,12 @@ The ["Complete Example"](#complete-example) section includes a complete server. :::note Tested Deployments -This demo was last tested on 2024 March 11 with ElysiaJS 0.8.17 and BunJS 1.0.30. +This demo was tested in the following deployments: + +| Platform | ElysiaJS | Date | +|:---------------|:---------|:-----------| +| BunJS `1.1.40` | `0.8.17` | 2024-12-19 | +| BunJS `1.1.40` | `1.1.26` | 2024-12-19 | ::: @@ -112,6 +118,16 @@ bun create elysia sheetjs-elysia cd sheetjs-elysia ``` +:::note pass + +The `bun install` command can install specific versions of ElysiaJS: + +```bash +bun install elysia@0.8.17 +``` + +::: + 2) Install the [SheetJS BunJS module](/docs/getting-started/installation/bun): {`\ @@ -142,7 +158,7 @@ app.post("/", async({ body: { upload } }) => { upload: t.File() }) }); -app.listen(3000); +app.listen(3000, () => { console.log("SheetJS ElysiaJS server is up")}); ``` 4) Run the server: @@ -151,6 +167,8 @@ app.listen(3000); bun run src/SheetJSElysia.ts ``` +The script will print `SheetJS ElysiaJS server is up`. + 5) Test POST requests using https://docs.sheetjs.com/pres.numbers . The commands should be run in a new terminal window: 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 f556d84..0eb7595 100644 --- a/docz/docs/03-demos/03-net/08-headless/index.md +++ b/docz/docs/03-demos/03-net/08-headless/index.md @@ -408,7 +408,6 @@ This demo was tested in the following environments: | Architecture | PhantomJS | Date | |:-------------|:----------|:-----------| | `darwin-x64` | `2.1.1` | 2024-12-17 | -| `win10-x64` | `2.1.1` | 2024-03-24 | | `win11-x64` | `2.1.1` | 2024-05-22 | | `linux-x64` | `2.1.1` | 2024-04-25 | diff --git a/docz/docs/03-demos/03-net/09-dom.md b/docz/docs/03-demos/03-net/09-dom.md index e9f0f93..0f4779c 100644 --- a/docz/docs/03-demos/03-net/09-dom.md +++ b/docz/docs/03-demos/03-net/09-dom.md @@ -396,7 +396,7 @@ The script will create a file `SheetJSDenoDOM.xlsx` that can be opened. :::caution pass -Deno 2 additionally requires `--allow-import`: +Deno 2 additionally requires the `--allow-import` entitlement: ```bash deno run --allow-net --allow-write --allow-import SheetJSDenoDOM.ts diff --git a/docz/docs/03-demos/19-desktop/01-electron.md b/docz/docs/03-demos/19-desktop/01-electron.md index 1f6ad2c..67c0df8 100644 --- a/docz/docs/03-demos/19-desktop/01-electron.md +++ b/docz/docs/03-demos/19-desktop/01-electron.md @@ -190,7 +190,6 @@ This demo was tested in the following environments: |:---------------|:-------------|:---------|:-----------| | macOS 14.4 | `darwin-x64` | `29.1.4` | 2024-03-15 | | macOS 14.5 | `darwin-arm` | `30.0.8` | 2024-05-28 | -| Windows 10 | `win10-x64` | `31.2.0` | 2024-07-12 | | Windows 11 | `win11-x64` | `31.2.0` | 2024-08-18 | | Windows 11 | `win11-arm` | `30.0.8` | 2024-05-28 | | Linux (HoloOS) | `linux-x64` | `29.1.4` | 2024-03-21 | @@ -277,7 +276,7 @@ The program will run on ARM64 Windows. |:-------------|:--------------------------------------------------------------| | `darwin-x64` |`open ./out/sheetjs-electron-darwin-x64/sheetjs-electron.app` | | `darwin-arm` |`open ./out/sheetjs-electron-darwin-arm64/sheetjs-electron.app`| -| `win10-x64` |`.\out\sheetjs-electron-win32-x64\sheetjs-electron.exe` | +| `win11-x64` |`.\out\sheetjs-electron-win32-x64\sheetjs-electron.exe` | | `win11-arm` |`.\out\sheetjs-electron-win32-x64\sheetjs-electron.exe` | | `linux-x64` |`./out/sheetjs-electron-linux-x64/sheetjs-electron` | | `linux-arm` |`./out/sheetjs-electron-linux-arm64/sheetjs-electron` | diff --git a/docz/docs/03-demos/19-desktop/02-nwjs.md b/docz/docs/03-demos/19-desktop/02-nwjs.md index 70a2ada..0189fd0 100644 --- a/docz/docs/03-demos/19-desktop/02-nwjs.md +++ b/docz/docs/03-demos/19-desktop/02-nwjs.md @@ -115,7 +115,7 @@ This demo was tested in the following environments: |:---------------|:-------------|:---------|:-----------|:---------------------| | macOS 14.3.1 | `darwin-x64` | `0.85.0` | 2024-03-12 | | | macOS 14.5 | `darwin-arm` | `0.88.0` | 2024-05-28 | | -| Windows 10 | `win10-x64` | `0.83.0` | 2024-03-04 | | +| Windows 11 | `win11-x64` | `0.94.0` | 2024-12-19 | | | Windows 11 | `win11-arm` | `0.88.0` | 2024-05-28 | | | Linux (HoloOS) | `linux-x64` | `0.89.0` | 2024-07-07 | | | Linux (Debian) | `linux-arm` | `0.60.0` | 2024-05-23 | Unofficial build[^1] | @@ -138,7 +138,7 @@ cd sheetjs-nwjs "version": "0.0.0", "main": "index.html", "dependencies": { - "nw": "0.89.0", + "nw": "0.94.0", "xlsx": "https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz" } }`} @@ -182,15 +182,23 @@ file can be opened in Excel or another spreadsheet editor. 5) To build a standalone app, run the builder: ```bash -npx -p nw-builder nwbuild --mode=build --version=0.89.0 --glob=false --outDir=../out ./ +npx -p nw-builder@4.11.6 nwbuild --mode=build --version=0.94.0 --glob=false --outDir=../out ./ ``` This will generate the standalone app in the `..\out\` folder. +:::caution pass + +There is a regression in `nw-builder` version `4.12.0`. In local `win11-x64` +testing, version `4.11.6` correctly generated the standalone application. + +::: + 6) Launch the generated application: | Architecture | Command | |:-------------|:--------------------------------------------------------------| | `linux-x64` | `../out/sheetjs-nwjs` | +| `win11-x64` | `..\out\sheetjs-nwjs.exe` | [^1]: The [`nw60-arm64_2022-01-08` release](https://github.com/LeonardLaszlo/nw.js-armv7-binaries/releases/tag/nw60-arm64_2022-01-08) included an ARM64 version of `nw`. \ No newline at end of file diff --git a/docz/docs/03-demos/19-desktop/05-neutralino.md b/docz/docs/03-demos/19-desktop/05-neutralino.md index 2ea996f..99b0d7b 100644 --- a/docz/docs/03-demos/19-desktop/05-neutralino.md +++ b/docz/docs/03-demos/19-desktop/05-neutralino.md @@ -33,7 +33,7 @@ app to read and write workbooks. The app will look like the screenshots below: Linux -![Windows screenshot](pathname:///neu/win10.png) +![Windows screenshot](pathname:///neu/win11.png) @@ -194,13 +194,13 @@ This demo was tested in the following environments: |:---------------|:-------------|:---------|:---------|:-----------| | macOS 14.4 | `darwin-x64` | `5.0.0` | `5.0.1` | 2024-03-15 | | macOS 14.5 | `darwin-arm` | `5.1.0` | `5.1.0` | 2024-05-25 | -| Windows 10 | `win10-x64` | `5.1.0` | `5.1.0` | 2024-03-24 | +| Windows 11 | `win11-x64` | `5.5.0` | `5.5.0` | 2024-12-20 | | Windows 11 | `win11-arm` | `5.1.0` | `5.1.1` | 2024-05-28 | | Linux (HoloOS) | `linux-x64` | `5.0.0` | `5.0.1` | 2024-03-21 | | Linux (Debian) | `linux-arm` | `5.1.0` | `5.1.1` | 2024-05-28 | -On `win11-arm`, the Electron runner is a proper ARM64 binary but the binaries -generated by Electron Forge are x64. The x64 binaries run in Windows on ARM. +NeutralinoJS on Windows on ARM generates X64 binaries that run using the X64 +compatibility layer. The binaries are not native ARM64 programs! ::: @@ -414,6 +414,7 @@ Platform-specific programs will be created in the `dist` folder: | Platform | Path to binary | |:-------------|:---------------------------------------------| | `darwin-arm` | `./dist/sheetjs-neu/sheetjs-neu-mac_arm64` | +| `win11-x64` | `.\dist\sheetjs-neu\sheetjs-neu-win_x64.exe` | | `win11-arm` | `.\dist\sheetjs-neu\sheetjs-neu-win_x64.exe` | | `linux-arm` | `.\dist\sheetjs-neu\sheetjs-neu-linux_arm64` | diff --git a/docz/docs/03-demos/19-desktop/06-reactnative.md b/docz/docs/03-demos/19-desktop/06-reactnative.md index b59ae79..d65b8a2 100644 --- a/docz/docs/03-demos/19-desktop/06-reactnative.md +++ b/docz/docs/03-demos/19-desktop/06-reactnative.md @@ -46,7 +46,6 @@ This demo was tested in the following environments: | OS and Version | Architecture | RN Platform | Date | |:---------------|:-------------|:------------|:-----------| -| Windows 10 | `win10-x64` | `v0.74.6` | 2024-05-28 | | Windows 11 | `win11-x64` | `v0.74.6` | 2024-05-28 | | Windows 11 | `win11-arm` | `v0.74.5` | 2024-05-25 | | MacOS 14.7 | `darwin-x64` | `v0.75.13` | 2024-10-26 | diff --git a/docz/docs/03-demos/20-cli/03-nexe.md b/docz/docs/03-demos/20-cli/03-nexe.md index 3841ad7..0e312c8 100644 --- a/docz/docs/03-demos/20-cli/03-nexe.md +++ b/docz/docs/03-demos/20-cli/03-nexe.md @@ -39,7 +39,7 @@ This demo was tested in the following deployments: |:-------------|:-------------|:----------|:----------|:-----------| | `darwin-x64` | `4.0.0-rc.6` | `14.15.3` | Pre-built | 2024-05-28 | | `darwin-arm` | `4.0.0-rc.6` | `18.20.3` | Compiled | 2024-05-25 | -| `win10-x64` | `4.0.0-rc.4` | `14.15.3` | Pre-built | 2024-04-18 | +| `win11-x64` | `4.0.0-rc.6` | `14.15.3` | Pre-built | 2024-12-19 | | `win11-arm` | `4.0.0-rc.6` | `20.10.0` | Compiled | 2024-05-28 | | `linux-x64` | `4.0.0-rc.4` | `14.15.3` | Pre-built | 2024-03-21 | | `linux-arm` | `4.0.0-rc.6` | `18.20.3` | Compiled | 2024-05-26 | diff --git a/docz/docs/03-demos/20-cli/05-pkg.md b/docz/docs/03-demos/20-cli/05-pkg.md index bb434c9..6c2ad36 100644 --- a/docz/docs/03-demos/20-cli/05-pkg.md +++ b/docz/docs/03-demos/20-cli/05-pkg.md @@ -39,7 +39,7 @@ This demo was tested in the following deployments: |:-------------|:--------|:---------|:-----------| | `darwin-x64` | `5.8.1` | `18.5.0` | 2024-05-28 | | `darwin-arm` | `5.8.1` | `18.5.0` | 2024-05-25 | -| `win10-x64` | `5.8.1` | `18.5.0` | 2024-04-18 | +| `win11-x64` | `5.8.1` | `18.5.0` | 2024-12-19 | | `win11-arm` | `5.8.1` | `18.5.0` | 2024-10-25 | | `linux-x64` | `5.8.1` | `18.5.0` | 2024-03-21 | | `linux-arm` | `5.8.1` | `18.5.0` | 2024-05-26 | diff --git a/docz/docs/03-demos/20-cli/08-boxednode.md b/docz/docs/03-demos/20-cli/08-boxednode.md index 3dd2a28..9b09b03 100644 --- a/docz/docs/03-demos/20-cli/08-boxednode.md +++ b/docz/docs/03-demos/20-cli/08-boxednode.md @@ -32,7 +32,7 @@ This demo was tested in the following deployments: |:-------------|:--------|:----------|:-----------| | `darwin-x64` | `2.4.0` | `22.2.0` | 2024-05-28 | | `darwin-arm` | `2.4.3` | `22.2.0` | 2024-05-25 | -| `win10-x64` | `2.4.2` | `16.20.2` | 2024-04-18 | +| `win11-x64` | `2.4.4` | `16.20.2` | 2024-12-19 | | `linux-x64` | `2.4.0` | `21.7.1` | 2024-03-21 | | `linux-arm` | `2.4.3` | `20.13.1` | 2024-05-26 | @@ -91,7 +91,7 @@ yarn add https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz exit-on-epi ```bash -npx boxednode@2.4.3 -s xlsx-cli.js -t xlsx-cli +npx boxednode@2.4.4 -s xlsx-cli.js -t xlsx-cli ``` :::caution pass @@ -113,7 +113,7 @@ The `-n` flag controls the target NodeJS version. For this demo, the following command uses NodeJS `20.13.1`: ```bash -npx boxednode@2.4.3 -s xlsx-cli.js -t xlsx-cli -n 20.13.1 +npx boxednode@2.4.4 -s xlsx-cli.js -t xlsx-cli -n 20.13.1 ``` ::: @@ -122,7 +122,7 @@ npx boxednode@2.4.3 -s xlsx-cli.js -t xlsx-cli -n 20.13.1 ```bash -npx boxednode@2.4.3 -s xlsx-cli.js -t xlsx-cli.exe -n 16.20.2 +npx boxednode@2.4.4 -s xlsx-cli.js -t xlsx-cli.exe -n 16.20.2 ``` :::info pass diff --git a/docz/docs/03-demos/20-cli/11-nodesea.md b/docz/docs/03-demos/20-cli/11-nodesea.md index a012e67..4c439ce 100644 --- a/docz/docs/03-demos/20-cli/11-nodesea.md +++ b/docz/docs/03-demos/20-cli/11-nodesea.md @@ -160,7 +160,6 @@ This demo was tested in the following deployments: |:-------------|:----------|:-----------| | `darwin-x64` | `22.2.0` | 2024-05-28 | | `darwin-arm` | `22.2.0` | 2024-05-29 | -| `win10-x64` | `20.12.0` | 2024-03-26 | | `win11-x64` | `20.13.1` | 2024-05-22 | | `win11-arm` | `20.14.0` | 2024-06-11 | | `linux-x64` | `20.11.1` | 2024-03-18 | @@ -285,7 +284,7 @@ codesign --remove-signature ./sheet2csv ``` - + In PowerShell, the `Get-Command` command displays the location to `node.exe`: @@ -344,7 +343,7 @@ codesign -s - ./sheet2csv ``` - + ```bash npx -y postject --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 sheet2csv.exe NODE_SEA_BLOB sheet2csv.blob @@ -405,7 +404,7 @@ Signature=adhoc ``` - + 13) Validate the binary signature: diff --git a/docz/docs/03-demos/20-cli/12-bunsea.md b/docz/docs/03-demos/20-cli/12-bunsea.md index 1b6ba8b..ddfac50 100644 --- a/docz/docs/03-demos/20-cli/12-bunsea.md +++ b/docz/docs/03-demos/20-cli/12-bunsea.md @@ -80,8 +80,8 @@ This demo was last tested in the following deployments: | Architecture | BunJS | Date | |:-------------|:---------|:-----------| | `darwin-x64` | `1.1.10` | 2024-05-28 | -| `darwin-arm` | `1.1.10` | 2024-05-29 | -| `win10-x64` | `1.1.12` | 2024-06-10 | +| `darwin-arm` | `1.1.40` | 2024-12-19 | +| `win11-x64` | `1.1.40` | 2024-12-19 | | `win11-arm` | `1.1.33` | 2024-10-25 | | `linux-x64` | `1.1.12` | 2024-06-09 | | `linux-arm` | `1.1.12` | 2024-06-10 | @@ -114,13 +114,11 @@ bun install https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`} :::caution pass -In some test runs, the command failed with a `ENOTEMPTY` error: +In some test runs, the command failed with a module resolution error: -``` -error: InstallFailed extracting tarball for https://cdn.sheetjs.com/xlsx-0.20.1/xlsx-0.20.1.tgz -error: moving "https://cdn.sheetjs.com/xlsx-0.20.1/xlsx-0.20.1.tgz" to cache dir failed -ENOTEMPTY: Directory not empty (NtSetInformationFile()) -``` +{`\ +error: https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz failed to resolve`} + The workaround is to prepend `xlsx@` to the URL: diff --git a/docz/docs/03-demos/20-cli/13-denosea.md b/docz/docs/03-demos/20-cli/13-denosea.md index ebeacb5..5a2d7aa 100644 --- a/docz/docs/03-demos/20-cli/13-denosea.md +++ b/docz/docs/03-demos/20-cli/13-denosea.md @@ -101,7 +101,6 @@ This demo was last tested in the following deployments: |:-------------|:---------|:-----------| | `darwin-x64` | `1.43.6` | 2024-05-28 | | `darwin-arm` | `1.43.6` | 2024-05-23 | -| `win10-x64` | `1.41.3` | 2024-03-24 | | `win11-x64` | `1.43.6` | 2024-05-25 | | `win11-arm` | `2.0.3` | 2024-10-25 | | `linux-x64` | `1.41.3` | 2024-03-18 | diff --git a/docz/docs/03-demos/32-extensions/09-mathematica.md b/docz/docs/03-demos/32-extensions/09-mathematica.md index 7579ac3..72c76ca 100644 --- a/docz/docs/03-demos/32-extensions/09-mathematica.md +++ b/docz/docs/03-demos/32-extensions/09-mathematica.md @@ -30,7 +30,7 @@ This demo was tested by SheetJS users in the following deployments: | Architecture | Version | Date | |:-------------|:--------|:-----------| | `darwin-x64` | `14.0` | 2024-06-05 | -| `win10-x64` | `14.0` | 2024-06-05 | +| `win11-x64` | `14.0` | 2024-12-19 | ::: @@ -186,7 +186,7 @@ This demo tests the NodeJS external engine and dedicated command line tools. 1) Install dependencies in the Home folder (`~` or `$HOME` or `%HOMEPATH%`): {`\ -npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz zeromq@6.0.0-beta.19`} +npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz zeromq@6.1.2`} 2) Open a new Mathematica Notebook and register NodeJS. When the example was @@ -221,7 +221,7 @@ The second argument to `RegisterExternalEvaluator` should be the path to the PowerShell window: ```powershell -Get-Command node.exe +(Get-Command node.exe).Path ``` @@ -229,14 +229,16 @@ Get-Command node.exe If NodeJS is registered, the value in the "Registered" column will be "True". -4) To determine the base folder, run `require("process").cwd()` from NodeJS: +4) Run `require("process").cwd()` from NodeJS: ```mathematica ExternalEvaluate["NodeJS", "require('process').cwd()"] ``` +The result is the working directory for NodeJS scripts + 5) Download [`pres.numbers`](https://docs.sheetjs.com/pres.numbers) and move -the file to the base folder as shown in the previous step. +the file to the folder from the previous result. 3) Copy, but do not run, the following snippet into the running notebook: diff --git a/docz/docs/03-demos/32-extensions/10-stata.md b/docz/docs/03-demos/32-extensions/10-stata.md index dd64ff4..e9e66a3 100644 --- a/docz/docs/03-demos/32-extensions/10-stata.md +++ b/docz/docs/03-demos/32-extensions/10-stata.md @@ -55,7 +55,7 @@ This demo was tested in the following deployments: |:-------------|:------------------|:-----------| | `darwin-x64` | `18.0` | 2024-04-10 | | `darwin-arm` | `18.5` (StataNow) | 2024-12-15 | -| `win10-x64` | `18.0` | 2024-04-10 | +| `win11-x64` | `18.5` (StataNow) | 2024-12-19 | | `win11-arm` | `18.5` (StataNow) | 2024-12-15 | | `linux-x64` | `18.0` | 2024-04-25 | diff --git a/docz/docs/03-demos/32-extensions/12-maple.md b/docz/docs/03-demos/32-extensions/12-maple.md index be7f0d6..fc2df2f 100644 --- a/docz/docs/03-demos/32-extensions/12-maple.md +++ b/docz/docs/03-demos/32-extensions/12-maple.md @@ -37,7 +37,7 @@ This demo was tested by SheetJS users in the following deployments: | Architecture | Version | Date | |:-------------|:--------|:-----------| | `darwin-x64` | 2024 | 2024-04-25 | -| `win10-x64` | 2024 | 2024-04-25 | +| `win11-x64` | 2024 | 2024-12-19 | ::: diff --git a/docz/docs/03-demos/42-engines/01-duktape.md b/docz/docs/03-demos/42-engines/01-duktape.md index bf8d6ea..9fb62e8 100644 --- a/docz/docs/03-demos/42-engines/01-duktape.md +++ b/docz/docs/03-demos/42-engines/01-duktape.md @@ -130,7 +130,7 @@ This demo was tested in the following deployments: |:-------------|:--------|:-----------| | `darwin-x64` | `2.7.0` | 2024-04-04 | | `darwin-arm` | `2.7.0` | 2024-05-23 | -| `win10-x64` | `2.7.0` | 2024-03-27 | +| `win11-x64` | `2.7.0` | 2024-12-20 | | `win11-arm` | `2.7.0` | 2024-05-25 | | `linux-x64` | `2.7.0` | 2024-03-21 | | `linux-arm` | `2.7.0` | 2024-05-23 | @@ -700,7 +700,7 @@ folder must be added to the include path list: }); // highlight-start // this line is required to make @cInclude("duktape.h") work - exe.addIncludePath(.{ .path = "duktape-2.7.0/src" }); + exe.addIncludePath(b.path("duktape-2.7.0/src")); // highlight-end ``` @@ -714,7 +714,7 @@ and linked against `libc` and `libm`: }); // highlight-start exe.addCSourceFile(.{: - .file = .{ .path = "duktape-2.7.0/src/duktape.c" }, + .file = b.path("duktape-2.7.0/src/duktape.c"), .flags = &.{ "-std=c99", "-fno-sanitize=undefined" } }); exe.linkSystemLibrary("c"); @@ -781,7 +781,7 @@ This demo was tested in the following deployments: |:-------------|:--------|:---------|:-----------| | `darwin-x64` | `2.7.0` | `0.11.0` | 2024-03-10 | | `darwin-arm` | `2.7.0` | `0.12.0` | 2024-05-23 | -| `win10-x64` | `2.7.0` | `0.11.0` | 2024-03-10 | +| `win11-x64` | `2.7.0` | `0.13.0` | 2024-12-20 | | `win11-arm` | `2.7.0` | `0.12.0` | 2024-05-25 | | `linux-x64` | `2.7.0` | `0.12.0` | 2024-04-25 | | `linux-arm` | `2.7.0` | `0.12.0` | 2024-05-25 | @@ -798,7 +798,7 @@ mkdir sheetjs-zig cd sheetjs-zig ``` -1) Download Zig 0.12.0 from https://ziglang.org/download/ and extract to the +1) Download Zig 0.13.0 from https://ziglang.org/download/ and extract to the project folder. @@ -807,14 +807,14 @@ project folder. For X64 Mac: ```bash -curl -LO https://ziglang.org/download/0.12.0/zig-macos-x86_64-0.12.0.tar.xz +curl -LO https://ziglang.org/download/0.13.0/zig-macos-x86_64-0.13.0.tar.xz tar -xzf zig-macos-*.tar.xz ``` For ARM64 Mac: ```bash -curl -LO https://ziglang.org/download/0.12.0/zig-macos-aarch64-0.12.0.tar.xz +curl -LO https://ziglang.org/download/0.13.0/zig-macos-aarch64-0.13.0.tar.xz tar -xzf zig-macos-*.tar.xz ``` @@ -825,7 +825,7 @@ tar -xzf zig-macos-*.tar.xz For X64 Linux: ```bash -curl -LO https://ziglang.org/download/0.12.0/zig-linux-x86_64-0.12.0.tar.xz +curl -LO https://ziglang.org/download/0.13.0/zig-linux-x86_64-0.13.0.tar.xz xz -d zig-linux-*.tar.xz tar -xf zig-linux-*.tar ``` @@ -833,13 +833,13 @@ tar -xf zig-linux-*.tar For AArch64 Linux: ```bash -curl -LO https://ziglang.org/download/0.12.0/zig-linux-aarch64-0.12.0.tar.xz +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 ``` - + :::note pass @@ -850,15 +850,15 @@ The following commands should be run within WSL bash. For X64 Windows: ```bash -curl -LO https://ziglang.org/download/0.12.0/zig-windows-x86_64-0.12.0.zip -unzip zig-windows-x86_64-0.12.0.zip +curl -LO https://ziglang.org/download/0.13.0/zig-windows-x86_64-0.13.0.zip +unzip zig-windows-x86_64-0.13.0.zip ``` For ARM64 Windows: ```bash -curl -LO https://ziglang.org/download/0.12.0/zig-windows-aarch64-0.12.0.zip -unzip zig-windows-aarch64-0.12.0.zip +curl -LO https://ziglang.org/download/0.13.0/zig-windows-aarch64-0.13.0.zip +unzip zig-windows-aarch64-0.13.0.zip ``` @@ -881,7 +881,7 @@ unzip zig-windows-aarch64-0.12.0.zip ``` - + :::note pass @@ -929,13 +929,13 @@ mv *.js src`} ```zig title="build.zig (add highlighted lines)" const exe = b.addExecutable(.{ .name = "sheetjs-zig", - .root_source_file = .{ .path = "src/main.zig" }, + .root_source_file = b.path("src/main.zig"), .target = target, .optimize = optimize, }); // highlight-start - exe.addCSourceFile(.{ .file = .{ .path = "duktape-2.7.0/src/duktape.c" }, .flags = &.{ "-std=c99", "-fno-sanitize=undefined" } }); - exe.addIncludePath(.{ .path = "duktape-2.7.0/src" }); + exe.addCSourceFile(.{ .file = b.path("duktape-2.7.0/src/duktape.c"), .flags = &.{ "-std=c99", "-fno-sanitize=undefined" } }); + exe.addIncludePath(b.path("duktape-2.7.0/src")); exe.linkSystemLibrary("c"); exe.linkSystemLibrary("m"); // highlight-end @@ -981,7 +981,7 @@ sudo pacman -Syu glibc linux-api-headers ::: - + This command should be run in PowerShell: diff --git a/docz/docs/03-demos/42-engines/02-v8.md b/docz/docs/03-demos/42-engines/02-v8.md index ca43201..6ec2659 100644 --- a/docz/docs/03-demos/42-engines/02-v8.md +++ b/docz/docs/03-demos/42-engines/02-v8.md @@ -148,7 +148,7 @@ This demo was tested in the following deployments: |:--------------|:-------------|:--------------|:-----------------|:-----------| | `13.3.228` | `darwin-x64` | macOS 15.1.1 | `clang 16.0.0` | 2024-12-03 | | `12.7.130` | `darwin-arm` | macOS 14.5 | `clang 15.0.0` | 2024-05-25 | -| `12.5.48` | `win10-x64` | Windows 10 | `CL 19.39.33523` | 2024-03-24 | +| `12.7.130` | `win11-x64` | Windows 11 | `CL 19.42.34435` | 2024-12-20 | | `12.5.48` | `linux-x64` | HoloOS 3.5.17 | `gcc 13.1.1` | 2024-03-21 | | `12.7.130` | `linux-arm` | Debian 12 | `gcc 12.2.0` | 2024-05-25 | @@ -210,14 +210,19 @@ installed. In the sidebar, verify the following components are checked: In the "Individual components" tab, search for "Windows 11 SDK" and verify that "Windows 11 SDK (10.0.22621.0)" is checked. +**Even though newer SDKs exist, Windows 11 SDK 10.0.22621.0 must be installed!** + Click "Modify" and allow the installer to finish. +--- + The SDK debugging tools must be installed after the SDK is installed. -1) Using the Search bar, search "Apps & features". +1) Using the Search bar, search "Apps & features". If "Apps & features" is not +available, search for "Installed apps". 2) When the setting panel opens, scroll down to "Windows Software Development -Kit - Windows 10.0.22621 and click "Modify". +Kit - Windows 10.0.22621" and click "Modify". 3) In the new window, select "Change" and click "Next" @@ -264,7 +269,8 @@ sudo chmod 777 /usr/local/lib [The bundle](https://storage.googleapis.com/chrome-infra/depot_tools.zip) is a ZIP file that should be downloaded and extracted. -The demo was last tested on an exFAT-formatted drive (mounted at `E:\`). +The demo was last tested on a NTFS-formatted drive (mounted at `C:\`). The ZIP +was extracted to `C:\src\depot_tools`. After extracting, verify that the `depot_tools` folder is not read-only. @@ -290,14 +296,14 @@ script such as `.bashrc` or `.zshrc` These instructions are for `cmd` use. Do not run in PowerShell! -It is strongly recommended to use the "Developer Command Prompt" from Visual -Studio as it prepares the console to run build tools. +It is strongly recommended to use "x64 Native Tools Developer Command Prompt" +from Visual Studio as it prepares the console to run build tools. ::: ```bash set DEPOT_TOOLS_WIN_TOOLCHAIN=0 -set PATH=E:\depot_tools;%PATH% +set PATH=C:\src\depot_tools;%PATH% ``` In addition, the `vs2022_install` variable must be set to the Visual Studio @@ -347,14 +353,14 @@ the recommended commands and re-running `gclient`. :::caution pass -There were errors pertaining to `gitconfig`: +There may be errors pertaining to `gitconfig`: ``` error: could not write config file E:/depot_tools/bootstrap-2@3_8_10_chromium_26_bin/git/etc/gitconfig: File exists ``` This can happen if the `depot_tools` folder is read-only. The workaround is to -unset the read-only flag for the `E:\depot_tools` folder. +unset the read-only flag for the `depot_tools` folder. ::: @@ -381,7 +387,7 @@ Note that the actual repo will be placed in `~/dev/v8/v8`. ```bash -cd E:\ +cd C:\ mkdir v8 cd v8 fetch v8 @@ -584,7 +590,7 @@ The build passed after disabling the assertions: ::: - + ```bash python3 tools\dev\v8gen.py -vv x64.release.sample @@ -707,7 +713,7 @@ g++ -I. -Iinclude samples/hello-world.cc -o hello_world -fno-rtti -lv8_monolith ``` - + ```bash cl /I. /Iinclude samples/hello-world.cc /GR- v8_monolith.lib Advapi32.lib Winmm.lib Dbghelp.lib /std:c++17 /DV8_COMPRESS_POINTERS=1 /DV8_ENABLE_SANDBOX /link /out:hello_world.exe /LIBPATH:out.gn\x64.release.sample\obj\ @@ -735,7 +741,7 @@ cd sheetjs-v8 ```bash -cd E:\ +cd C:\ mkdir sheetjs-v8 cd sheetjs-v8 ``` @@ -793,7 +799,7 @@ ln -s ~/dev/v8/v8/out.gn/arm64.release.sample/obj ```bash -copy E:\v8\v8\samples\hello-world.cc .\ +copy C:\v8\v8\samples\hello-world.cc .\ ``` 10) Observe that exFAT does not support symbolic links and move on to step 11. @@ -955,13 +961,13 @@ fn eval_code_ab(scope: &mut v8::HandleScope, code: &str) -> Vec { This demo was last tested in the following deployments: -| Architecture | V8 Crate | Date | -|:-------------|:---------|:-----------| -| `darwin-x64` | `0.92.0` | 2024-05-28 | -| `darwin-arm` | `0.92.0` | 2024-05-25 | -| `win10-x64` | `0.89.0` | 2024-03-24 | -| `linux-x64` | `0.91.0` | 2024-04-25 | -| `linux-arm` | `0.92.0` | 2024-05-25 | +| Architecture | V8 Crate | Date | +|:-------------|:----------|:-----------| +| `darwin-x64` | `0.92.0` | 2024-05-28 | +| `darwin-arm` | `0.92.0` | 2024-05-25 | +| `win11-x64` | `130.0.2` | 2024-03-24 | +| `linux-x64` | `0.91.0` | 2024-04-25 | +| `linux-arm` | `0.92.0` | 2024-05-25 | ::: @@ -999,6 +1005,18 @@ curl -LO https://docs.sheetjs.com/pres.numbers`} curl -L -o src/main.rs https://docs.sheetjs.com/v8/main.rs ``` +:::info pass + +There was a breaking change in version `0.102.0` affecting `v8::Context::new`. +When targeting older versions of the crate, remove the second argument: + +```rs title="src/main.rs" + let context = v8::Context::new(handle_scope); // v8 <= 0.101.0 + //let context = v8::Context::new(handle_scope, Default::default()); // v8 >= 0.102.0 +``` + +::: + 5) Build and run the app: ```bash @@ -1030,7 +1048,7 @@ This demo was last tested in the following deployments: |:-------------|:--------------|:--------|:----------|:-----------| | `darwin-x64` | `12.6.228.13` | `3.1.3` | `22` | 2024-06-19 | | `darwin-arm` | `12.6.228.13` | `3.1.3` | `11.0.23` | 2024-06-19 | -| `win10-x64` | `12.6.228.13` | `3.1.3` | `11.0.16` | 2024-06-21 | +| `win11-x64` | `12.6.228.13` | `3.1.3` | `21.0.5` | 2024-12-20 | | `linux-x64` | `12.6.228.13` | `3.1.3` | `17.0.7` | 2024-06-20 | | `linux-arm` | `12.6.228.13` | `3.1.3` | `17.0.11` | 2024-06-20 | @@ -1189,7 +1207,7 @@ This demo was last tested in the following deployments: |:-------------|:--------------|:-----------| | `darwin-x64` | `12.3.219.12` | 2024-07-16 | | `darwin-arm` | `12.3.219.12` | 2024-07-16 | -| `win10-x64` | `12.3.219.12` | 2024-07-16 | +| `win11-x64` | `12.3.219.12` | 2024-12-20 | | `win11-arm` | `12.3.219.12` | 2024-07-16 | | `linux-x64` | `12.3.219.12` | 2024-07-16 | | `linux-arm` | `12.3.219.12` | 2024-07-16 | @@ -1479,9 +1497,8 @@ This demo was last tested in the following deployments: | Architecture | V8 Version | Crate | Date | |:-------------|:--------------|:---------|:-----------| | `darwin-x64` | `12.6.228.3` | `0.92.0` | 2024-05-28 | -| `darwin-arm` | `12.6.228.3` | `0.92.0` | 2024-05-23 | -| `win10-x64` | `12.3.219.9` | `0.88.0` | 2024-03-24 | -| `win11-x64` | `12.6.228.3` | `0.92.0` | 2024-05-23 | +| `darwin-arm` | `12.6.228.3` | `0.92.0` | 2024-12-20 | +| `win11-x64` | `12.6.228.3` | `0.92.0` | 2024-12-20 | | `linux-x64` | `12.3.219.9` | `0.88.0` | 2024-03-18 | | `linux-arm` | `12.6.228.3` | `0.92.0` | 2024-05-26 | diff --git a/docz/docs/03-demos/42-engines/05-jint.md b/docz/docs/03-demos/42-engines/05-jint.md index de87080..48702a6 100644 --- a/docz/docs/03-demos/42-engines/05-jint.md +++ b/docz/docs/03-demos/42-engines/05-jint.md @@ -41,7 +41,7 @@ setting the environment variable on supported platforms. :::note pass Most of the integration functions are not documented. This explanation is based -on version `3.1.0`. +on version `4.1.0`. ::: @@ -165,7 +165,7 @@ This demo was tested in the following deployments: |:-------------|:--------|:-----------| | `darwin-x64` | `4.1.0` | 2024-12-17 | | `darwin-arm` | `3.1.2` | 2024-05-25 | -| `win10-x64` | `3.1.0` | 2024-04-17 | +| `win11-x64` | `4.1.0` | 2024-12-20 | | `win11-arm` | `3.1.2` | 2024-05-25 | | `linux-x64` | `3.1.0` | 2024-04-25 | | `linux-arm` | `3.1.2` | 2024-05-25 | @@ -248,7 +248,7 @@ dotnet run ```bash dotnet nuget add source https://www.myget.org/F/jint/api/v3/index.json -dotnet add package Jint --version 3.1.2 +dotnet add package Jint --version 4.1.0 ``` To verify Jint is installed, replace `Program.cs` with the following: @@ -379,7 +379,7 @@ tested platforms are listed below: |:-----------------|:--------------| | Intel Mac | `osx-x64` | | ARM64 Mac | `osx-arm64` | -| Windows 10 (x64) | `win10-x64` | +| Windows 11 (x64) | `win-x64` | | Windows 11 (ARM) | `win-arm64` | | Linux (x64) | `linux-x64` | | Linux (ARM) | `linux-arm64` | @@ -426,12 +426,12 @@ dotnet publish -c Release -r linux-arm64 --self-contained true -p:PublishSingleF ``` - + -For Windows 10 x64, the RID is `win10-x64` and the command is: +For Windows 11 x64, the RID is `win-x64` and the command is: ```powershell -dotnet publish -c Release -r win10-x64 --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true +dotnet publish -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true ``` @@ -494,12 +494,12 @@ cp bin/Release/net6.0/linux-arm64/publish/SheetJSJint . ``` - + -For Windows 10 x64, the RID is `win10-x64` and the command is: +For Windows 10 x64, the RID is `win-x64` and the command is: ```powershell -copy .\bin\Release\net6.0\win10-x64\publish\SheetJSJint.exe . +copy .\bin\Release\net6.0\win-x64\publish\SheetJSJint.exe . ``` :::caution pass @@ -513,7 +513,7 @@ The system cannot find the path specified. The correct command was ```powershell -copy .\bin\x64\Release\net6.0\win10-x64\publish\SheetJSJint.exe . +copy .\bin\x64\Release\net6.0\win-x64\publish\SheetJSJint.exe . ``` ::: @@ -545,7 +545,7 @@ copy .\bin\Release\net6.0\win-arm64\publish\SheetJSJint.exe . ```powershell -.\SheetJSJint pres.xlsx +.\SheetJSJint.exe pres.xlsx ``` diff --git a/docz/docs/03-demos/42-engines/06-goja.md b/docz/docs/03-demos/42-engines/06-goja.md index ad2ee51..ee4b003 100644 --- a/docz/docs/03-demos/42-engines/06-goja.md +++ b/docz/docs/03-demos/42-engines/06-goja.md @@ -1,5 +1,6 @@ --- -title: Go + Goja +title: Sheets in Golang with Goja +sidebar_label: Go + Goja pagination_prev: demos/bigdata/index pagination_next: solutions/input --- @@ -7,14 +8,24 @@ pagination_next: solutions/input import current from '/version.js'; import CodeBlock from '@theme/CodeBlock'; -Goja is a pure Go implementation of ECMAScript 5. +Goja[^1] is a pure Go implementation of ECMAScript 5. + +[SheetJS](https://sheetjs.com) is a JavaScript library for reading and writing +data from spreadsheets. + +This demo uses Goja and SheetJS to read and write spreadsheets. We'll explore +how to load SheetJS in the Goja engine, exchange binary data with a Go program +and process spreadsheets and structured data. + +The ["Complete Example"](#complete-example) section makes a command-line tool +for reading arbitrary workbooks and writing data to XLSB workbooks. + +## Integration Details The [SheetJS Standalone scripts](/docs/getting-started/installation/standalone) can be parsed and evaluated in a Goja context. -## Integration Details - -_Initialize Goja_ +### Initialize Goja Goja does not provide a `global` variable. It can be created in one line: @@ -27,7 +38,7 @@ vm := goja.New() v, err := vm.RunString("var global = (function(){ return this; }).call(null);") ``` -_Load SheetJS Scripts_ +### Load SheetJS Scripts The shim and main libraries can be loaded by reading the scripts from the file system and evaluating in the Goja context: @@ -94,9 +105,9 @@ This demo was tested in the following deployments: | Architecture | Git Commit | Go version | Date | |:-------------|:-----------|:-----------|:-----------| -| `darwin-x64` | `79f3a7e` | `1.23.3` | 2024-12-27 | +| `darwin-x64` | `79f3a7e` | `1.23.3` | 2024-12-17 | | `darwin-arm` | `ccbae20` | `1.22.3` | 2024-05-23 | -| `win10-x64` | `e401ed4` | `1.22.1` | 2024-03-24 | +| `win11-x64` | `79f3a7e` | `1.23.4` | 2024-12-20 | | `win11-arm` | `ccbae20` | `1.22.3` | 2024-05-25 | | `linux-x64` | `e401ed4` | `1.22.1` | 2024-03-21 | | `linux-arm` | `ccbae20` | `1.19.8` | 2024-05-25 | @@ -150,3 +161,5 @@ go build SheetGoja.go If the program succeeded, the CSV contents will be printed to console and the file `sheetjsw.xlsb` will be created. That file can be opened with Excel. + +[^1]: The project does not have a website. The library is hosted on [GitHub](https://pkg.go.dev/github.com/dop251/goja). diff --git a/docz/docs/03-demos/42-engines/08-quickjs.md b/docz/docs/03-demos/42-engines/08-quickjs.md index 4028624..400db84 100644 --- a/docz/docs/03-demos/42-engines/08-quickjs.md +++ b/docz/docs/03-demos/42-engines/08-quickjs.md @@ -265,7 +265,7 @@ This demo was tested in the following deployments: |:-------------|:-----------|:-----------| | `darwin-x64` | `6e2e68f` | 2024-12-17 | | `darwin-arm` | `6e2e68f` | 2024-12-17 | -| `win10-x64` | `9e561d5` | 2024-03-04 | +| `win11-x64` | `6e2e68f` | 2024-12-19 | | `win11-arm` | `d378a9f` | 2024-05-25 | | `linux-x64` | `3b45d15` | 2024-04-25 | | `linux-arm` | `d378a9f` | 2024-05-25 | @@ -276,7 +276,7 @@ When the demo was tested, `6e2e68f` was the HEAD commit on the `master` branch. :::caution pass -QuickJS does not officially support Windows. The `win10-x64` and `win11-arm` +QuickJS does not officially support Windows. The `win11-x64` and `win11-arm` tests were run entirely within Windows Subsystem for Linux. ::: diff --git a/docz/docs/03-demos/42-engines/09-hermes.md b/docz/docs/03-demos/42-engines/09-hermes.md index 768e5c6..e3c3b3b 100644 --- a/docz/docs/03-demos/42-engines/09-hermes.md +++ b/docz/docs/03-demos/42-engines/09-hermes.md @@ -374,7 +374,7 @@ fork, which powers React Native for Windows, does have built-in support[^5] | Architecture | Git Commit | Date | |:-------------|:-----------|:-----------| -| `win10-x64` | `240573e` | 2024-03-24 | +| `win11-x64` | `4c64b05` | 2024-12-20 | | `win11-arm` | `240573e` | 2024-06-20 | The ["Windows Example"](#windows-example) covers `hermes-windows`. @@ -574,6 +574,16 @@ The easiest way to install is to select "Individual components" and search for +:::caution pass + +Out of the box, Windows 11 will alias `python`, redirecting unsuspecting users +to the App Installer. This redirect must be disabled: + +Type `alias` in the search bar and select "Manage app execution aliases", In the +settings pane, scroll down and turn off the alias for `python.exe`. + +::: + 1) Set up `depot_tools`. [`depot_tools.zip`](https://storage.googleapis.com/chrome-infra/depot_tools.zip) @@ -607,7 +617,7 @@ Click "OK" in each window (3 windows) and restart your computer. 2) Delete `c:\src\depot_tools\ninja` if it exists, then download the -[official Windows release](https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip) +[official Windows release](https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-win.zip) and move the `ninja.exe` into `c:\src\depot_tools`. If a `ninja.exe` exists in the folder, replace the existing program. @@ -623,7 +633,7 @@ cd sheetjs-hermes ```bash git clone https://github.com/microsoft/hermes-windows cd hermes-windows -git checkout 240573e +git checkout 4c64b05 cd .. ``` @@ -694,7 +704,8 @@ cmake --build ./build -6) Copy every generated `.lib` and `.dll` file into the main folder: +6) Copy every generated `.lib` and `.dll` file into the main folder. The +following commands should be run in a PowerShell session: @@ -707,8 +718,6 @@ dir -r -Path .\hermes-windows\workspace\build\win32-x64-debug\ -Filter "*.lib" | -Run the following commands in a PowerShell session: - ```powershell dir -r -Path .\build -Filter "*.dll" | Copy-Item -Destination .\ dir -r -Path .\build -Filter "*.lib" | Copy-Item -Destination .\ @@ -726,7 +735,7 @@ curl -o sheetjs-hermesw.cpp https://docs.sheetjs.com/hermes/sheetjs-hermesw.cpp 8) Build the application: ```powershell -cl /MDd sheetjs-hermesw.cpp DbgHelp.lib *.lib /I hermes-windows\API /I hermes-windows\include /I hermes-windows\public\ /I hermes-windows\API\jsi +cl /MDd sheetjs-hermesw.cpp DbgHelp.lib *.lib /I hermes-windows\API /I hermes-windows\include /I hermes-windows\public\ /I hermes-windows\API\jsi icuuc.lib icuin.lib ``` :::caution pass @@ -766,6 +775,7 @@ This demo was tested in the following deployments: | Architecture | Hermes | Date | |:-------------|:---------|:-----------| | `darwin-x64` | `0.13.0` | 2024-12-17 | +| `win11-x64` | `0.13.0` | 2024-12-20 | ::: @@ -810,6 +820,17 @@ cd sheetjs-hermes-cli cp ~/.jsvu/engines/hermes-0.13.0/hermes-0.13.0 . ``` +:::note pass + +On Windows, all DLLs must be copied: + +```powershell +copy %userprofile%\.jsvu\engines\hermes-0.13.0\hermes-0.13.0.exe . +copy %userprofile%\.jsvu\engines\hermes-0.13.0\*.dll . +``` + +::: + #### Create Script 4) Download the SheetJS Standalone script and the test file. Save both files in @@ -872,5 +893,5 @@ If successful, the script will print CSV data from the test file. [^4]: See [`sheet_to_csv` in "Utilities"](/docs/api/utilities/csv#csv-output) [^5]: See [`microsoft/hermes-windows`](https://github.com/microsoft/hermes-windows) on GitHub [^6]: See ["Dependencies" in "Building and Running"](https://hermesengine.dev/docs/building-and-running/#dependencies) in the Hermes Documentation -[^7]: See ["Download Python"](https://www.python.org/downloads/) in the Python website. +[^7]: See ["Download Python"](https://www.python.org/downloads/) in the Python website. When the demo was last tested, Python 3.11.9 was installed. [^8]: See [the Visual Studio website](https://visualstudio.microsoft.com/#vs-section) for download links. diff --git a/docz/docs/03-demos/42-engines/15-rb.md b/docz/docs/03-demos/42-engines/15-rb.md index 9ef5488..c6a8486 100644 --- a/docz/docs/03-demos/42-engines/15-rb.md +++ b/docz/docs/03-demos/42-engines/15-rb.md @@ -89,7 +89,7 @@ This demo was tested in the following deployments: |:-------------|:---------|:---------|:-----------| | `darwin-x64` | `2.6.10` | `2.10.0` | 2024-12-17 | | `darwin-arm` | `2.6.10` | `2.9.1` | 2024-05-25 | -| `win10-x64` | `3.2.3` | `2.9.1` | 2024-03-10 | +| `win11-x64` | `3.3.6` | `2.10.0` | 2024-12-20 | | `win11-arm` | `3.0.2` | `2.9.1` | 2024-05-25 | | `linux-x64` | `3.0.5` | `2.9.1` | 2024-03-21 | | `linux-arm` | `3.1.2` | `2.9.1` | 2024-05-25 | diff --git a/docz/docs/03-demos/42-engines/20-chakra.md b/docz/docs/03-demos/42-engines/20-chakra.md index 78ccd69..8d0ab2c 100644 --- a/docz/docs/03-demos/42-engines/20-chakra.md +++ b/docz/docs/03-demos/42-engines/20-chakra.md @@ -134,7 +134,7 @@ This demo was tested in the following deployments: |:-------------|:-----------|:-----------| | `darwin-x64` | `e26c81f` | 2024-12-17 | | `darwin-arm` | `3a7b120` | 2024-05-23 | -| `win10-x64` | `c3ead3f` | 2024-03-04 | +| `win11-x64` | `e26c81f` | 2024-12-19 | | `win11-arm` | `13358c6` | 2024-07-14 | | `linux-x64` | `1f6e17c` | 2024-04-25 | @@ -143,7 +143,7 @@ This demo was tested in the following deployments: 0) Install dependencies: - + ```bash brew install icu4c cmake @@ -166,7 +166,7 @@ sudo pacman -S cmake clang ``` - + Install Visual Studio 2022 with the "Desktop Development with C++" workflow and the "Git for Windows" individual component. @@ -196,7 +196,7 @@ cd .. 2) Build ChakraCore: - + ```bash cd ChakraCore @@ -282,7 +282,7 @@ cd .. ``` - + :::info pass @@ -432,7 +432,7 @@ make - + ``` cl sheetjs.ch.cpp ChakraCore.lib /I ChakraCore\lib\Jsrt /link /LIBPATH:ChakraCore\Build\VcBuild\bin\x64_debug diff --git a/docz/docs/03-demos/42-engines/21-boa.md b/docz/docs/03-demos/42-engines/21-boa.md index 76a71e5..8265ef8 100644 --- a/docz/docs/03-demos/42-engines/21-boa.md +++ b/docz/docs/03-demos/42-engines/21-boa.md @@ -122,7 +122,7 @@ This demo was tested in the following deployments: |:-------------|:---------|:-----------| | `darwin-x64` | `0.20.0` | 2024-12-17 | | `darwin-arm` | `0.18.0` | 2024-05-23 | -| `win10-x64` | `0.18.0` | 2024-04-25 | +| `win11-x64` | `0.20.0` | 2024-12-19 | | `win11-arm` | `0.18.0` | 2024-05-25 | | `linux-x64` | `0.18.0` | 2024-03-21 | | `linux-arm` | `0.18.0` | 2024-05-25 | diff --git a/docz/docs/03-demos/42-engines/23-jerryscript.md b/docz/docs/03-demos/42-engines/23-jerryscript.md index ae8251c..b24db0e 100644 --- a/docz/docs/03-demos/42-engines/23-jerryscript.md +++ b/docz/docs/03-demos/42-engines/23-jerryscript.md @@ -38,7 +38,7 @@ This demo was tested in the following environments: |:-------------|:----------|:-----------| | `darwin-x64` | `d2d30df` | 2024-12-17 | | `darwin-arm` | `35465ed` | 2024-05-25 | -| `win10-x64` | `47bd5d4` | 2024-04-14 | +| `win11-x64` | `d2d30df` | 2024-12-19 | | `win11-arm` | `35465ed` | 2024-05-25 | | `linux-x64` | `cefd391` | 2024-03-21 | | `linux-arm` | `35465ed` | 2024-05-25 | diff --git a/docz/docs/03-demos/42-engines/25-mujs.md b/docz/docs/03-demos/42-engines/25-mujs.md index 8857b80..c135037 100644 --- a/docz/docs/03-demos/42-engines/25-mujs.md +++ b/docz/docs/03-demos/42-engines/25-mujs.md @@ -324,7 +324,7 @@ This demo was tested in the following deployments: |:-------------|:--------|:-----------| | `darwin-x64` | `1.3.5` | 2024-12-17 | | `darwin-arm` | `1.3.4` | 2024-05-23 | -| `win10-x64` | `1.3.4` | 2024-06-20 | +| `win11-x64` | `1.3.5` | 2024-12-19 | | `win11-arm` | `1.3.4` | 2024-06-20 | | `linux-x64` | `1.3.4` | 2024-04-21 | | `linux-arm` | `1.3.4` | 2024-05-25 | @@ -333,13 +333,13 @@ This demo was tested in the following deployments: :::caution pass -MuJS distributions do not include native Windows projects. The `win10-x64` and +MuJS distributions do not include native Windows projects. The `win11-x64` and `win11-arm` tests were run entirely within Windows Subsystem for Linux. -When building in WSL, `libreadline-dev` must be installed using `apt`: +When building in WSL, `libreadline-dev` and `build-essential` must be installed: ```bash -sudo apt-get install libreadline-dev +sudo apt-get install libreadline-dev build-essential ``` ::: diff --git a/docz/docs/03-demos/42-engines/26-jurassic.md b/docz/docs/03-demos/42-engines/26-jurassic.md index 3273b02..11baadb 100644 --- a/docz/docs/03-demos/42-engines/26-jurassic.md +++ b/docz/docs/03-demos/42-engines/26-jurassic.md @@ -178,7 +178,7 @@ This demo was tested in the following deployments: |:-------------|:---------|:-----------| | `darwin-x64` | `3.2.8` | 2024-12-17 | | `darwin-arm` | `3.2.7` | 2024-06-15 | -| `win10-x64` | `3.2.7` | 2024-06-21 | +| `win11-x64` | `3.2.8` | 2024-12-19 | | `win11-arm` | `3.2.7` | 2024-07-14 | | `linux-x64` | `3.2.7` | 2024-06-20 | | `linux-arm` | `3.2.7` | 2024-06-20 | diff --git a/docz/docs/09-miscellany/05-contributing.md b/docz/docs/09-miscellany/05-contributing.md index 5659dce..55b2b8d 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 14.4 (x64) | `darwin-x64` | 2024-07-12 | | MacOS 15.1 (ARM64) | `darwin-arm` | 2024-11-10 | | Windows 10 (x64) + WSL Ubuntu | `win10-x64` | 2024-07-12 | -| Windows 11 (x64) + WSL Ubuntu | `win11-x64` | 2024-07-26 | +| Windows 11 (x64) + WSL Ubuntu | `win11-x64` | 2024-12-19 | | Windows 11 (ARM) + WSL Ubuntu | `win11-arm` | 2024-05-23 | With some additional dependencies, the unminified scripts are reproducible and @@ -113,6 +113,25 @@ wsl --install Ubuntu ::: +:::caution pass + +In Windows 11 24H2, the `wsl` commands may fail with the following message: + +``` +Class not registered +Error code: Wsl/CallMsi/Install/REGDB_E_CLASSNOTREG +``` + +[WSL should be manually installed](https://github.com/microsoft/WSL/releases). +Once installed, WSL2 should be activated: + +```bash +wsl --set-default-version 2 +wsl --install -d Ubuntu +``` + +::: + :::danger pass **WSL will not run in a Windows on ARM VM on computers with the M1 CPU** diff --git a/docz/static/deno/s2c.ts b/docz/static/deno/s2c.ts index 49ea70f..83e2e20 100644 --- a/docz/static/deno/s2c.ts +++ b/docz/static/deno/s2c.ts @@ -1,6 +1,6 @@ -// @deno-types="https://cdn.sheetjs.com/xlsx-0.20.3/package/types/index.d.ts" -import { read, utils, set_cptable, version } from 'https://cdn.sheetjs.com/xlsx-0.20.3/package/xlsx.mjs'; -import * as cptable from 'https://cdn.sheetjs.com/xlsx-0.20.3/package/dist/cpexcel.full.mjs'; +// @deno-types="https://cdn.sheetjs.com/xlsx-latest/package/types/index.d.ts" +import { read, utils, set_cptable, version } from 'https://cdn.sheetjs.com/xlsx-latest/package/xlsx.mjs'; +import * as cptable from 'https://cdn.sheetjs.com/xlsx-latest/package/dist/cpexcel.full.mjs'; set_cptable(cptable); import * as Drash from "https://cdn.jsdelivr.net/gh/drashland/drash@v2.8.1/mod.ts"; diff --git a/docz/static/duk/main.zig b/docz/static/duk/main.zig index 2744e0f..c7e5cbf 100644 --- a/docz/static/duk/main.zig +++ b/docz/static/duk/main.zig @@ -63,5 +63,5 @@ pub fn main() !void { const slc: []u8 = @as([*]u8, @ptrCast(c_ptr))[0..sz]; // write to file - _ = try std.fs.cwd().writeFile("sheetjs.zig.xlsx", slc); + _ = try std.fs.cwd().writeFile(.{ .sub_path = "sheetjs.zig.xlsx", .data = slc }); } diff --git a/docz/static/neu/win10.png b/docz/static/neu/win11.png similarity index 100% rename from docz/static/neu/win10.png rename to docz/static/neu/win11.png diff --git a/docz/static/v8/main.rs b/docz/static/v8/main.rs index 2681483..cd831cd 100644 --- a/docz/static/v8/main.rs +++ b/docz/static/v8/main.rs @@ -27,7 +27,8 @@ fn main() { let isolate = &mut v8::Isolate::new(Default::default()); let handle_scope = &mut v8::HandleScope::new(isolate); - let context = v8::Context::new(handle_scope); + //let context = v8::Context::new(handle_scope); // v8 <= 0.101.0 + let context = v8::Context::new(handle_scope, Default::default()); // v8 >= 0.102.0 let context_scope = &mut v8::ContextScope::new(handle_scope, context); /* load library */ diff --git a/docz/version.js b/docz/version.js index 34053fc..aceec23 100644 --- a/docz/version.js +++ b/docz/version.js @@ -1,4 +1,3 @@ -//const version = "0.20.2"; import { version } from "xlsx"; export default version; diff --git a/index.html b/misc/index.html similarity index 100% rename from index.html rename to misc/index.html