
Security News
npm Tooling Bug Incorrectly Marks One-Character Packages as Security Holders
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.
@weave-md/parse
Advanced tools
AST generation and serialization for Weave Markdown - parse markdown strings to WeaveAst and stringify back to Markdown.
@weave-md/parse provides the core parsing functionality for Weave Markdown:
weave-ast.schema.jsonThis package intentionally does not:
@weave-md/basic for that)@weave-md/basic for that)@weave-md/validate for that)pnpm add @weave-md/parse @weave-md/core
This package provides two parsing functions:
parseWeaveDocument(markdown) - Fast synchronous parser for simple use cases. Does not support extensions or plugins.parseWeaveDocumentAsync(markdown, options) - Full-featured async parser that supports custom syntax extensions and remark plugins (which may perform async operations).Use the sync version when you just need to parse standard Weave Markdown. Use the async version when you need custom extensions, plugins, or strict mode.
import { parseWeaveDocument } from '@weave-md/parse'
const markdown = `---
id: intro
title: Introduction
---
See [next section](node:next).
`
const ast = parseWeaveDocument(markdown)
console.log(ast.sections) // [{ id: 'intro', title: 'Introduction', body: '...' }]
console.log(ast.links) // [{ ref: { id: 'next' }, sourceId: 'intro', ... }]
import { parseToMdast } from '@weave-md/parse'
const { tree, frontmatter, diagnostics } = parseToMdast(markdown)
// tree is an mdast Root with Weave node types (weaveNodeLink, weaveMathBlock, etc.)
// frontmatter is { id, title?, peek? }
// diagnostics contains any parse-time warnings/errors
import { parseToMdast, stringifyWeaveDocument } from '@weave-md/parse'
const { tree, frontmatter } = parseToMdast(markdown)
// Modify the tree...
const output = stringifyWeaveDocument({ tree, frontmatter })
import { parseWeaveDocumentAsync } from '@weave-md/parse'
const ast = await parseWeaveDocumentAsync(markdown, {
extensions: [myCustomExtension],
plugins: [myRemarkPlugin],
strict: true // throws on errors
})
@weave-md/parse performs parse-time validation - checking syntax and structure as it parses:
id field?For document-level validation (broken references, duplicate IDs across files), use @weave-md/validate.
@weave-md/core - Core types and helpers (peer dependency)micromark + mdast-util-from-markdown - Markdown parsingmdast-util-to-markdown - Markdown stringificationMIT
FAQs
AST generation for Weave Markdown - parse markdown to WeaveAst
The npm package @weave-md/parse receives a total of 7 weekly downloads. As such, @weave-md/parse popularity was classified as not popular.
We found that @weave-md/parse 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.

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

Research
/Security News
Newer packages in this compromise use native extensions and .pth loaders to execute JavaScript stealers in developer environments.

Research
Socket found 37 malicious PyPI wheels that abuse Python startup hooks to launch a Bun-powered credential stealer tied to Mini Shai-Hulud/Miasma.