oficina / sheets Public

Clone
git clone https://amadan.net/oficina/sheets

Plain git — no account needed to clone.

Download

Download this file

1# Vendored grid
2
3Jspreadsheet CE and its one runtime dependency, jsuites. Both MIT — the
4licences are beside the code as `LICENSE.jspreadsheet` and
5`LICENSE.jsuites`.
6
7Vendored, not fetched: spec §6 and AGENTS.md both rule out a CDN and a
8build step. These files are served from this app's own origin, with a
9content hash in the URL, and they change only when somebody runs the
10commands below and commits the result.
11
12## Versions
13
14| File | Package | Version |
15|---|---|---|
16| `jspreadsheet.js`, `jspreadsheet.css` | `jspreadsheet-ce` | 5.0.2 |
17| `jsuites.js`, `jsuites.css` | `jsuites` | 5.13.5 |
18
19jsuites is pinned to the newest **5.x**, not to npm's `latest`. Version
206 is out, and `jspreadsheet-ce@5.0.2` declares `jsuites: ^5.8.5` — so
216.x is a major it has never claimed to work with, and taking `latest`
22would silently cross that line on the next upgrade.
23
24## Upgrading
25
26Re-run this from the repository root, then commit the diff:
27
28```sh
29D=$(mktemp -d)
30JS=5.0.2
31SU=5.13.5
32mkdir -p "$D/js" "$D/su"
33curl -sSL -o "$D/js.tgz" "https://registry.npmjs.org/jspreadsheet-ce/-/jspreadsheet-ce-$JS.tgz"
34curl -sSL -o "$D/su.tgz" "https://registry.npmjs.org/jsuites/-/jsuites-$SU.tgz"
35tar xzf "$D/js.tgz" -C "$D/js"
36tar xzf "$D/su.tgz" -C "$D/su"
37
38V=internal/sheets/static/vendor
39install -m 644 "$D/js/package/dist/index.js" "$V/jspreadsheet.js"
40install -m 644 "$D/js/package/dist/jspreadsheet.css" "$V/jspreadsheet.css"
41install -m 644 "$D/su/package/dist/jsuites.js" "$V/jsuites.js"
42install -m 644 "$D/su/package/dist/jsuites.css" "$V/jsuites.css"
43install -m 644 "$D/js/package/LICENSE" "$V/LICENSE.jspreadsheet"
44install -m 644 "$D/su/package/LICENSE" "$V/LICENSE.jsuites"
45```
46
47Then update the table above, and check two things by hand, because
48nothing else will:
49
501. **Formula evaluation stays off.** `grid.js` never enables it. Our
51 engine computes and the client paints; a client-side evaluator would
52 disagree with the server on the first `SUM(1,2,"3")` — the divergence
53 the formula corpus already documents — and the disagreement would be
54 invisible.
552. **The two files are the only exemptions** in
56 `internal/guardstest/jscap_test.go`. That test caps our own
57 JavaScript at 300 lines and names each vendored blob explicitly, so a
58 third file dropped in here is not silently exempt.
59