dsh-plugin-toolkit 0.2.0 → 0.2.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.1
4
+
5
+ - A missing peer dependency now names the install command instead of failing with `ERR_MODULE_NOT_FOUND`.
6
+
3
7
  ## 0.2.0
4
8
 
5
9
  - `dsh-plugin-toolkit/testkit`: mount a single-file client bundle in jsdom with the real React and a recording host context — `click`, `type`, `press`, `must`, `attributes`, and normalised DOM baselines.
@@ -40,9 +40,16 @@ export async function mountClient(options) {
40
40
  const { window, document } = createDom();
41
41
  const restoreGlobals = installGlobals(window, document);
42
42
 
43
- const React = await import('react');
44
- const reactDom = await import('react-dom/client');
45
- const jsxRuntime = await import('react/jsx-runtime');
43
+ const need = async (name) => {
44
+ try {
45
+ return await import(name);
46
+ } catch {
47
+ throw new Error(`testkit needs ${name}: npm install --save-dev jsdom react react-dom`);
48
+ }
49
+ };
50
+ const React = await need('react');
51
+ const reactDom = await need('react-dom/client');
52
+ const jsxRuntime = await need('react/jsx-runtime');
46
53
  const jsxDevRuntime = await import('react/jsx-dev-runtime').catch(() => jsxRuntime);
47
54
 
48
55
  const modules = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-toolkit",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Preflight, release and test DeepSeek Harness plugins: checks what the host needs, waits for npm to actually serve the version, and keeps the market index honest.",
5
5
  "type": "module",
6
6
  "bin": {