darwin-x64 build test
This commit is contained in:
parent
def11cf796
commit
67d7c1f993
@ -130,13 +130,13 @@ This demo was tested in the following deployments:
|
||||
|
||||
| Puppeteer | Date |
|
||||
|:----------|:-----------|
|
||||
| `24.9.0` | 2025-05-21 |
|
||||
| `23.11.1` | 2025-05-21 |
|
||||
| `22.15.0` | 2025-05-21 |
|
||||
| `21.11.0` | 2025-05-21 |
|
||||
| `20.9.0` | 2025-05-21 |
|
||||
| `15.5.0` | 2025-05-21 |
|
||||
| `10.4.0` | 2025-05-21 |
|
||||
| `24.35.0` | 2026-01-21 |
|
||||
| `23.11.1` | 2026-01-21 |
|
||||
| `22.15.0` | 2026-01-21 |
|
||||
| `21.11.0` | 2026-01-21 |
|
||||
| `20.9.0` | 2026-01-21 |
|
||||
| `15.5.0` | 2026-01-21 |
|
||||
| `10.4.0` | 2026-01-21 |
|
||||
|
||||
:::
|
||||
|
||||
@ -430,4 +430,4 @@ env OPENSSL_CONF=/dev/null QT_QPA_PLATFORM=phantom ./phantomjs-2.1.1-linux-x86_6
|
||||
|
||||
[^1]: See ["Workbook Object"](/docs/csf/book) for more details about the SheetJS workbook object.
|
||||
[^2]: See [`table_to_book` in "HTML" Utilities](/docs/api/utilities/html#create-new-sheet)
|
||||
[^3]: See [`write` in "Writing Files"](/docs/api/write-options)
|
||||
[^3]: See [`write` in "Writing Files"](/docs/api/write-options)
|
||||
|
||||
@ -37,7 +37,7 @@ This demo was tested in the following deployments:
|
||||
|
||||
| Architecture | Version | NodeJS | Source | Date |
|
||||
|:-------------|:---------------|:----------|:----------|:-----------|
|
||||
| `darwin-x64` | `5.0.0-beta.4` | `14.15.3` | Pre-built | 2025-04-21 |
|
||||
| `darwin-x64` | `5.0.0-beta.4` | `14.15.3` | Pre-built | 2026-01-21 |
|
||||
| `darwin-arm` | `5.0.0-beta.4` | `22.14.0` | Compiled | 2025-06-18 |
|
||||
| `win11-x64` | `5.0.0-beta.4` | `14.15.3` | Pre-built | 2025-05-07 |
|
||||
| `win11-arm` | `4.0.0-rc.6` | `22.14.0` | Compiled | 2025-02-23 |
|
||||
|
||||
@ -37,7 +37,7 @@ This demo was tested in the following deployments:
|
||||
|
||||
| Architecture | Version | NodeJS | Date |
|
||||
|:-------------|:--------|:---------|:-----------|
|
||||
| `darwin-x64` | `5.8.1` | `18.5.0` | 2025-04-21 |
|
||||
| `darwin-x64` | `5.8.1` | `18.5.0` | 2026-01-21 |
|
||||
| `darwin-arm` | `5.8.1` | `18.5.0` | 2025-06-18 |
|
||||
| `win11-x64` | `5.8.1` | `18.5.0` | 2025-05-07 |
|
||||
| `win11-arm` | `5.8.1` | `18.5.0` | 2025-02-23 |
|
||||
|
||||
@ -158,7 +158,7 @@ This demo was tested in the following deployments:
|
||||
|
||||
| Architecture | NodeJS | Date |
|
||||
|:-------------|:----------|:-----------|
|
||||
| `darwin-x64` | `22.14.0` | 2025-04-21 |
|
||||
| `darwin-x64` | `24.13.0` | 2026-01-21 |
|
||||
| `darwin-arm` | `24.2.0` | 2025-06-18 |
|
||||
| `win11-x64` | `24.2.0` | 2025-06-17 |
|
||||
| `win11-arm` | `22.14.0` | 2025-02-23 |
|
||||
|
||||
@ -79,7 +79,7 @@ This demo was last tested in the following deployments:
|
||||
|
||||
| Architecture | BunJS | Date |
|
||||
|:-------------|:---------|:-----------|
|
||||
| `darwin-x64` | `1.2.10` | 2025-04-21 |
|
||||
| `darwin-x64` | `1.3.6` | 2026-01-21 |
|
||||
| `darwin-arm` | `1.2.16` | 2025-06-18 |
|
||||
| `win11-x64` | `1.2.13` | 2025-05-07 |
|
||||
| `win11-arm` | `1.2.3` | 2025-02-23 |
|
||||
|
||||
@ -102,7 +102,7 @@ This demo was last tested in the following deployments:
|
||||
|
||||
| Architecture | Deno | Date |
|
||||
|:-------------|:---------|:-----------|
|
||||
| `darwin-x64` | `2.2.11` | 2025-04-21 |
|
||||
| `darwin-x64` | `2.6.5` | 2026-01-21 |
|
||||
| `darwin-arm` | `2.3.6` | 2025-06-18 |
|
||||
| `win11-x64` | `2.3.6` | 2025-06-17 |
|
||||
| `win11-arm` | `2.2.1` | 2025-02-23 |
|
||||
|
||||
@ -90,12 +90,12 @@ This demo was tested in the following deployments:
|
||||
|
||||
| Architecture | Version | Commit | Date |
|
||||
|:-------------|:----------|:----------|:-----------|
|
||||
| `darwin-x64` | `24.12.0` | | 2025-04-19 |
|
||||
| `darwin-x64` | `24.12.0` | `793dd9d` | 2026-01-21 |
|
||||
| `darwin-arm` | `24.12.0` | `793dd9d` | 2026-01-18 |
|
||||
| `win11-x64` | `24.12.0` | | 2025-04-19 |
|
||||
| `win11-arm` | `24.12.0` | | 2025-04-19 |
|
||||
| `linux-x64` | `24.12.0` | `65e5595` | 2026-01-18 |
|
||||
| `linux-arm` | `24.12.0` | | 2025-04-19 |
|
||||
| `linux-arm` | `24.12.0` | `65e5595` | 2026-01-21 |
|
||||
|
||||
:::
|
||||
|
||||
@ -161,7 +161,7 @@ following commands should be run in the `txiki.js` folder:
|
||||
```bash
|
||||
rm -rf build
|
||||
cmake -B build -DCMAKE_BUILD_TYPE=Release -DUSE_EXTERNAL_FFI=ON
|
||||
cmake --build build -j 32
|
||||
cmake --build build -j 8
|
||||
cp build/tjs ../
|
||||
```
|
||||
|
||||
|
||||
@ -128,7 +128,7 @@ This demo was tested in the following deployments:
|
||||
|
||||
| Architecture | Version | Date |
|
||||
|:-------------|:--------|:-----------|
|
||||
| `darwin-x64` | `2.7.0` | 2025-03-31 |
|
||||
| `darwin-x64` | `2.7.0` | 2026-01-21 |
|
||||
| `darwin-arm` | `2.7.0` | 2025-09-03 |
|
||||
| `win11-x64` | `2.7.0` | 2025-04-28 |
|
||||
| `win11-arm` | `2.7.0` | 2025-02-23 |
|
||||
@ -405,7 +405,7 @@ This demo was tested in the following deployments:
|
||||
|
||||
| Architecture | Version | PHP | Date |
|
||||
|:-------------|:--------|:---------|:-----------|
|
||||
| `darwin-x64` | `2.7.0` | `8.4.2` | 2025-03-31 |
|
||||
| `darwin-x64` | `2.7.0` | `8.4.11` | 2026-01-21 |
|
||||
| `darwin-arm` | `2.7.0` | `8.4.4` | 2025-02-25 |
|
||||
| `linux-x64` | `2.7.0` | `8.3.6` | 2025-04-21 |
|
||||
| `linux-arm` | `2.7.0` | `8.2.26` | 2025-02-15 |
|
||||
@ -547,7 +547,7 @@ This demo was tested in the following deployments:
|
||||
|
||||
| Architecture | Version | Python | Date |
|
||||
|:-------------|:--------|:---------|:-----------|
|
||||
| `darwin-x64` | `2.7.0` | `3.13.1` | 2025-03-31 |
|
||||
| `darwin-x64` | `2.7.0` | `3.13.7` | 2026-01-21 |
|
||||
| `darwin-arm` | `2.7.0` | `3.12.3` | 2025-03-30 |
|
||||
| `linux-x64` | `2.7.0` | `3.12.3` | 2025-04-21 |
|
||||
| `linux-arm` | `2.7.0` | `3.11.2` | 2025-02-15 |
|
||||
@ -1017,7 +1017,7 @@ This demo was tested in the following deployments:
|
||||
|
||||
| Architecture | Version | Date |
|
||||
|:-------------|:--------|:-----------|
|
||||
| `darwin-x64` | `2.2.0` | 2025-03-31 |
|
||||
| `darwin-x64` | `2.2.0` | 2026-02-21 |
|
||||
| `darwin-arm` | `2.2.0` | 2025-03-30 |
|
||||
| `linux-x64` | `2.2.0` | 2025-04-21 |
|
||||
| `linux-arm` | `2.2.0` | 2025-02-15 |
|
||||
@ -1112,7 +1112,7 @@ This demo was tested in the following deployments:
|
||||
|
||||
| Architecture | Version | Date |
|
||||
|:-------------|:--------|:-----------|
|
||||
| `darwin-x64` | `2.2.1` | 2025-03-31 |
|
||||
| `darwin-x64` | `2.2.1` | 2026-01-21 |
|
||||
| `darwin-arm` | `2.2.1` | 2025-03-31 |
|
||||
| `win11-x64` | `2.2.1` | 2025-04-17 |
|
||||
| `linux-x64` | `2.2.1` | 2026-01-08 |
|
||||
@ -1181,7 +1181,7 @@ cargo add ducc base64
|
||||
6) Build and run the app:
|
||||
|
||||
```bash
|
||||
cargo run pres.numbers
|
||||
cargo run -- pres.numbers
|
||||
```
|
||||
|
||||
If the program succeeded, the CSV contents will be printed to console and the
|
||||
|
||||
@ -163,7 +163,7 @@ This demo was tested in the following deployments:
|
||||
|
||||
| Architecture | Jint | Date |
|
||||
|:-------------|:--------|:-----------|
|
||||
| `darwin-x64` | `4.2.1` | 2025-03-31 |
|
||||
| `darwin-x64` | `4.5.0` | 2026-01-21 |
|
||||
| `darwin-arm` | `4.2.0` | 2025-02-13 |
|
||||
| `win11-x64` | `4.2.2` | 2026-04-28 |
|
||||
| `win11-arm` | `4.2.0` | 2025-02-23 |
|
||||
@ -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 4.2.2
|
||||
dotnet add package Jint --version 4.5.0
|
||||
```
|
||||
|
||||
To verify Jint is installed, replace `Program.cs` with the following:
|
||||
|
||||
@ -105,7 +105,7 @@ This demo was tested in the following deployments:
|
||||
|
||||
| Architecture | Git Commit | Go version | Date |
|
||||
|:-------------|:-----------|:-----------|:-----------|
|
||||
| `darwin-x64` | `bcd7cc6` | `1.24.1` | 2025-03-31 |
|
||||
| `darwin-x64` | `651366f` | `1.25.6` | 2026-01-21 |
|
||||
| `darwin-arm` | `cb187b0` | `1.24.0` | 2025-06-18 |
|
||||
| `win11-x64` | `bcd7cc6` | `1.24.2` | 2025-04-28 |
|
||||
| `win11-arm` | `5ef83b8` | `1.24.0` | 2025-02-23 |
|
||||
|
||||
@ -27,7 +27,7 @@ command-line tool for reading data from files.
|
||||
:::note pass
|
||||
|
||||
Many QuickJS functions are not documented. The explanation was verified against
|
||||
commit `0d7aaed`.
|
||||
commit `f113949`.
|
||||
|
||||
:::
|
||||
|
||||
@ -263,14 +263,14 @@ This demo was tested in the following deployments:
|
||||
|
||||
| Architecture | Library | Git Commit | Date |
|
||||
|:-------------|:-----------|:-----------|:-----------|
|
||||
| `darwin-x64` | QuickJS | `0d7aaed` | 2025-03-31 |
|
||||
| `darwin-x64` | QuickJS | `f113949` | 2026-01-21 |
|
||||
| `darwin-arm` | QuickJS | `3306254` | 2025-09-03 |
|
||||
| `win11-x64` | QuickJS-NG | `865ba1f` | 2025-04-18 |
|
||||
| `win11-arm` | QuickJS-NG | `865ba1f` | 2025-04-18 |
|
||||
| `linux-x64` | QuickJS | `3306254` | 2025-06-18 |
|
||||
| `linux-arm` | QuickJS | `6e2e68f` | 2025-02-15 |
|
||||
|
||||
When the demo was tested, `0d7aaed` was the HEAD commit on the `master` branch.
|
||||
When the demo was tested, `f113949` was the HEAD commit on the `master` branch.
|
||||
|
||||
:::
|
||||
|
||||
@ -281,7 +281,7 @@ When the demo was tested, `0d7aaed` was the HEAD commit on the `master` branch.
|
||||
```bash
|
||||
git clone https://github.com/bellard/quickjs
|
||||
cd quickjs
|
||||
git checkout 3306254
|
||||
git checkout f113949
|
||||
make
|
||||
cd ..
|
||||
```
|
||||
@ -428,9 +428,9 @@ This demo was tested in the following environments:
|
||||
|
||||
| Git Commit | Date |
|
||||
|:-----------|:-----------|
|
||||
| `0d7aaed` | 2025-03-31 |
|
||||
| `f113949` | 2026-01-21 |
|
||||
|
||||
When the demo was tested, `0d7aaed` was the HEAD commit on the `master` branch.
|
||||
When the demo was tested, `f113949` was the HEAD commit on the `master` branch.
|
||||
|
||||
:::
|
||||
|
||||
@ -440,7 +440,7 @@ and build the `quickjs` project:
|
||||
```bash
|
||||
git clone https://github.com/bellard/quickjs
|
||||
cd quickjs
|
||||
git checkout 0d7aaed
|
||||
git checkout f113949
|
||||
make
|
||||
cd ..
|
||||
```
|
||||
|
||||
@ -87,7 +87,7 @@ This demo was tested in the following deployments:
|
||||
|
||||
| Platform | Ruby | ExecJS | Date |
|
||||
|:-------------|:---------|:---------|:-----------|
|
||||
| `darwin-x64` | `2.6.10` | `2.10.0` | 2025-03-31 |
|
||||
| `darwin-x64` | `2.6.10` | `2.10.0` | 2026-01-21 |
|
||||
| `darwin-arm` | `2.6.10` | `2.10.0` | 2025-09-03 |
|
||||
| `win11-x64` | `3.3.8` | `2.10.0` | 2025-04-28 |
|
||||
| `win11-arm` | `3.2.3` | `2.10.0` | 2025-02-23 |
|
||||
|
||||
@ -105,7 +105,7 @@ This demo was tested in the following deployments:
|
||||
|
||||
| Architecture | Boa | Date |
|
||||
|:-------------|:---------|:-----------|
|
||||
| `darwin-x64` | `0.20.0` | 2025-03-31 |
|
||||
| `darwin-x64` | `0.20.1` | 2026-01-21 |
|
||||
| `darwin-arm` | `0.20.0` | 2025-09-03 |
|
||||
| `win11-x64` | `0.20.0` | 2025-04-28 |
|
||||
| `win11-arm` | `0.20.0` | 2025-02-23 |
|
||||
|
||||
@ -129,7 +129,7 @@ This demo was tested in the following deployments:
|
||||
|
||||
| Architecture | Version | Date |
|
||||
|:-------------|:--------|:-----------|
|
||||
| `darwin-x64` | `0.066` | 2025-03-31 |
|
||||
| `darwin-x64` | `0.066` | 2026-01-21 |
|
||||
| `darwin-arm` | `0.066` | 2025-09-03 |
|
||||
| `win11-x64` | `0.066` | 2026-01-10 |
|
||||
| `win11-arm` | `0.066` | 2026-01-10 |
|
||||
|
||||
@ -36,7 +36,7 @@ This demo was tested in the following environments:
|
||||
|
||||
| Architecture | Commit | Date |
|
||||
|:-------------|:----------|:-----------|
|
||||
| `darwin-x64` | `5020015` | 2025-03-31 |
|
||||
| `darwin-x64` | `b706935` | 2026-01-21 |
|
||||
| `darwin-arm` | `355ab24` | 2025-09-03 |
|
||||
| `win11-x64` | `5020015` | 2025-04-23 |
|
||||
| `win11-arm` | `5020015` | 2025-02-23 |
|
||||
@ -52,7 +52,7 @@ The Windows tests were run in WSL.
|
||||
:::info pass
|
||||
|
||||
The official JerryScript documentation and examples are out of date. This
|
||||
explanation was verified against the latest release (commit `5020015`).
|
||||
explanation was verified against the latest release (commit `b706935`).
|
||||
|
||||
:::
|
||||
|
||||
|
||||
@ -176,7 +176,7 @@ This demo was tested in the following deployments:
|
||||
|
||||
| Architecture | Jurassic | Date |
|
||||
|:-------------|:---------|:-----------|
|
||||
| `darwin-x64` | `3.2.9` | 2025-03-31 |
|
||||
| `darwin-x64` | `3.2.9` | 2026-01-21 |
|
||||
| `darwin-arm` | `3.2.9` | 2025-09-03 |
|
||||
| `win11-x64` | `3.2.9` | 2025-04-23 |
|
||||
| `win11-arm` | `3.2.9` | 2025-02-23 |
|
||||
|
||||
@ -43,7 +43,7 @@ These instructions were tested on the following platforms:
|
||||
|:------------------------------|:-------------|:-----------|
|
||||
| Linux (Ubuntu Linux x64) | `linux-x64` | 2025-07-06 |
|
||||
| Linux (Debian Linux AArch64) | `linux-arm` | 2025-01-14 |
|
||||
| MacOS 15.3 (x64) | `darwin-x64` | 2025-03-31 |
|
||||
| MacOS 15.6 (x64) | `darwin-x64` | 2026-01-21 |
|
||||
| MacOS 15.2 (ARM64) | `darwin-arm` | 2025-03-07 |
|
||||
| Windows 11 (x64) + WSL Ubuntu | `win11-x64` | 2025-06-20 |
|
||||
| Windows 11 (ARM) + WSL Ubuntu | `win11-arm` | 2025-02-23 |
|
||||
@ -303,7 +303,7 @@ browser.
|
||||
|
||||
*In the `"Get Node.js®"` section:*
|
||||
|
||||
1. Select the LTS version (currently `"v22.14.0 (LTS)"`) in the first dropdown
|
||||
1. Select the LTS version (currently `"v24.13.0 (LTS)"`) in the first dropdown
|
||||
|
||||
*In the `"Or get a prebuilt Node.js® for"` section:*
|
||||
|
||||
|
||||
@ -11,8 +11,6 @@ curl -o xlsx-cli.js https://docs.sheetjs.com/cli/xlsx-cli.js
|
||||
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz exit-on-epipe commander@2
|
||||
|
||||
## NOTE: these steps are for darwin-arm
|
||||
|
||||
npx -y boxednode@2.4.4 -s xlsx-cli.js -t xlsx-cli -n 23.11.0
|
||||
npx -y boxednode -s xlsx-cli.js -t xlsx-cli || npx -y boxednode -s xlsx-cli.js -t xlsx-cli -n 23.11.0
|
||||
|
||||
./xlsx-cli pres.numbers
|
||||
|
||||
@ -11,7 +11,20 @@ curl -o xlsx-cli.js https://docs.sheetjs.com/cli/xlsx-cli.js
|
||||
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz exit-on-epipe commander@2
|
||||
|
||||
## npx -y nexe -t 14.15.3 xlsx-cli.js ## does not work on arm64
|
||||
npx -y nexe xlsx-cli.js --build --python=$(which python3) --make="-j8"
|
||||
OS="$(uname -s)"
|
||||
ARCH="$(uname -m)"
|
||||
|
||||
case "$OS" in
|
||||
Darwin) OS="macos" ;;
|
||||
Linux) OS="linux" ;;
|
||||
*) echo "unsupported OS: $OS"; exit 1 ;;
|
||||
esac
|
||||
|
||||
case "$ARCH" in
|
||||
x86_64) npx -y nexe -t 14.15.3 xlsx-cli.js ;;
|
||||
arm64|aarch64) npx -y nexe xlsx-cli.js --build --python=$(which python3) --make="-j8" ;;
|
||||
*) echo "unsupported architecture: $ARCH"; exit 1 ;;
|
||||
esac
|
||||
|
||||
# Run the generated binary
|
||||
./xlsx-cli pres.numbers
|
||||
|
||||
@ -11,8 +11,23 @@ curl -o xlsx-cli.js https://docs.sheetjs.com/cli/xlsx-cli.js
|
||||
|
||||
npm i --save https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz exit-on-epipe commander@2
|
||||
|
||||
npx -y pkg -t 'node18-win-arm64,node18-linux-arm64,node18-macos-arm64' xlsx-cli.js
|
||||
OS="$(uname -s)"
|
||||
ARCH="$(uname -m)"
|
||||
|
||||
## NOTE: these steps are for darwin
|
||||
case "$OS" in
|
||||
Darwin) OS="macos" ;;
|
||||
Linux) OS="linux" ;;
|
||||
*) echo "unsupported OS: $OS"; exit 1 ;;
|
||||
esac
|
||||
|
||||
./xlsx-cli-macos pres.numbers
|
||||
case "$ARCH" in
|
||||
x86_64) ARCH="x64" ;;
|
||||
arm64|aarch64) ARCH="arm64" ;;
|
||||
*) echo "unsupported arch: $ARCH"; exit 1 ;;
|
||||
esac
|
||||
|
||||
# Build for the current platform
|
||||
npx -y pkg -t "node18-win-${ARCH},node18-linux-${ARCH},node18-macos-${ARCH}" xlsx-cli.js
|
||||
|
||||
# Run the appropriate binary based on OS
|
||||
./xlsx-cli-${OS} pres.numbers
|
||||
|
||||
@ -27,11 +27,34 @@ EOF
|
||||
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js
|
||||
|
||||
## NOTE: these steps are for darwin
|
||||
curl -LO https://github.com/saghul/txiki.js/releases/download/v24.12.0/txiki-macos.zip
|
||||
unzip txiki-macos.zip
|
||||
mv txiki-macos/tjs .
|
||||
chmod +x tjs
|
||||
OS="$(uname -s)"
|
||||
|
||||
case "$OS" in
|
||||
Darwin)
|
||||
curl -LO https://github.com/saghul/txiki.js/releases/download/v24.12.0/txiki-macos.zip
|
||||
unzip txiki-macos.zip
|
||||
mv txiki-macos/tjs .
|
||||
chmod +x tjs
|
||||
;;
|
||||
|
||||
Linux)
|
||||
echo "Installing txiki.js for Linux"
|
||||
git clone --recursive https://github.com/saghul/txiki.js --shallow-submodules
|
||||
cd txiki.js
|
||||
|
||||
make || (
|
||||
echo "!!! First build attempt failed, trying with system libffi..."
|
||||
rm -rf build
|
||||
cmake -B build -DCMAKE_BUILD_TYPE=Release -DUSE_EXTERNAL_FFI=ON
|
||||
cmake --build build -j 8
|
||||
)
|
||||
|
||||
cp build/tjs ../
|
||||
cd ..
|
||||
;;
|
||||
|
||||
*) echo "Unsupported OS: $OS"; exit 1 ;;
|
||||
esac
|
||||
|
||||
npx -y esbuild sheet2csv.js --bundle --outfile=bundle.js --platform=neutral
|
||||
|
||||
|
||||
16
tests/engines/duktape-perl.sh
Executable file
16
tests/engines/duktape-perl.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
# https://docs.sheetjs.com/docs/demos/engines/duktape#perl-demo
|
||||
|
||||
cd /tmp
|
||||
rm -rf sheetjs-duk-perl
|
||||
mkdir sheetjs-duk-perl
|
||||
cd sheetjs-duk-perl
|
||||
|
||||
curl -LO https://docs.sheetjs.com/duk/SheetJSDuk.pl
|
||||
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-0.20.3/package/dist/xlsx.extendscript.js
|
||||
curl -LO https://docs.sheetjs.com/pres.xlsx
|
||||
|
||||
perl SheetJSDuk.pl pres.xlsx; echo $?
|
||||
|
||||
npx -y xlsx-cli SheetJSDuk.xlsb
|
||||
36
tests/engines/duktape-php.sh
Executable file
36
tests/engines/duktape-php.sh
Executable file
@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
# https://docs.sheetjs.com/docs/demos/engines/duktape#php-demo
|
||||
|
||||
cd /tmp
|
||||
rm -rf sheetjs-duk-php
|
||||
mkdir sheetjs-duk-php
|
||||
cd sheetjs-duk-php
|
||||
|
||||
curl -LO https://duktape.org/duktape-2.7.0.tar.xz
|
||||
tar -xJf duktape-2.7.0.tar.xz
|
||||
cd duktape-2.7.0
|
||||
make -f Makefile.sharedlibrary
|
||||
cd ..
|
||||
|
||||
OS="$(uname -s)"
|
||||
|
||||
case "$OS" in
|
||||
Darwin) LIB_NAME="libduktape.207.20700.so" ;;
|
||||
Linux) LIB_NAME="libduktape.so.207.20700" ;;
|
||||
*) echo "Unsupported OS: $OS"; exit 1 ;;
|
||||
esac
|
||||
|
||||
cp "duktape-2.7.0/$LIB_NAME" .
|
||||
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-0.20.3/package/dist/shim.min.js
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-0.20.3/package/dist/xlsx.full.min.js
|
||||
curl -LO https://docs.sheetjs.com/pres.numbers
|
||||
|
||||
curl -LO https://docs.sheetjs.com/duk/SheetJSDuk.php
|
||||
|
||||
sed "s#libduktape.207.20700.so#$LIB_NAME#g" SheetJSDuk.php > SheetJSDuk.php.tmp
|
||||
mv SheetJSDuk.php.tmp SheetJSDuk.php
|
||||
|
||||
php SheetJSDuk.php pres.numbers; echo $?
|
||||
|
||||
npx -y xlsx-cli sheetjsw.xlsb
|
||||
36
tests/engines/duktape-python.sh
Executable file
36
tests/engines/duktape-python.sh
Executable file
@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
# https://docs.sheetjs.com/docs/demos/engines/duktape#python-demo
|
||||
|
||||
cd /tmp
|
||||
rm -rf sheetjs-duk-python
|
||||
mkdir sheetjs-duk-python
|
||||
cd sheetjs-duk-python
|
||||
|
||||
curl -LO https://duktape.org/duktape-2.7.0.tar.xz
|
||||
tar -xJf duktape-2.7.0.tar.xz
|
||||
cd duktape-2.7.0
|
||||
make -f Makefile.sharedlibrary
|
||||
cd ..
|
||||
|
||||
OS="$(uname -s)"
|
||||
|
||||
case "$OS" in
|
||||
Darwin) LIB_NAME="libduktape.207.20700.so" ;;
|
||||
Linux) LIB_NAME="libduktape.so.207.20700" ;;
|
||||
*) echo "Unsupported OS: $OS"; exit 1 ;;
|
||||
esac
|
||||
|
||||
cp "duktape-2.7.0/$LIB_NAME" .
|
||||
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-0.20.3/package/dist/shim.min.js
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-0.20.3/package/dist/xlsx.full.min.js
|
||||
curl -LO https://docs.sheetjs.com/pres.numbers
|
||||
|
||||
curl -LO https://docs.sheetjs.com/duk/SheetJSDuk.py
|
||||
|
||||
sed "s#libduktape.207.20700.so#$LIB_NAME#g" SheetJSDuk.py > SheetJSDuk.py.tmp
|
||||
mv SheetJSDuk.py.tmp SheetJSDuk.py
|
||||
|
||||
python3 SheetJSDuk.py pres.numbers; echo $?
|
||||
|
||||
npx -y xlsx-cli sheetjsw.xlsb
|
||||
20
tests/engines/duktape-rust.sh
Executable file
20
tests/engines/duktape-rust.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
# https://docs.sheetjs.com/docs/demos/engines/duktape#rust-demo
|
||||
|
||||
cd /tmp
|
||||
rm -rf sheetjs-duk-rs
|
||||
cargo new sheetjs-duk-rs
|
||||
cd sheetjs-duk-rs
|
||||
|
||||
curl -L -o src/shim.min.js https://cdn.sheetjs.com/xlsx-0.20.3/package/dist/shim.min.js
|
||||
curl -L -o src/xlsx.full.min.js https://cdn.sheetjs.com/xlsx-0.20.3/package/dist/xlsx.full.min.js
|
||||
|
||||
curl -LO https://docs.sheetjs.com/pres.numbers
|
||||
|
||||
curl -L -o src/main.rs https://docs.sheetjs.com/duk/main.rs
|
||||
|
||||
cargo add ducc base64
|
||||
|
||||
cargo run -- pres.numbers; echo $?
|
||||
|
||||
npx -y xlsx-cli sheetjsw.xlsb
|
||||
@ -7,10 +7,12 @@ mkdir -p sheetjs-zig
|
||||
cd sheetjs-zig
|
||||
|
||||
## NOTE: these steps are for darwin
|
||||
case "$(uname -m)" in
|
||||
ARCH="$(uname -m)"
|
||||
|
||||
case "$ARCH" in
|
||||
arm64) curl -LO https://ziglang.org/download/0.15.2/zig-aarch64-macos-0.15.2.tar.xz ;;
|
||||
x86_64) curl -LO https://ziglang.org/download/0.15.2/zig-x86_64-macos-0.15.2.tar.xz ;;
|
||||
*) echo "unsupported arch $(uname -m)"; exit 1 ;;
|
||||
*) echo "unsupported arch $ARCH"; exit 1 ;;
|
||||
esac
|
||||
tar -xzf zig-*.tar.xz
|
||||
|
||||
|
||||
76
tests/engines/jint.sh
Executable file
76
tests/engines/jint.sh
Executable file
@ -0,0 +1,76 @@
|
||||
#!/bin/bash
|
||||
# https://docs.sheetjs.com/docs/demos/engines/jint
|
||||
|
||||
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||
|
||||
cd /tmp
|
||||
rm -rf SheetJSJint
|
||||
mkdir SheetJSJint
|
||||
cd SheetJSJint
|
||||
|
||||
dotnet new console
|
||||
dotnet run
|
||||
|
||||
dotnet nuget add source https://www.myget.org/F/jint/api/v3/index.json
|
||||
dotnet add package Jint --version 4.5.0
|
||||
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/shim.min.js
|
||||
curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js
|
||||
curl -LO https://docs.sheetjs.com/pres.xlsx
|
||||
|
||||
cat >Program.cs <<EOF
|
||||
/* sheetjs (C) 2013-present SheetJS -- https://sheetjs.com */
|
||||
/* vim: set ts=2: */
|
||||
using Jint;
|
||||
|
||||
/* Initialize Jint */
|
||||
var engine = new Jint.Engine();
|
||||
engine.Evaluate("global = globalThis;");
|
||||
|
||||
/* Load SheetJS Scripts */
|
||||
engine.Evaluate(File.ReadAllText("shim.min.js"));
|
||||
engine.Evaluate(File.ReadAllText("xlsx.full.min.js"));
|
||||
Console.WriteLine("SheetJS version {0}", engine.Evaluate("XLSX.version"));
|
||||
|
||||
/* Read and Parse File */
|
||||
byte[] filedata = File.ReadAllBytes(args[0]);
|
||||
Jint.Native.JsValue u8 = engine.Intrinsics.Uint8Array.Construct(filedata);
|
||||
engine.SetValue("buf", u8);
|
||||
engine.Evaluate("var wb = XLSX.read(buf);");
|
||||
|
||||
/* Print CSV of first worksheet*/
|
||||
engine.Evaluate("var ws = wb.Sheets[wb.SheetNames[0]];");
|
||||
Jint.Native.JsValue csv = engine.Evaluate("XLSX.utils.sheet_to_csv(ws)");
|
||||
Console.Write(csv);
|
||||
|
||||
/* Generate XLSB file and save to SheetJSJint.xlsb */
|
||||
Jint.Native.JsValue xlsb = engine.Evaluate("XLSX.write(wb, {bookType: 'xlsb', type: 'buffer'})");
|
||||
File.WriteAllBytes("SheetJSJint.xlsb", xlsb.AsUint8Array());
|
||||
EOF
|
||||
|
||||
dotnet run pres.xlsx; echo $?
|
||||
npx -y xlsx-cli SheetJSJint.xlsb
|
||||
|
||||
OS="$(uname -s)"
|
||||
ARCH="$(uname -m)"
|
||||
|
||||
case "$OS" in
|
||||
Darwin) OS="osx" ;;
|
||||
Linux) OS="linux" ;;
|
||||
*) echo "unsupported OS: $OS"; exit 1 ;;
|
||||
esac
|
||||
|
||||
case "$ARCH" in
|
||||
x86_64) ARCH="x64" ;;
|
||||
arm64|aarch64) ARCH="arm64" ;;
|
||||
*) echo "unsupported architecture: $ARCH"; exit 1 ;;
|
||||
esac
|
||||
|
||||
RID="${OS}-${ARCH}"
|
||||
|
||||
dotnet publish -c Release -r $RID --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=true
|
||||
cp bin/Release/net*/$RID/publish/SheetJSJint .
|
||||
|
||||
rm -f SheetJSJint.xlsb
|
||||
./SheetJSJint pres.xlsx; echo $?
|
||||
npx -y xlsx-cli SheetJSJint.xlsb
|
||||
@ -1,6 +1,8 @@
|
||||
#!/bin/bash
|
||||
# https://docs.sheetjs.com/docs/demos/engines/jurassic
|
||||
|
||||
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||
|
||||
cd /tmp
|
||||
rm -rf SheetJSJurassic
|
||||
mkdir SheetJSJurassic
|
||||
@ -44,4 +46,29 @@ string ods = engine.Evaluate("XLSX.write(wb, {bookType: 'ods', type: 'base64'})"
|
||||
File.WriteAllBytes("SheetJSJurassic.ods", System.Convert.FromBase64String(ods));
|
||||
EOF
|
||||
|
||||
dotnet run pres.xlsx
|
||||
dotnet run pres.xlsx; echo $?
|
||||
npx -y xlsx-cli SheetJSJurassic.ods
|
||||
|
||||
OS="$(uname -s)"
|
||||
ARCH="$(uname -m)"
|
||||
|
||||
case "$OS" in
|
||||
Darwin) OS="osx" ;;
|
||||
Linux) OS="linux" ;;
|
||||
*) echo "unsupported OS: $OS"; exit 1 ;;
|
||||
esac
|
||||
|
||||
case "$ARCH" in
|
||||
x86_64) ARCH="x64" ;;
|
||||
arm64|aarch64) ARCH="arm64" ;;
|
||||
*) echo "unsupported architecture: $ARCH"; exit 1 ;;
|
||||
esac
|
||||
|
||||
RID="${OS}-${ARCH}"
|
||||
|
||||
dotnet publish -c Release -r $RID --self-contained true -p:PublishSingleFile=true -p:PublishTrimmed=false
|
||||
cp bin/Release/net*/$RID/publish/SheetJSJurassic .
|
||||
|
||||
rm -f SheetJSJurassic.ods
|
||||
./SheetJSJurassic pres.xlsx
|
||||
npx -y xlsx-cli SheetJSJurassic.ods
|
||||
|
||||
@ -7,7 +7,7 @@ cd sheetjs-quickjs
|
||||
|
||||
git clone https://github.com/bellard/quickjs
|
||||
cd quickjs
|
||||
git checkout 3306254
|
||||
git checkout f113949
|
||||
make
|
||||
cd ..
|
||||
|
||||
@ -22,3 +22,12 @@ curl -LO https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js
|
||||
curl -LO https://docs.sheetjs.com/pres.numbers
|
||||
|
||||
./sheetjs.quick pres.numbers
|
||||
|
||||
# CLI Test
|
||||
cp quickjs/qjs .
|
||||
|
||||
curl -LO https://docs.sheetjs.com/quickjs/SheetJSQuick.js
|
||||
|
||||
./qjs SheetJSQuick.js
|
||||
|
||||
npx -y xlsx-cli SheetJSQuick.xlsx
|
||||
|
||||
@ -1,46 +0,0 @@
|
||||
#!/bin/bash
|
||||
# https://docs.sheetjs.com/docs/demos/net/headless#puppeteer
|
||||
|
||||
cd /tmp
|
||||
rm -rf sheetjs-puppeteer-deno
|
||||
mkdir sheetjs-puppeteer-deno
|
||||
cd sheetjs-puppeteer-deno
|
||||
|
||||
# NOTE: this was tested against Deno 2.6.4
|
||||
|
||||
env PUPPETEER_PRODUCT=chrome deno run -A --unstable https://deno.land/x/puppeteer@16.2.0/install.ts
|
||||
|
||||
cat >SheetJSPuppeteer.ts <<EOF
|
||||
import puppeteer from "https://deno.land/x/puppeteer@16.2.0/mod.ts";
|
||||
import { decodeBase64 } from "https://deno.land/std/encoding/base64.ts"
|
||||
|
||||
/* (1) Load the target page */
|
||||
const browser = await puppeteer.launch();
|
||||
const page = await browser.newPage();
|
||||
page.on("console", msg => console.log("PAGE LOG:", msg.text()));
|
||||
await page.setViewport({width: 1920, height: 1080});
|
||||
await page.goto('https://sheetjs.com/demos/table');
|
||||
|
||||
/* (2) Load the standalone SheetJS build from the CDN */
|
||||
await page.addScriptTag({ url: 'https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js' });
|
||||
|
||||
/* (3) Run the snippet in browser and return data */
|
||||
const b64 = await page.evaluate(() => {
|
||||
|
||||
/* find first table */
|
||||
var table = document.body.getElementsByTagName('table')[0];
|
||||
|
||||
/* call table_to_book on first table */
|
||||
var wb = XLSX.utils.table_to_book(table);
|
||||
|
||||
/* generate XLSB and return binary string */
|
||||
return XLSX.write(wb, {type: "base64", bookType: "xlsb"});
|
||||
});
|
||||
/* (4) write data to file */
|
||||
Deno.writeFileSync("SheetJSPuppeteer.xlsb", decodeBase64(b64));
|
||||
|
||||
await browser.close();
|
||||
EOF
|
||||
|
||||
deno run -A --unstable SheetJSPuppeteer.ts
|
||||
npx -y xlsx-cli SheetJSPuppeteer.xlsb
|
||||
Loading…
Reference in New Issue
Block a user