Skip to content

Commit 271a7d6

Browse files
authored
Allow PostHog packages to release individually (#196)
1 parent 5df07b5 commit 271a7d6

4 files changed

Lines changed: 7 additions & 20 deletions

File tree

RELEASING.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This repo publishes three NuGet packages independently:
1212
| `PostHog.AspNetCore` | `PostHog.AspNetCore` | `src/PostHog.AspNetCore/package.json` | `src/PostHog.AspNetCore/PostHog.AspNetCore.csproj` |
1313
| `PostHog.AI` | `PostHog.AI` | `src/PostHog.AI/package.json` | `src/PostHog.AI/PostHog.AI.csproj` |
1414

15-
`PostHog.AspNetCore` and `PostHog.AI` depend on `PostHog`. If a changeset bumps `PostHog`, Changesets will also patch-bump the dependent packages so their NuGet dependencies point at the new `PostHog` version.
15+
The package-specific `package.json` files are Changesets metadata only. They intentionally do not declare internal package dependencies, so Changesets releases only the packages selected by changesets. The actual NuGet package dependencies come from the `.csproj` project references when packages are built.
1616

1717
## How to release
1818

@@ -72,7 +72,8 @@ You can manually trigger the release workflow from the Actions tab with `workflo
7272
- The root `package.json` is tooling-only and is not released.
7373
- The workflow publishes packages sequentially with `PostHog` first, because the other packages depend on it.
7474
- If only `PostHog.AI` changes, only `PostHog.AI` is versioned and published.
75-
- If `PostHog` changes, `PostHog.AspNetCore` and `PostHog.AI` receive patch dependency bumps and are published too.
75+
- If only `PostHog` changes, only `PostHog` is versioned and published, including for major releases.
76+
- Do not add internal `dependencies` entries to the package-specific `package.json` files unless you intentionally want Changesets to couple those packages' releases.
7677

7778
## Troubleshooting
7879

pnpm-lock.yaml

Lines changed: 2 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/PostHog.AI/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
{
22
"name": "PostHog.AI",
33
"version": "0.1.2",
4-
"private": true,
5-
"dependencies": {
6-
"PostHog": "workspace:*"
7-
}
4+
"private": true
85
}
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
{
22
"name": "PostHog.AspNetCore",
33
"version": "2.6.2",
4-
"private": true,
5-
"dependencies": {
6-
"PostHog": "workspace:*"
7-
}
4+
"private": true
85
}

0 commit comments

Comments
 (0)