Skip to content
This repository was archived by the owner on Jul 5, 2026. It is now read-only.

Modernize: ESM, markdown-magic v4, vitest, Node 22+ (v2.0.0)#1

Merged
camacho merged 6 commits into
masterfrom
modernize
Jul 4, 2026
Merged

Modernize: ESM, markdown-magic v4, vitest, Node 22+ (v2.0.0)#1
camacho merged 6 commits into
masterfrom
modernize

Conversation

@camacho

@camacho camacho commented Jul 3, 2026

Copy link
Copy Markdown
Owner

v1.2.2 → v2.0.0.

Package-specific:

  • findup → find-up ^8 (returns file path directly); sort-scripts retained
  • Dropped markdown-magic-install-command devDep — dead, never imported anywhere in source
  • Contract change: a package.json with no scripts field now returns the block content unchanged (master crashed with a TypeError inside sort-scripts); consistent with the family-wide passthrough convention
  • yarn.lock removed

Breaking changes (unpublished)

  • ESM only ("type": "module"); CJS consumers on Node ≥22.12 must use require(pkg).default
  • markdown-magic v4 plugin API: transform signature ({ content, options, srcPath }); peer markdown-magic@^4
  • Node ≥22.18.0 engines floor

Shared changes

  • jest/no tests → vitest; prettier 3; fresh npm lockfile (v3); npm audit clean
  • CI: test workflow on Node 22/24 (npm ci, vitest, prettier check)
  • docs script formats README after regeneration so CI format checks stay stable

Validation

  • vitest green; npm run docs idempotent (hash-verified); ESM + CJS interop smokes pass; reviewed (approved)

Part of the markdown-magic-* family modernization preceding the planned monorepo consolidation. Refs: markdown-magic v4 API (https://github.com/DavidWells/markdown-magic), pure-ESM package conventions (https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c)

camacho added 2 commits July 3, 2026 18:47
- migrate to ESM (type: module), v4 transform object API
- findup -> find-up ^8, rewrite call sites (findUpSync, cwd is a dir)
- drop markdown-magic-install-command devDep (dead, unused)
- convert to vitest, add index.spec.js (happy path + no-scripts edge)
- delete yarn.lock, npm-only lockfile
- add CI workflow (Node 22/24, npm ci, npm test, prettier check)
- peer markdown-magic ^4
- version 2.0.0
Comment thread index.spec.js
Comment thread package.json
Comment thread package.json Outdated
@camacho camacho merged commit 388677a into master Jul 4, 2026
4 checks passed
@camacho camacho deleted the modernize branch July 5, 2026 10:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant