
Company News
Andrew Becherer Joins Socket as Chief Information Security Officer
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.
@weave-md/validate
Advanced tools
Format conformance validator for Weave Markdown - lightweight for editor/CI use.
@weave-md/validate validates Weave Markdown documents against the format specification:
image blocks (requires file, warns about missing alt, validates width options)gallery blocks (requires files array, warns about missing alt)audio blocks (requires file, validates boolean autoplay, controls, loop)video blocks (requires file, validates start number and boolean options)embed blocks (requires url)math blocks (validates non-empty content)pre blocks (warns about empty content)id field and optional title, peeknode: URLs from markdown links and validates URL format:math[...] syntax for proper bracket closure and non-empty contentThis package intentionally does not:
It's designed to be fast and lightweight for use in editors and CI pipelines.
pnpm add @weave-md/validate
# Validate a workspace
weave-md-validate ./path/to/content
# Output JSON for CI integration
weave-md-validate ./path/to/content --format json
Note: CLI tool is planned but not yet implemented
import {
parseFrontmatter,
extractNodeLinks,
validateSections,
validateWeaveBlocks,
validateInlineSyntax,
validateReferences,
formatDiagnostics
} from '@weave-md/validate';
const content = `---
id: intro
title: Introduction
---
See [next section](node:next).
\`\`\`image
file: photo.jpg
alt: A photo
width: wide
\`\`\`
:math[ x^2 + y^2 = z^2 ]
`;
// Parse and validate frontmatter
const { frontmatter, body, diagnostics: fmDiagnostics } = parseFrontmatter(content);
// Extract and validate node links
const { links, errors: linkErrors } = extractNodeLinks(body);
// Validate Weave blocks
const blockDiagnostics = validateWeaveBlocks(content);
// Validate inline syntax
const inlineDiagnostics = validateInlineSyntax(content);
// Format all diagnostics
const allDiagnostics = [...fmDiagnostics, ...linkErrors, ...blockDiagnostics, ...inlineDiagnostics];
console.log(formatDiagnostics(allDiagnostics));
@weave-md/core - Core types and helpers (peer dependency)@weave-md/parse - Full AST generation with parse-time validation@weave-md/basic - CLI and rendering (uses both parse and validate)@weave-md/core - Core types and helpersyaml - YAML parsingMIT
FAQs
Reference validation for Weave Markdown
The npm package @weave-md/validate receives a total of 9 weekly downloads. As such, @weave-md/validate popularity was classified as not popular.
We found that @weave-md/validate demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.

Company News
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.

Security News
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.