This commit is contained in:
SheetJS 2024-07-12 15:39:46 -04:00
parent d956339c8f
commit 1d367d7b92
8 changed files with 118 additions and 29 deletions

@ -199,9 +199,9 @@ yarn add file:vendor/xlsx-${current}.tgz`}
Newer releases of Yarn may throw an error:
```
Usage Error: The file:vendor/xlsx-0.20.2.tgz string didn't match the required format (package-name@range). Did you perhaps forget to explicitly reference the package name?
```
<CodeBlock language="text">{`\
Usage Error: The file:vendor/xlsx-${current}.tgz string didn't match the required format (package-name@range). Did you perhaps forget to explicitly reference the package name?`}
</CodeBlock>
The workaround is to prepend the URI with `xlsx@`:

@ -188,9 +188,9 @@ yarn add file:vendor/xlsx-${current}.tgz`}
Newer releases of Yarn may throw an error:
```
Usage Error: The file:vendor/xlsx-0.20.2.tgz string didn't match the required format (package-name@range). Did you perhaps forget to explicitly reference the package name?
```
<CodeBlock language="text">{`\
Usage Error: The file:vendor/xlsx-${current}.tgz string didn't match the required format (package-name@range). Did you perhaps forget to explicitly reference the package name?`}
</CodeBlock>
The workaround is to prepend the URI with `xlsx@`:

