@henryqw/pi-deps 1.0.0 → 1.0.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/README.md +19 -25
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
# `@henryqw/pi-deps`
|
|
2
2
|
|
|
3
|
-
Start locked Node and uv dependency installs whenever Git creates a worktree for an opted-in repository.
|
|
4
|
-
|
|
5
|
-
## Why
|
|
6
|
-
|
|
7
|
-
- **Created for**: Developers who create worktrees through several tools.
|
|
8
|
-
- **Advantage**: One Git hook prepares every new checkout without adding work to each Pi startup.
|
|
3
|
+
Start locked Node and uv dependency installs whenever Git creates a worktree for an opted-in repository. Developers using several worktree tools get one shared hook without adding work to every Pi startup.
|
|
9
4
|
|
|
10
5
|
## Install
|
|
11
6
|
|
|
@@ -13,7 +8,7 @@ Start locked Node and uv dependency installs whenever Git creates a worktree for
|
|
|
13
8
|
pi install npm:@henryqw/pi-deps
|
|
14
9
|
```
|
|
15
10
|
|
|
16
|
-
Node 22.19 or newer, Git, and each selected package manager must be available on `PATH` used by Git.
|
|
11
|
+
Node 22.19 or newer, Git, and each selected package manager must be available on the `PATH` used by Git.
|
|
17
12
|
|
|
18
13
|
## Use
|
|
19
14
|
|
|
@@ -21,41 +16,40 @@ Run `/deps` in a trusted repository to enable preparation. Create a worktree, th
|
|
|
21
16
|
|
|
22
17
|
Pi shows install progress and reports the result. Run `/deps` again when you want to disable future preparation.
|
|
23
18
|
|
|
24
|
-
### Enable, disable, and update
|
|
25
|
-
|
|
26
19
|
- Run `/deps` once from any worktree to enable preparation through the repository's shared `post-checkout` hook.
|
|
27
20
|
- Run `/deps` again to disable it.
|
|
28
21
|
- Hooks without this package's marker are never overwritten or removed.
|
|
29
22
|
- After updating the package, run `/deps` twice in each opted-in repository. This replaces the copied hook with the current version.
|
|
30
|
-
- A configured `core.hooksPath` replaces the shared hooks directory. `/deps` refuses instead of installing where Git would ignore or share the hook.
|
|
31
23
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
- Only Git-root lockfiles are inspected.
|
|
35
|
-
- npm, pnpm, Yarn, and Bun use frozen installs. uv uses `uv sync --locked`.
|
|
36
|
-
- Node and uv both run when both lockfile types exist.
|
|
37
|
-
- Root npm and uv workspaces remain package-manager concerns. Nested independent projects are not scanned.
|
|
38
|
-
|
|
39
|
-
### Background install and status
|
|
24
|
+
## Flow
|
|
40
25
|
|
|
41
26
|

|
|
42
27
|
|
|
43
28
|
- Worktree creation returns immediately.
|
|
44
29
|
- The hook validates lockfiles synchronously. Conflicting Node lockfiles, `packageManager` mismatches, and unsupported declarations still fail the worktree command fast.
|
|
45
30
|
- A detached installer runs frozen installs in the background.
|
|
46
|
-
- Its result is stored in `<worktree gitdir>/pi-deps/status.json`. Command output is in the adjacent `install.log`.
|
|
47
|
-
- The status file is removed once a Pi session reports it.
|
|
48
31
|
- A Pi session in the worktree shows an editor widget while installing. It auto-dismisses success after five seconds and keeps failures visible, including missing executables.
|
|
49
|
-
- Other tools that create worktrees get the same background install. They must consume the status file themselves.
|
|
50
32
|
|
|
51
|
-
|
|
33
|
+
Node and uv both run when both lockfile types exist.
|
|
34
|
+
|
|
35
|
+
## State and storage
|
|
52
36
|
|
|
37
|
+
The installer stores its result in `<worktree gitdir>/pi-deps/status.json`. Command output is in the adjacent `install.log`.
|
|
38
|
+
|
|
39
|
+
The status file is removed once a Pi session reports it. Other tools that create worktrees get the same background install. They must consume the status file themselves.
|
|
40
|
+
|
|
41
|
+
## Data, cost, and privacy
|
|
42
|
+
|
|
43
|
+
Dependency installation may execute repository-controlled build and install scripts. Enable only repositories you trust.
|
|
44
|
+
|
|
45
|
+
## Limits and recovery
|
|
46
|
+
|
|
47
|
+
- A configured `core.hooksPath` replaces the shared hooks directory. `/deps` refuses instead of installing where Git would ignore or share the hook.
|
|
48
|
+
- Only Git-root lockfiles are inspected.
|
|
49
|
+
- Root npm and uv workspaces remain package-manager concerns. Nested independent projects are not scanned.
|
|
53
50
|
- Already-present `node_modules`, `.pnp.cjs`, or `.venv` are skipped.
|
|
54
51
|
- Worktrees created with `git worktree add --no-checkout` never run `post-checkout`, so they are not prepared.
|
|
55
52
|
- Installs finish after creation returns. A consumer may use a worktree before dependencies are ready.
|
|
56
|
-
- Dependency installation may execute repository-controlled build and install scripts. Enable only repositories you trust.
|
|
57
|
-
|
|
58
|
-
## Supported managers
|
|
59
53
|
|
|
60
54
|
Only current major versions are supported. Older majors are not handled and fall back to the lockfile default below.
|
|
61
55
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@henryqw/pi-deps",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Prepare Node and uv dependencies when opted-in Git worktrees are created.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"pack:check": "npm pack --dry-run"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@earendil-works/pi-coding-agent": "^0.85.
|
|
31
|
-
"@earendil-works/pi-tui": "^0.85.
|
|
30
|
+
"@earendil-works/pi-coding-agent": "^0.85.1",
|
|
31
|
+
"@earendil-works/pi-tui": "^0.85.1"
|
|
32
32
|
},
|
|
33
33
|
"repository": {
|
|
34
34
|
"type": "git",
|