Skip to content

fix(md): pin markdown-it-attrs to ^4.5.0 - #262

Merged
Brooooooklyn merged 1 commit into
mainfrom
fix/md-markdown-it-attrs-peer
Jul 7, 2026
Merged

Brooooooklyn merged 1 commit into
mainfrom
fix/md-markdown-it-attrs-peer

Conversation

@Brooooooklyn

@Brooooooklyn Brooooooklyn commented Jul 7, 2026 •

Copy link
Copy Markdown
Member

Problem

Consumers of @void/md@0.10.6 that don't have markdown-it in their tree fail to build:

error during build: Build failed with 95 errors:
Error: Cannot find module 'markdown-it'
  - node_modules/markdown-it-attrs/index.js

(Real failure on napi.rs website main: run #28873381156.)

Root cause

#256 "Update deps" bumped markdown-it-attrs ^4.3.1 → ^5.0.0. That major added a top-level require('markdown-it'):

// markdown-it-attrs@5.0.0/index.js
const createMarkdownIt = require('markdown-it');        // line 3, module load
...
const defaultFence = createMarkdownIt().renderer.rules.fence;   // line 112, only for the new `fenceAttrsOnPre` option

@void/md ships the markdown-exit fork and no markdown-it, so this previously-optional peer became a hard, unresolvable dependency for any consumer that doesn't happen to have markdown-it installed.

Why CI was green: void's monorepo resolves markdown-it@14.1.1 from other tooling, silently satisfying the peer. Downstream consumers (yarn/npm without markdown-it) don't get that, so they explode on install → build.

Fix

Pin markdown-it-attrs back to ^4.5.0 — the version void shipped through 0.10.5.

4.5.0 5.0.0
top-level require('markdown-it') ❌ (only JSDoc @typedef) ✅ line 3
{.class #id} / curly_attributes rule identical identical
fenceAttrsOnPre option n/a new — void never uses it

void applies attrs to its own markdown-exit instance and installs its own shiki fence renderer, so no 5.x behavior is lost.

Validation

  • ✅ @void/md build (vp pack) — clean
  • ✅ md unit tests 30/30 (compile / plugins / metadata), incl. compile('Hello {.greeting}') and the {1,3-5} fence line-highlight test
  • ✅ lockfile: 0 remaining refs to markdown-it-attrs@5

⚠️ Renovate will try to re-bump this to ^5.0.0. Consider a renovate ignore/rule so it doesn't regress, or migrate @void/md off the markdown-exit fork for attrs. Staying on markdown-exit means attrs must not hard-require markdown-it.

🤖 Generated with Claude Code


Note

Low Risk
Dependency downgrade only; attrs behavior used by void ({.class}) matches 4.5.0, with no application code changes.

Overview
Downgrades markdown-it-attrs from ^5.0.0 to ^4.5.0 in @void/md so consumers without markdown-it in their dependency tree can build again. Version 5.x loads markdown-it at module init; this package compiles with markdown-exit and does not ship markdown-it, which caused Cannot find module 'markdown-it' for downstream apps.

The lockfile is refreshed for the new attrs version; unrelated resolution/tarball metadata churn in pnpm-lock.yaml is incidental.

Reviewed by Cursor Bugbot for commit fa6ef09. Bugbot is set up for automated code reviews on this repo. Configure here.

markdown-it-attrs@5.0.0 added a top-level `require('markdown-it')` (used only
for its new `fenceAttrsOnPre` option), turning the previously-optional
`markdown-it` peer into a hard dependency. @void/md ships the markdown-exit
fork and no markdown-it, so any consumer without markdown-it in its tree fails
the build with `Cannot find module 'markdown-it'` (95 errors on napi.rs).

void's own CI missed it because the monorepo happens to resolve
markdown-it@14.1.1 from other tooling, silently satisfying the peer.

4.5.0 references markdown-it only in JSDoc typedefs and applies attrs to the
passed-in markdown-exit instance, so `{.class #id}` handling and the `{1,3-5}`
fence line-highlight interaction are identical; void never uses fenceAttrsOnPre.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cursor

cursor Bot commented Jul 7, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_cd7d1b4a-0036-439b-b4ff-6c5d193dcf8a)

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedmarkdown-it-attrs@​4.5.010010010087100

View full report

@Brooooooklyn
Brooooooklyn merged commit ce2f75b into main Jul 7, 2026
7 checks passed
@Brooooooklyn
Brooooooklyn deleted the fix/md-markdown-it-attrs-peer branch July 7, 2026 15:18
cpojer pushed a commit that referenced this pull request Sep 11, 2026
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
cpojer pushed a commit that referenced this pull request Sep 11, 2026
* feat(api): per-project cpuMs override with plan ceiling (bump framework)

Honors the new manifest field limits.cpuMs (void.json worker.limits.cpu_ms,
#299) when building routing dispatch limits:

- tiers.ts: PlanLimits.maxCpuMsPerRequest, the highest cpuMs a project
  may request (free 10, solo/pro/sponsored 30_000, custom 0 = no ceiling)
- deploy ingest: validate manifest.limits shape; reject an over-ceiling
  cpuMs with 400 naming both numbers, before the claim transaction
- routing.ts: shared computeDispatchLimits replaces the duplicated
  inline expressions at deploy go-live and rollback; byte-identical
  output for manifests without limits
- rollback clamps to the current plan ceiling instead of rejecting, and
  an out-of-domain stored cpuMs (0, negative, fractional - storable
  through the pre-validation API skew window) falls back to the plan
  default instead of erasing the cap
- dispatch unchanged: routing.limits was already applied verbatim

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DF8p6MCmgiE7e3LM1J8EQV

* fix(api): replace zero-width spaces in comments with backslash escapes

`vp lint` has failed on main since the vite+ 0.3.0 bump (#262): the newer
oxlint enforces no-irregular-whitespace, which flags six U+200B zero-width
spaces added in #89. Every one sits inside a quoted `*/`, where it stops
the sequence from closing the enclosing comment.

Deleting them is not safe. Four are inside `/** */` docstrings, where a
bare `*/` truncates the comment and breaks the file. Those use `*\/`,
which the tokenizer does not treat as a terminator. The remaining two are
inside `//` line comments, where `*/` needs no escape at all.

Unblocks CI for this PR and every branch cut after #262.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Grrh3fMQxnc3MKfJWKg7Vv

* chore(api): track the framework submodule at void CLI 0.10.12

The rebased submodule pointer moves the framework from 0.10.10 to
0.10.12, and both fallback CLI constants must follow it. They only
apply to repos with no local `void` dependency, so drift never shows
up in an ordinary build — `build-manager.test.ts` is what catches it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Grrh3fMQxnc3MKfJWKg7Vv

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant