obsidian-plugin-dev-kit 0.3.2 → 0.3.3
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.md +4 -4
- package/dist/build-info.json +1 -1
- package/docs/build.md +1 -1
- package/docs/ci.md +2 -2
- package/docs/e2e.md +2 -2
- package/docs/scanner.md +1 -1
- package/package.json +1 -1
- package/plugins/opdk/skills/build/SKILL.md +1 -1
- package/plugins/opdk/skills/release/SKILL.md +1 -1
- package/plugins/opdk/skills/scanner/SKILL.md +1 -1
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ npm install -D -E obsidian-plugin-dev-kit
|
|
|
32
32
|
npx opdk --help
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
From v0.3.2 the kit is on npm (`-E` pins the exact version). Versions from 0.3.3 on are published by a GitHub workflow and carry npm provenance; 0.3.2 was published by hand. A git tag works too: `npm install -D "github:Dimagious/obsidian-plugin-dev-kit#v0.3.
|
|
35
|
+
From v0.3.2 the kit is on npm (`-E` pins the exact version). Versions from 0.3.3 on are published by a GitHub workflow and carry npm provenance; 0.3.2 was published by hand. A git tag works too: `npm install -D "github:Dimagious/obsidian-plugin-dev-kit#v0.3.3"`. `opdk kit upgrade` (below) moves only a git-tag install for now. With npm, run `npm install -D -E obsidian-plugin-dev-kit@X.Y.Z`, then in each `uses:` line of the kit's workflows set the commit of that tag (`git ls-remote https://github.com/Dimagious/obsidian-plugin-dev-kit 'refs/tags/vX.Y.Z^{}'`; the tags are annotated, and without `^{}` it prints the tag object) and the comment `# vX.Y.Z`. `opdk release check` compares the comments with the installed version; it cannot check the commit of an npm install, so update the two together.
|
|
36
36
|
|
|
37
37
|
Install size, measured on 2026-11-16: the package is 396 KB packed and 1.3 MB unpacked. In an empty project it brings about 100 MB with its required dependencies, mostly TypeScript, esbuild and the ESLint stack a plugin usually has already. Electron, Playwright, Vitest, `@vitest/coverage-v8` and jsdom are not dependencies of the kit at all: the plugin installs them for end-to-end tests, demo films and unit tests, and the kit checks their versions when it runs and fails with the install command. ESLint and TypeScript 6 are the only peer dependencies; `opdk scan` fails on an older TypeScript, because the community scanner type-checks with 6.
|
|
38
38
|
|
|
@@ -123,10 +123,10 @@ A plugin pins the kit in three places: the tag in `package.json`, the commit in
|
|
|
123
123
|
|
|
124
124
|
```bash
|
|
125
125
|
npx opdk kit upgrade --dry-run # what would change, and the kit's CHANGELOG since your version
|
|
126
|
-
npx opdk kit upgrade # latest release; or: npx opdk kit upgrade v0.3.
|
|
126
|
+
npx opdk kit upgrade # latest release; or: npx opdk kit upgrade v0.3.3
|
|
127
127
|
```
|
|
128
128
|
|
|
129
|
-
On v0.1.0, which has no `kit` command, run it once as `npx -y -p github:Dimagious/obsidian-plugin-dev-kit#v0.3.
|
|
129
|
+
On v0.1.0, which has no `kit` command, run it once as `npx -y -p github:Dimagious/obsidian-plugin-dev-kit#v0.3.3 opdk kit upgrade v0.3.3`. It needs a clean git tree, never commits or pushes, and puts `package.json` and the lockfile back if `npm install` fails (run `npm ci` if `node_modules` looks off). Review the diff and open a pull request. Configure Dependabot to ignore the kit (a lone bump of one pin breaks the check; the `ignore` entries are in the docs) and watch the kit's releases on GitHub. Details: [docs/ci.md](docs/ci.md#updating-the-kit).
|
|
130
130
|
|
|
131
131
|
## Unit tests
|
|
132
132
|
|
|
@@ -206,7 +206,7 @@ npm run e2e:smoke # the kit's own e2e specs against a real Obsidian; by hand be
|
|
|
206
206
|
|
|
207
207
|
`dist/` is not committed. `npm install` from a git tag runs `prepare`, which builds it, so a broken build breaks every plugin install. CI runs the same checks plus the smoke on every pull request.
|
|
208
208
|
|
|
209
|
-
Releasing: bump `version` in `package.json`, move the `[Unreleased]` entries in `CHANGELOG.md` under the new version, merge, then the owner tags `vX.Y.Z` and pushes the tag. A workflow fails the tag if it differs from `package.json`, and another publishes that version to npm with provenance. Plugins pin the version, for example `obsidian-plugin-dev-kit@0.3.
|
|
209
|
+
Releasing: bump `version` in `package.json`, move the `[Unreleased]` entries in `CHANGELOG.md` under the new version, merge, then the owner tags `vX.Y.Z` and pushes the tag. A workflow fails the tag if it differs from `package.json`, and another publishes that version to npm with provenance. Plugins pin the version, for example `obsidian-plugin-dev-kit@0.3.3` from npm or `github:Dimagious/obsidian-plugin-dev-kit#v0.3.3`.
|
|
210
210
|
|
|
211
211
|
## Credits
|
|
212
212
|
|
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"commit":"
|
|
1
|
+
{"commit":"f3267c5"}
|
package/docs/build.md
CHANGED
|
@@ -49,7 +49,7 @@ In `package.json`:
|
|
|
49
49
|
"dev:vault": "opdk build --vault --watch"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"obsidian-plugin-dev-kit": "github:Dimagious/obsidian-plugin-dev-kit#v0.3.
|
|
52
|
+
"obsidian-plugin-dev-kit": "github:Dimagious/obsidian-plugin-dev-kit#v0.3.3"
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
```
|
package/docs/ci.md
CHANGED
|
@@ -107,13 +107,13 @@ A plugin pins the kit in three places that have to name one release: the tag in
|
|
|
107
107
|
|
|
108
108
|
```bash
|
|
109
109
|
npx opdk kit upgrade --dry-run # the lines that would change, and what the kit changed
|
|
110
|
-
npx opdk kit upgrade # latest release; or: npx opdk kit upgrade v0.3.
|
|
110
|
+
npx opdk kit upgrade # latest release; or: npx opdk kit upgrade v0.3.3
|
|
111
111
|
```
|
|
112
112
|
|
|
113
113
|
A plugin on v0.1.0 has no `kit` command yet, so `npx opdk kit upgrade` stops with `unknown command "kit"`. Run the new release's `opdk` once through npx instead; npx builds the kit in its own cache, which took about a minute on each of three plugins:
|
|
114
114
|
|
|
115
115
|
```bash
|
|
116
|
-
npx -y -p github:Dimagious/obsidian-plugin-dev-kit#v0.3.
|
|
116
|
+
npx -y -p github:Dimagious/obsidian-plugin-dev-kit#v0.3.3 opdk kit upgrade v0.3.3
|
|
117
117
|
```
|
|
118
118
|
|
|
119
119
|
From v0.2.0 on, the installed `opdk` has the command.
|
package/docs/e2e.md
CHANGED
|
@@ -57,7 +57,7 @@ Install the kit and the two things it runs on. The kit does not declare them as
|
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@playwright/test": "1.65.0",
|
|
59
59
|
"electron": "44.10.2",
|
|
60
|
-
"obsidian-plugin-dev-kit": "github:Dimagious/obsidian-plugin-dev-kit#v0.3.
|
|
60
|
+
"obsidian-plugin-dev-kit": "github:Dimagious/obsidian-plugin-dev-kit#v0.3.3"
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
```
|
|
@@ -151,7 +151,7 @@ npm records a GitHub dependency in `package-lock.json` as `git+ssh://git@github.
|
|
|
151
151
|
GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=url.https://github.com/.insteadOf GIT_CONFIG_VALUE_0=ssh://git@github.com/ npm ci
|
|
152
152
|
```
|
|
153
153
|
|
|
154
|
-
On a CI runner, which is thrown away after the job, `git config --global url."https://github.com/".insteadOf ssh://git@github.com/` before `npm ci` does the same. Or write the dependency as `git+https://github.com/Dimagious/obsidian-plugin-dev-kit.git#v0.3.
|
|
154
|
+
On a CI runner, which is thrown away after the job, `git config --global url."https://github.com/".insteadOf ssh://git@github.com/` before `npm ci` does the same. Or write the dependency as `git+https://github.com/Dimagious/obsidian-plugin-dev-kit.git#v0.3.3` in `package.json`.
|
|
155
155
|
|
|
156
156
|
## What happens per test
|
|
157
157
|
|
package/docs/scanner.md
CHANGED
|
@@ -22,7 +22,7 @@ Add the command to `package.json` and run it before every release:
|
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"eslint": "^10.14.0",
|
|
24
24
|
"typescript": "^6.0.3",
|
|
25
|
-
"obsidian-plugin-dev-kit": "github:Dimagious/obsidian-plugin-dev-kit#v0.3.
|
|
25
|
+
"obsidian-plugin-dev-kit": "github:Dimagious/obsidian-plugin-dev-kit#v0.3.3"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
```
|
package/package.json
CHANGED
|
@@ -62,7 +62,7 @@ How to read it:
|
|
|
62
62
|
|
|
63
63
|
## Migrating a plugin's build scripts
|
|
64
64
|
|
|
65
|
-
1. `npm install --save-dev github:Dimagious/obsidian-plugin-dev-kit#v0.3.
|
|
65
|
+
1. `npm install --save-dev github:Dimagious/obsidian-plugin-dev-kit#v0.3.3` (pin an exact tag).
|
|
66
66
|
2. Replace the scripts:
|
|
67
67
|
|
|
68
68
|
| Before | After |
|
|
@@ -43,7 +43,7 @@ Reading failures:
|
|
|
43
43
|
|
|
44
44
|
## Upgrading the kit
|
|
45
45
|
|
|
46
|
-
The kit is pinned in `package.json` (`github:Dimagious/obsidian-plugin-dev-kit#vX.Y.Z`), in the lockfile (a commit) and in each kit `uses: ...@<sha> # vX.Y.Z` line of the workflows. `opdk kit upgrade [vX.Y.Z]` moves all three: it finds the latest `vX.Y.Z` tag with `git ls-remote --tags` (no login), rewrites `package.json`, runs `npm install` for that package (a minute: npm builds the kit; on failure `package.json` and the lockfile are put back, nothing else; run `npm ci` if `node_modules` looks off; without a lockfile npm does not run), rewrites the workflow lines with the new commit and `# vX.Y.Z`, runs the `kit` check, and prints the kit's CHANGELOG sections since the old version. Then: read the changelog, commit on a branch, open a pull request. Configure Dependabot to ignore the kit (a lone bump of one pin breaks the `kit` check; the two `ignore` entries are in docs/ci.md), and learn about new kit releases by watching the kit's releases on GitHub. Refuses a dirty tree (`--dry-run` does not). A plugin on v0.1.0 has no `kit` command (`unknown command "kit"`): run `npx -y -p github:Dimagious/obsidian-plugin-dev-kit#v0.3.
|
|
46
|
+
The kit is pinned in `package.json` (`github:Dimagious/obsidian-plugin-dev-kit#vX.Y.Z`), in the lockfile (a commit) and in each kit `uses: ...@<sha> # vX.Y.Z` line of the workflows. `opdk kit upgrade [vX.Y.Z]` moves all three: it finds the latest `vX.Y.Z` tag with `git ls-remote --tags` (no login), rewrites `package.json`, runs `npm install` for that package (a minute: npm builds the kit; on failure `package.json` and the lockfile are put back, nothing else; run `npm ci` if `node_modules` looks off; without a lockfile npm does not run), rewrites the workflow lines with the new commit and `# vX.Y.Z`, runs the `kit` check, and prints the kit's CHANGELOG sections since the old version. Then: read the changelog, commit on a branch, open a pull request. Configure Dependabot to ignore the kit (a lone bump of one pin breaks the `kit` check; the two `ignore` entries are in docs/ci.md), and learn about new kit releases by watching the kit's releases on GitHub. Refuses a dirty tree (`--dry-run` does not). A plugin on v0.1.0 has no `kit` command (`unknown command "kit"`): run `npx -y -p github:Dimagious/obsidian-plugin-dev-kit#v0.3.3 opdk kit upgrade v0.3.3` once. Docs: `node_modules/obsidian-plugin-dev-kit/docs/ci.md`, section "Updating the kit".
|
|
47
47
|
|
|
48
48
|
## The push flow and its stops
|
|
49
49
|
|
|
@@ -49,7 +49,7 @@ Options: `rootDir` (default `process.cwd()`), `tsconfig` (default `./tsconfig.js
|
|
|
49
49
|
|
|
50
50
|
## Migrating a plugin's scripts
|
|
51
51
|
|
|
52
|
-
1. `npm install --save-dev github:Dimagious/obsidian-plugin-dev-kit#v0.3.
|
|
52
|
+
1. `npm install --save-dev github:Dimagious/obsidian-plugin-dev-kit#v0.3.3` (exact tag). Keep `eslint` as the plugin's own devDependency (peer of the kit, `^9.19.0 || ^10.0.0`) and `typescript` (peer, `>=6.0.0 <6.1.0`; `npm install -D typescript@6`, then fix what `tsc` reports). Add `eslint` explicitly: without an `eslint` devDependency npm installs ESLint 9 on its own, because the plugins nested under obsidianmd peer on `^9`. Then, in order:
|
|
53
53
|
- (a) Remove the plugin's own `eslint-plugin-obsidianmd`, `typescript-eslint`, `@eslint/js` (unused once `obsidianPlugin()` replaces its config), `postcss`, `doiuse`, and `esbuild` if no script calls it directly. The kit pins them.
|
|
54
54
|
- (b) Run `npm install`. On ESLint 10 it may print `ERESOLVE overriding peer dependency` warnings and `npm ls` exits 1. Both come from obsidianmd's own peers, cannot be fixed in the kit, and the install works. `loglevel=error` in the plugin's `.npmrc` quiets them but hides other warnings too.
|
|
55
55
|
- (c) Run `npm explain eslint`, see step 3.
|