prjct-cli 2.1.2 → 2.2.2

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,105 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.2.2] - 2026-04-22
4
+
5
+ ### Bug Fixes
6
+
7
+ - sandboxable config resolver + stop leaking to real config
8
+
9
+
10
+ ## [2.2.1] - 2026-04-22
11
+
12
+ Follow-up to 2.2.0: the vault was generated at the right location but
13
+ Obsidian refused to open it via `obsidian://open?vault=<slug>` because
14
+ the folder wasn't registered in Obsidian's global vault list. Users had
15
+ to manually "Open folder as vault" the first time.
16
+
17
+ ### Added
18
+ - `core/services/obsidian-vault.ts`: `ensureObsidianVault(vaultPath)`
19
+ does two things, idempotently:
20
+ 1. Bootstraps a minimal `.obsidian/app.json` inside the vault so
21
+ Obsidian treats the folder as already-initialized (and skips its
22
+ trust prompt).
23
+ 2. Registers the vault path in Obsidian's config file
24
+ (`~/Library/Application Support/obsidian/obsidian.json` on macOS,
25
+ `$XDG_CONFIG_HOME/obsidian/obsidian.json` on Linux,
26
+ `%APPDATA%\obsidian\obsidian.json` on Windows). The vault then
27
+ shows up in the Vault Switcher after a restart.
28
+ Best-effort — quietly skips registration when Obsidian isn't
29
+ installed (no config directory). Bootstrap still runs so the vault
30
+ is valid the moment the user does run Obsidian.
31
+ - `wiki-generator.ts` calls `ensureObsidianVault(wikiRoot)` at the end
32
+ of every regen. `.catch(() => undefined)` guard: never fail a regen
33
+ because Obsidian glue misbehaved.
34
+ - Tests in `core/__tests__/services/obsidian-vault.test.ts` cover
35
+ bootstrap, URL-encoding of vault names, registration append (keeps
36
+ prior vaults), idempotency, and the no-Obsidian-installed path.
37
+
38
+ ### Operator note
39
+
40
+ First-time upgraders from <2.2.1: Obsidian caches its vault list in
41
+ memory. Close Obsidian fully (⌘Q on macOS, File > Exit on Windows/
42
+ Linux) and relaunch — the newly-registered vault will appear in the
43
+ switcher.
44
+
45
+ ## [2.2.0] - 2026-04-22
46
+
47
+ Obsidian vault location moved out of the repo. Each project now has its
48
+ own visible vault at `~/Documents/prjct/<slug>/` instead of the hidden
49
+ `<repo>/.prjct/wiki/` path. Two reasons:
50
+
51
+ 1. The `.prjct/` prefix is a dotfile — Finder/Explorer hide it by
52
+ default, so users who opened Obsidian looking for their vault often
53
+ couldn't find it. The new path lives under `~/Documents/prjct/`,
54
+ visible without toggling hidden files.
55
+ 2. Privacy-by-default. The old path lived inside the repo and got
56
+ committed on any `git add -A` unless the user remembered to
57
+ `.gitignore` it — leaking private decisions, learnings, and gotchas
58
+ on push.
59
+
60
+ ### Changed (BREAKING — path, not API)
61
+ - Default vault path: `~/Documents/prjct/<slug>/` where `<slug>` is
62
+ derived from the project directory name (basename, lowercased,
63
+ slugified). Callers that hard-coded `.prjct/wiki/` will no longer find
64
+ the vault there.
65
+ - `core/infrastructure/path-manager.ts` exposes a new `getWikiPath()`
66
+ resolver as the single source of truth. Both `wiki-generator.ts` and
67
+ `wiki-ingest.ts` route through it.
68
+
69
+ ### Added
70
+ - `vaultPath` field in `.prjct/prjct.config.json` (optional string) —
71
+ overrides the default. Accepts absolute paths, `~/...`, or
72
+ project-relative paths (e.g. `"./docs/wiki"` to keep the vault
73
+ in-repo). Use `"vaultPath": ".prjct/wiki"` to keep pre-2.2.0 behaviour
74
+ verbatim.
75
+ - Auto-migration: the first `prjct remember`/`ship`/`context wiki sync`
76
+ after upgrade detects a legacy `.prjct/wiki/` folder and moves its
77
+ contents to the new location. Cross-filesystem moves (EXDEV) fall
78
+ back to copy + delete. Idempotent.
79
+ - `.gitignore` gets a `.prjct/wiki/` entry appended when a git repo is
80
+ detected during migration, so the legacy folder doesn't show up in
81
+ `git status` if a tracked copy was ever committed.
82
+ - Tests:
83
+ - `core/__tests__/infrastructure/path-manager-wiki.test.ts` covers the
84
+ resolver (defaults, overrides, slug collisions, project-relative
85
+ rollback).
86
+ - `core/__tests__/services/wiki-migration.test.ts` covers the move
87
+ (no-op cases, conflict detection, gitignore dedup).
88
+
89
+ ### Migration notes
90
+
91
+ - **Nothing breaks for users who accept the default.** The first
92
+ wiki-touching command after upgrading moves your existing
93
+ `.prjct/wiki/` to `~/Documents/prjct/<repo-name>/` with a one-line
94
+ stderr notice, then continues. Second invocation is silent.
95
+ - **To keep the old path**, add `"vaultPath": ".prjct/wiki"` to
96
+ `.prjct/prjct.config.json`. The migration respects the override and
97
+ leaves the legacy folder alone.
98
+ - **Conflict handling**: if you somehow already have content at both
99
+ the legacy path and the new default, the migration refuses to
100
+ overwrite and prints a warning. Merge manually or pick a side via
101
+ `vaultPath`.
102
+
3
103
  ## [2.1.2] - 2026-04-22
4
104
 
5
105
  Upgrade-safety pass for clients coming from 1.x or 2.1.0. The 2.1.1