chore: upgrade remark-hbs to 0.5.0 - #219
Merged
Merged
Conversation
remark-hbs 0.5.0 is the ESM/unified 11 release, which removes the last stale
link in Docfy's markdown pipeline: 0.4.1 was from 2021 and carried its own
unist-util-visit 2 and unist-builder 2. 0.5.0 has unist-util-visit 5 as its only
runtime dependency and takes unified 11 as a peer.
No source changes were needed. All three call sites already import the package
root, which is all the new exports map allows, and the compiled CJS
`require('remark-hbs').default` path that @docfy/ember-cli relies on works
because the package ships a default export — verified directly rather than
assumed. The option names Docfy sets (escapeCurliesCode,
escapeCurliesInlineCode) are unchanged.
The new `unified` peer dependency needs no declaration in @docfy/ember-cli or
@docfy/ember-vite: pnpm satisfies it through @docfy/core, and `pnpm peers check`
reports only the two pre-existing unrelated issues (ember-source via
ember-cli-fastboot-testing, tailwindcss via @tailwindcss/typography).
The release notes claim rendered output is unchanged. That is verified here
independently rather than taken on trust: the committed .gjs templates are
regenerated from docs/ on every build, and they come out byte-identical, so the
templates guard passes with no diff at all.
Stacked on the worktree edit-URL fix, which is what makes that guard usable as
evidence from a worktree.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Picks up remark-hbs 0.5.0, the ESM/unified 11 release. This removes the last stale link in Docfy's markdown pipeline — 0.4.1 was from 2021 and carried its own
unist-util-visit2 andunist-builder2 alongside a tree running unified 11. 0.5.0 hasunist-util-visit5 as its only runtime dependency and takesunified11 as a peer.No source changes needed
All three call sites already import the package root, which is all the new
exportsmap permits:The option names Docfy sets (
escapeCurliesCode,escapeCurliesInlineCode) are unchanged, andRemarkHbsOptionsis still importable — now as a named export rather than off a namespace, which is what the existingimport typealready expected.Things I checked rather than assumed
The CJS interop path works.
@docfy/ember-clicompiles to CommonJS, so it doesrequire('remark-hbs').defaultagainst an ESM-only package. The release notes say that works; confirmed:Worth recording how that nearly misled me: my first run returned
keys: [] | typeof default: undefined, which looks exactly like broken interop. It was stalenode_modulesleft by a baseline experiment I'd run minutes earlier —Object.keys()of 0.4.1's CJS function export. Reinstalling fixed it and the symlink now points atremark-hbs@0.5.0_unified@11.0.5. Had I trusted the first result I'd have filed a bug against a working package.The new
unifiedpeer needs no declaration.@docfy/ember-cliand@docfy/ember-vitedepend on remark-hbs without depending onunifieddirectly, so I expected an unmet peer. pnpm satisfies it through@docfy/core, andpnpm peers checkreports only the two pre-existing unrelated issues (ember-sourceviaember-cli-fastboot-testing,tailwindcssvia@tailwindcss/typography).Rendered output is unchanged — verified, not trusted. The release notes claim this, which is exactly the sort of claim worth testing independently. The committed
.gjstemplates are regenerated fromdocs/on every build, so if remark-hbs altered a single character they would move. They come out byte-identical: the templates guard passes with no diff.That check is only usable from a worktree thanks to #218, which landed first.
Verification
pnpm -r run compileclean@docfy/core59/59 across 12 files,@docfy/ember-vite60/60,@docfy/plugin-with-prose2/2test-app-classicbuilds (the CJS/require-ESM path) with 19 distincthljs-*classes includinghljs-template-variable, so glimmer highlighting and curly escaping still work end to endtest-app-vitebuilds; routes guard passes; templates guard passes with zero difflint:formatcleanFollow-up worth considering
remark-hbs declares
enginesof^20.19.0 || >=22.12.0while Docfy now requires>=22.22.2, and its CI matrix tests Node 20/22/24. That's harmless — Docfy's range is a subset — but if remark-hbs is only ever consumed by Docfy, its floor could eventually be raised to match.🤖 Generated with Claude Code