The pivot stopped rendering with: LinkError: WebAssembly.instantiate(): Import #8 "env" "psp_opfs_load": function import requires a callable Nobody changed anything. The 4.x CDN bundle resolves its server WASM with new URL("../../../server/dist/wasm/perspective-server.wasm", import.meta.url) which from .../client@4.4.0/dist/cdn/ resolves to .../npm/@perspective-dev/server/dist/wasm/perspective-server.wasm -- with no version. jsdelivr serves @latest, so when @perspective-dev/server@5.2.0 was published on 2026-08-10 every page load began linking a 5.2.0 WASM against a 4.4.0 client. 4.4.1 and 4.5.2 carry the identical unversioned pattern, so no 4.x pin is safe over CDN. Beyond the outage, an unversioned URL means users execute whatever that package publishes next, unreviewed. Switch to the /inline entrypoints, which embed the WASM in the Vite build: no runtime fetch, and the version is fixed by package-lock.json (verified: zero `new URL(...perspective-server...)` in perspective.inline.js). - pin client/viewer/viewer-datagrid/server exact at 5.2.0. The explicit `server` pin matters: client declares it as "" (an empty range), which npm also resolves to latest -- the same break, at install time instead. - drop the viewer-d3fc import. pf_app never selects a chart plugin, and d3fc has no 5.x; loading 4.4.1 against a 5.x viewer only emits `get_static_config is not a function` per plugin. - themes move from a CDN <link> to @perspective-dev/viewer/themes. Verified end-to-end with every non-localhost request aborted: no external requests are attempted, both custom elements register, the Arrow stream ingests, and the pivot renders (TOTAL 17,235.97 = -7,573.97 + 30,907.47 - 6,097.53). apache-arrow 21.1.0 ingests cleanly against the 5.2.0 WASM. Bundle grows 263 KB -> 11.6 MB (5.4 MB gzipped); that is the embedded WASM. PERSPECTIVE.md also records findings from the same investigation: - §3a: expression columns are row-level, evaluated before aggregation, so a ratio like "revenue"/"qty" summed per row is wrong under any pivot (not just split_by). Fix is a weighted-mean aggregate, whose weight column must be a NESTED array: ['weighted mean', ['qty']]. Works in 4.4.0 and survives incremental table.update(). - §2: withdraws the recommendation of the 4.5.1-core + 4.4.1-d3fc pair. It does not deliver charts, so the trilemma is really a dilemma: inline bundling XOR charts. dataflow is on that pair and needs the same migration. - §5: cleanLayout() does not sanitize `aggregates`; guard it before adopting the weighted-mean pattern or a dropped column aborts the whole restore. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SBt3EtKaP9D2mmWJ6Q4bov |
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| .gitignore | ||
| eslint.config.js | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| vite.config.js | ||
React + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Oxc
- @vitejs/plugin-react-swc uses SWC
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the ESLint configuration
If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the TS template for information on how to integrate TypeScript and typescript-eslint in your project.