hono-decks 1.2.2 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +5 -3
- package/README.md +6 -4
- package/dist/bin.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/{init-vite-F2gLT72s.js → init-vite-BPRPonCD.js} +9 -6
- package/package.json +1 -1
package/README.ja.md
CHANGED
|
@@ -72,11 +72,13 @@ npm run build
|
|
|
72
72
|
```
|
|
73
73
|
|
|
74
74
|
この連携には standalone compiler/client export を持つアダプターが必要です。
|
|
75
|
-
新規インストールの既定値は `void-plugin-hono-jsx@^0.
|
|
75
|
+
新規インストールの既定値は `void-plugin-hono-jsx@^0.9.1` です。
|
|
76
76
|
`--install` は、インストール済みの互換アダプターを維持します。
|
|
77
77
|
`--install` を省略する場合は、Markdown 用の任意 peer も必要です:
|
|
78
|
-
`
|
|
79
|
-
|
|
78
|
+
`yaml@^2.9.1 shiki@^4.5.0 @shikijs/transformers@^4.5.0`。
|
|
79
|
+
|
|
80
|
+
新しい導入では `@ts-76/hono-markdown` 0.2.1以降がパーサー2パッケージを自動導入します。利用者側で `markdown-exit`・`markdown-it-container` を追加する必要はありません。既存Void 1.1用の0.6アダプターでは従来のpeer依存をinitが補完します。
|
|
81
|
+
動作確認した組み合わせは Node >=24.22.1 <25、Void 1.2.1、Vite 8.3.4、Hono 4.13.13 です。既存のVoid 1.1.11アプリでは互換性のある0.6アダプターを維持し、未導入の場合も0.6を選択します。0.9.1では[Void/Cloudflare依存の既知リスク](https://github.com/ts-76/void-plugin-hono-jsx/blob/v0.9.1/docs/dependency-security.md)が残ります。
|
|
80
82
|
|
|
81
83
|
`--install` は npm/pnpm/Yarn/Bun を packageManager または lockfile から判定し、
|
|
82
84
|
不足する依存だけを追加します。互換性のない既存バージョンは自動更新せずエラーにします。
|
package/README.md
CHANGED
|
@@ -71,10 +71,12 @@ npm run build
|
|
|
71
71
|
~~~
|
|
72
72
|
|
|
73
73
|
This integration requires an adapter with the `/markdown/compiler` and
|
|
74
|
-
`/markdown/client` exports. New installations default to `void-plugin-hono-jsx@^0.
|
|
74
|
+
`/markdown/client` exports. New installations default to `void-plugin-hono-jsx@^0.9.1`;
|
|
75
75
|
`--install` preserves an already installed compatible adapter. Without `--install`, also install the optional Markdown peers:
|
|
76
|
-
`
|
|
77
|
-
|
|
76
|
+
`yaml@^2.9.1 shiki@^4.5.0 @shikijs/transformers@^4.5.0`.
|
|
77
|
+
|
|
78
|
+
With `@ts-76/hono-markdown` 0.2.1 or newer, parser dependencies are installed automatically. Do not add `markdown-exit` or `markdown-it-container` to new apps. Existing Void 1.1 apps using adapter 0.6 retain automatic installation of its legacy parser peers.
|
|
79
|
+
The verified host versions are Void 1.2.1, Vite 8.3.4, and Hono 4.13.13 on Node >=24.22.1 <25. Existing Void 1.1.11 apps keep their compatible 0.6 adapter; if it is missing, init selects 0.6 rather than forcing a host upgrade. Adapter 0.9.1 retains the documented [Void/Cloudflare dependency risks](https://github.com/ts-76/void-plugin-hono-jsx/blob/v0.9.1/docs/dependency-security.md).
|
|
78
80
|
|
|
79
81
|
`--install` selects npm/pnpm/Yarn/Bun from packageManager or lockfiles and installs
|
|
80
82
|
missing dependencies. Incompatible installed versions require an explicit update;
|
|
@@ -467,7 +469,7 @@ At this level, the application owns the mount path, source policy, and option me
|
|
|
467
469
|
## Void Hono Markdown
|
|
468
470
|
|
|
469
471
|
Set `build.markdown: "void"` in `hono-decks.config.ts` to opt into `.md` decks
|
|
470
|
-
alongside MDX. This requires `void-plugin-hono-jsx@^0.
|
|
472
|
+
alongside MDX. This requires `void-plugin-hono-jsx@^0.9.1` with its standalone compiler and client exports.
|
|
471
473
|
See the [Void consumer fixture](https://github.com/ts-76/hono-decks/tree/main/fixtures/void-markdown)
|
|
472
474
|
for package verification, Void middleware hosting, supported syntax and limitations.
|
|
473
475
|
|
package/dist/bin.js
CHANGED
|
@@ -2350,7 +2350,7 @@ async function runInitCommand(input, args, stdout, stderr) {
|
|
|
2350
2350
|
return { exitCode: 1 };
|
|
2351
2351
|
}
|
|
2352
2352
|
if (parsed.options.framework) try {
|
|
2353
|
-
const { initializeVite } = await import("./init-vite-
|
|
2353
|
+
const { initializeVite } = await import("./init-vite-BPRPonCD.js");
|
|
2354
2354
|
const sampleSlug = await initializeVite(input.cwd, parsed.options.framework, parsed.options.configFile, parsed.options.entry, parsed.options.install ? { adapter: parsed.options.adapter } : void 0);
|
|
2355
2355
|
stdout(`Initialized ${parsed.options.framework} decks at /slides/${sampleSlug}. Run your usual dev or build command; no manual compile is needed.`);
|
|
2356
2356
|
return { exitCode: 0 };
|
package/dist/cli.js
CHANGED
|
@@ -2349,7 +2349,7 @@ async function runInitCommand(input, args, stdout, stderr) {
|
|
|
2349
2349
|
return { exitCode: 1 };
|
|
2350
2350
|
}
|
|
2351
2351
|
if (parsed.options.framework) try {
|
|
2352
|
-
const { initializeVite } = await import("./init-vite-
|
|
2352
|
+
const { initializeVite } = await import("./init-vite-BPRPonCD.js");
|
|
2353
2353
|
const sampleSlug = await initializeVite(input.cwd, parsed.options.framework, parsed.options.configFile, parsed.options.entry, parsed.options.install ? { adapter: parsed.options.adapter } : void 0);
|
|
2354
2354
|
stdout(`Initialized ${parsed.options.framework} decks at /slides/${sampleSlug}. Run your usual dev or build command; no manual compile is needed.`);
|
|
2355
2355
|
return { exitCode: 0 };
|
|
@@ -9,15 +9,15 @@ import { execFile } from "node:child_process";
|
|
|
9
9
|
//#region src/adapters/void.ts
|
|
10
10
|
/** Dependency policy of the Void preset, outside the deck compiler. */
|
|
11
11
|
const voidDependencies = [
|
|
12
|
-
["void", "void@>=1.1
|
|
12
|
+
["void", "void@>=1.2.1 <1.3.0"],
|
|
13
13
|
["vite", "vite@^8.0.16"],
|
|
14
14
|
["hono", "hono@^4.13.13"],
|
|
15
|
-
["markdown-exit", "markdown-exit@^1.3.0"],
|
|
16
15
|
["yaml", "yaml@^2.9.1"],
|
|
17
|
-
["markdown-it-container", "markdown-it-container@^4.0.0"],
|
|
18
16
|
["shiki", "shiki@^4.5.0"],
|
|
19
17
|
["@shikijs/transformers", "@shikijs/transformers@^4.5.0"]
|
|
20
18
|
];
|
|
19
|
+
/** Pre-0.9 adapters on existing Void 1.1 hosts still use parser peers. */
|
|
20
|
+
const legacyMarkdownDependencies = [["markdown-exit", "markdown-exit@^1.3.0"], ["markdown-it-container", "markdown-it-container@^4.0.0"]];
|
|
21
21
|
//#endregion
|
|
22
22
|
//#region src/node/install-void.ts
|
|
23
23
|
async function installVoidDependencies(cwd, options = {}) {
|
|
@@ -46,7 +46,9 @@ async function installVoidDependencies(cwd, options = {}) {
|
|
|
46
46
|
return true;
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
|
-
const
|
|
49
|
+
const hostVersion = missing("void") ? void 0 : await installedVersion(require.resolve("void"), "void");
|
|
50
|
+
let legacyVoid = /^1\.1\./.test(hostVersion ?? "");
|
|
51
|
+
const required = [...voidDependencies, ...legacyVoid ? legacyMarkdownDependencies : []];
|
|
50
52
|
for (const [id, spec] of required) {
|
|
51
53
|
if (missing(id)) continue;
|
|
52
54
|
const version = await installedVersion(require.resolve(id), id);
|
|
@@ -55,7 +57,8 @@ async function installVoidDependencies(cwd, options = {}) {
|
|
|
55
57
|
const value = version.match(/^(\d+)\.(\d+)\.(\d+)$/);
|
|
56
58
|
const min = minimum.slice(1).map(Number);
|
|
57
59
|
const current = value?.slice(1).map(Number);
|
|
58
|
-
if (!current || current[0] !== min[0] || id === "void"
|
|
60
|
+
if (!current || current[0] !== min[0] || (id === "void" ? !(current[1] === 1 && current[2] >= 11 || current[1] === 2 && current[2] >= 1) : compare(current, min) < 0)) throw new Error(`Installed ${id}@${version} is incompatible with ${spec}. Update it explicitly before --install.`);
|
|
61
|
+
if (id === "void") legacyVoid = current[1] === 1;
|
|
59
62
|
}
|
|
60
63
|
}
|
|
61
64
|
const specs = required.filter(([id]) => missing(id)).map(([, spec]) => spec);
|
|
@@ -81,7 +84,7 @@ async function installVoidDependencies(cwd, options = {}) {
|
|
|
81
84
|
specs.push(`hono-decks@${requested}`);
|
|
82
85
|
}
|
|
83
86
|
if (options.adapter || missing("void-plugin-hono-jsx/markdown/compiler")) {
|
|
84
|
-
let adapter = options.adapter ??
|
|
87
|
+
let adapter = options.adapter ?? `void-plugin-hono-jsx@${legacyVoid ? "^0.6.0" : "^0.9.1"}`;
|
|
85
88
|
if (/^\d+\./.test(adapter)) adapter = "void-plugin-hono-jsx@" + adapter;
|
|
86
89
|
else if (modernYarn && (adapter.endsWith(".tgz") || adapter.startsWith("file:"))) adapter = "void-plugin-hono-jsx@file:" + resolve(cwd, adapter.replace(/^file:/, ""));
|
|
87
90
|
specs.push(adapter);
|