You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add front-door delegation to the Node tool + document composition
- With autoRunNode, `version` in a repo with no .NET projects now delegates
entirely to the Node tool, so net-as-`changeset` transparently handles
Node-only repos (the interop + autoRunNode post-pass already covers mixed).
- Loop guard via an inherited env marker so a nodeChangesetCommand that
resolves back to net cannot recurse forever.
- README: "Using alongside @changesets (Node)" with the composition
principle, a CLI/repo chart, the front-door config, and per-shell
`changeset-net` setup instructions (zsh/bash/pwsh).
- Delegation parity test + changeset.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Make net-changesets a front door to the Node `@changesets` tool. With `autoRunNode` enabled, `version` in a repository with no .NET projects (for example a Node-only repo where `changeset` resolved to net) now delegates entirely to the Node tool instead of just reporting nothing to do — so a single `changeset version` works whether the repo is .NET, Node, or both. A loop guard (an inherited environment marker) prevents infinite recursion if `nodeChangesetCommand` is misconfigured to point back at net. The README now documents how the two tools compose.
With `autoRunNode`, `changeset version` versions the .NET side and then invokes the Node tool
64
+
(`nodeChangesetCommand`, default `npx changeset`); in a repo with no .NET projects it delegates to the Node
65
+
tool entirely. net never deletes a Node changeset it didn't process.
66
+
67
+
### How it composes
68
+
69
+
| Repository |`changeset` runs… | What happens |
70
+
| --- | --- | --- |
71
+
|**.NET only**| net | Versions your .NET projects. ✅ |
72
+
|**.NET only**| Node | Node finds no packages — run `changeset-net` instead. |
73
+
|**Node only**| net | With `autoRunNode`, net delegates to the Node tool ✅; otherwise it points you to the Node tool and leaves changesets untouched. |
74
+
|**Node only**| Node | Versions your Node packages. ✅ |
75
+
|**Both**| net | Versions .NET, then runs the Node tool (`interop` + `autoRunNode`) ✅; without interop it versions .NET and keeps Node-only changesets for the Node tool. |
76
+
|**Both**| Node | Versions Node packages only — run `changeset-net version` for the .NET side. |
77
+
78
+
### Reaching net directly: `changeset-net`
79
+
80
+
When the Node tool owns `changeset` (it's first on your `PATH`), add net-changesets' `changeset-net` shell
81
+
function so you can always invoke net regardless of `PATH`. Add the line for your shell to its startup file,
82
+
then restart the shell (or re-source the file):
83
+
84
+
**zsh** — add to `~/.zshrc`:
85
+
86
+
```zsh
56
87
eval"$(changeset shell-init zsh)"
57
88
```
58
89
59
-
`changeset shell-init <shell>` prints the snippet; run `changeset shell-init` for setup instructions. In a
60
-
polyglot repo the smoothest setup is to let net-changesets own `changeset` (it leaves Node changesets untouched
61
-
and guides you to the Node tool when there are no .NET projects), using `changeset-net` only when the Node tool
62
-
owns `changeset`.
90
+
**bash** — add to `~/.bashrc` (on macOS, `$HOME/.bash_profile`):
91
+
92
+
```bash
93
+
eval"$(changeset shell-init bash)"
94
+
```
95
+
96
+
**PowerShell** — add to your `$PROFILE` (open it with `notepad $PROFILE`, creating it if prompted):
0 commit comments