From fd224fabffcea41229b862a65a96447dc914bff5 Mon Sep 17 00:00:00 2001
From: Josemar Luedke
Date: Fri, 21 Aug 2026 14:13:31 -0700
Subject: [PATCH 1/5] chore: upgrade hosted-git-info to v9
v4 dropped the string `browsetemplate` that repo-info.ts was string-replacing
into. Build the edit URL from the parsed host metadata instead, which keeps the
literal `{filepath}` placeholder intact -- the host's own `edit()`/`browse()`
helpers percent-encode the braces.
Generated URLs are unchanged for GitHub, GitLab and Bitbucket. Those three are
now an explicit whitelist rather than a fallback: `getTreePath` only knows their
two URL shapes, so every other host hosted-git-info can parse returns null
instead of a plausible looking but wrong URL. That covers gist, whose URL
previously came out as a broken `.../{project}{/committish}` with no
`{filepath}`, and sourcehut, which v9 newly parses.
v9 is the newest release whose engines (`^20.17.0 || >=22.9.0`) still fit inside
docfy's own `^20.19.0 || >=22.12.0`; v10 narrows to `^22.22.2 || ^24.15.0 ||
>=26.0.0` and would force an engines bump on consumers.
Co-Authored-By: Claude Opus 5
---
packages/core/package.json | 2 +-
packages/core/src/-private/repo-info.ts | 29 ++++++++++++++++---------
pnpm-lock.yaml | 12 ++--------
3 files changed, 22 insertions(+), 21 deletions(-)
diff --git a/packages/core/package.json b/packages/core/package.json
index 2bc65ad8..48a5ddd6 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -25,7 +25,7 @@
"fast-glob": "^3.3.3",
"git-repo-info": "^2.1.1",
"github-slugger": "^2.0.0",
- "hosted-git-info": "^3.0.8",
+ "hosted-git-info": "^9.0.3",
"mdast-util-to-string": "^4.0.0",
"rehype-stringify": "^10.0.1",
"remark-extract-frontmatter": "^3.2.0",
diff --git a/packages/core/src/-private/repo-info.ts b/packages/core/src/-private/repo-info.ts
index 3f11e002..7b20993f 100644
--- a/packages/core/src/-private/repo-info.ts
+++ b/packages/core/src/-private/repo-info.ts
@@ -1,6 +1,17 @@
import path from 'path';
import getRepoInfo from 'git-repo-info';
-import GitHost, { fromUrl } from 'hosted-git-info';
+// @types/hosted-git-info is three majors behind the runtime (DefinitelyTyped never
+// published typings for v4+) and is actively wrong in places: it declares the
+// `*template` members as strings, but they have been functions since v4, and its
+// `Hosts` union is missing hosts v9 parses. Only `fromUrl`, `type`, `domain`, `user`
+// and `project` are relied on below, which the stale typings still describe correctly.
+import GitHost from 'hosted-git-info';
+
+// A whitelist, not a fallback: `getTreePath` only knows two URL shapes, Bitbucket's
+// and the `/edit/` form GitHub and GitLab accept. Every other host hosted-git-info can
+// parse (gist, sourcehut, anything a future release adds) would otherwise be handed a
+// plausible looking but wrong URL, and no edit link beats a broken one.
+const supportedHostTypes = ['github', 'gitlab', 'bitbucket'];
function getTreePath(repo: GitHost | undefined, branch: string, relative: string): string {
if (repo && repo.type === 'bitbucket') {
@@ -25,19 +36,17 @@ export function getRepoEditUrl(root: string, repoURL: string, branch = 'master')
try {
const gitRoot = getRepoInfo(root).root;
- const repo = fromUrl(repoURL);
+ const repo = GitHost.fromUrl(repoURL);
const relative = path.relative(gitRoot, root);
const tree = getTreePath(repo, branch, relative);
+ // The host's own `edit`/`browse` helpers percent-encode the path, which would
+ // mangle the `{filepath}` placeholder Docfy substitutes later on, so the URL is
+ // assembled from the parsed host metadata instead.
result =
- (repo &&
- repo.browsetemplate &&
- repo.browsetemplate
- .replace('{domain}', repo.domain)
- .replace('{user}', repo.user)
- .replace('{project}', repo.project)
- .replace('{/tree/committish}', tree)) ||
- null;
+ repo && supportedHostTypes.includes(repo.type)
+ ? `https://${repo.domain}/${repo.user}/${repo.project}${tree}`
+ : null;
} catch (err) {
console.error(err);
result = null;
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index da2153a9..4dbf49fb 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -30,8 +30,8 @@ importers:
specifier: ^2.0.0
version: 2.0.0
hosted-git-info:
- specifier: ^3.0.8
- version: 3.0.8
+ specifier: ^9.0.3
+ version: 9.0.3
mdast-util-to-string:
specifier: ^4.0.0
version: 4.0.0
@@ -6119,10 +6119,6 @@ packages:
hosted-git-info@2.8.9:
resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==}
- hosted-git-info@3.0.8:
- resolution: {integrity: sha512-aXpmwoOhRBrw6X3j0h5RloK4x1OzsxMPyxqIHyNfSe2pypkVTZFpEiRoSipPEPlMrh0HW/XsjkJ5WgnCirpNUw==}
- engines: {node: '>=10'}
-
hosted-git-info@4.1.0:
resolution: {integrity: sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==}
engines: {node: '>=10'}
@@ -17469,10 +17465,6 @@ snapshots:
hosted-git-info@2.8.9: {}
- hosted-git-info@3.0.8:
- dependencies:
- lru-cache: 6.0.0
-
hosted-git-info@4.1.0:
dependencies:
lru-cache: 6.0.0
From b4b88b9cd2f80ee5e9396109e6472e94df295f00 Mon Sep 17 00:00:00 2001
From: Josemar Luedke
Date: Fri, 21 Aug 2026 14:31:08 -0700
Subject: [PATCH 2/5] chore: go to hosted-git-info v10 and raise the Node floor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Follow-up on the v9 commit: the maintainer opted for v10 and the wider engines
break it implies.
All four published packages now declare `^22.22.2 || ^24.15.0 || >=26.0.0`,
matching hosted-git-info's own range rather than depending on a package we do
not support. They are kept in sync deliberately so a consumer installing
@docfy/ember-cli on Node 20 gets a warning from every package, not just core.
The docs previously justified the floor as "the Node versions that support
require() of ES modules". That no longer explains the number — require(esm)
landed in 20.19/22.12 — so getting-started and the upgrade guide now separate
the two constraints instead of leaving a stale rationale attached to a new
range. The upgrade guide states the break plainly: this drops Node 20 entirely
and also 22.12 through 22.22.
Behaviour re-verified against the original v3 baseline rather than against v9:
all 16 GitHub/GitLab/Bitbucket URLs byte-identical, gist and sourcehut null.
v10's host parsing is unchanged from v9, so the whitelist needed no changes.
CI's `node-version: 24.x` already satisfies the range (resolves to 24.19.0) and
is left untouched.
Co-Authored-By: Claude Opus 5
---
docs/ember/ember-cli.md | 2 +-
docs/ember/upgrade-guide.md | 15 +++++++++++----
docs/getting-started.md | 13 +++++++++----
packages/core/package.json | 4 ++--
packages/ember-cli/package.json | 2 +-
packages/ember-vite/package.json | 2 +-
packages/plugin-with-prose/package.json | 2 +-
pnpm-lock.yaml | 12 ++++++++++--
8 files changed, 36 insertions(+), 16 deletions(-)
diff --git a/docs/ember/ember-cli.md b/docs/ember/ember-cli.md
index 28901ab5..a6538ba0 100644
--- a/docs/ember/ember-cli.md
+++ b/docs/ember/ember-cli.md
@@ -9,7 +9,7 @@ order: 3
## Prerequisites
- Classic Ember CLI application
-- Node `^20.19.0 || >=22.12.0`
+- Node `^22.22.2 || ^24.15.0 || >=26.0.0`
- `@docfy/ember` for runtime components (covered in [Tutorial](./tutorial.md))
## Installation
diff --git a/docs/ember/upgrade-guide.md b/docs/ember/upgrade-guide.md
index 7e1b11f4..7d2b6083 100644
--- a/docs/ember/upgrade-guide.md
+++ b/docs/ember/upgrade-guide.md
@@ -13,10 +13,17 @@ remark 11, rehype 11). Docfy's own packages are now ES modules.
### Node version
-Docfy now requires Node `^20.19.0 || >=22.12.0`. This is not negotiable: those
-are the versions where `require()` of an ES module works, which is what allows
-the classic Ember CLI build and CommonJS config files to keep working against
-ESM-only packages.
+Docfy now requires Node `^22.22.2 || ^24.15.0 || >=26.0.0`. Read that range carefully
+before upgrading: it drops Node 20 entirely, and it also drops Node 22.12 through
+22.22. If you are on Node 20 or on an early 22.x, you need to upgrade Node first.
+
+Two different constraints combine to produce that range. Docfy needs `require()` of
+an ES module to work, which is what allows the classic Ember CLI build and CommonJS
+config files to keep working against ESM-only packages; that support landed in Node
+20.19 and 22.12, so on its own it would only require those. The floor is higher
+because `hosted-git-info`, the dependency that builds "edit this page" links, ships
+its own narrower engines range, and Docfy matches it rather than depending on a
+package it does not support.
### Your config file keeps working
diff --git a/docs/getting-started.md b/docs/getting-started.md
index 71b53d7c..bb430a17 100644
--- a/docs/getting-started.md
+++ b/docs/getting-started.md
@@ -22,10 +22,15 @@ yarn init
## Requirements
-Docfy is published as ES modules and requires Node `^20.19.0 || >=22.12.0`. Those
-are the Node versions that support `require()` of ES modules, which is what lets
-CommonJS tooling (Ember CLI, a CommonJS config file) load Docfy and ESM-only
-remark/rehype plugins.
+Docfy is published as ES modules and requires Node `^22.22.2 || ^24.15.0 || >=26.0.0`.
+
+Two separate constraints combine to produce that range. Docfy needs `require()` of
+an ES module to work, which is what lets CommonJS tooling (Ember CLI, a CommonJS
+config file) load Docfy and ESM-only remark/rehype plugins; that support landed in
+Node 20.19 and 22.12. The floor is higher than those versions because
+`hosted-git-info`, the dependency Docfy uses to build "edit this page" links, ships
+its own narrower engines range, and Docfy matches it rather than depending on a
+package it does not support.
## Add `@docfy/core` as a dependency
diff --git a/packages/core/package.json b/packages/core/package.json
index 48a5ddd6..24c4334a 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -25,7 +25,7 @@
"fast-glob": "^3.3.3",
"git-repo-info": "^2.1.1",
"github-slugger": "^2.0.0",
- "hosted-git-info": "^9.0.3",
+ "hosted-git-info": "^10.1.1",
"mdast-util-to-string": "^4.0.0",
"rehype-stringify": "^10.0.1",
"remark-extract-frontmatter": "^3.2.0",
@@ -64,7 +64,7 @@
"vitest": "^3.2.4"
},
"engines": {
- "node": "^20.19.0 || >=22.12.0"
+ "node": "^22.22.2 || ^24.15.0 || >=26.0.0"
},
"publishConfig": {
"access": "public"
diff --git a/packages/ember-cli/package.json b/packages/ember-cli/package.json
index 9ac30d1e..b4e81c81 100644
--- a/packages/ember-cli/package.json
+++ b/packages/ember-cli/package.json
@@ -109,7 +109,7 @@
"webpack": "^5.100.2"
},
"engines": {
- "node": "^20.19.0 || >=22.12.0"
+ "node": "^22.22.2 || ^24.15.0 || >=26.0.0"
},
"publishConfig": {
"access": "public"
diff --git a/packages/ember-vite/package.json b/packages/ember-vite/package.json
index 743bc099..c94eb727 100644
--- a/packages/ember-vite/package.json
+++ b/packages/ember-vite/package.json
@@ -73,7 +73,7 @@
"vite": ">= 6.0.0"
},
"engines": {
- "node": "^20.19.0 || >=22.12.0"
+ "node": "^22.22.2 || ^24.15.0 || >=26.0.0"
},
"publishConfig": {
"access": "public"
diff --git a/packages/plugin-with-prose/package.json b/packages/plugin-with-prose/package.json
index 83f0184c..b0579529 100644
--- a/packages/plugin-with-prose/package.json
+++ b/packages/plugin-with-prose/package.json
@@ -38,7 +38,7 @@
"vitest": "^3.2.4"
},
"engines": {
- "node": "^20.19.0 || >=22.12.0"
+ "node": "^22.22.2 || ^24.15.0 || >=26.0.0"
},
"publishConfig": {
"access": "public"
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 4dbf49fb..fed6e8b2 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -30,8 +30,8 @@ importers:
specifier: ^2.0.0
version: 2.0.0
hosted-git-info:
- specifier: ^9.0.3
- version: 9.0.3
+ specifier: ^10.1.1
+ version: 10.1.1
mdast-util-to-string:
specifier: ^4.0.0
version: 4.0.0
@@ -6116,6 +6116,10 @@ packages:
resolution: {integrity: sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==}
engines: {node: '>=0.10.0'}
+ hosted-git-info@10.1.1:
+ resolution: {integrity: sha512-DeOnSPAvOndYKfw075gt8yZzQ7S2hNztw34zBTfhIzLhmBTswIBg5/y+pqu/VD5cYWm5goAFTusDmUEmKZ0PEQ==}
+ engines: {node: ^22.22.2 || ^24.15.0 || >=26.0.0}
+
hosted-git-info@2.8.9:
resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==}
@@ -17463,6 +17467,10 @@ snapshots:
dependencies:
parse-passwd: 1.0.0
+ hosted-git-info@10.1.1:
+ dependencies:
+ lru-cache: 11.5.2
+
hosted-git-info@2.8.9: {}
hosted-git-info@4.1.0:
From b5bd50e370bc0284587068cc96a85b5d705966fa Mon Sep 17 00:00:00 2001
From: Josemar Luedke
Date: Fri, 21 Aug 2026 14:33:50 -0700
Subject: [PATCH 3/5] chore: regenerate docs templates for the new Node range
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The templates guard added in #214 flagged these: the committed .gjs templates
are rendered from docs/, so editing the Node requirement prose changes them.
Only the three pages whose text changed are affected, and the diff contains no
editUrl changes — the worktree path segment that git-repo-info introduces when
building from a linked worktree was stripped before committing, so these match
what a clean checkout produces.
Co-Authored-By: Claude Opus 5
---
.../app/templates/docs/ember/ember-cli.gjs | 2 +-
.../app/templates/docs/ember/upgrade-guide.gjs | 14 ++++++++++----
.../app/templates/docs/getting-started.gjs | 12 ++++++++----
3 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/test-app-vite/app/templates/docs/ember/ember-cli.gjs b/test-app-vite/app/templates/docs/ember/ember-cli.gjs
index 1c550b83..6c1b1d04 100644
--- a/test-app-vite/app/templates/docs/ember/ember-cli.gjs
+++ b/test-app-vite/app/templates/docs/ember/ember-cli.gjs
@@ -6,7 +6,7 @@ import { DocfyLink } from '@docfy/ember';
- Classic Ember CLI application
-- Node
^20.19.0 || >=22.12.0
+- Node
^22.22.2 || ^24.15.0 || >=26.0.0
@docfy/ember for runtime components (covered in Tutorial)
diff --git a/test-app-vite/app/templates/docs/ember/upgrade-guide.gjs b/test-app-vite/app/templates/docs/ember/upgrade-guide.gjs
index 8a268a11..cfa1af9b 100644
--- a/test-app-vite/app/templates/docs/ember/upgrade-guide.gjs
+++ b/test-app-vite/app/templates/docs/ember/upgrade-guide.gjs
@@ -5,10 +5,16 @@
Version 0.13.0 moves Docfy onto the current unified/remark stack (unified 11,
remark 11, rehype 11). Docfy's own packages are now ES modules.
-Docfy now requires Node ^20.19.0 || >=22.12.0. This is not negotiable: those
-are the versions where require() of an ES module works, which is what allows
-the classic Ember CLI build and CommonJS config files to keep working against
-ESM-only packages.
+Docfy now requires Node ^22.22.2 || ^24.15.0 || >=26.0.0. Read that range carefully
+before upgrading: it drops Node 20 entirely, and it also drops Node 22.12 through
+22.22. If you are on Node 20 or on an early 22.x, you need to upgrade Node first.
+Two different constraints combine to produce that range. Docfy needs require() of
+an ES module to work, which is what allows the classic Ember CLI build and CommonJS
+config files to keep working against ESM-only packages; that support landed in Node
+20.19 and 22.12, so on its own it would only require those. The floor is higher
+because hosted-git-info, the dependency that builds "edit this page" links, ships
+its own narrower engines range, and Docfy matches it rather than depending on a
+package it does not support.
There is no forced migration to .mjs. A CommonJS .docfy-config.js is still
fully supported, including require()-ing ESM-only remark/rehype plugins.
diff --git a/test-app-vite/app/templates/docs/getting-started.gjs b/test-app-vite/app/templates/docs/getting-started.gjs
index 8c798114..10675704 100644
--- a/test-app-vite/app/templates/docs/getting-started.gjs
+++ b/test-app-vite/app/templates/docs/getting-started.gjs
@@ -11,10 +11,14 @@ structures for your convenience.
yarn init
-Docfy is published as ES modules and requires Node ^20.19.0 || >=22.12.0. Those
-are the Node versions that support require() of ES modules, which is what lets
-CommonJS tooling (Ember CLI, a CommonJS config file) load Docfy and ESM-only
-remark/rehype plugins.
+Docfy is published as ES modules and requires Node ^22.22.2 || ^24.15.0 || >=26.0.0.
+Two separate constraints combine to produce that range. Docfy needs require() of
+an ES module to work, which is what lets CommonJS tooling (Ember CLI, a CommonJS
+config file) load Docfy and ESM-only remark/rehype plugins; that support landed in
+Node 20.19 and 22.12. The floor is higher than those versions because
+hosted-git-info, the dependency Docfy uses to build "edit this page" links, ships
+its own narrower engines range, and Docfy matches it rather than depending on a
+package it does not support.
npm install @docfy/core
From 78a97da44c6693b0e7f9d4af7f048b7ea81f25aa Mon Sep 17 00:00:00 2001
From: Josemar Luedke
Date: Fri, 21 Aug 2026 14:37:54 -0700
Subject: [PATCH 4/5] chore: replace @types/hosted-git-info with local typings
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Answering whether the @types package is still needed now that we're on v10: it
is not removable in favour of the package's own types, because hosted-git-info
v10.1.1 ships none — no `types` field, no `.d.ts` anywhere in the tarball. And
DefinitelyTyped never went past 3.0.5, so `@types/hosted-git-info` is now four
majors behind and wrong where it matters: it declares the `*template` members
as strings when they have been functions since v4, and its `Hosts` union does
not know about hosts the current version parses.
So rather than keep type-checking against a four-major-old contract, this
declares only the five members repo-info.ts actually consumes — `fromUrl`,
`type`, `domain`, `user`, `project` — and drops the devDependency.
Nothing leaks into the public API: `getRepoEditUrl` returns `string | null`, and
the emitted lib/-private/repo-info.d.ts makes no reference to GitHost, so
consumers are unaffected.
Verified the compiled output is byte-for-byte equivalent in behaviour: the URL
probe produces output identical to the @types-based build, and still differs
from the original v3 baseline only in the gist case.
Co-Authored-By: Claude Opus 5
---
packages/core/package.json | 1 -
.../core/src/-private/hosted-git-info.d.ts | 29 +++++++++++++++++++
packages/core/src/-private/repo-info.ts | 5 ----
pnpm-lock.yaml | 8 -----
4 files changed, 29 insertions(+), 14 deletions(-)
create mode 100644 packages/core/src/-private/hosted-git-info.d.ts
diff --git a/packages/core/package.json b/packages/core/package.json
index 0a08fe72..fa9cefdc 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -45,7 +45,6 @@
"@eslint/js": "^9.32.0",
"@types/debug": "^4.1.12",
"@types/hast": "^3.0.4",
- "@types/hosted-git-info": "^3.0.5",
"@types/mdast": "^4.0.4",
"@types/node": "^24.0.14",
"@types/unist": "^3.0.0",
diff --git a/packages/core/src/-private/hosted-git-info.d.ts b/packages/core/src/-private/hosted-git-info.d.ts
new file mode 100644
index 00000000..1a9e3cb6
--- /dev/null
+++ b/packages/core/src/-private/hosted-git-info.d.ts
@@ -0,0 +1,29 @@
+/**
+ * Minimal typings for the `hosted-git-info` members Docfy actually uses.
+ *
+ * The package ships no types of its own, and DefinitelyTyped's
+ * `@types/hosted-git-info` stopped at 3.0.5 — it was never updated for v4+, so
+ * it is now four majors behind and wrong in ways that matter: it declares the
+ * `*template` members as strings when they have been functions since v4, and
+ * its `Hosts` union does not know about hosts the current version parses.
+ *
+ * Declaring only what `repo-info.ts` consumes keeps the contract honest and
+ * small. None of this leaks into Docfy's public API — `getRepoEditUrl` returns
+ * `string | null`.
+ */
+declare module 'hosted-git-info' {
+ class GitHost {
+ /**
+ * Short host name. The current version reports `github`, `gitlab`,
+ * `bitbucket`, `gist` or `sourcehut`.
+ */
+ type: string;
+ domain: string;
+ user: string;
+ project: string;
+
+ static fromUrl(gitUrl: string, options?: Record): GitHost | undefined;
+ }
+
+ export = GitHost;
+}
diff --git a/packages/core/src/-private/repo-info.ts b/packages/core/src/-private/repo-info.ts
index 7b20993f..2220313c 100644
--- a/packages/core/src/-private/repo-info.ts
+++ b/packages/core/src/-private/repo-info.ts
@@ -1,10 +1,5 @@
import path from 'path';
import getRepoInfo from 'git-repo-info';
-// @types/hosted-git-info is three majors behind the runtime (DefinitelyTyped never
-// published typings for v4+) and is actively wrong in places: it declares the
-// `*template` members as strings, but they have been functions since v4, and its
-// `Hosts` union is missing hosts v9 parses. Only `fromUrl`, `type`, `domain`, `user`
-// and `project` are relied on below, which the stale typings still describe correctly.
import GitHost from 'hosted-git-info';
// A whitelist, not a fallback: `getTreePath` only knows two URL shapes, Bitbucket's
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 6d6aa740..73abc16b 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -81,9 +81,6 @@ importers:
'@types/hast':
specifier: ^3.0.4
version: 3.0.5
- '@types/hosted-git-info':
- specifier: ^3.0.5
- version: 3.0.5
'@types/mdast':
specifier: ^4.0.4
version: 4.0.4
@@ -2941,9 +2938,6 @@ packages:
'@types/hast@3.0.5':
resolution: {integrity: sha512-rp/ezSWaD1m44dPKICGhiskI13nVr7qTloFwDa/IYkhhf5nzwP+zIQcIJh3WIFSBOy/H1PzB40jPjMDksN4F+g==}
- '@types/hosted-git-info@3.0.5':
- resolution: {integrity: sha512-Dmngh7U003cOHPhKGyA7LWqrnvcTyILNgNPmNCxlx7j8MIi54iBliiT8XqVLIQ3GchoOjVAyBzNJVyuaJjqokg==}
-
'@types/http-errors@2.0.5':
resolution: {integrity: sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg==}
@@ -12598,8 +12592,6 @@ snapshots:
dependencies:
'@types/unist': 2.0.3
- '@types/hosted-git-info@3.0.5': {}
-
'@types/http-errors@2.0.5': {}
'@types/json-schema@7.0.15': {}
From aed3bb330582074f4232e3a8456ae80c9efcddf3 Mon Sep 17 00:00:00 2001
From: Josemar Luedke
Date: Fri, 21 Aug 2026 14:41:09 -0700
Subject: [PATCH 5/5] chore: widen engines to >=22.22.2 to stop the install
warnings
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Mirroring hosted-git-info's own `^22.22.2 || ^24.15.0 || >=26.0.0` meant Docfy
declared support for LTS lines only, excluding Node 23 and all of Node 25. That
made every `pnpm install` — including in this repo, which runs Node 25 — print
an Unsupported engine warning from all four published packages.
A plain `>=22.22.2` keeps the same practical floor without the noise. Verified:
zero engine warnings on install now, and hosted-git-info does not start warning
in its place — pnpm only reports engine mismatches for workspace projects, not
for third-party dependencies.
The docs rationale is updated rather than just having the number swapped. The
previous wording said Docfy "matches" hosted-git-info's range rather than
depending on a package it does not support, which is no longer what we do;
getting-started now notes that the dependency expresses its range as a list of
LTS lines and that Docfy deliberately uses `>=` instead.
Templates regenerated for the changed docs prose, with the worktree path
segment stripped — the diff contains no editUrl changes.
Co-Authored-By: Claude Opus 5
---
docs/ember/ember-cli.md | 2 +-
docs/ember/upgrade-guide.md | 13 ++++++-------
docs/getting-started.md | 13 ++++++++-----
packages/core/package.json | 2 +-
packages/ember-cli/package.json | 2 +-
packages/ember-vite/package.json | 2 +-
packages/plugin-with-prose/package.json | 2 +-
.../app/templates/docs/ember/ember-cli.gjs | 2 +-
.../app/templates/docs/ember/upgrade-guide.gjs | 13 ++++++-------
.../app/templates/docs/getting-started.gjs | 12 +++++++-----
10 files changed, 33 insertions(+), 30 deletions(-)
diff --git a/docs/ember/ember-cli.md b/docs/ember/ember-cli.md
index a6538ba0..20d9f940 100644
--- a/docs/ember/ember-cli.md
+++ b/docs/ember/ember-cli.md
@@ -9,7 +9,7 @@ order: 3
## Prerequisites
- Classic Ember CLI application
-- Node `^22.22.2 || ^24.15.0 || >=26.0.0`
+- Node `>=22.22.2`
- `@docfy/ember` for runtime components (covered in [Tutorial](./tutorial.md))
## Installation
diff --git a/docs/ember/upgrade-guide.md b/docs/ember/upgrade-guide.md
index 7d2b6083..5e5eade7 100644
--- a/docs/ember/upgrade-guide.md
+++ b/docs/ember/upgrade-guide.md
@@ -13,17 +13,16 @@ remark 11, rehype 11). Docfy's own packages are now ES modules.
### Node version
-Docfy now requires Node `^22.22.2 || ^24.15.0 || >=26.0.0`. Read that range carefully
-before upgrading: it drops Node 20 entirely, and it also drops Node 22.12 through
-22.22. If you are on Node 20 or on an early 22.x, you need to upgrade Node first.
+Docfy now requires Node `>=22.22.2`. Note what that drops: Node 20 entirely, and
+also Node 22.12 through 22.22. If you are on Node 20 or on an early 22.x, you need
+to upgrade Node first.
-Two different constraints combine to produce that range. Docfy needs `require()` of
+Two different constraints combine to produce that floor. Docfy needs `require()` of
an ES module to work, which is what allows the classic Ember CLI build and CommonJS
config files to keep working against ESM-only packages; that support landed in Node
20.19 and 22.12, so on its own it would only require those. The floor is higher
-because `hosted-git-info`, the dependency that builds "edit this page" links, ships
-its own narrower engines range, and Docfy matches it rather than depending on a
-package it does not support.
+because `hosted-git-info`, the dependency that builds "edit this page" links,
+requires 22.22.2 as its own minimum.
### Your config file keeps working
diff --git a/docs/getting-started.md b/docs/getting-started.md
index bb430a17..685f0cee 100644
--- a/docs/getting-started.md
+++ b/docs/getting-started.md
@@ -22,15 +22,18 @@ yarn init
## Requirements
-Docfy is published as ES modules and requires Node `^22.22.2 || ^24.15.0 || >=26.0.0`.
+Docfy is published as ES modules and requires Node `>=22.22.2`.
-Two separate constraints combine to produce that range. Docfy needs `require()` of
+Two separate constraints combine to produce that floor. Docfy needs `require()` of
an ES module to work, which is what lets CommonJS tooling (Ember CLI, a CommonJS
config file) load Docfy and ESM-only remark/rehype plugins; that support landed in
Node 20.19 and 22.12. The floor is higher than those versions because
-`hosted-git-info`, the dependency Docfy uses to build "edit this page" links, ships
-its own narrower engines range, and Docfy matches it rather than depending on a
-package it does not support.
+`hosted-git-info`, the dependency Docfy uses to build "edit this page" links,
+requires 22.22.2 as its own minimum.
+
+That dependency expresses its range as a list of LTS lines, which excludes
+odd-numbered releases such as Node 23 and 25. Docfy uses a plain `>=` instead, so
+developing on a current release does not produce install warnings.
## Add `@docfy/core` as a dependency
diff --git a/packages/core/package.json b/packages/core/package.json
index fa9cefdc..e7ae12fe 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -63,7 +63,7 @@
"vitest": "^3.2.4"
},
"engines": {
- "node": "^22.22.2 || ^24.15.0 || >=26.0.0"
+ "node": ">=22.22.2"
},
"publishConfig": {
"access": "public"
diff --git a/packages/ember-cli/package.json b/packages/ember-cli/package.json
index 10b26ecc..2b3234be 100644
--- a/packages/ember-cli/package.json
+++ b/packages/ember-cli/package.json
@@ -107,7 +107,7 @@
"webpack": "^5.100.2"
},
"engines": {
- "node": "^22.22.2 || ^24.15.0 || >=26.0.0"
+ "node": ">=22.22.2"
},
"publishConfig": {
"access": "public"
diff --git a/packages/ember-vite/package.json b/packages/ember-vite/package.json
index ba5b1ef9..f98f5c1b 100644
--- a/packages/ember-vite/package.json
+++ b/packages/ember-vite/package.json
@@ -71,7 +71,7 @@
"vite": ">= 6.0.0"
},
"engines": {
- "node": "^22.22.2 || ^24.15.0 || >=26.0.0"
+ "node": ">=22.22.2"
},
"publishConfig": {
"access": "public"
diff --git a/packages/plugin-with-prose/package.json b/packages/plugin-with-prose/package.json
index d5ba9173..65622a5b 100644
--- a/packages/plugin-with-prose/package.json
+++ b/packages/plugin-with-prose/package.json
@@ -38,7 +38,7 @@
"vitest": "^3.2.4"
},
"engines": {
- "node": "^22.22.2 || ^24.15.0 || >=26.0.0"
+ "node": ">=22.22.2"
},
"publishConfig": {
"access": "public"
diff --git a/test-app-vite/app/templates/docs/ember/ember-cli.gjs b/test-app-vite/app/templates/docs/ember/ember-cli.gjs
index 6c1b1d04..d5d9a485 100644
--- a/test-app-vite/app/templates/docs/ember/ember-cli.gjs
+++ b/test-app-vite/app/templates/docs/ember/ember-cli.gjs
@@ -6,7 +6,7 @@ import { DocfyLink } from '@docfy/ember';
- Classic Ember CLI application
-- Node
^22.22.2 || ^24.15.0 || >=26.0.0
+- Node
>=22.22.2
@docfy/ember for runtime components (covered in Tutorial)
diff --git a/test-app-vite/app/templates/docs/ember/upgrade-guide.gjs b/test-app-vite/app/templates/docs/ember/upgrade-guide.gjs
index cfa1af9b..89bd8004 100644
--- a/test-app-vite/app/templates/docs/ember/upgrade-guide.gjs
+++ b/test-app-vite/app/templates/docs/ember/upgrade-guide.gjs
@@ -5,16 +5,15 @@
Version 0.13.0 moves Docfy onto the current unified/remark stack (unified 11,
remark 11, rehype 11). Docfy's own packages are now ES modules.
-Docfy now requires Node ^22.22.2 || ^24.15.0 || >=26.0.0. Read that range carefully
-before upgrading: it drops Node 20 entirely, and it also drops Node 22.12 through
-22.22. If you are on Node 20 or on an early 22.x, you need to upgrade Node first.
-Two different constraints combine to produce that range. Docfy needs require() of
+
Docfy now requires Node >=22.22.2. Note what that drops: Node 20 entirely, and
+also Node 22.12 through 22.22. If you are on Node 20 or on an early 22.x, you need
+to upgrade Node first.
+Two different constraints combine to produce that floor. Docfy needs require() of
an ES module to work, which is what allows the classic Ember CLI build and CommonJS
config files to keep working against ESM-only packages; that support landed in Node
20.19 and 22.12, so on its own it would only require those. The floor is higher
-because hosted-git-info, the dependency that builds "edit this page" links, ships
-its own narrower engines range, and Docfy matches it rather than depending on a
-package it does not support.
+because hosted-git-info, the dependency that builds "edit this page" links,
+requires 22.22.2 as its own minimum.
There is no forced migration to .mjs. A CommonJS .docfy-config.js is still
fully supported, including require()-ing ESM-only remark/rehype plugins.
diff --git a/test-app-vite/app/templates/docs/getting-started.gjs b/test-app-vite/app/templates/docs/getting-started.gjs
index 10675704..457c198b 100644
--- a/test-app-vite/app/templates/docs/getting-started.gjs
+++ b/test-app-vite/app/templates/docs/getting-started.gjs
@@ -11,14 +11,16 @@ structures for your convenience.
yarn init
-Docfy is published as ES modules and requires Node ^22.22.2 || ^24.15.0 || >=26.0.0.
-Two separate constraints combine to produce that range. Docfy needs require() of
+
Docfy is published as ES modules and requires Node >=22.22.2.
+Two separate constraints combine to produce that floor. Docfy needs require() of
an ES module to work, which is what lets CommonJS tooling (Ember CLI, a CommonJS
config file) load Docfy and ESM-only remark/rehype plugins; that support landed in
Node 20.19 and 22.12. The floor is higher than those versions because
-hosted-git-info, the dependency Docfy uses to build "edit this page" links, ships
-its own narrower engines range, and Docfy matches it rather than depending on a
-package it does not support.
+hosted-git-info, the dependency Docfy uses to build "edit this page" links,
+requires 22.22.2 as its own minimum.
+That dependency expresses its range as a list of LTS lines, which excludes
+odd-numbered releases such as Node 23 and 25. Docfy uses a plain >= instead, so
+developing on a current release does not produce install warnings.
npm install @docfy/core