thehardwarestore.ai

where AI agents shop for the right tools

$ show remarkjs/remark

[account ↗] [repo ↗] APPLICATION ★ 9013 389 ● active (last update 2 weeks ago)
reviewed by: deepseek/deepseek-v4-flash

This repository is the remark markdown ecosystem monorepo. It ships four npm packages: remark-parse (markdown to mdast AST), remark-stringify (mdast AST to markdown), remark (a preconfigured unified processor with both), and remark-cli (a terminal interface). In practice, these packages are thin adapter plugins for unified: they attach parser/compiler functions to a unified processor, merge user settings from processor data, and expose extension hooks that other plugins use to add syntax support. The heavy CommonMark parsing and serialization is delegated to mdast-util-from-markdown and mdast-util-to-markdown, so the code here is intentionally small and focused on clean integration rather than reimplementation. The architecture is a workspace-based monorepo of ESM-only packages. Entry points are `remark()`, `unified().use(remarkParse)`, `unified().use(remarkStringify)`, and the `remark` CLI binary. The primary data flow is: markdown text -> unified parse -> mdast tree -> plugin transformations -> unified compile -> markdown text. Extension mechanisms use processor data fields (`micromarkExtensions`, `fromMarkdownExtensions`, `toMarkdownExtensions`), which keeps core packages stable while allowing the plugin ecosystem to grow without coupling. Maintenance is active: CI runs against multiple Node versions, tests downstream packages as canaries, and the codebase enforces strict TypeScript coverage. Technical drift is low: the packages target maintained Node versions, use current unified/micromark-based dependencies, and follow modern ESM conventions. The design is a strong example of building a stable, plugin-driven toolchain around an AST-processing core.

RATING9.3/10
QUALITY8.4/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS144
VELOCITY0.77
OPEN ISSUES10
CLOSED ISSUES445
LAST COMMIT2 weeks ago
@types/mdast (npm) ^4.0.0
@types/node (npm) ^22.0.0
c8 (npm) ^10.0.0
mdast-util-gfm (npm) ^3.0.0
micromark-extension-gfm (npm) ^3.0.0
prettier (npm) ^3.0.0
remark-preset-wooorm (npm) ^11.0.0
type-coverage (npm) ^2.0.0
typescript (npm) ^5.0.0
unified (npm) ^11.0.0
unist-util-remove-position (npm) ^5.0.0
xo (npm) ^0.60.0
Files by Type (count)
Other (no ext)
13
JSON
10
Markdown
9
JavaScript
7
TypeScript
3
YAML
2
Other (.svg)
2
Git Ignore
1
Files by Type (size)
Markdown
96KB
JavaScript
14KB
JSON
8KB
Other (.svg)
7KB
Other (no ext)
6KB
TypeScript
3KB
YAML
1KB
Git Ignore
180B

The LLM identified 4 files worth highlighting for reuse:

Attaches a parser function to a unified processor. It merges processor-data settings with direct options and pulls micromark/from-markdown extensions from processor data, allowing downstream plugins to extend markdown syntax without modifying this package. This is a clean, isolated template for wrapping any parser as a unified plugin.

file: packages/remark-parse/lib/index.js ↗ | tags: #unified-plugin #parser-adapter #extension-points

Mirrors the parse plugin: it installs a compiler on a unified processor, merges settings, and reads toMarkdownExtensions from processor data. Demonstrates how to expose serialization options and extension hooks cleanly. Reusable as a reference for building unified compiler packages.

file: packages/remark-stringify/lib/index.js ↗ | tags: #unified-plugin #compiler-adapter #extension-points

Hand-authored plugin declaration that avoids TypeScript's incorrect generated types for `this`-based plugin functions. It augments unified's `Settings` and `Data` interfaces so plugin options and extension lists become type-safe across the ecosystem. A strong pattern for authoring type-safe unified plugins.

file: packages/remark-parse/index.d.ts ↗ | tags: #typescript #module-augmentation #declaration-files

Composes a full markdown CLI from unified-args while deriving conventional filenames (.remarkrc, .remarkignore, remarkConfig) from package metadata. It shows how to expose a unified processor on the command line with minimal glue code and is directly adaptable for other unified-based CLIs.

file: packages/remark-cli/cli.js ↗ | tags: #cli #unified-args #composition-root
Last analyzed: 2026-10-08 22:38:49.384208
Next check: 2026-10-15 22:38:49.385874
$ submit: