create-linkdesk-plugin 0.1.5 โ†’ 0.1.7

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.
Files changed (2) hide show
  1. package/README.md +24 -2
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -3,15 +3,17 @@
3
3
  The LinkDesk plugin scaffold โ€” one command generates your first plugin project (the `yo code` equivalent).
4
4
 
5
5
  ```bash
6
- npm create linkdesk-plugin my-cool-plugin
6
+ npm create linkdesk-plugin@latest my-cool-plugin
7
7
  ```
8
8
 
9
9
  Run it without a name and it asks interactively:
10
10
 
11
11
  ```bash
12
- npm create linkdesk-plugin
12
+ npm create linkdesk-plugin@latest
13
13
  ```
14
14
 
15
+ > ๐Ÿ”ด **Always write `@latest`.** Without the version anchor npm's `npx` cache may silently reuse a months-old copy and hand you an outdated skeleton โ€” the CLI does not print its own version, so the only symptom is a project missing files (no `.git`, no `AGENTS.md`, no CI). With `@latest` npm is forced to ask the registry. Already bitten? `npm cache clean --force`.
16
+
15
17
  ## What you get
16
18
 
17
19
  The generated project has **the same shape as an official plugin** โ€” README / CHANGELOG / resources / i18n, nothing missing:
@@ -27,6 +29,8 @@ my-cool-plugin/
27
29
  โ”œโ”€โ”€ CHANGELOG.md # release notes โ€” data source for the marketplace "Changelog" tab
28
30
  โ”œโ”€โ”€ .github/workflows/ci.yml # CI that runs `npm run verify` on every push
29
31
  โ”œโ”€โ”€ scripts/ci-verify.mjs # the strict tier CI runs (lint + tests + declaration self-checks)
32
+ โ”œโ”€โ”€ vitest.config.ts # test config (jsdom + globals; @linkdesk/ui is inlined so its CSS import resolves)
33
+ โ”œโ”€โ”€ vitest.setup.ts # test runtime ground โ€” mocks window.linkdesk (no Electron preload under vitest)
30
34
  โ”œโ”€โ”€ .vscode/settings.json # plugin.json is treated as jsonc (comments do not light up red)
31
35
  โ”œโ”€โ”€ resources/
32
36
  โ”‚ โ””โ”€โ”€ icon.svg # placeholder icon โ€” replace it with your own
@@ -60,3 +64,21 @@ npm run publish # one-shot publish (creates the GitHub Release + uploads + up
60
64
  > with the Chinese original at `docs/03-ๆ’ไปถๅˆถ้€ /`.
61
65
 
62
66
  > ๐Ÿ”ด The generated `AGENTS.md` also carries this pointer, plus the iron rules inline โ€” so the AI working in your project knows where to look without being told.
67
+
68
+ ## Maintaining this package (LinkDesk maintainers)
69
+
70
+ This package is **one of the five author axes** (the others: `@linkdesk/contracts` / `@linkdesk/plugin-sdk` / `@linkdesk/ui` / `@linkdesk/plugin-docs`) and has its own version axis โ€” **publishing it does not bump the application, and the application does not bump it**.
71
+
72
+ ๐Ÿ”ด **The template is the product**: change `template/**` and the package version **must** be bumped and published โ€” otherwise the skeleton authors get stays old and **no gate goes red** (only `check:npm-release` shows a yellow light).
73
+
74
+ ```bash
75
+ # 1. bump packages/create-linkdesk-plugin/package.json version (0.x backward-compatible โ†’ patch)
76
+ # 2. publish
77
+ npm publish --registry=https://registry.npmjs.org # ๐Ÿ”ด the registry flag is mandatory โ€” the machine default is a read-only mirror
78
+ # 3. record the baseline (run in the LinkDesk repo root)
79
+ npm run release:mark
80
+ # 4. after publishing, verify the generated output really matches the template
81
+ npm run check:scaffold
82
+ ```
83
+
84
+ > Full procedure + the three measured pitfalls โ†’ **`docs/06-ๅ‘ๅธƒ็ฎก็†/ไฝœ่€…่ฝดnpmๅ‘็‰ˆ.md`** in the LinkDesk repository.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-linkdesk-plugin",
3
- "version": "0.1.5",
4
- "description": "LinkDesk ๆ’ไปถ่„šๆ‰‹ๆžถโ€”โ€”`npm create linkdesk-plugin my-cool-plugin` ไธ€่กŒ็”Ÿๆˆไฝ ็š„็ฌฌไธ€ไธชๆ’ไปถ้กน็›ฎ๏ผˆๅฏนๆ ‡ yo code๏ผ‰ใ€‚",
3
+ "version": "0.1.7",
4
+ "description": "LinkDesk ๆ’ไปถ่„šๆ‰‹ๆžถโ€”โ€”`npm create linkdesk-plugin@latest my-cool-plugin` ไธ€่กŒ็”Ÿๆˆไฝ ็š„็ฌฌไธ€ไธชๆ’ไปถ้กน็›ฎ๏ผˆๅฏนๆ ‡ yo code๏ผ‰ใ€‚",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "create-linkdesk-plugin": "index.js"