Repository navigation
Metaplate v0.9.1
Metaplate v0.9.1
Metaplate 0.9.1 makes metaplate render --incremental safe for cards that draw image files. Until now, a card whose artwork or product photo changed under the same path was reused with the old image, because only the copy, the plate's code, and its fonts were part of the cache key. Each card now records the files it read and their contents, and renders again when one changes, and metaplate preview reloads when one of them is edited. The audited Satori release also moves to 0.64.3, which includes a security fix in a Satori dependency.
Upgrade recommendation: Recommended for everyone who uses
metaplate render --incremental, and for anyone who wants the patched Satori. There is no migration. The first--incrementalbuild after upgrading renders every image once, and Satori 0.64 can move a card by about a pixel, so compare your cards as the upgrade guide describes.
Why upgrade
- No more stale cards from changed image files. Re-exporting an SVG or re-cutting a product photo kept its path, so
--incrementalreported every card unchanged and shipped the old picture. Cards that draw files throughreadImageAssetorfileImageLoadernow render again when those files change, with no new configuration. - A way to declare files read with plain
fs. A plate that reads a file itself can list it in the newinputsoption, and--incrementalwatches it the same way. - A preview that sees image edits.
metaplate previewreloaded only when code changed, so a re-exported logo or a new product photo stayed stale in the gallery until you saved a source file. It now reloads when any file a card read changes. - Patched Satori. A fresh install now selects Satori 0.64.3, which moves to a patched
fflate. Thesatoripeer range is unchanged.
Highlights
Incremental builds that see image files
- Each manifest entry gains
inputs: the files the card read while it rendered, with the SHA-256 of their contents.--incrementalreuses a card only while every one of those files still has that hash; a changed or deleted file renders the card again. See Files a card reads. readImageAssetandfileImageLoaderfrommetaplate/assetsrecord each file for the card being rendered, including afileImageLoadercall answered from memory. A file read while the render module loads, such as a logo read at its top level, counts for every card, and a card is not reused when this run's top-level reads differ from the ones it recorded. Renders running at once in one process, throughrunClifrommetaplate/cli, keep each card's files apart, and a later render in the same process still counts the module's top-level reads.createNodeOg,createEdgeOg, andcreateTakumiOgtakeinputs: (copy) => pathsfor files the plate reads withfs. A listed file that cannot be read fails that card, with the reason and where relative paths resolve. Plates gain a matchinginputs(copy)member, andRenderInputsOptionis exported frommetaplate/node,metaplate/edge, andmetaplate/takumi.- Paths are written relative to the directory the command runs in, with
../for a file outside it, so cards are reused across checkouts; only a file on another Windows drive or a UNC path keeps its absolute path. The manifest is published with your site unless--manifestpoints outside--out, so keep it there if image file names are private. - Upgrading
takumi-jsnow rendersmetaplate/takumiplates again. Before,--incrementalhashed the Satori and Resvg versions but not Takumi's, and reused every card. - Still outside the cache key, as the guide explains: remote images, files read with
fsthatinputsdoes not list, and a promise the plate caches itself, which records its file only for the first card. Raise the plate'srevisionfor those. A render repeated in one process draws the bytes its loaders already hold; the next build in a fresh process renders the changed card again.
A preview that reloads on image edits
metaplate previewwatches the files a card reads throughreadImageAssetandfileImageLoader, and the files the plate'sinputsoption names, the same files--incrementalrecords. A file the module reads at its top level is watched as soon as it loads; a card's files join the watch once it renders. A fileinputsnames is watched even before it exists, so creating it reloads the gallery. See Reloading.- The reload imports the module afresh, so a
fileImageLoaderit creates draws the new bytes. A directory keeps one file watch however many cards read from it, and aninputsthat returns something other than file paths fails that card with the messagemetaplate rendergives.
Satori 0.64.3
- Satori 0.64 lays out at 1/64 px and snaps box edges and text baselines to device pixels, as Chrome does, so a card can differ from its 0.63 rendering by about a pixel. Satori 0.64.1 moves to
fflate0.7.5 (GHSA-px8p-9vwx-vf98). - The tests that pin each render guard to Satori's real behavior, and the parity budget that holds
metaplate/takumitometaplate/node, pass on it. Runnpm install satori@0.64to move an existing project.
Breaking changes
None.
Manifests written by earlier versions have no inputs, so the first --incremental build after upgrading renders every image once. See Upgrading.
Install or upgrade
npm install metaplate@0.9.1That single command still includes the framework-neutral SVG and PNG renderer: npm 7+ and pnpm 8+ install the satori, @resvg/resvg-js, and react peers. Yarn needs them added explicitly. Node.js 20 or newer is required. Peer ranges are unchanged.
Verification
npm run checkpasses: lint, the duplication scan, workflow pin policy, dependency inventory and Socket disposition policy, deployment evidence policy, release-note validation, source and example type checks, the full test suite, the build, and the package dry run.npm run check:packageinstalls the packed tarball into fresh consumers, with Satori 0.64.3 selected, and builds and serves the Next.js, Astro, React Router, SvelteKit, Express, and edge fixtures from it.- The incremental fix is covered end to end through the spawned CLI, including files read at module load, renders running at once and one after another in one process, a deleted input, manifest paths on Windows, and a real
createNodeOgplate drawing a changed SVG. The reproduction from issue #229 was confirmed against the built package, and an independent pre-release review of everything since 0.9.0 found no release blocker. Its findings are fixed or documented in this release, including makingmetaplate previewreload when an image file changes. The preview change is tested against a spawned CLI whose card shows the bytes of the file it reads. npm audit --audit-level=highreports no vulnerabilities.- Socket baseline. It is the Socket CLI deep score of the published
metaplate@0.9.0, captured 2026-12-02. The package scores 79 overall, and its own alerts areunpopularPackage(medium) andurlStrings(low). Two high dependency alerts carry time-bounded dispositions that expire 2027-04-30.string.prototype.codepointat, under the Satori peer, carries over: Satori 0.64.3 still reaches it through@shuding/opentype.js.obfuscatedFilenow namescaniuse-lite@1.0.30001829, reached only through the optionalnextpeer and development tooling. A tarball diff against the reviewed 1.0.30001828 shows only its version and ten packed data files changed, with every decoder byte-identical, and it was published through npm trusted publishing with SLSA provenance. There are no critical alerts. The deep score raises no alert on the optionaltakumi-jspeer, but Socket's export does not list the packages it resolved, so it does not show whether that peer was scored. - npm registry signature and SLSA provenance verification run after publication, against the published artifact.
Documentation and support
- README and Upgrading
- Incremental builds, Previewing plates, and Project files with
metaplate/assets - Satori releases
- Release process
- npm package
- Report a problem