Skip to content

Metaplate v0.8.0

Choose a tag to compare

@github-actions github-actions released this 02 Nov 06:52
· 133 commits to main since this release

Metaplate v0.8.0

Metaplate 0.8 is the largest release so far. Plates now render on Deno-based edge runtimes, write and verify static files from one command, cache their renders, and guard against blank or broken cards. Metadata gains page tags, X player and app cards, Open Graph video and audio, JSON-LD, Adaptive Cards, versioned and signed image URLs, and a live preview. metaplate verify-page audits a deployed page the way crawlers read it. Hosted deployments on Vercel, Netlify, and Deno Deploy are certified for the first time.

No export is removed and every 0.7 plate keeps rendering, but a few checks are stricter (see Breaking changes).

Upgrade recommendation: Recommended for every 0.7 user. Read the behavior changes below if you rely on socialImageCompatibility results for discord or x, on font loaders accepting unusual bytes, or on raw characters in relative image paths.

Why upgrade

  • Run where your site runs. metaplate/edge renders through @resvg/resvg-wasm on Deno-based edges (hosted-certified on Netlify Edge Functions and Deno Deploy). The satori peer range widens from >=0.33.3 <0.34 to >=0.33.3 <1, so a current Satori no longer conflicts.
  • Ship static cards safely. metaplate render writes every page and size, verifies each file on disk, and records a manifest that a failed run never leaves stale.
  • Catch broken cards before crawlers do.
    • Render guards fail a card with overflowing text, missing glyphs, or a single color.
    • verify-page audits a deployed page's tags, images, and robots.txt access for each platform.
    • The compatibility profiles now encode Discord's and X's documented image rules.
  • Describe everything platforms read:
    • page-level Open Graph and article: tags;
    • X player and app cards;
    • Open Graph video and audio;
    • Schema.org JSON-LD;
    • Teams Adaptive Cards.

Highlights

Rendering

  • Edge runtimes. metaplate/edge (new entry) renders PNG through @resvg/resvg-wasm and Satori's standalone build.
    • The caller supplies both Wasm modules.
    • It is hosted-certified on Netlify Edge Functions and Deno Deploy.
    • Cloudflare Workers and Vercel Edge forbid compiling Wasm at run time and are not supported.
    • See Edge runtimes.
  • Render guards (guards: { overflow, missingGlyphs, blank }) report or fail a render whose text leaves the canvas, whose text no font covers, or whose image is a single color. RenderGuardError names the problem.
  • Render caching.
    • plate.cached() renders each distinct copy once. It serves strong ETags with 304/412 handling, through a bounded LRU or your own store.
    • metaplate render --incremental reuses files whose inputs and bytes are unchanged.
  • Images and assets.
    • Plate components may be async.
    • imageAsset and imageAssetLoader embed checked image bytes.
    • The new metaplate/assets entry reads project files and allowlisted remote images.
  • Emoji render as images from an installed set (packageEmojiLoader) or from bytes you serve (metaplate/emoji, a new entry).
  • Other scripts. languageFonts renders Japanese, Korean, Chinese, Arabic, Hebrew, Thai, Devanagari, and more from installed Fontsource packages, offline. Before, that text drew missing-glyph boxes.
  • Size variants. One plate can declare square and landscape sizes, with per-size paths, alt text, and metadata.

Static files and preview

  • metaplate render <module> renders every page and size of a render module into --out. It verifies each file's hash, format, and dimensions as read back from disk, and writes metaplate-manifest.json atomically.
    • A failing run removes the old manifest.
    • A file whose extension would make a static host serve the wrong type is refused.
    • See Render CLI.
  • metaplate preview <module> serves a live local gallery: every page and size, with its metadata, verification results, Satori debug boxes, and crop overlays. It reloads when the module changes.

Metadata and URLs

  • Page tags. socialMetaTags and socialMetaHtml serialize validated page-level fields (title, description, URL, locale, article: times and tags, theme-color). metaplate/next maps them to Next's Metadata and Viewport.
  • X player and app cards, Open Graph video and audio, Schema.org JSON-LD (socialImageJsonLd), and Teams Adaptive Cards (socialImageAdaptiveCard).
  • Versioned image URLs. version: "copy" adds a content-derived ?v= token so crawlers refetch a changed card. revision covers changes the copy can't show.
  • Signed image routes. signImagePath and verifyImageSignature (HMAC-SHA-256 via Web Crypto, with secret rotation) stop anyone else from rendering arbitrary copy on your route.

Image and page checks

  • metaplate verify-url fetches a deployed image through a hardened fetcher and runs the same checks as verify. The fetcher:
    • blocks private addresses and pins DNS;
    • checks redirects, byte limits, and timeouts;
    • decodes gzip, deflate, and br bodies.
  • metaplate verify-page audits a deployed page:
    • It reads the page's social tags with a parser that follows the HTML spec closely.
    • It verifies every image the page names.
    • It checks each platform crawler's robots.txt access (RFC 9309).
    • It warns when tags sit past a crawler's read limit.
  • Compatibility profiles.
    • New targets: teams, whatsapp, bluesky, telegram, threads, and pinterest.
    • discord and x now check those platforms' documented image rules.
    • --require-content fails a blank PNG.

