From 09e390a090c7237f5662a28f0c429cbdc84953d8 Mon Sep 17 00:00:00 2001 From: SheetJS Date: Sun, 14 Apr 2024 22:52:56 -0400 Subject: [PATCH] astro 4 is out of beta --- .../03-demos/02-frontend/19-bundler/index.md | 20 ++++++++++-- docz/docs/03-demos/12-static/12-astro.md | 19 ++++++----- .../docs/03-demos/17-mobile/01-reactnative.md | 2 +- .../03-demos/42-engines/23-jerryscript.md | 2 +- docz/docs/03-demos/42-engines/index.md | 32 ++++++++++--------- 5 files changed, 48 insertions(+), 27 deletions(-) diff --git a/docz/docs/03-demos/02-frontend/19-bundler/index.md b/docz/docs/03-demos/02-frontend/19-bundler/index.md index f4b4e01..d5b9cf2 100644 --- a/docz/docs/03-demos/02-frontend/19-bundler/index.md +++ b/docz/docs/03-demos/02-frontend/19-bundler/index.md @@ -43,6 +43,14 @@ Complete Examples are included [in the "Dojo" demo](/docs/demos/frontend/dojo) ## Snowpack +Snowpack was a development tool built by the AstroJS team. + +:::caution pass + +Snowpack is no longer maintained. The developers recommend [ViteJS](/docs/demos/frontend/bundler/vitejs) + +::: + Snowpack works with no caveats.
@@ -54,7 +62,7 @@ This demo was tested in the following environments: | Version | Date | |:--------|:-----------| -| `3.8.8` | 2023-12-04 | +| `3.8.8` | 2024-04-14 | ::: @@ -165,6 +173,14 @@ Click on "Click here to export" to generate a file. ## WMR +WMR was a development tool built by the PreactJS team. + +:::caution pass + +WMR is no longer maintained. The developers recommend [ViteJS](/docs/demos/frontend/bundler/vitejs) + +::: + WMR works with no caveats.
@@ -176,7 +192,7 @@ This demo was tested in the following environments: | Version | Date | |:--------|:-----------| -| `3.8.0` | 2023-12-04 | +| `3.8.0` | 2024-04-14 | ::: diff --git a/docz/docs/03-demos/12-static/12-astro.md b/docz/docs/03-demos/12-static/12-astro.md index 00bc10b..a688399 100644 --- a/docz/docs/03-demos/12-static/12-astro.md +++ b/docz/docs/03-demos/12-static/12-astro.md @@ -50,10 +50,10 @@ npx astro telemetry disable This demo was tested in the following environments: -| AstroJS | Date | -|:---------------|:-----------| -| `3.6.4` | 2023-12-04 | -| `4.0.0-beta.4` | 2023-12-04 | +| AstroJS | Template | Date | +|:--------|:------------------|:-----------| +| `3.6.5` |: Starlight 0.14.0 | 2024-04-14 | +| `4.6.1` |: Starlight 0.21.5 | 2024-04-14 | ::: @@ -212,10 +212,13 @@ cd sheetjs-astro :::note pass -To test the AstroJS 4 beta release, run the following command: +To test an older version of AstroJS, install the specific version of `astro` and +a supported starter template after creating the project. + +For major version 3, Starlight must be version `0.14.0`: ```bash -npm install --force @astrojs/starlight@^0.14.0 astro@4.0.0-beta.4 +npm install --force astro@3.6.5 @astrojs/starlight@0.14.0 ``` The version can be verified by running: @@ -251,7 +254,7 @@ declare module '*.xlsx' { const data: string; export default data; } - At the top of the script, import `readFileSync`: -```js title="astro.config.mjs" +```js title="astro.config.mjs (add higlighted lines)" // highlight-start /* import `readFileSync` at the top of the script*/ import { readFileSync } from 'fs'; @@ -261,7 +264,7 @@ import { defineConfig } from 'astro/config'; - In the object argument to `defineConfig`, add a `vite` section: -```js title="astro.config.mjs" +```js title="astro.config.mjs (add highlighted lines)" export default defineConfig({ // highlight-start /* this vite section should be added as a property of the object */ diff --git a/docz/docs/03-demos/17-mobile/01-reactnative.md b/docz/docs/03-demos/17-mobile/01-reactnative.md index aef729c..89f827f 100644 --- a/docz/docs/03-demos/17-mobile/01-reactnative.md +++ b/docz/docs/03-demos/17-mobile/01-reactnative.md @@ -1477,7 +1477,7 @@ The Numbers app will load the spreadsheet, confirming that the file is valid. [^2]: See ["Array of Arrays" in the API reference](/docs/api/utilities/array#array-of-arrays) [^3]: See ["Array Output" in "Utility Functions"](/docs/api/utilities/array#array-output) [^4]: See ["Array of Arrays Input" in "Utility Functions"](/docs/api/utilities/array#array-of-arrays-input) -[^5]: React-Native commit [`5b597b5`](https://github.com/facebook/react-native/commit/5b597b5ff94953accc635ed3090186baeecb3873) added the final piece required for `fetch` support. It landed in version `0.72.0-rc.1` and is available in official releases starting from `0.72.0`. +[^5]: React-Native commit [`5b597b5`](https://github.com/facebook/react-native/commit/5b597b5ff94953accc635ed3090186baeecb3873) added the final piece required for `fetch` support. It is available in official releases starting from `0.72.0`. [^6]: When the demo was last tested, the Temurin distribution of Java 17 was installed through the macOS Brew package manager by running `brew install temurin17`. [Direct downloads are available at `adoptium.net`](https://adoptium.net/temurin/releases/?version=17) [^7]: See ["Running On Device"](https://reactnative.dev/docs/running-on-device) in the React Native documentation [^8]: See [`UIFileSharingEnabled`](https://developer.apple.com/documentation/bundleresources/information_property_list/uifilesharingenabled) in the Apple Developer Documentation. diff --git a/docz/docs/03-demos/42-engines/23-jerryscript.md b/docz/docs/03-demos/42-engines/23-jerryscript.md index 6670eae..9392904 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` | `cefd391` | 2024-03-15 | | `darwin-arm` | `ef4cb2b` | 2023-12-08 | -| `win11-x64` | `ef4cb2b` | 2023-12-08 | +| `win10-x64` | `47bd5d4` | 2024-04-14 | | `win11-arm` | `ef4cb2b` | 2023-12-08 | | `linux-x64` | `cefd391` | 2024-03-21 | | `linux-arm` | `ef4cb2b` | 2023-12-08 | diff --git a/docz/docs/03-demos/42-engines/index.md b/docz/docs/03-demos/42-engines/index.md index 62a2ccc..c83b3e1 100644 --- a/docz/docs/03-demos/42-engines/index.md +++ b/docz/docs/03-demos/42-engines/index.md @@ -14,8 +14,7 @@ import EngineData from '/data/engines.js' data from spreadsheets. JavaScript code cannot be directly executed on most modern computers. A software -component ("JavaScript engine") executes code. There are many engines designed -for embedding in other applications. After embedding a JS engine in software, +component ("JavaScript engine") executes code. After embedding a JS engine, programs can leverage SheetJS libraries to process spreadsheets and data. The demos in this section showcase a number of JS engines and language bindings. @@ -25,23 +24,23 @@ SheetJS library scripts, and reads and writes spreadsheet files. ## General Caveats -There are many other JS engines with different design goals. Some are designed -for low-power or low-memory environments. Others aim for interoperability with +There are many JS engines with different design goals. Some are designed for +low-power or low-memory environments. Others aim for interoperability with specific programming languages or environments. Typically they support ES3 and are capable of running SheetJS code. Common browser and NodeJS APIs are often missing from light-weight JS engines. -#### Global +**Global** -Some engines do not provide `globalThis` or `global` or `window`. A `global` +Some engines do not provide `globalThis` or `global` or `window`. A `global` variable can be exposed in one line that should be run in the JS engine: ```js var global = (function(){ return this; }).call(null); ``` -#### Console +**Console** Some engines do not provide a `console` object but offer other ways to print to standard output. For example, Hermes[^1] provides `print()`. A `console` object @@ -51,16 +50,17 @@ should be created using the engine print function: var console = { log: function(x) { print(x); } }; ``` -#### Binary Data +**Binary Data** -Some engines do not provide easy ways to exchange binary data. For example, it -is common to pass null-terminated arrays, which would truncate XLSX, XLS, and -other exports. APIs that accept pointers without length should be avoided. +Some engines do not provide easy ways to exchange binary data. For example, some +libraries pass null-terminated arrays, which would truncate XLSX, XLS, and other +exports. APIs that accept pointers without length should be avoided. -Base64 strings are safe for passing between JS and native code, but they should -only be used when there is no safe way to pass `ArrayBuffer` or `Uint8Array`. +Base64 strings are safe, as they do not use null characters, but should only be +used when there is no safe way to pass `ArrayBuffer` or `Uint8Array` objects. +The SheetJS `read`[^2] and `write`[^3] methods directly support Base64 strings. -#### Byte Conventions +**Byte Conventions** Java has no native concept of unsigned bytes. Values in a `byte[]` are limited to the range `-128 .. 127`. They need to be fixed within the JS engine. @@ -173,4 +173,6 @@ The demo includes examples in C++ and Rust. The ["Python + Pandas" demo](/docs/demos/math/pandas) uses V8 with Python. -[^1]: See ["Initialize Hermes"](/docs/demos/engines/hermes#initialize-hermes) in the Hermes demo. \ No newline at end of file +[^1]: See ["Initialize Hermes"](/docs/demos/engines/hermes#initialize-hermes) in the Hermes demo. +[^2]: See [`read` in "Reading Files"](/docs/api/parse-options) +[^3]: See [`write` in "Writing Files"](/docs/api/write-options)