obsidian-wikilinks 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.
Files changed (2) hide show
  1. package/README.md +42 -29
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # obsidian-wikilinks
2
2
 
3
+ [![Claude Code](https://img.shields.io/badge/Claude_Code-supported-D97757?logo=claude&logoColor=white)](#install-in-claude-code)
4
+ [![Codex](https://img.shields.io/badge/Codex-supported-000000?logoColor=white)](#install-in-codex)
5
+ [![OpenCode](https://img.shields.io/badge/OpenCode-supported-FBBF24?logo=opencode&logoColor=white)](#install-in-opencode)
6
+ [![npm](https://img.shields.io/npm/v/obsidian-wikilinks?logo=npm&logoColor=white&color=CB3837)](https://www.npmjs.com/package/obsidian-wikilinks)
7
+ [![CI](https://github.com/DepickereSven/obsidian-wikilinks/actions/workflows/ci.yml/badge.svg)](https://github.com/DepickereSven/obsidian-wikilinks/actions/workflows/ci.yml)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue)](LICENSE)
9
+
3
10
  Resolve `[[wikilinks]]` typed in a Codex, Claude Code, or OpenCode prompt to
4
11
  absolute paths in your Obsidian vault, and inject them as context so the agent
5
12
  reads the right notes.
@@ -42,6 +49,7 @@ claude plugin install obsidian-wikilinks@depickeresven-obsidian-wikilinks
42
49
 
43
50
  ### From npm (recommended)
44
51
 
52
+ If you want it local in one project
45
53
  ```bash
46
54
  opencode plugin obsidian-wikilinks
47
55
  ```
@@ -58,8 +66,11 @@ That installs the package and adds it to your config. Or add it by hand:
58
66
  Use `~/.config/opencode/opencode.json` for every project, or `opencode.json` in
59
67
  a repo for that project only.
60
68
 
61
- > The package is not on npm yet. Until it is published, use one of the local
62
- > options below, or publish it yourself from a checkout with `npm publish`.
69
+ Or you want it installed global:
70
+ ```bash
71
+ opencode plugin obsidian-wikilinks --global
72
+ ```
73
+
63
74
 
64
75
  ### From a local checkout
65
76
 
@@ -166,42 +177,44 @@ npm run test:bun # same tests on Bun, the runtime OpenCode uses
166
177
  No dependencies to install: the plugin uses Node/Bun built-ins and the resolver
167
178
  is standard-library Python.
168
179
 
169
- ## Releasing
180
+ ### Releasing
170
181
 
171
- CI runs the test suite on Node 20/22/24 and on Bun for every push and pull
172
- request, and checks that the packed tarball ships both `plugin/` and `hooks/`.
182
+ Two workflows, chained.
173
183
 
174
- To cut a release:
184
+ `.github/workflows/ci.yml` runs the smoke tests on Node 20/22/24 and on Bun, and
185
+ checks the packed tarball ships both `plugin/` and `hooks/`. It runs on pull
186
+ requests and on pushes to `main` — not on every branch, so a pull request is
187
+ never tested twice.
175
188
 
176
- ```bash
177
- npm version patch # or minor / major
178
- git push --follow-tags
179
- gh release create "v$(node -p 'require("./package.json").version')" --generate-notes
180
- ```
189
+ `.github/workflows/publish.yml` starts only when a CI run on `main` finishes
190
+ successfully, checks out that exact commit, and asks npm whether the version in
191
+ `package.json` already exists:
192
+
193
+ - **Already on npm** — nothing is released. This is what an ordinary push to
194
+ `main` does.
195
+ - **Not on npm** — it publishes with provenance, tags the commit, and opens a
196
+ GitHub release with notes generated from the merged commits.
181
197
 
182
- `npm version` also rewrites the Claude Code and Codex manifests through
183
- `scripts/sync-versions.mjs`, so all three stay on one version. Publishing the
184
- GitHub release triggers `.github/workflows/publish.yml`, which re-runs the
185
- tests, verifies the tag matches `package.json`, refuses to overwrite a version
186
- already on npm, and publishes with provenance.
198
+ So a version bump landing on `main` *is* the release, and it can only happen
199
+ after CI has gone green on that commit.
187
200
 
188
- The workflow authenticates through **npm trusted publishing** (OIDC), so no
189
- token is stored in the repository. One-time setup: on npmjs.com, open the
190
- package's *Settings -> Trusted publishers*, and add this repository with
191
- workflow `publish.yml`.
201
+ To cut one:
192
202
 
193
- Trusted-publisher settings live on the package, so they can only be configured
194
- once the package exists. Do the **first** publish by hand from a checkout with
195
- `npm publish --access public`, then wire up the trusted publisher and let the
196
- workflow handle every release after that.
203
+ ```bash
204
+ npm version patch --no-git-tag-version # or minor / major
205
+ git commit -am "Release $(node -p 'require("./package.json").version')"
206
+ git push
207
+ ```
197
208
 
198
- To use a granular access token instead, save it as the `NPM_TOKEN` secret and
199
- uncomment the `NODE_AUTH_TOKEN` block in the workflow.
209
+ `--no-git-tag-version` matters: the workflow creates the tag, so creating one
210
+ locally would collide. The bump still runs `scripts/sync-versions.mjs`, keeping
211
+ the Claude Code and Codex manifests on the same version as `package.json` — CI
212
+ fails the build if they ever drift.
200
213
 
201
- Use the workflow's manual trigger (`workflow_dispatch`) with *dry run* enabled
202
- to rehearse a publish without releasing anything.
214
+ Use the publish workflow's manual trigger (`workflow_dispatch`) with *dry run*
215
+ enabled to rehearse a publish without releasing anything.
203
216
 
204
- ## Requirements
217
+ ### Requirements
205
218
 
206
219
  - `python3` on PATH (standard-library only; no pip installs).
207
220
  - OpenCode only: no extra dependencies — the plugin uses Node/Bun built-ins.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "obsidian-wikilinks",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Resolve Obsidian [[wikilinks]] in coding-agent prompts to local vault paths and inject them as context.",
5
5
  "type": "module",
6
6
  "main": "plugin/obsidian-wikilinks.js",