Deployment evidence

  • Hosted certifications, all dated 2026-11-01:
    • Vercel Functions (Node.js runtime);
    • Next.js 16.4.3 on Vercel;
    • Netlify Functions and Netlify Edge Functions;
    • Deno Deploy (both renderers);
    • Bun and Deno runtime smokes of the packed tarball, now required CI checks.
  • Local packed-artifact fixtures:
    • Next.js static export and next start;
    • Astro static and @astrojs/node server;
    • React Router 8 resource routes;
    • SvelteKit 3 +server routes;
    • Express;
    • an edge consumer.
  • See Framework and runtime support and Deployment.

Fixes

  • metaplate/next now imports next/og.js, so it works in plain Node (scripts and test runners that don't bundle) and under NodeNext types.
  • An SVG with a fractional size no longer fails verifySocialImage and verify-page.
  • A trailing --size or --format that no file follows is an error instead of being ignored.
  • metaplate <command> --help succeeds.

Breaking changes

No export is removed and no signature narrows. These behavior changes can alter the results of existing calls:

  • Font loaders reject non-font bytes. Every loader throws a TypeError for bytes that are not TrueType, OpenType, WOFF, or WOFF2, where Satori used to render the text as nothing. A failed font fetch (an HTML error page, an empty body) now fails the render instead of caching a blank card.
  • discord checks formats. It now requires PNG, GIF, JPEG, WebP, or AVIF instead of reporting an unknown contract.
  • x checks X's Card image rules. It now requires JPG, PNG, WEBP, or GIF (SVG fails), under 5MB, 144x144 to 4096x4096 pixels, and alt text of at most 420 characters. Before, it checked only the URL and alt text.
  • Relative image paths are percent-encoded. socialImagePath without an origin now encodes spaces, control characters, and non-ASCII, exactly as the absolute URL always did. A route such as /a b now yields /a%20b/og-image.

Upgrade advice: run your existing socialImageCompatibility and metaplate verify --target checks once after upgrading. If x now fails an SVG card, render PNG or JPEG for it.

Install or upgrade

npm install metaplate@0.8.0

That 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 widens to >=0.33.3 <1. The audited release is 0.63.2; metaplate/edge needs 0.35.2 or newer. To move an existing project to the audited line, run npm install satori@0.63.
  • @resvg/resvg-wasm (>=2.6.2 <3) is a new optional peer, needed only by metaplate/edge: npm install @resvg/resvg-wasm.
  • next (>=16.3.2 <17) stays optional and is still supplied by Next applications.

New entry points: metaplate/edge, metaplate/emoji, and metaplate/assets.

Verification

  • npm run check passes:

    • lint;
    • a zero-tolerance duplication scan;
    • workflow pin policy;
    • dependency inventory and Socket disposition policy;
    • deployment evidence policy;
    • release-note validation;
    • source and example type checks;
    • 1,286 tests;
    • build;
    • the package dry run.
  • npm run check:package installs the exact local tarball into clean consumers. It then builds, serves, and fetches images from every fixture listed above, and runs metaplate/next in plain Node.

  • npm run release:evidence re-runs the build, packed-artifact, inventory, deployment, Socket, and workflow checks, records each result with its output, and binds the bundle, including every artifact's SHA-256, to the release commit.

  • Hosted certifications. These ran on 2026-11-01 from pre-release 0.8.0 tarballs, packed at commits 4135f77 (Vercel), 4b04f90 and 697f6f7 (Netlify), and 36be0e9 (Deno Deploy). Each recorded:

    • status, media type, and dimensions;
    • response headers;
    • distinct bytes per slug;
    • a decoded check that each image is not blank.

    Raw outputs are in .planning/hosted-evidence/. Changes made after those dates are covered by the packed-artifact fixtures and the Bun and Deno smokes, which run on every commit, not by new hosted deployments.

  • Socket baseline. It is the Socket CLI deep score of the published metaplate@0.7.0, captured 2026-10-31. The package itself scores 80 overall with no alerts. Its two high dependency alerts carry time-bounded dispositions that expire 2027-04-30:

    • string.prototype.codepointat, under the Satori peer;
    • tslib@2.9.1's ownership change, reached only through the optional next peer.

    Socket scores only published packages, so 0.8.0 is scored after publication. npm audit is not a substitute for Socket's behavioral analysis.

  • Dependabot alert #68 (deepmerge prototype poisoning, no patched release) is dismissed as tolerable risk. deepmerge is reached only through @sveltejs/vite-plugin-svelte, a development dependency of the SvelteKit fixture, where it merges the fixture's own configuration. It is not in the published package or its peers.

  • npm registry signature and SLSA provenance verification run after publication, against the published artifact.

Documentation and support

Full changelog