Repository navigation
Metaplate v0.8.1
Metaplate v0.8.1
Metaplate 0.8.1 closes the gaps found by putting 0.8.0 into production on a real Next.js static export. Three new render guards catch text that sits in a crop strip, crowds other text, or runs under a photo. --require-content now checks JPEG cards. verify takes directories and globs, so it works in npm scripts on Windows, and runCli runs any command from a script without a shell. verify-page reads the twitter:image type and size that Next.js emits, and stops warning about formats it has already measured.
Upgrade recommendation: Recommended for every 0.8.0 user. The
satoripeer floor rises to 0.38.2: if your project pins an older Satori, upgrade it first (see Breaking changes).
Why upgrade
- Catch broken cards that stay inside the canvas.
overflowonly sees text that leaves the image. The newsafeArea,textOverlap, andavoidguards fail a footer pushed into the strip X's 2:1 crop removes, a line crowding the one below it, and a headline running under a photo. - Check JPEG cards after the build. The rendering guide recommends JPEG for photographic cards, and
--require-contentnow decodes JPEG as well as PNG, so a blank JPEG card fails the build. - See what a dependency upgrade changed. Guards say nothing is broken, not that nothing moved.
metaplate verify --baselinecompares every card with a saved copy and fails the ones that changed, with a picture of each change, so a Satori, Resvg, or font upgrade cannot quietly shift every card. - Verify every card from any shell, or from code.
metaplate verify out/ogandmetaplate verify "out/og/*/og-image.jpg"work in npm scripts on Windows, wherecmd.exeexpands nothing.runClifrommetaplate/cliruns the same commands in-process.
Highlights
Render guards
safeAreareports text outside the area that the centered 2:1 crop (Xsummary_large_image) and the 1.91:1 crop (Open Graph) both keep. For 1200x630 that removes 15px from the top and bottom, the same cropsmetaplate previewoverlays.{ level, inset }sets your own margin instead.textOverlapreports two text elements whose boxes intersect.avoid: { level, keys, gap }reports text withingappixels of an element whose Reactkeyis listed, such askey="photo"on an<img>.- All three run in
createSvgOg,createNodeOg, andcreateEdgeOg, and each issue lists the text and its box. See Render guards. metaplate/nodeandmetaplate/edgenow export theSatoriOptionsandSatoriLayoutNodetypes, sosatori: { onNodeDetected }no longer needs a cast to Satori's ownSatoriOptions, which requireswidth,height, andfonts.
Image and page checks
verify --baseline DIRcompares cards with a baseline. Each PNG or JPEG is matched with the file at the same relative path inDIR. A card fails when more of its pixels changed than--max-diffallows (default 0), when it has no baseline, or when a baseline file has no card.--thresholdsets how far a channel may move before a pixel counts as changed: 0 for PNG by default, and 16 when either side is a JPEG, so re-encoding noise does not count.--write-diff DIRwrites the baseline, the current card, and the changed pixels in red side by side, and--update-baselinerewrites the baseline after review.compareImagesfrommetaplate/noderuns the same comparison in tests. JPEGs are fully decoded with no new dependency, within a few levels of libjpeg. See Compare against a baseline.--require-contentdecodes JPEG. Baseline and progressive Huffman JPEGs are supported, with any chroma subsampling, restart markers, grayscale, and Adobe CMYK, and no new dependency. A JPEG fails only when every 8x8 block of every channel holds the same flat value, so a card with any detail never fails. WebP and GIF still fail with the flag, and that error now points to the plate'sguards: { blank: "error" }. See Require visible content.verifytakes directories and globs. A directory stands for every image file below it (limited to--formatwhen given). Globs support*,?,**,[...], and{a,b}. Files are checked in sorted order, once each. See Directories and globs.metaplate/cli(new entry) exportsrunCli(args, { stdout, stderr }). It resolves to the exit code, leavesprocess.exitCodealone, and keeps concurrent calls apart. See Run the CLI from a script.verify-pagereadstwitter:image:type,:width, and:height. Next.js metadata emits them for a JPEG plate, and they are now checked against the fetched bytes like theog:image:*properties. When a page declares no type, target format rules read the fetched bytes instead of warning that compatibility "cannot be confirmed". See Page audits.
Breaking changes
-
The
satoripeer range is now>=0.38.2 <1(was>=0.33.3 <1). Releases below 0.38.2 drop content without an error, and no guard can see it:- before 0.38.2,
insetis ignored, so aninset: 0overlay collapses to 0x0; - through 0.35.1,
color: "transparent"text, the usual way to draw outline type withWebkitTextStroke, draws nothing; - 0.35.2 to 0.37.0 fail on import under Node ESM;
- before 0.38.2, a fragment is laid out as a box of its own.
Each was checked on Satori 0.33.5 through 0.63.2. This is a peer contract change in a patch release; a project on an older Satori gets a peer-dependency warning (or an
ERESOLVEerror under strict peers) until it upgrades. - before 0.38.2,
-
verify-pagetarget format results change for undeclared types. A page with noog:image:typenow passesuniversalwhen the fetched image is PNG or JPEG (it was an error), andxnow fails an undeclared SVG (it was a warning).socialImageCompatibilityandverifySocialImageare unchanged.
Upgrade advice: run npm install satori@0.63 if npm ls satori shows a release below 0.38.2. Then re-run your verify-page --target checks once.
Install or upgrade
npm install metaplate@0.8.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 changes: satori rises to >=0.38.2 <1 (audited release 0.63.2). @resvg/resvg-wasm and next stay optional and unchanged.
New entry point: metaplate/cli.
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, 1,341 tests, the build, and the package dry run.npm run check:packageinstalls the exact local tarball into clean consumers and builds, serves, and fetches images from every framework fixture.- The full JPEG decode behind
--baselinewas compared with libjpeg (Pillow) on baseline 4:2:0, progressive 4:2:2, 4:4:4, and grayscale images: every channel of every pixel was within 4 levels, and the test suite checks two of those against libjpeg's own output. - The JPEG content check was compared with libjpeg (Pillow) on 400 random JPEGs: baseline and progressive, every chroma subsampling, grayscale, CMYK, and restart intervals, flat and with one changed pixel. It agreed on every file.
- Socket baseline. It is the Socket CLI deep score of the published
metaplate@0.8.0, captured 2026-11-03. The package scores 78 overall; its own alerts arerecentlyPublished(medium) andurlStrings(low). The same two high dependency alerts as 0.8.0 carry time-bounded dispositions that expire 2027-04-30:string.prototype.codepointat, under the Satori peer, andtslib@2.9.1's ownership change, reached only through optional and development dependencies. Socket scores only published packages, so 0.8.1 is scored after publication. - Hosted deployments. After publication, the Vercel, Netlify, and Deno Deploy fixtures are redeployed with the published 0.8.1 and checked for status, media type, dimensions, response headers, distinct bytes per slug, and non-blank content. That evidence is recorded in
.planning/hosted-evidence/. - npm registry signature and SLSA provenance verification run after publication, against the published artifact.
Documentation and support
- README and API reference
- Render guards
- Compare against a baseline
- Verification and page audits
- Next.js
generateMetadata - X Cards markup
- Satori releases
- Release process
- npm package
- Report a problem