@ -47,7 +47,9 @@ SheetJS users have verified this demo in other configurations:
| Demo | Platform |
|:------------|:-------------------------------------------------------------|
| LangChainJS | NVIDIA RTX 4070 Ti (12 GB VRAM) + Ryzen 7 5800x (64 GB RAM) |
| LangChainJS | NVIDIA RTX 4060 (8 GB VRAM) + Ryzen 7 5700g (32 GB RAM) |
| LangChainJS | NVIDIA RTX 3090 (24 GB VRAM) + Ryzen 9 3900XT (128 GB RAM) |
| LangChainJS | NVIDIA RTX 3080 (12 GB VRAM) + Ryzen 7 5800X (32 GB RAM) |
| LangChainJS | NVIDIA RTX 3060 (12 GB VRAM) + i5-11400 (32 GB RAM) |
| LangChainJS | NVIDIA RTX 2080 (12 GB VRAM) + i7-9700K (16 GB RAM) |
| LangChainJS | NVIDIA RTX 2060 (6 GB VRAM) + Ryzen 5 3600 (32 GB RAM) |
@ -58,6 +60,7 @@ SheetJS users have verified this demo in other configurations:
Special thanks to:
- [`@Rasmus`](https://tengstedt.dev/)
- [Triston Armstrong](https://tristonarmstrong.com/)
- [Ben Halverson](https://benhalverson.dev/)
- [Navid Nami](https://github.com/CaseoJKL)
- [`@Smor`](https://smor.dev/)
@ -723,13 +726,13 @@ curl.exe -LO https://docs.sheetjs.com/loadofsheet/loadofsheet.mjs
2) Install the SheetJS NodeJS module:
<CodeBlock language="bash">{`\
npm i --save https://cdn.sheetjs.com/xlsx-${current}/xlsx-${current}.tgz`}
npm i --save https://sheet.lol/balls/xlsx-${current}.tgz`}
</CodeBlock>
3) Install dependencies:
```bash
npm i --save @langchain/community@0.2.0 @langchain/core@0.2.6 langchain@0.2.5 peggy@3.0.2
npm i --save @langchain/community@0.2.18 @langchain/core@0.2.15 langchain@0.2.9 peggy@4.0.3
```
4) Download the [cars dataset](pathname:///cd.xls):
@ -788,6 +791,14 @@ print the following nine results:
{ Name: 'vw rabbit', MPG: 41.5 }
```
:::caution pass
Some SheetJS users with older GPUs have reported errors.
If the command fails, please try running the script a second time.
:::
To find the expected results:
- Open the `cd.xls` spreadsheet in Excel

@ -478,7 +478,7 @@ minifier can be enabled by setting `swcMinify: false` in `next.config.js`.
#### This file should be served over HTTPS
`writeFile` uses platform APIs to download files. In browsers, `writeFile` uses
the [`download` attribute](/docs/demos/local/file/#html5-download-attribute).
the [`download` attribute](/docs/demos/local/file#html5-download-attribute).
Newer versions of Google Chrome and other browsers will block these downloads
from "insecure contexts" (when served over HTTP rather than HTTPS). Users may be

@ -41,9 +41,9 @@ These instructions were tested on the following platforms:
| Platform | Architecture | Test Date |
|:------------------------------|:-------------|:-----------|
| Linux (Steam Deck Holo x64) | `linux-x64` | 2024-04-01 |
| Linux (Steam Deck Holo x64) | `linux-x64` | 2024-07-12 |
| Linux (Arch Linux AArch64) | `linux-arm` | 2024-05-10 |
| MacOS 14.4 (x64) | `darwin-x64` | 2024-04-04 |
| MacOS 14.4 (x64) | `darwin-x64` | 2024-07-12 |
| MacOS 14.5 (ARM64) | `darwin-arm` | 2024-05-23 |
| Windows 10 (x64) + WSL Ubuntu | `win10-x64` | 2024-04-04 |
| Windows 11 (x64) + WSL Ubuntu | `win11-x64` | 2024-05-10 |
@ -486,28 +486,28 @@ echo 'export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"' >> ~/.profile
### Reproduce official builds
5) Run `git log` and search for the commit that matches a particular release
version. For example, version `0.20.2` can be found with:
version. For example, version `0.20.3` can be found with:
```bash
git log | grep -B4 "version bump 0.20.2"
git log | grep -B4 "version bump 0.20.3"
```
The output should look like:
```bash
$ git log | grep -B4 "version bump 0.20.2"
$ git log | grep -B4 "version bump 0.20.3"
# highlight-next-line
commit a0bed2a97dcb1e3b76049be91abf3747f333c975 <-- this is the commit hash
commit 8a7cfd47bde8258c0d91df6a737bf0136699cdf8 <-- this is the commit hash
Author: SheetJS <dev@sheetjs.com>
Date: Thu Apr 4 21:20:28 2024 -0400
Date: Fri Jul 12 11:47:14 2024 -0400
version bump 0.20.2
version bump 0.20.3
```
6) Switch to that commit:
```bash
git checkout a0bed2a97dcb1e3b76049be91abf3747f333c975
git checkout 8a7cfd47bde8258c0d91df6a737bf0136699cdf8
```
7) Run the full build sequence
@ -554,36 +554,36 @@ The checksum for the CDN version can be computed with:
<TabItem value="wsl" label="Windows WSL">
```bash
curl -L https://cdn.sheetjs.com/xlsx-0.20.2/package/dist/xlsx.full.min.js | md5sum -
curl -L https://cdn.sheetjs.com/xlsx-0.20.3/package/dist/xlsx.full.min.js | md5sum -
```
</TabItem>
<TabItem value="osx" label="MacOS">
```bash
curl -k -L https://cdn.sheetjs.com/xlsx-0.20.2/package/dist/xlsx.full.min.js | md5
curl -k -L https://cdn.sheetjs.com/xlsx-0.20.3/package/dist/xlsx.full.min.js | md5
```
</TabItem>
<TabItem value="l" label="Linux">
```bash
curl -L https://cdn.sheetjs.com/xlsx-0.20.2/package/dist/xlsx.full.min.js | md5sum -
curl -L https://cdn.sheetjs.com/xlsx-0.20.3/package/dist/xlsx.full.min.js | md5sum -
```
</TabItem>
</Tabs>
When the demo was last tested on macOS, against version `0.20.2`:
When the demo was last tested on macOS, against version `0.20.3`:
>
```bash
$ md5 dist/xlsx.full.min.js
# highlight-next-line
MD5 (dist/xlsx.full.min.js) = 50d3c495c9358a6196878296d2644eab
$ curl -k -L https://cdn.sheetjs.com/xlsx-0.20.2/package/dist/xlsx.full.min.js | md5
MD5 (dist/xlsx.full.min.js) = 6b3130af1ceadf07caa0ec08af7addff
$ curl -k -L https://cdn.sheetjs.com/xlsx-0.20.3/package/dist/xlsx.full.min.js | md5
# highlight-next-line
50d3c495c9358a6196878296d2644eab
6b3130af1ceadf07caa0ec08af7addff
```
The two hashes should match.

@ -0,0 +1,78 @@
---
title: sheet.lol
sidebar_position: 9
hide_table_of_contents: true
---
import current from '/version.js';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import CodeBlock from '@theme/CodeBlock';
The authoritative source for SheetJS libraries is https://cdn.sheetjs.com .
Unfortunately, some third-party tools do not support the URL pattern for NodeJS
packages hosted on the main distribution point.
https://sheet.lol is a mirror that uses a different URL scheme for NodeJS
packages. The mirror is maintained by SheetJS LLC.
:::info pass
**It is strongly recommended to use https://cdn.sheetjs.com when possible!**
:::
## NodeJS Packages
Package tarballs are available on https://sheet.lol.
<p><a href={"https://sheet.lol/balls/xlsx-" + current + ".tgz"}>{"https://sheet.lol/balls/xlsx-" + current + ".tgz"}</a> is the URL for version {current}</p>
Tarballs can be directly installed using a package manager:
<Tabs groupId="pm">
<TabItem value="npm" label="npm">
<CodeBlock language="bash">{`\
npm rm --save xlsx
npm i --save https://sheet.lol/balls/xlsx-${current}.tgz`}
</CodeBlock>
</TabItem>
<TabItem value="pnpm" label="pnpm">
<CodeBlock language="bash">{`\
pnpm rm xlsx
pnpm install --save https://sheet.lol/balls/xlsx-${current}.tgz`}
</CodeBlock>
</TabItem>
<TabItem value="yarn" label="Yarn" default>
<CodeBlock language="bash">{`\
yarn remove xlsx
yarn add https://sheet.lol/balls/xlsx-${current}.tgz`}
</CodeBlock>
:::caution pass
Newer releases of Yarn may throw an error:
```
Usage Error: It seems you are trying to add a package using a https:... url; we now require package names to be explicitly specified.
Try running the command again with the package name prefixed: yarn add my-package@https:...
```
The workaround is to prepend the URL with `xlsx@`:
<CodeBlock language="bash">{`\
yarn add xlsx@https://sheet.lol/balls/xlsx-${current}.tgz`}
</CodeBlock>
:::
</TabItem>
</Tabs>
:::tip pass
[Watch the repo](https://git.sheetjs.com/SheetJS/sheetjs) or subscribe to the
[RSS feed](https://git.sheetjs.com/sheetjs/sheetjs/tags.rss) to be notified when
new versions are released!
:::

@ -33,7 +33,7 @@
"react-dom": "18.2.0",
"rehype-katex": "7.0.0",
"remark-math": "6.0.0",
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz"
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.3.2"

@ -1,6 +1,6 @@
// @deno-types="https://cdn.sheetjs.com/xlsx-0.20.2/package/types/index.d.ts"
import { read, utils, set_cptable, version } from 'https://cdn.sheetjs.com/xlsx-0.20.2/package/xlsx.mjs';
import * as cptable from 'https://cdn.sheetjs.com/xlsx-0.20.2/package/dist/cpexcel.full.mjs';
// @deno-types="https://cdn.sheetjs.com/xlsx-0.20.3/package/types/index.d.ts"
import { read, utils, set_cptable, version } from 'https://cdn.sheetjs.com/xlsx-0.20.3/package/xlsx.mjs';
import * as cptable from 'https://cdn.sheetjs.com/xlsx-0.20.3/package/dist/cpexcel.full.mjs';
set_cptable(cptable);
import * as Drash from "https://cdn.jsdelivr.net/gh/drashland/drash@v2.8.1/mod.ts";