Skip to content

File Viewer v3.0.1

Choose a tag to compare

@wybaby168 wybaby168 released this 05 Sep 03:42

File Viewer v3.0.1

A patch release aimed at the install path and the two format reports that were open since 3.0.0. Nothing here changes the published format matrix, the Full package API, or the offline asset contract.

Highlights

  • @file-viewer/vue3 no longer installs its own Vue. vue moved to peerDependencies: ">=3.3 <4", matching the Vue 2.6/2.7, React, Svelte and jQuery components. Apps that pinned a different Vue 3 previously got two Vue copies and crashed on mount with Cannot read properties of null (reading 'refs'). A new host-runtime contract gate plus a cold-install check on the resolved framework path keep the three Vue lines from overlapping again.
  • vite build no longer fails on the PDF CJK font (#242). @file-viewer/vite-plugin has listed pdf assets as required since 2.4, and 2.4 built only because @fontsource-variable/noto-sans-sc was then a runtime dependency of @file-viewer/renderer-pdf. 3.0.0 moved that font to devDependencies, so an installed app had no source to copy and copyAssets aborted the build on pdf:pdf-cjk-font-fallback. In 3.0.1 preset-office and preset-all declare the font and preset-standard takes it from @file-viewer/assets-standard, the published renderer tarball carries no font copy, and with no font source installed the asset is optional, so the build warns instead of failing. pnpm test:pdf-cjk-font-github-242 keeps that shape in CI.
  • Two new renderers. @file-viewer/renderer-chm unpacks CHM help files in the browser through Rust/WASM with a sandboxed reader for the outline, body and images. @file-viewer/renderer-design previews Adobe design files offline: PSD/PSB layers, native Illustrator PGF plus the PDF compatibility surface, IDML/ICML/INX, INDD/XD, and modern XFL. Both are explicit on-demand packages; their Worker, WASM and font assets stay self-hostable.
  • Readable text preview (#235). text.wrapLongLines wraps by logical line on both the plain and virtual text paths, and text.prettyPrint loads Prettier parsers per format with an original-source toggle. Oversized, failing or unsupported input falls back without an error, and downloads still return the original bytes.
  • EML header correctness (#232). The parser baseline moves to postal-mime@3.0.0: undeclared part charsets fall back to the header encoding, folded RFC 5322 headers unfold completely, duplicated headers are first-wins, and to/cc/bcc keep their original order. test:email-github-232 locks those behaviours against one real EML through the renderer's own parse path.
  • @xmldom/xmldom 0.9.10 is gone from the graph (#246). The published advisory that covers it is GHSA-6gmq-8vp8-gcm6 (>= 0.9.0, <= 0.9.11, patched in 0.9.12), and the upstream 0.9.11 and 0.9.12 security releases also fix further parse-path injection and ReDoS issues, three of them named as reachable from DOMParser.parseFromString. A workspace override pins the whole graph to 0.9.12, including the @ljheee/xmind-parser path that previously resolved 0.9.10. The public boundary and install gates verify the override applies, and the XMind renderer was smoke-tested on a real .xmind file at 0.9.12.
  • CLI interaction. The new-project format step now lists renderer and format families with their check state, accepts numbers, ranges, select-all and clear, and no longer asks you to type extensions. Vite 8 scaffolds declare and check Node ^20.19.0 || >=22.12.0, and Web Component events are created in the element's own document realm.

Release composition

88 npm targets are frozen from this commit: 87 mainline packages at 3.0.1 and the historical msdoc-viewer alias at 0.2.5, which follows the resolved @file-viewer/doc version. The external engines stay pinned at @file-viewer/docx@0.3.28 and styled-exceljs@0.21.4. Every asset below was produced by the same frozen build, test, security-gate, cold-install, browser and npm publish --dry-run pass; the publish step never rebuilds or repacks.

Upgrade

npm create file-viewer@3.0.1 my-viewer
pnpm add @file-viewer/vue3-full@3.0.1