From c76ec7f27db3dd2ff75de97fa987920161aaa881 Mon Sep 17 00:00:00 2001 From: SheetJS Date: Sat, 2 Dec 2023 03:39:35 -0500 Subject: [PATCH] arm --- docz/docs/03-demos/02-grid/_category_.json | 2 +- docz/docs/03-demos/03-net/_category_.json | 2 +- docz/docs/03-demos/04-static/_category_.json | 2 +- .../docs/03-demos/05-mobile/01-reactnative.md | 18 +- docz/docs/03-demos/05-mobile/_category_.json | 2 +- docz/docs/03-demos/07-data/_category_.json | 2 +- .../{06-desktop => 19-desktop}/01-electron.md | 44 +++-- .../{06-desktop => 19-desktop}/02-nwjs.md | 31 ++-- .../{06-desktop => 19-desktop}/03-wails.md | 18 +- .../{06-desktop => 19-desktop}/04-tauri.md | 37 ++-- .../05-neutralino.md | 29 +-- .../06-reactnative.md | 35 ++-- .../{06-desktop => 19-desktop}/09-cli.md | 171 ++++++++++++------ .../_category_.json | 2 +- .../{06-desktop => 19-desktop}/index.md | 0 docz/docs/03-demos/42-engines/01-duktape.md | 37 +++- docz/docs/03-demos/42-engines/02-v8.md | 46 ++--- docz/docs/03-demos/42-engines/05-jint.md | 12 +- docz/docs/03-demos/42-engines/06-goja.md | 6 +- docz/docs/03-demos/42-engines/07-nashorn.md | 66 ++++--- docz/docs/03-demos/42-engines/08-quickjs.md | 10 +- docz/docs/03-demos/42-engines/09-hermes.md | 2 +- docz/docs/03-demos/42-engines/15-rb.md | 10 +- docz/docs/03-demos/42-engines/21-boa.md | 4 +- docz/docs/09-miscellany/05-contributing.md | 31 +++- docz/docs/12-constellation/21-dta.md | 2 +- docz/static/cli/Cargo.toml | 2 +- docz/static/dta/dta.min.js | 2 - docz/static/electron/package.json | 12 +- 29 files changed, 410 insertions(+), 227 deletions(-) rename docz/docs/03-demos/{06-desktop => 19-desktop}/01-electron.md (88%) rename docz/docs/03-demos/{06-desktop => 19-desktop}/02-nwjs.md (85%) rename docz/docs/03-demos/{06-desktop => 19-desktop}/03-wails.md (95%) rename docz/docs/03-demos/{06-desktop => 19-desktop}/04-tauri.md (92%) rename docz/docs/03-demos/{06-desktop => 19-desktop}/05-neutralino.md (92%) rename docz/docs/03-demos/{06-desktop => 19-desktop}/06-reactnative.md (96%) rename docz/docs/03-demos/{06-desktop => 19-desktop}/09-cli.md (76%) rename docz/docs/03-demos/{06-desktop => 19-desktop}/_category_.json (70%) rename docz/docs/03-demos/{06-desktop => 19-desktop}/index.md (100%) delete mode 100644 docz/static/dta/dta.min.js diff --git a/docz/docs/03-demos/02-grid/_category_.json b/docz/docs/03-demos/02-grid/_category_.json index 6739e79..631401e 100644 --- a/docz/docs/03-demos/02-grid/_category_.json +++ b/docz/docs/03-demos/02-grid/_category_.json @@ -1,4 +1,4 @@ { "label": "Data Grids and Tables", - "position": 2 + "position": 4 } \ No newline at end of file diff --git a/docz/docs/03-demos/03-net/_category_.json b/docz/docs/03-demos/03-net/_category_.json index 9059674..e6ce94f 100644 --- a/docz/docs/03-demos/03-net/_category_.json +++ b/docz/docs/03-demos/03-net/_category_.json @@ -1,4 +1,4 @@ { "label": "Servers and Remote Data", - "position": 3 + "position": 9 } \ No newline at end of file diff --git a/docz/docs/03-demos/04-static/_category_.json b/docz/docs/03-demos/04-static/_category_.json index db4d3fc..a4c197b 100644 --- a/docz/docs/03-demos/04-static/_category_.json +++ b/docz/docs/03-demos/04-static/_category_.json @@ -1,4 +1,4 @@ { "label": "Content and Static Sites", - "position": 4 + "position": 12 } \ No newline at end of file diff --git a/docz/docs/03-demos/05-mobile/01-reactnative.md b/docz/docs/03-demos/05-mobile/01-reactnative.md index 2cb3d41..7ee172f 100644 --- a/docz/docs/03-demos/05-mobile/01-reactnative.md +++ b/docz/docs/03-demos/05-mobile/01-reactnative.md @@ -213,20 +213,20 @@ const wb = XLSX.read(ab); ### Fetch Demo -:::note +:::note Tested Deployments -The Android demo was last tested on 2023 September 03 with RN `0.72.4`. The +The Android demo was last tested on 2023 December 01 with RN `0.72.7`. The simulator used Android 13 ("Tiramisu") API 33 on a Pixel 3. -The iOS demo was last tested on 2023 September 03 with RN `0.72.4`. The -simulator used iOS 16.4 on an iPhone SE (3rd generation). +The iOS demo was last tested on 2023 December 01 with RN `0.72.7`. The +simulator used iOS 17.0.1 on an iPhone SE (3rd generation). ::: 1) Create project: ```bash -npx -y react-native@0.72.4 init SheetJSRNFetch --version="0.72.4" +npx -y react-native@0.72.7 init SheetJSRNFetch --version="0.72.7" ``` 2) Install shared dependencies: @@ -253,9 +253,9 @@ curl -LO https://docs.sheetjs.com/reactnative/App.tsx When the demo was last tested on macOS, `java -version` displayed the following: ``` -openjdk version "11.0.20" 2023-07-18 LTS -OpenJDK Runtime Environment Zulu11.66+15-CA (build 11.0.20+8-LTS) -OpenJDK 64-Bit Server VM Zulu11.66+15-CA (build 11.0.20+8-LTS, mixed mode) +openjdk version "11.0.21" 2023-10-17 LTS +OpenJDK Runtime Environment Zulu11.68+17-CA (build 11.0.21+9-LTS) +OpenJDK 64-Bit Server VM Zulu11.68+17-CA (build 11.0.21+9-LTS, mixed mode) ``` ::: @@ -591,7 +591,7 @@ await FileSystem.writeAsStringAsync(FileSystem.documentDirectory + "sheetjs.xlsx ### Demo -:::note +:::note Tested Deployments Each Android demo was last tested on 2023 September 03 with RN `0.72.6`. The simulator used Android 13 ("Tiramisu") API 33 on a Pixel 3. diff --git a/docz/docs/03-demos/05-mobile/_category_.json b/docz/docs/03-demos/05-mobile/_category_.json index d27716f..ae7c363 100644 --- a/docz/docs/03-demos/05-mobile/_category_.json +++ b/docz/docs/03-demos/05-mobile/_category_.json @@ -1,4 +1,4 @@ { "label": "iOS and Android Apps", - "position": 5 + "position": 17 } \ No newline at end of file diff --git a/docz/docs/03-demos/07-data/_category_.json b/docz/docs/03-demos/07-data/_category_.json index 9757d22..c43e582 100644 --- a/docz/docs/03-demos/07-data/_category_.json +++ b/docz/docs/03-demos/07-data/_category_.json @@ -1,4 +1,4 @@ { "label": "Databases and Stores", - "position": 7 + "position": 23 } \ No newline at end of file diff --git a/docz/docs/03-demos/06-desktop/01-electron.md b/docz/docs/03-demos/19-desktop/01-electron.md similarity index 88% rename from docz/docs/03-demos/06-desktop/01-electron.md rename to docz/docs/03-demos/19-desktop/01-electron.md index b4f312b..fe9e3ce 100644 --- a/docz/docs/03-demos/06-desktop/01-electron.md +++ b/docz/docs/03-demos/19-desktop/01-electron.md @@ -16,12 +16,12 @@ from the main or the renderer thread. The "Complete Example" creates an app that looks like the screenshots below: - +
Win10Windows macOS Linux
-![Win10 screenshot](pathname:///electron/ew.png) +![Windows screenshot](pathname:///electron/ew.png) @@ -178,18 +178,18 @@ function exportFile(workbook) { ## Complete Example -:::note +:::note Tested Deployments This demo was tested in the following environments: -| OS and Version | Arch | Electron | Date | -|:---------------|:-----|:---------|:-----------| -| macOS 13.5.1 | x64 | `26.1.0` | 2023-09-03 | -| macOS 13.5.1 | ARM | `26.1.0` | 2023-09-03 | -| Windows 10 | x64 | `26.1.0` | 2023-09-03 | -| Windows 11 | ARM | `26.1.0` | 2023-09-24 | -| Linux (HoloOS) | x64 | `27.0.0` | 2023-10-11 | -| Linux (Debian) | ARM | `26.1.0` | 2023-09-03 | +| OS and Version | Architecture | Electron | Date | +|:---------------|:-------------|:---------|:-----------| +| macOS 13.5.1 | `darwin-x64` | `26.1.0` | 2023-09-03 | +| macOS 14.1.2 | `darwin-arm` | `27.1.3` | 2023-12-01 | +| Windows 10 | `win10-x64` | `26.1.0` | 2023-09-03 | +| Windows 11 | `win11-arm` | `27.1.3` | 2023-12-01 | +| Linux (HoloOS) | `linux-x64` | `27.0.0` | 2023-10-11 | +| Linux (Debian) | `linux-arm` | `27.1.3` | 2023-12-01 | ::: @@ -216,7 +216,7 @@ try to load the page in your browser. The goal is to save the file contents. ::: -These instructions can be run in a terminal window: +These instructions can be run in a Terminal (bash) or Command Prompt window: ```bash mkdir sheetjs-electron @@ -262,7 +262,7 @@ The program will run on ARM64 Windows. ::: -**Testing** +### Testing 5) Download [the test file `pres.numbers`](https://sheetjs.com/pres.numbers) @@ -272,7 +272,7 @@ The program will run on ARM64 Windows. npx -y electron . ``` -_Electron API_ +#### Electron API 7) Click "Click here to select a file from your computer". With the file picker, navigate to the Downloads folder and select `pres.numbers`. @@ -282,10 +282,18 @@ The application should show data in a table. 8) Click "Export Data!" and click "Save" in the popup. By default, it will try to write to `Untitled.xls` in the Downloads folder. +:::note pass + +During the most recent Linux ARM64 test, the dialog did not have a default name. + +If there is no default name, enter `Untitled.xls` and click "Save". + +::: + The app will show a popup once the data is exported. Open the file in a spreadsheet editor and compare the data to the table shown in the application. -_Drag and Drop_ +#### Drag and Drop 9) Close the application, end the terminal process and re-launch (see step 6) @@ -294,7 +302,7 @@ _Drag and Drop_ 11) Click and drag the `pres.numbers` file from the Downloads folder to the bordered "Drop a spreadsheet file" box. The file data should be displayed. -_File Input Element_ +#### File Input Element 12) Close the application, end the terminal process and re-launch (see step 6) @@ -305,7 +313,7 @@ and select `pres.numbers`. ## Electron Breaking Changes The first version of this demo used Electron 1.7.5. The current demo includes -the required changes for Electron 23.0.0. +the required changes for Electron 27.1.3. There are no Electron-specific workarounds in the library, but Electron broke backwards compatibility multiple times. A summary of changes is noted below. @@ -327,4 +335,4 @@ call is required to enable Developer Tools in the window. ::: -[^1]: See ["Makers"](https://www.electronforge.io/config/makers) in the Electron Forge documentation. \ No newline at end of file +[^1]: See ["Makers"](https://www.electronforge.io/config/makers) in the Electron Forge documentation. On Linux, the demo generates `rpm` and `deb` distributables. \ No newline at end of file diff --git a/docz/docs/03-demos/06-desktop/02-nwjs.md b/docz/docs/03-demos/19-desktop/02-nwjs.md similarity index 85% rename from docz/docs/03-demos/06-desktop/02-nwjs.md rename to docz/docs/03-demos/19-desktop/02-nwjs.md index b6d0dc4..74ad237 100644 --- a/docz/docs/03-demos/06-desktop/02-nwjs.md +++ b/docz/docs/03-demos/19-desktop/02-nwjs.md @@ -18,12 +18,12 @@ can be referenced in a `SCRIPT` tag from the entry point HTML page. The "Complete Example" creates an app that looks like the screenshots below: - +
Win10Windows macOS Linux
-![Win10 screenshot](pathname:///nwjs/nww.png) +![Windows screenshot](pathname:///nwjs/nww.png) @@ -107,23 +107,30 @@ input.click(); ## Complete Example -:::note +:::note Tested Deployments This demo was tested in the following environments: -| OS and Version | Arch | NW.js | Date | -|:---------------|:-----|:---------|:-----------| -| macOS 13.5.2 | x64 | `0.78.1` | 2023-09-27 | -| macOS 13.5.2 | ARM | `0.78.1` | 2023-09-27 | -| Windows 10 | x64 | `0.78.1` | 2023-09-27 | -| Windows 11 | ARM | `0.78.1` | 2023-09-27 | -| Linux (HoloOS) | x64 | `0.78.1` | 2023-10-11 | +| OS and Version | Architecture | NW.js | Date | +|:---------------|:-------------|:---------|:-----------| +| macOS 13.5.2 | `darwin-x64` | `0.78.1` | 2023-09-27 | +| macOS 14.1.2 | `darwin-arm` | `0.82.0` | 2023-12-01 | +| Windows 10 | `win10-x64` | `0.78.1` | 2023-09-27 | +| Windows 11 | `win11-arm` | `0.82.0` | 2023-12-01 | +| Linux (HoloOS) | `linux-x64` | `0.78.1` | 2023-10-11 | There is no official Linux ARM64 release. The community release[^1] was tested and verified on 2023-09-27. ::: +0) Create a project folder: + +```bash +mkdir sheetjs-nwjs +cd sheetjs-nwjs +``` + 1) Create a `package.json` file that specifies the entry point: {`\ @@ -133,7 +140,7 @@ and verified on 2023-09-27. "version": "0.0.0", "main": "index.html", "dependencies": { - "nw": "0.78.1", + "nw": "0.82.0", "xlsx": "https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz" } }`} @@ -172,7 +179,7 @@ the file input element to select a spreadsheet and clicking the export button. 5) To build a standalone app, run the builder: ```bash -npx -p nw-builder nwbuild --mode=build --version=0.78.1 --glob=false --outDir=../out ./ +npx -p nw-builder nwbuild --mode=build --version=0.82.0 --glob=false --outDir=../out ./ ``` This will generate the standalone app in the `..\out\` folder. diff --git a/docz/docs/03-demos/06-desktop/03-wails.md b/docz/docs/03-demos/19-desktop/03-wails.md similarity index 95% rename from docz/docs/03-demos/06-desktop/03-wails.md rename to docz/docs/03-demos/19-desktop/03-wails.md index bd5c9d5..588632b 100644 --- a/docz/docs/03-demos/06-desktop/03-wails.md +++ b/docz/docs/03-demos/19-desktop/03-wails.md @@ -33,7 +33,7 @@ app to read and write workbooks. The app will look like the screenshots below: Linux
-![Win10 screenshot](pathname:///wails/win10.png) +![Windows screenshot](pathname:///wails/win10.png) @@ -295,14 +295,14 @@ async function exportFile(table_element) { This demo was tested in the following environments: -| OS and Version | Arch | Wails | Date | -|:---------------|:-----|:---------|:-----------| -| macOS 13.6 | x64 | `v2.6.0` | 2023-11-05 | -| macOS 13.5.1 | ARM | `v2.5.1` | 2023-08-24 | -| Windows 10 | x64 | `v2.5.1` | 2023-08-25 | -| Windows 11 | ARM | `v2.6.0` | 2023-09-25 | -| Linux (HoloOS) | x64 | `v2.6.0` | 2023-10-11 | -| Linux (Debian) | ARM | `v2.6.0` | 2023-09-25 | +| OS and Version | Architecture | Wails | Date | +|:---------------|:-------------|:---------|:-----------| +| macOS 13.6 | `darwin-x64` | `v2.6.0` | 2023-11-05 | +| macOS 14.1.2 | `darwin-arm` | `v2.6.0` | 2023-12-01 | +| Windows 10 | `win10-x64` | `v2.5.1` | 2023-08-25 | +| Windows 11 | `win11-arm` | `v2.6.0` | 2023-12-01 | +| Linux (HoloOS) | `linux-x64` | `v2.6.0` | 2023-10-11 | +| Linux (Debian) | `linux-arm` | `v2.6.0` | 2023-12-01 | ::: diff --git a/docz/docs/03-demos/06-desktop/04-tauri.md b/docz/docs/03-demos/19-desktop/04-tauri.md similarity index 92% rename from docz/docs/03-demos/06-desktop/04-tauri.md rename to docz/docs/03-demos/19-desktop/04-tauri.md index b5969c9..dd1b6e9 100644 --- a/docz/docs/03-demos/06-desktop/04-tauri.md +++ b/docz/docs/03-demos/19-desktop/04-tauri.md @@ -30,12 +30,12 @@ The ["Complete Example"](#complete-example) section covers a complete desktop app to read and write workbooks. The app will look like the screenshots below: - +
Win10Windows macOS Linux
-![Win10 screenshot](pathname:///tauri/win10.png) +![Windows screenshot](pathname:///tauri/win10.png) @@ -251,18 +251,18 @@ const save_button_callback = async() => { ## Complete Example -:::note pass +:::note Tested Deployments This demo was tested in the following environments: -| OS and Version | Arch | Tauri | Date | -|:---------------|:-----|:---------|:-----------| -| macOS 14.1.1 | x64 | `v1.5.6` | 2023-11-17 | -| macOS 14.0 | ARM | `v1.5.2` | 2023-10-18 | -| Windows 10 | x64 | `v1.5.0` | 2023-10-01 | -| Windows 11 | ARM | `v1.4.1` | 2023-09-26 | -| Linux (HoloOS) | x64 | `v1.5.2` | 2023-10-11 | -| Linux (Debian) | ARM | `v1.4.1` | 2023-09-26 | +| OS and Version | Architecture | Tauri | Date | +|:---------------|:-------------|:---------|:-----------| +| macOS 14.1.1 | `darwin-x64` | `v1.5.6` | 2023-11-17 | +| macOS 14.0 | `darwin-arm` | `v1.5.2` | 2023-10-18 | +| Windows 10 | `win10-x64` | `v1.5.0` | 2023-10-01 | +| Windows 11 | `win11-arm` | `v1.5.7` | 2023-12-01 | +| Linux (HoloOS) | `linux-x64` | `v1.5.2` | 2023-10-11 | +| Linux (Debian) | `linux-arm` | `v1.5.7` | 2023-12-01 | ::: @@ -415,7 +415,20 @@ The following features should be manually verified: :::note pass -During the last Linux test, the build failed with the following error message: +During the last Linux ARM64 test, the build failed to create an AppImage: + +``` + Error [tauri-cli-node] failed to bundle project: error running appimage.sh +``` + +This is a known Tauri AppImage packaging bug. Since the actual application and +the `.deb` distributable are created, the error can be ignored. + +::: + +:::note pass + +During the last Linux x64 test, the build failed with the error message: ``` 'openssl/opensslv.h' file not found diff --git a/docz/docs/03-demos/06-desktop/05-neutralino.md b/docz/docs/03-demos/19-desktop/05-neutralino.md similarity index 92% rename from docz/docs/03-demos/06-desktop/05-neutralino.md rename to docz/docs/03-demos/19-desktop/05-neutralino.md index f843b1c..f0ec717 100644 --- a/docz/docs/03-demos/06-desktop/05-neutralino.md +++ b/docz/docs/03-demos/19-desktop/05-neutralino.md @@ -28,12 +28,12 @@ The ["Complete Example"](#complete-example) section covers a complete desktop app to read and write workbooks. The app will look like the screenshots below: - +
Win10Windows macOS Linux
-![Win10 screenshot](pathname:///neu/win10.png) +![Windows screenshot](pathname:///neu/win10.png) @@ -186,18 +186,18 @@ const save_button_callback = async() => { ## Complete Example -:::note +:::note Tested Deployments This demo was tested in the following environments: -| OS and Version | Arch | Server | Client | Date | -|:---------------|:-----|:----------|:----------|:-----------| -| macOS 13.5.1 | x64 | `v4.13.0` | `v3.11.0` | 2023-08-26 | -| macOS 14.0 | ARM | `v4.14.1` | `v3.12.0` | 2023-10-18 | -| Windows 10 | x64 | `v4.13.0` | `v3.11.0` | 2023-08-26 | -| Windows 11 | ARM | `v4.13.0` | `v3.11.0` | 2023-09-21 | -| Linux (HoloOS) | x64 | `v4.14.1` | `v3.12.0` | 2023-10-11 | -| Linux (Debian) | ARM | `v4.13.0` | `v3.11.0` | 2023-09-25 | +| OS and Version | Architecture | Server | Client | Date | +|:---------------|:-------------|:----------|:----------|:-----------| +| macOS 13.5.1 | `darwin-x64` | `v4.13.0` | `v3.11.0` | 2023-08-26 | +| macOS 14.0 | `darwin-arm` | `v4.14.1` | `v3.12.0` | 2023-10-18 | +| Windows 10 | `win10-x64` | `v4.13.0` | `v3.11.0` | 2023-08-26 | +| Windows 11 | `win11-arm` | `v4.14.1` | `v3.12.0` | 2023-12-01 | +| Linux (HoloOS) | `linux-x64` | `v4.14.1` | `v3.12.0` | 2023-10-11 | +| Linux (Debian) | `linux-arm` | `v4.14.1` | `v3.12.0` | 2023-12-01 | ::: @@ -368,6 +368,13 @@ async function exportData() { When the app loads, click the "Import File" button and select a spreadsheet to see the contents. +:::info pass + +If no dialog is displayed, see the ["Installation Notes"](#complete-example) for +more details. On Linux ARM64, KDialog or Zenity must be installed. + +::: + Click "Export File" and enter `SheetJSNeu.xlsx` to write a new file. :::caution pass diff --git a/docz/docs/03-demos/06-desktop/06-reactnative.md b/docz/docs/03-demos/19-desktop/06-reactnative.md similarity index 96% rename from docz/docs/03-demos/06-desktop/06-reactnative.md rename to docz/docs/03-demos/19-desktop/06-reactnative.md index 8ad9408..fe1bb4b 100644 --- a/docz/docs/03-demos/06-desktop/06-reactnative.md +++ b/docz/docs/03-demos/19-desktop/06-reactnative.md @@ -28,7 +28,7 @@ and create native modules for selecting and reading files from the computer. The Windows and macOS demos create apps that look like the screenshots below: - +
Win10Windows macOS
@@ -40,17 +40,17 @@ The Windows and macOS demos create apps that look like the screenshots below:
-:::note +:::note Tested Deployments This demo was tested in the following environments: -| OS and Version | Arch | RN Platform | Date | -|:---------------|:-----|:------------|:-----------| -| Windows 10 | x64 | `v0.72.16` | 2023-10-27 | -| Windows 11 | x64 | `v0.72.12` | 2023-10-14 | -| Windows 11 | ARM | `v0.72.9` | 2023-09-18 | -| MacOS 14.1 | x64 | `v0.72.5` | 2023-10-27 | -| MacOS 13.5.2 | ARM | `v0.72.4` | 2023-09-18 | +| OS and Version | Architecture | RN Platform | Date | +|:---------------|:-------------|:------------|:-----------| +| Windows 10 | `win10-x64` | `v0.72.16` | 2023-10-27 | +| Windows 11 | `win11-x64` | `v0.72.12` | 2023-10-14 | +| Windows 11 | `win11-arm` | `v0.72.20` | 2023-12-01 | +| MacOS 14.1 | `darwin-x64` | `v0.72.5` | 2023-10-27 | +| MacOS 14.1.2 | `darwin-arm` | `v0.72.11` | 2023-12-01 | ::: @@ -420,10 +420,10 @@ setup instructions" to find instructions for manual installation. ### Project Setup -1) Create a new project using React Native `0.72.6`: +1) Create a new project using React Native `0.72.7`: ```bash -npx react-native init SheetJSWin --template react-native@0.72.6 +npx react-native init SheetJSWin --template react-native@0.72.7 cd SheetJSWin ``` @@ -858,6 +858,17 @@ highlighted lines: npx react-native run-macos ``` +:::note + +If the app runs but no window is displayed, clear caches and try again: + +```bash +npx react-native clean --include metro,watchman +npx react-native run-macos +``` + +::: + Close the running app from the dock and close the Metro terminal window. ### Application @@ -895,7 +906,7 @@ xcodebuild -workspace macos/SheetJSmacOS.xcworkspace -scheme SheetJSmacOS-macOS ``` When the demo was last tested, the path to the generated app was displayed in -the terminal. Search for `Release/SheetJSmacOS.app`: +the terminal. Search for `Release/SheetJSmacOS.app` and look for `touch`: ``` /usr/bin/touch -c /Users/sheetjs/Library/Developer/Xcode/DerivedData/SheetJSmacOS-abcdefghijklmnopqrstuvwxyzab/Build/Products/Release/SheetJSmacOS.app diff --git a/docz/docs/03-demos/06-desktop/09-cli.md b/docz/docs/03-demos/19-desktop/09-cli.md similarity index 76% rename from docz/docs/03-demos/06-desktop/09-cli.md rename to docz/docs/03-demos/19-desktop/09-cli.md index 49d24a4..3132199 100644 --- a/docz/docs/03-demos/06-desktop/09-cli.md +++ b/docz/docs/03-demos/19-desktop/09-cli.md @@ -42,43 +42,49 @@ Options: ... ``` -
Tested Deployments (click to show) +:::note Tested Deployments This demo was tested in the following deployments: -**`pkg`** - -| Architecture | Version | Node Target | Date | -|:-------------|:--------|:------------|:-----------| -| `darwin-x64` | `5.8.1` | `18.5.0` | 2023-10-11 | -| `darwin-arm` | `5.8.1` | `18.5.0` | 2023-09-25 | -| `win10-x64` | `5.8.1` | `18.5.0` | 2023-10-09 | -| `win11-arm` | `5.8.1` | `18.5.0` | 2023-09-25 | -| `linux-x64` | `5.8.1` | `18.5.0` | 2023-10-11 | -| `linux-arm` | `5.8.1` | `18.5.0` | 2023-09-25 | - -**`nexe`** + + | Architecture | Version | Node Target | Date | |:-------------|:-------------|:------------|:-----------| | `darwin-x64` | `4.0.0-rc.2` | `14.15.3` | 2023-10-10 | -| `darwin-arm` | `4.0.0-rc.2` | `20.7.0` | 2023-09-25 | +| `darwin-arm` | `4.0.0-rc.2` | `18.18.0` | 2023-12-01 | | `win10-x64` | `4.0.0-rc.2` | `14.15.3` | 2023-10-09 | -| `win11-arm` | `4.0.0-rc.2` | `18.17.1` | 2023-09-25 | +| `win11-arm` | `4.0.0-rc.2` | `20.10.0` | 2023-12-01 | | `linux-x64` | `4.0.0-rc.2` | `14.15.3` | 2023-10-11 | -| `linux-arm` | `4.0.0-rc.2` | `20.7.0` | 2023-09-25 | +| `linux-arm` | `4.0.0-rc.2` | `20.10.0` | 2023-12-01 | -**`boxednode`** + + + +| Architecture | Version | Node Target | Date | +|:-------------|:--------|:------------|:-----------| +| `darwin-x64` | `5.8.1` | `18.5.0` | 2023-10-11 | +| `darwin-arm` | `5.8.1` | `18.5.0` | 2023-12-01 | +| `win10-x64` | `5.8.1` | `18.5.0` | 2023-10-09 | +| `win11-arm` | `5.8.1` | `18.5.0` | 2023-12-01 | +| `linux-x64` | `5.8.1` | `18.5.0` | 2023-10-11 | +| `linux-arm` | `5.8.1` | `18.5.0` | 2023-12-01 | + + + | Architecture | Version | Node Target | Date | |:-------------|:--------|:------------|:-----------| | `darwin-x64` | `2.1.2` | `20.8.0` | 2023-10-12 | -| `darwin-arm` | `2.1.1` | `20.7.0` | 2023-09-25 | +| `darwin-arm` | `2.3.0` | `21.3.0` | 2023-12-01 | | `win10-x64` | `2.1.2` | `16.20.2` | 2023-10-09 | | `linux-x64` | `2.1.2` | `20.8.0` | 2023-10-11 | -| `linux-arm` | `2.1.1` | `20.7.0` | 2023-09-25 | +| `linux-arm` | `2.3.0` | `21.3.0` | 2023-12-01 | -
+ + + +::: 0) Download the test file : @@ -114,7 +120,7 @@ yarn add https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz exit-on-epi 3) Follow tooling steps: - + Run `nexe` and manually specify NodeJS version 14.15.3 @@ -134,10 +140,41 @@ missing. The package must be built from source: npx nexe xlsx-cli.js --build --python=$(which python3) --make="-j8" ``` -On Windows ARM, the target `windows-arm64-18.17.1` must be specified: +::: + +:::caution pass + +On Windows ARM, the target `windows-arm64-20.10.0` must be specified: ```bash -npx nexe xlsx-cli.js --build --python=$(which python3) --make="-j8" --target=windows-arm64-18.17.1 +npx nexe xlsx-cli.js --build --make="-j8" --target=windows-arm64-20.10.0 +``` + +The Windows build may fail with a `vcbuild.bat` error: + +``` +Error: vcbuild.bat nosign release arm64 exited with code: 1 +``` + +Pass the `-v` flag for more details. In the most recent test, the error stemmed +from a Python version mismatch: + +``` +Node.js configure: found Python 2.7.18 +Please use python3.11 or python3.10 or python3.9 or python3.8 or python3.7 or python3.6 +``` + +The resolved version of Python can be found with + +```cmd +where python +``` + +In the most recent test, a Python 2 version appeared first. This was fixed by +finding the Python 3 location and prepending it to `PATH`: + +```cmd +set PATH="C:\correct\path\to\python\three";%PATH% ``` ::: @@ -145,6 +182,35 @@ npx nexe xlsx-cli.js --build --python=$(which python3) --make="-j8" --target=win +:::warning pass + +When this demo was last tested, `pkg` failed with an error referencing `node20`: + +``` +> Targets not specified. Assuming: + node20-linux-arm64, node20-macos-arm64, node20-win-arm64 +> Error! No available node version satisfies 'node20' +``` + +**`pkg` does not support NodeJS 20!** + +The local NodeJS version must be rolled back to version 18. + +If `n` is installed: + +```bash +sudo n 18 +``` + +If `nvm` was used to install NodeJS: + +```bash +nvm install 18 +nvm use 18 +``` + +::: + Run `pkg`: ```bash @@ -162,7 +228,7 @@ Run `boxednode`: ```bash -npx boxednode@2.1.2 -s xlsx-cli.js -t xlsx-cli +npx boxednode@2.3.0 -s xlsx-cli.js -t xlsx-cli ``` @@ -233,7 +299,7 @@ example, `nexe` generates `xlsx-cli` in macOS so the command is: The [V8](/docs/demos/engines/v8) demo covers standalone programs that embed the V8 engine. This demo uses the Rust integration to generate a command line tool. -
Tested Deployments (click to show) +:::note Tested Deployments This demo was last tested in the following deployments: @@ -244,27 +310,10 @@ This demo was last tested in the following deployments: | `win10-x64` | `11.8.172.13` | `0.79.2` | 2023-10-09 | | `win11-x64` | `11.8.172.13` | `0.79.2` | 2023-10-14 | | `linux-x64` | `11.8.172.13` | `0.79.2` | 2023-10-11 | -| `linux-arm` | `11.7.439.6` | `0.75.1` | 2023-08-30 | - -:::caution pass - -Using crate version `0.71.2`, the Linux AArch64 build failed with an error: - -``` -error[E0080]: evaluation of constant value failed - - | -1715 | assert!(size_of::() == size_of::()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'assertion failed: size_of::() == size_of::()' -``` - -This was fixed in version `0.75.1` of the crate. +| `linux-arm` | `12.0.267.8` | `0.82.0` | 2023-12-01 | ::: - -
- 0) Make a new folder for the project: ```bash @@ -301,6 +350,23 @@ cargo build --bin snapshot cargo run --bin snapshot ``` +:::caution pass + +With some versions of the `v8` crate, the Linux AArch64 build failed with an error: + +``` +error[E0080]: evaluation of constant value failed + + | +1715 | assert!(size_of::() == size_of::()); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'assertion failed: size_of::() == size_of::()' +``` + +Versions `0.75.1` and `0.82.0` are known to work. + +::: + + 4) Build `sheet2csv` (`sheet2csv.exe` in Windows): ```bash @@ -344,7 +410,7 @@ to read files from the filesystem with `Deno.readFileSync`. can be compiled and run from Deno. -
Tested Deployments (click to show) +:::note Tested Deployments This demo was last tested in the following deployments: @@ -354,19 +420,21 @@ This demo was last tested in the following deployments: | `darwin-arm` | `1.37.2` | 2023-10-18 | | `win10-x64` | `1.37.1` | 2023-10-09 | | `win11-x64` | `1.37.2` | 2023-10-14 | -| `win11-arm` | `1.37.0` | 2023-09-26 | +| `win11-arm` | `1.38.4` | 2023-12-01 | | `linux-x64` | `1.37.1` | 2023-10-11 | -| `linux-arm` | `1.36.3` | 2023-08-30 | +| `linux-arm` | `1.38.4` | 2023-12-01 | -
+::: -0) Download the test file : +0) Install Deno.[^2] + +1) Download the test file : ```bash curl -LO https://sheetjs.com/pres.numbers ``` -1) Test the script with `deno run`: +2) Test the script with `deno run`: ```bash deno run -r --allow-read https://docs.sheetjs.com/cli/sheet2csv.ts pres.numbers @@ -374,7 +442,7 @@ deno run -r --allow-read https://docs.sheetjs.com/cli/sheet2csv.ts pres.numbers If this worked, the program will print a CSV of the first worksheet. -2) Compile and run `sheet2csv`: +3) Compile and run `sheet2csv`: ```bash deno compile -r --allow-read https://docs.sheetjs.com/cli/sheet2csv.ts @@ -391,4 +459,5 @@ The following demos for JS engines produce standalone programs: - [Goja](/docs/demos/engines/goja) - [JavaScriptCore](/docs/demos/engines/jsc) -[^1]: Downloads can be found [at the main NASM project website](https://www.nasm.us/) \ No newline at end of file +[^1]: Downloads can be found [at the main NASM project website](https://www.nasm.us/) +[^2]: [The official instructions](https://docs.deno.com/runtime/manual/getting_started/installation) cover most platforms. Deno does not provide official Linux ARM64 builds, but [there are unofficial community builds](https://github.com/LukeChannings/deno-arm64). \ No newline at end of file diff --git a/docz/docs/03-demos/06-desktop/_category_.json b/docz/docs/03-demos/19-desktop/_category_.json similarity index 70% rename from docz/docs/03-demos/06-desktop/_category_.json rename to docz/docs/03-demos/19-desktop/_category_.json index 974109c..a78039b 100644 --- a/docz/docs/03-demos/06-desktop/_category_.json +++ b/docz/docs/03-demos/19-desktop/_category_.json @@ -1,4 +1,4 @@ { "label": "Desktop and CLI Tools", - "position": 6 + "position": 19 } diff --git a/docz/docs/03-demos/06-desktop/index.md b/docz/docs/03-demos/19-desktop/index.md similarity index 100% rename from docz/docs/03-demos/06-desktop/index.md rename to docz/docs/03-demos/19-desktop/index.md diff --git a/docz/docs/03-demos/42-engines/01-duktape.md b/docz/docs/03-demos/42-engines/01-duktape.md index c2436d3..8efcc89 100644 --- a/docz/docs/03-demos/42-engines/01-duktape.md +++ b/docz/docs/03-demos/42-engines/01-duktape.md @@ -124,7 +124,7 @@ The resulting `buf` can be written to file with `fwrite`. ## Complete Example -:::note +:::note Tested Deployments This demo was tested in the following deployments: @@ -133,9 +133,9 @@ This demo was tested in the following deployments: | `darwin-x64` | `2.7.0` | 2023-10-26 | | `darwin-arm` | `2.7.0` | 2023-10-18 | | `win10-x64` | `2.7.0` | 2023-10-27 | -| `win11-arm` | `2.7.0` | 2023-09-26 | +| `win11-arm` | `2.7.0` | 2023-12-01 | | `linux-x64` | `2.7.0` | 2023-10-11 | -| `linux-arm` | `2.7.0` | 2023-08-30 | +| `linux-arm` | `2.7.0` | 2023-12-01 | ::: @@ -355,13 +355,14 @@ The Perl binding does not have raw `Buffer` ops, so Base64 strings are used. #### Perl Demo -:::note +:::note Tested Deployments This demo was tested in the following deployments: | Architecture | Version | Date | |:-------------|:--------|:-----------| | `darwin-x64` | `2.5.0` | 2023-10-26 | +| `linux-arm` | `2.5.0` | 2023-12-01 | ::: @@ -373,6 +374,16 @@ This demo was tested in the following deployments: cpan install JavaScript::Duktape ``` +:::note pass + +On some systems, the command must be run as the root user: + +```bash +sudo cpan install JavaScript::Duktape +``` + +::: + 2) Save the following codeblock to `SheetJSDuk.pl`: ```perl title="SheetJSDuk.pl" @@ -425,4 +436,20 @@ perl SheetJSDuk.pl pres.xlsx ``` If the script succeeded, the data in the test file will be printed in CSV rows. -The script will also export `SheetJSDuk.xlsb`. \ No newline at end of file +The script will also export `SheetJSDuk.xlsb`. + +:::note pass + +In the latest Linux ARM64 test, the command failed due to missing `File::Slurp`: + +``` +Can't locate File/Slurp.pm in @INC (you may need to install the File::Slurp module) +``` + +The fix is to install `File::Slurp` with `cpan`: + +```bash +sudo cpan install File::Slurp +``` + +::: \ No newline at end of file diff --git a/docz/docs/03-demos/42-engines/02-v8.md b/docz/docs/03-demos/42-engines/02-v8.md index 1354b3a..446d075 100644 --- a/docz/docs/03-demos/42-engines/02-v8.md +++ b/docz/docs/03-demos/42-engines/02-v8.md @@ -125,10 +125,10 @@ This demo was tested in the following deployments: | V8 Version | Platform | OS Version | Compiler | Date | |:--------------|:-------------|:--------------|:-----------------|:-----------| | `12.1.131` | `darwin-x64` | macOS 14.1 | `clang 15.0.0` | 2023-11-15 | -| `12.0.175` | `darwin-arm` | macOS 14.0 | `clang 15.0.0` | 2023-10-20 | +| `12.1.283` | `darwin-arm` | macOS 14.1.2 | `clang 15.0.0` | 2023-12-01 | | `12.0.265` | `win10-x64` | Windows 10 | `CL 19.37.32822` | 2023-10-28 | | `12.1.222` | `linux-x64` | HoloOS 3.5.7 | `gcc 13.1.1` | 2023-11-27 | -| `11.8.82` | `linux-arm` | Debian 11 | `gcc 10.2.1` | 2023-09-26 | +| `11.8.82` | `linux-arm` | Debian 12 | `gcc 12.2.0` | 2023-12-01 | ::: @@ -160,7 +160,7 @@ mkdir -p /usr/local/lib cd /usr/local/lib ``` -:::caution pass +:::note pass If this step throws a permission error, run: @@ -224,6 +224,17 @@ git config --global branch.autosetuprebase always git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git ``` +:::note pass + +If this step throws a permission error, run: + +```bash +sudo mkdir -p /usr/local/lib +sudo chmod 777 /usr/local/lib +``` + +::: +
@@ -395,20 +406,11 @@ The recommended fix is to delete the referenced folder and re-run `gclient sync`
-5) Checkout the desired version. The following command pulls `12.0.265`: +5) Checkout the desired version. The following command pulls `12.1.283`: - - ```bash -git checkout refs/tags/12.0.265 -b sample -t -``` - - - - -```bash -git checkout tags/12.0.265 -b sample +git checkout tags/12.1.283 -b sample ``` :::caution pass @@ -416,21 +418,18 @@ git checkout tags/12.0.265 -b sample The official documentation recommends: ```bash -git checkout refs/tags/12.0.265 -b sample -t +git checkout refs/tags/12.1.283 -b sample -t ``` This command failed in local testing: ``` -E:\v8\v8>git checkout refs/tags/12.0.265 -b sample -t -fatal: cannot set up tracking information; starting point 'refs/tags/12.0.265' is not a branch +E:\v8\v8>git checkout refs/tags/12.1.283 -b sample -t +fatal: cannot set up tracking information; starting point 'refs/tags/12.1.283' is not a branch ``` ::: - - - ### Build V8 6) Build the static library. @@ -489,10 +488,11 @@ treat_warnings_as_errors = false tools/dev/v8gen.py arm64.release.sample ``` -Append the following line to `out.gn/arm64.release.sample/args.gn`: +Append the following lines to `out.gn/arm64.release.sample/args.gn`: ```text title="out.gn/arm64.release.sample/args.gn (add to file)" is_clang = false +treat_warnings_as_errors = false ``` Run the build: @@ -813,10 +813,10 @@ This demo was last tested in the following deployments: | Architecture | V8 Crate | Date | |:-------------|:---------|:-----------| | `darwin-x64` | `0.81.0` | 2023-11-14 | -| `darwin-arm` | `0.79.2` | 2023-10-18 | +| `darwin-arm` | `0.82.0` | 2023-12-01 | | `win10-x64` | `0.81.0` | 2023-11-14 | | `linux-x64` | `0.81.0` | 2023-11-27 | -| `linux-arm` | `0.75.1` | 2023-08-30 | +| `linux-arm` | `0.82.0` | 2023-12-01 | ::: diff --git a/docz/docs/03-demos/42-engines/05-jint.md b/docz/docs/03-demos/42-engines/05-jint.md index 879cab5..a9056f2 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.0.0-beta-2055`. +on version `3.0.0-beta-2056`. ::: @@ -157,18 +157,18 @@ System.IO.File.WriteAllBytes("SheetJSJint.xlsb", outfile); ## Integration Example -:::note +:::note Tested Deployments This demo was tested in the following deployments: | Architecture | Jint Version | Date | |:-------------|:------------------|:-----------| | `darwin-x64` | `3.0.0-beta-2055` | 2023-11-14 | -| `darwin-arm` | `3.0.0-beta-2051` | 2023-09-26 | +| `darwin-arm` | `3.0.0-beta-2056` | 2023-12-01 | | `win10-x64` | `3.0.0-beta-2053` | 2023-10-28 | -| `win11-arm` | `3.0.0-beta-2051` | 2023-09-26 | +| `win11-arm` | `3.0.0-beta-2056` | 2023-12-01 | | `linux-x64` | `3.0.0-beta-2052` | 2023-10-11 | -| `linux-arm` | `3.0.0-beta-2051` | 2023-09-26 | +| `linux-arm` | `3.0.0-beta-2056` | 2023-12-01 | ::: @@ -238,7 +238,7 @@ dotnet run ```bash dotnet nuget add source https://www.myget.org/F/jint/api/v3/index.json -dotnet add package Jint --version 3.0.0-beta-2055 +dotnet add package Jint --version 3.0.0-beta-2056 ``` To verify Jint is installed, replace `Program.cs` with the following: diff --git a/docz/docs/03-demos/42-engines/06-goja.md b/docz/docs/03-demos/42-engines/06-goja.md index fed1046..e9b0f2c 100644 --- a/docz/docs/03-demos/42-engines/06-goja.md +++ b/docz/docs/03-demos/42-engines/06-goja.md @@ -88,7 +88,7 @@ _ = ioutil.WriteFile("sheetjs.xlsx", buf, 0644) ## Complete Example -:::note +:::note Tested Deployments This demo was tested in the following deployments: @@ -97,9 +97,9 @@ This demo was tested in the following deployments: | `darwin-x64` | `873a149` | `1.21.3` | 2023-10-14 | | `darwin-arm` | `873a149` | `1.21.3` | 2023-10-18 | | `win10-x64` | `b396bb4` | `1.21.3` | 2023-10-28 | -| `win11-arm` | `fc55792` | `1.21.1` | 2023-09-25 | +| `win11-arm` | `b396bb4` | `1.21.1` | 2023-12-01 | | `linux-x64` | `fc55792` | `1.21.3` | 2023-10-11 | -| `linux-arm` | `3dbe69d` | `1.21.1` | 2023-08-30 | +| `linux-arm` | `b396bb4` | `1.21.4` | 2023-12-01 | 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/07-nashorn.md b/docz/docs/03-demos/42-engines/07-nashorn.md index 6fe00e0..07fc0ea 100644 --- a/docz/docs/03-demos/42-engines/07-nashorn.md +++ b/docz/docs/03-demos/42-engines/07-nashorn.md @@ -1,5 +1,6 @@ --- -title: Java + Nashorn +title: Data Processing with Nashorn +sidebar_label: Java + Nashorn pagination_prev: demos/bigdata/index pagination_next: solutions/input --- @@ -9,18 +10,22 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import CodeBlock from '@theme/CodeBlock'; -Nashorn is a JavaScript engine for Java. It shipped with Java distributions -starting with Java 8 and was eventually removed in Java 15. The project was -spun off and a compatible standalone release is available for Java 15+. +[Nashorn](https://openjdk.org/projects/nashorn/) is a JS engine for Java. It +shipped with Java distributions starting with Java 8 and was eventually removed +in Java 15. The project was spun off and a compatible standalone release is +available for Java 15+. -The [SheetJS Standalone scripts](/docs/getting-started/installation/standalone) -can be parsed and evaluated in a Nashorn context. +[SheetJS](https://sheetjs.com) is a JavaScript library for reading and writing +data from spreadsheets. + +The ["Complete Example"](#complete-example) section includes a complete Java +command-line tool for reading data from spreadsheets and printing CSV rows. ## Integration Details -_Initialize Nashorn_ +### Initialize Nashorn -`global` must be created from a Nashorn engine: +Nashorn does not provide a `global` variable. It must be created: ```java import javax.script.ScriptEngine; @@ -33,10 +38,14 @@ import java.util.Scanner; ScriptEngine engine = (new ScriptEngineManager()).getEngineByName("javascript"); /* create global */ +// highlight-next-line engine.eval("var global = (function(){ return this; }).call(null);"); ``` -_Load SheetJS Scripts_ +### Load SheetJS Scripts + +The [SheetJS Standalone scripts](/docs/getting-started/installation/standalone) +can be parsed and evaluated in a Nashorn context. The main library can be loaded by reading the script from the file system and evaluating in the Nashorn context: @@ -90,19 +99,26 @@ engine.eval("var wb = XLSX.read(u8a, {type: 'array'})"); ## Complete Example -:::note +:::note Tested Deployments This demo was tested in the following deployments: | OpenJDK | Nashorn | Date | |:--------|:----------------|:-----------| -| 21-rc34 | 15.4 standalone | 2023-08-28 | -| 20.0.2 | 15.4 standalone | 2023-08-28 | -| 19.0.2 | 15.4 standalone | 2023-08-28 | -| 17.0.8 | 15.4 standalone | 2023-08-28 | -| 15.0.10 | 15.4 standalone | 2023-08-28 | -| 11.0.20 | Built-in | 2023-08-28 | -| 1.8.0 | Built-in | 2023-08-28 | +| 21.0.1 | 15.4 standalone | 2023-12-01 | +| 20.0.2 | 15.4 standalone | 2023-12-01 | +| 19.0.2 | 15.4 standalone | 2023-12-01 | +| 18.0.2 | 15.4 standalone | 2023-12-01 | +| 17.0.9 | 15.4 standalone | 2023-12-01 | +| 16.0.1 | 15.4 standalone | 2023-12-01 | +| 15.0.10 | 15.4 standalone | 2023-12-01 | +| 14.0.2 | Built-in | 2023-12-01 | +| 13.0.14 | Built-in | 2023-12-01 | +| 12.0.2 | Built-in | 2023-12-01 | +| 11.0.20 | Built-in | 2023-12-01 | +| 10.0.2 | Built-in | 2023-12-01 | +| 9 | Built-in | 2023-12-01 | +| 1.8.0 | Built-in | 2023-12-01 | ::: @@ -117,12 +133,12 @@ Nashorn is available without additional dependencies 0) Download Nashorn and its dependencies: ```bash -curl -LO "https://search.maven.org/remotecontent?filepath=org/openjdk/nashorn/nashorn-core/15.4/nashorn-core-15.4.jar" -curl -LO "https://search.maven.org/remotecontent?filepath=org/ow2/asm/asm/9.5/asm-9.5.jar" -curl -LO "https://search.maven.org/remotecontent?filepath=org/ow2/asm/asm-tree/9.5/asm-tree-9.5.jar" -curl -LO "https://search.maven.org/remotecontent?filepath=org/ow2/asm/asm-commons/9.5/asm-commons-9.5.jar" -curl -LO "https://search.maven.org/remotecontent?filepath=org/ow2/asm/asm-analysis/9.5/asm-analysis-9.5.jar" -curl -LO "https://search.maven.org/remotecontent?filepath=org/ow2/asm/asm-util/9.5/asm-util-9.5.jar" +curl -L -o nashorn-core-15.4.jar "https://search.maven.org/remotecontent?filepath=org/openjdk/nashorn/nashorn-core/15.4/nashorn-core-15.4.jar" +curl -L -o asm-9.5.jar "https://search.maven.org/remotecontent?filepath=org/ow2/asm/asm/9.5/asm-9.5.jar" +curl -L -o asm-tree-9.5.jar "https://search.maven.org/remotecontent?filepath=org/ow2/asm/asm-tree/9.5/asm-tree-9.5.jar" +curl -L -o asm-commons-9.5.jar "https://search.maven.org/remotecontent?filepath=org/ow2/asm/asm-commons/9.5/asm-commons-9.5.jar" +curl -L -o asm-analysis-9.5.jar "https://search.maven.org/remotecontent?filepath=org/ow2/asm/asm-analysis/9.5/asm-analysis-9.5.jar" +curl -L -o asm-util-9.5.jar "https://search.maven.org/remotecontent?filepath=org/ow2/asm/asm-util/9.5/asm-util-9.5.jar" ``` @@ -155,7 +171,8 @@ curl -LO https://docs.sheetjs.com/nashorn/SheetJSNashorn.java javac SheetJSNashorn.java ``` -This program tries to parse the file specified by the first argument +This program tries to parse the file specified by the first argument and prints +CSV rows from the first worksheet. 4) Run the command directly: @@ -212,3 +229,4 @@ java -cp .:asm-9.5.jar:asm-tree-9.5.jar:asm-commons-9.5.jar:asm-analysis-9.5.jar
+This should print the same CSV rows from Step 3. diff --git a/docz/docs/03-demos/42-engines/08-quickjs.md b/docz/docs/03-demos/42-engines/08-quickjs.md index 9aa5d39..df8c90e 100644 --- a/docz/docs/03-demos/42-engines/08-quickjs.md +++ b/docz/docs/03-demos/42-engines/08-quickjs.md @@ -256,7 +256,7 @@ while the "CLI Test" demonstrates other concepts using the `quickjs` CLI tool. ### Integration Example -:::note +:::note Tested Deployments This demo was tested in the following deployments: @@ -265,11 +265,11 @@ This demo was tested in the following deployments: | `darwin-x64` | `2788d71` | 2023-10-26 | | `darwin-arm` | `2788d71` | 2023-10-18 | | `win10-x64` | `2788d71` | 2023-10-09 | -| `win11-arm` | `2788d71` | 2023-09-25 | +| `win11-arm` | `03cc5ec` | 2023-12-01 | | `linux-x64` | `2788d71` | 2023-10-11 | -| `linux-arm` | `2788d71` | 2023-08-29 | +| `linux-arm` | `03cc5ec` | 2023-12-01 | -When the demo was tested, commit `2788d71` corresponded to the latest release. +When the demo was tested, commit `03cc5ec` corresponded to the latest commit. ::: @@ -285,7 +285,7 @@ tests were run entirely within Windows Subsystem for Linux. ```bash git clone https://github.com/bellard/quickjs cd quickjs -git checkout 2788d71 +git checkout 03cc5ec make cd .. ``` diff --git a/docz/docs/03-demos/42-engines/09-hermes.md b/docz/docs/03-demos/42-engines/09-hermes.md index 4695b07..5976353 100644 --- a/docz/docs/03-demos/42-engines/09-hermes.md +++ b/docz/docs/03-demos/42-engines/09-hermes.md @@ -365,7 +365,7 @@ This demo was tested in the following deployments: | `darwin-x64` | `84732b3` | 2023-11-14 | | `darwin-arm` | `2b4f949` | 2023-10-18 | | `linux-x64` | `2b4f949` | 2023-10-11 | -| `linux-arm` | `70af78b` | 2023-08-27 | +| `linux-arm` | `84732b3` | 2023-12-01 | 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] diff --git a/docz/docs/03-demos/42-engines/15-rb.md b/docz/docs/03-demos/42-engines/15-rb.md index ed6ee67..405ecf6 100644 --- a/docz/docs/03-demos/42-engines/15-rb.md +++ b/docz/docs/03-demos/42-engines/15-rb.md @@ -64,20 +64,20 @@ The `strict_` variants ensure that no newlines are added to the strings. ## Complete Example -:::note +:::note Tested Deployments This demo was tested in the following deployments: | Platform | Ruby | ExecJS | Date | |:-------------|:---------|:--------|:-----------| | `darwin-x64` | `2.6.10` | `2.9.1` | 2023-11-14 | -| `darwin-arm` | `2.7.4` | `2.9.1` | 2023-09-24 | +| `darwin-arm` | `2.6.10` | `2.9.1` | 2023-12-01 | | `win10-x64` | `3.2.2` | `2.9.1` | 2023-10-28 | -| `win11-arm` | `3.0.2` | `2.9.1` | 2023-09-24 | +| `win11-arm` | `3.0.2` | `2.9.1` | 2023-12-01 | | `linux-x64` | `3.0.4` | `2.9.1` | 2023-10-11 | -| `linux-arm` | `2.7.4` | `2.9.1` | 2023-09-24 | +| `linux-arm` | `2.7.4` | `2.9.1` | 2023-12-01 | -Note: The Windows 11 ARM64 test used the Ruby version that ships with WSL. +**Note: The Windows 11 ARM64 test used the Ruby version that ships with WSL.** ::: diff --git a/docz/docs/03-demos/42-engines/21-boa.md b/docz/docs/03-demos/42-engines/21-boa.md index cc8b7c9..9236b3a 100644 --- a/docz/docs/03-demos/42-engines/21-boa.md +++ b/docz/docs/03-demos/42-engines/21-boa.md @@ -123,9 +123,9 @@ This demo was tested in the following deployments: | `darwin-x64` | 2023-11-03 | | `darwin-arm` | 2023-10-20 | | `win10-x64` | 2023-10-28 | -| `win11-arm` | 2023-09-26 | +| `win11-arm` | 2023-12-01 | | `linux-x64` | 2023-10-11 | -| `linux-arm` | 2023-08-30 | +| `linux-arm` | 2023-12-01 | ::: diff --git a/docz/docs/09-miscellany/05-contributing.md b/docz/docs/09-miscellany/05-contributing.md index 84973c2..024beaf 100644 --- a/docz/docs/09-miscellany/05-contributing.md +++ b/docz/docs/09-miscellany/05-contributing.md @@ -40,9 +40,9 @@ These instructions were tested on the following platforms: | Platform | Test Date | |:------------------------------|:-----------| | Linux (Steam Deck Holo x64) | 2023-11-27 | -| Linux (Ubuntu 18 AArch64) | 2023-09-07 | +| Linux (Ubuntu 18 AArch64) | 2023-12-01 | | MacOS 10.13.6 (x64) | 2023-09-30 | -| MacOS 13.6 (ARM64) | 2023-09-30 | +| MacOS 14.1.2 (ARM64) | 2023-12-01 | | Windows 10 (x64) + WSL Ubuntu | 2023-11-27 | | Windows 11 (x64) + WSL Ubuntu | 2023-10-14 | | Windows 11 (ARM) + WSL Ubuntu | 2023-09-18 | @@ -360,7 +360,7 @@ This is *not required* for building or testing the library. -After installing mercurial and subversion, install NodeJS. +B) After installing mercurial and subversion, install NodeJS. :::note pass @@ -388,6 +388,20 @@ nvm use 16 ::: +C) Run `unzip`. If the program is missing, install manually. Using `apt-get`: + +```bash +sudo apt-get install -y unzip +``` + +D) Run `make`. If the program is missing, install manually. It is strongly +recommended to install `build-essential` on Debian and Ubuntu: + +```bash +sudo apt-get install -y make +``` + + @@ -424,11 +438,22 @@ git config --global http.sslVerify true 1) Install NodeJS modules for building the scripts: +```bash +npm i +npm i -g mocha@2.5.3 voc @sheetjs/uglify-js +``` + +:::caution pass + +If `npm i -g` fails with a permissions issue, run the command with `sudo`: + ```bash npm i sudo npm i -g mocha@2.5.3 voc @sheetjs/uglify-js ``` +::: + :::note Older Versions of Dependencies Some of the dependencies are wildly out of date. While SheetJS aims to run in diff --git a/docz/docs/12-constellation/21-dta.md b/docz/docs/12-constellation/21-dta.md index cc765b6..5c11c0b 100644 --- a/docz/docs/12-constellation/21-dta.md +++ b/docz/docs/12-constellation/21-dta.md @@ -5,7 +5,7 @@ hide_table_of_contents: true --- - + :::info pass diff --git a/docz/static/cli/Cargo.toml b/docz/static/cli/Cargo.toml index b7649ff..3dff8f2 100644 --- a/docz/static/cli/Cargo.toml +++ b/docz/static/cli/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] -v8 = "0.79.2" +v8 = "0.82.0" [[bin]] name = "sheet2csv" diff --git a/docz/static/dta/dta.min.js b/docz/static/dta/dta.min.js deleted file mode 100644 index 4330839..0000000 --- a/docz/static/dta/dta.min.js +++ /dev/null @@ -1,2 +0,0 @@ -var DTA=(()=>{var N=Object.defineProperty;var J=Object.getOwnPropertyDescriptor;var Y=Object.getOwnPropertyNames;var q=Object.prototype.hasOwnProperty;var z=r=>N(r,"__esModule",{value:!0});var H=(r,t)=>{for(var e in t)N(r,e,{get:t[e],enumerable:!0})},Q=(r,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Y(t))!q.call(r,o)&&(e||o!=="default")&&N(r,o,{get:()=>t[o],enumerable:!(s=J(t,o))||s.enumerable});return r};var X=(r=>(t,e)=>r&&r.get(t)||(e=Q(z({}),t,1),r&&r.set(t,e),e))(typeof WeakMap!="undefined"?new WeakMap:0);var se={};H(se,{parse:()=>ae,set_utils:()=>Z});var $;function Z(r){$=r}function U(r){return new TextDecoder().decode(r)}function P(r){return new TextDecoder("latin1").decode(r)}function L(r,t,e){if(r<0){let b=L(-r,t,e);return b.w="-"+b.w,b}let s={t:"n",v:r};switch(e){case 251:case 98:case 65530:t="%8.0g";break;case 252:case 105:case 65529:t="%8.0g";break;case 253:case 108:case 65528:t="%12.0g";break;case 254:case 102:case 65527:t="%9.0g";break;case 255:case 100:case 65526:t="%10.0g";break;default:throw e}try{let b=+(t.match(/%(\d+)/)||[])[1]||8,v=0;r<1&&++v,r<.1&&++v,r<.01&&++v,r<.001&&++v;let D=r.toExponential(),E=D.indexOf("e")==-1?0:+D.slice(D.indexOf("e")+1),g=b-2-E;g<0&&(g=0);var o=t.match(/%\d+\.(\d+)/);o&&+o[1]&&(g=+o[1]),s.w=(Math.round(r*10**g)/10**g).toFixed(g).replace(/^([-]?)0\./,"$1."),s.w=s.w.slice(0,b+v),s.w.indexOf(".")>-1&&(s.w=s.w.replace(/0+$/,"")),s.w=s.w.replace(/\.$/,""),s.w==""&&(s.w="0")}catch{}return s}function B(r){return new DataView(r.buffer,r.byteOffset,r.byteLength)}function n(r,t){return U(r.raw.slice(r.ptr,r.ptr+t.length))!=t?!1:(r.ptr+=t.length,!0)}function V(r,t){r.ptr+=8;let e=r.dv.getFloat64(r.ptr-8,t);return e>8988e304?null:e}function G(r,t){r.ptr+=4;let e=r.dv.getFloat32(r.ptr-4,t);return e>1701e35?null:e}function h(r,t){return r.ptr+=4,r.dv.getUint32(r.ptr-4,t)}function I(r,t){r.ptr+=4;let e=r.dv.getInt32(r.ptr-4,t);return e>2147483620?null:e}function F(r,t){return r.ptr+=2,r.dv.getUint16(r.ptr-2,t)}function j(r,t){r.ptr+=2;let e=r.dv.getInt16(r.ptr-2,t);return e>32740?null:e}function T(r){return r.raw[r.ptr++]}function K(r){let t=r.raw[r.ptr++];return t=t<128?t:t-256,t>100?null:t}var ee=["117","118","119","120","121"],te=[102,103,104,105,108,110,111,112,113,114,115];function re(r){let t="Not a DTA file",e={ptr:0,raw:r,dv:B(r)},s=118,o=!0,b=0,v=0,D=0,E=0,g="",C="",M=[],O=[],W=[];if(!n(e,""))throw t;{if(!n(e,"
"))throw t;{if(!n(e,""))throw t;let a=P(e.raw.slice(e.ptr,e.ptr+3));if(e.ptr+=3,!n(e,""))throw t;if(ee.indexOf(a)==-1)throw`Unsupported DTA ${a} file`;s=+a}{if(!n(e,""))throw t;let a=P(e.raw.slice(e.ptr,e.ptr+3));if(e.ptr+=3,!n(e,""))throw t;switch(a){case"MSF":o=!1;break;case"LSF":o=!0;break;default:throw`Unsupported byteorder ${a}`}}if(!n(e,"")||(b=s===119||s>=121?h(e,o):F(e,o),!n(e,"")))throw t;{if(!n(e,""))throw t;if(s==117)v=D=h(e,o);else{let a=h(e,o),l=h(e,o);v=o?(D=a)+(E=l)*Math.pow(2,32):(D=l)+(E=a)*Math.pow(2,32)}if(v>1e6&&console.error("More than 1 million observations -- extra rows will be dropped"),!n(e,""))throw t}{if(!n(e,""))throw t}{if(!n(e,""))throw t;let a=T(e);if(C=P(e.raw.slice(e.ptr,e.ptr+a)),e.ptr+=a,!n(e,""))throw t}if(!n(e,"
"))throw t}if(!n(e,"")||(e.ptr+=8*14,!n(e,"")))throw t;let f=0;{if(!n(e,""))throw t;for(var w=0;w=1&&a<=2045)f+=a;else switch(a){case 32768:f+=8;break;case 65525:f+=0;break;case 65526:f+=8;break;case 65527:f+=4;break;case 65528:f+=4;break;case 65529:f+=2;break;case 65530:f+=1;break;default:throw`Unsupported field type ${a}`}}if(!n(e,""))throw t}{if(!n(e,""))throw t;let a=s>=118?129:33;for(let l=0;l"))throw t}if(!n(e,"")||(e.ptr+=(2*b+2)*(s==119||s==121?2:1),!n(e,"")))throw t;{if(!n(e,""))throw t;let a=s>=118?57:49;for(let l=0;l"))throw t}let p=[];{if(!n(e,""))throw t;let a=s>=118?129:33;for(let l=0;l"))throw t}{if(!n(e,""))throw t;let a=s>=118?321:81;if(e.ptr+=a*b,!n(e,""))throw t}{if(!n(e,""))throw t;for(;n(e,"");){let a=h(e,o);if(e.ptr+=a,!n(e,""))throw t}if(!n(e,""))throw t}let u=$.aoa_to_sheet([O],{dense:!0});var _=[];{if(!n(e,""))throw t;for(let a=0;a=1&&d<=2045){let c=U(e.raw.slice(e.ptr,e.ptr+d));c=c.replace(/\x00[\s\S]*/,""),l[i]=c,e.ptr+=d}else switch(d){case 65525:e.ptr+=0;break;case 65530:l[i]=K(e);break;case 65529:l[i]=j(e,o);break;case 65528:l[i]=I(e,o);break;case 65527:l[i]=G(e,o);break;case 65526:l[i]=V(e,o);break;case 32768:l[i]="##SheetJStrL##",_.push([a+1,i,e.raw.slice(e.ptr,e.ptr+8)]),e.ptr+=8;break;default:throw`Unsupported field type ${d} for ${O[i]}`}typeof l[i]=="number"&&W[i]&&(l[i]=L(l[i],W[i],d))}$.sheet_add_aoa(u,[l],{origin:-1,sheetStubs:!0})}if(!n(e,""))throw t}{if(!n(e,""))throw t;let a=[];for(;e.raw[e.ptr]==71;){if(!n(e,"GSO"))throw t;let l=h(e,o),i=0;if(s==117)i=h(e,o);else{let k=h(e,o),y=h(e,o);i=o?k+y*Math.pow(2,32):y+k*Math.pow(2,32),i>1e6&&console.error("More than 1 million observations -- data will be dropped")}let d=T(e),c=h(e,o);a[i]||(a[i]=[]);let x="";d==129?(x=new TextDecoder(s>=118?"utf8":"latin1").decode(e.raw.slice(e.ptr,e.ptr+c)),e.ptr+=c):(x=new TextDecoder(s>=118?"utf8":"latin1").decode(e.raw.slice(e.ptr,e.ptr+c)).replace(/\x00$/,""),e.ptr+=c),a[i][l]=x}if(!n(e,""))throw t;_.forEach(([l,i,d])=>{let c=B(d),x=0,k=0;switch(s){case 117:x=c.getUint32(0,o),k=c.getUint32(4,o);break;case 118:case 120:{x=c.getUint16(0,o);let y=c.getUint16(2,o),A=c.getUint32(4,o);k=o?y+A*65536:A+y*2**32}break;case 119:case 121:{let y=c.getUint16(0,o),A=d[2];x=o?y+(A<<16):A+(y<<8);let R=d[3],m=c.getUint32(4,o);k=o?R+m*256:m+R*2**32}}u["!data"][l][i].v=a[k][x]})}{let a=s>=118?129:33;if(!n(e,""))throw t;for(;n(e,"");){let l=h(e,o),i=P(e.raw.slice(e.ptr,e.ptr+a)).replace(/\x00.*$/,"");e.ptr+=a,e.ptr+=3;let d=[];{let x=h(e,o),k=h(e,o),y=[],A=[];for(let m=0;m"))throw t}if(!n(e,""))throw t}if(!n(e,"
"))throw t;let S=$.book_new();return $.book_append_sheet(S,u,"Sheet1"),S}function oe(r){let t=r[0];if(te.indexOf(t)==-1)throw new Error("Not a DTA file");let e={ptr:1,raw:r,dv:B(r)},s=!0,o=0,b=0,v="",D="",E=[],g=[],C=[];{let f=T(e);switch(f){case 1:s=!1;break;case 2:s=!0;break;default:throw`DTA ${t} Unexpected byteorder ${f}`}let w=T(e);if(w!=1)throw`DTA ${t} Unexpected filetype ${w}`;e.ptr++,o=F(e,s),b=h(e,s),e.ptr+=t>=108?81:t>=103?32:30,t>=105&&(e.ptr+=18)}let M=[];{let f=0;for(f=0;f=110?33:9;for(f=0;f=114?49:t>=105?12:7;for(f=0;f=110?33:9;for(let _=0;_=106?81:32)*o,t>=105)for(;e.ptr=110?h:F)(e,s);if(f==0&&w==0)break;e.ptr+=w}let O=$.aoa_to_sheet([g],{dense:!0});for(let f=0;f=113)&&u>=1&&u<=244){let _=U(e.raw.slice(e.ptr,e.ptr+u));_=_.replace(/\x00[\s\S]*/,""),w[p]=_,e.ptr+=u}else if((t==112||t<=110)&&u>=128){let _=U(e.raw.slice(e.ptr,e.ptr+u-127));_=_.replace(/\x00[\s\S]*/,""),w[p]=_,e.ptr+=u-127}else switch(u){case 251:case 98:w[p]=K(e);break;case 252:case 105:w[p]=j(e,s);break;case 253:case 108:w[p]=I(e,s);break;case 254:case 102:w[p]=G(e,s);break;case 255:case 100:w[p]=V(e,s);break;default:throw`Unsupported field type ${u} for ${g[p]}`}typeof w[p]=="number"&&C[p]&&(w[p]=L(w[p],C[p],u))}$.sheet_add_aoa(O,[w],{origin:-1,sheetStubs:!0})}if(t>=115)for(;e.ptr=102&&r[0]<=115)return oe(r);if(r[0]===60)return re(r);throw new Error("Not a DTA file")}return X(se);})(); -//# sourceMappingURL=dta.min.js.map diff --git a/docz/static/electron/package.json b/docz/static/electron/package.json index dc238de..1b69239 100644 --- a/docz/static/electron/package.json +++ b/docz/static/electron/package.json @@ -15,12 +15,12 @@ "make": "electron-forge make" }, "devDependencies": { - "@electron-forge/cli": "6.4.2", - "@electron-forge/maker-deb": "6.4.2", - "@electron-forge/maker-rpm": "6.4.2", - "@electron-forge/maker-squirrel": "6.4.2", - "@electron-forge/maker-zip": "6.4.2", - "electron": "27.0.0" + "@electron-forge/cli": "7.2.0", + "@electron-forge/maker-deb": "7.2.0", + "@electron-forge/maker-rpm": "7.2.0", + "@electron-forge/maker-squirrel": "7.2.0", + "@electron-forge/maker-zip": "7.2.0", + "electron": "27.1.3" }, "config": { "forge": {