Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/internal-range-policy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@croco/frontend-react": patch
---

Published manifests no longer carry a stale semver range for the internal `@croco/meta-vite` peer; internal Croco source manifest references are checked against the workspace range policy before release.
10 changes: 10 additions & 0 deletions docs/release/package-entrypoint-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ imports `reflect-metadata`, that package must declare `reflect-metadata` in runt
`dependencies`. Keeping it only in `devDependencies`, or relying on another Croco package to hoist it
for consumers, is not valid because strict package managers may isolate transitive dependencies.

Internal Croco package references use `workspace:*` in source manifests across `dependencies`,
`devDependencies`, `peerDependencies`, and `optionalDependencies`. This includes internal peer
dependencies: pnpm rewrites `workspace:*` to the target workspace package version during
[pack and publish](https://pnpm.io/workspaces#publishing-workspace-packages), so source manifests do
not need hand-written internal semver ranges. If a future public peer compatibility range must stay
as semver in source, add an exact checked exception to
`scripts/internal-peer-dependency-range-exceptions.json` with the package name, `peerDependencies`
section, internal dependency name, range, and compatibility rationale. Exceptions are peer-only;
internal `dependencies`, `devDependencies`, and `optionalDependencies` still use `workspace:*`.

The contract is enforced by:

```bash
Expand Down
4 changes: 2 additions & 2 deletions packages/frontend-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@
"@croco/problems-core": "workspace:*"
},
"devDependencies": {
"@croco/meta-vite": "^0.0.4",
"@croco/meta-vite": "workspace:*",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"vitest": "4.0.16"
},
"peerDependencies": {
"@croco/meta-vite": "^0.0.4",
"@croco/meta-vite": "workspace:*",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
Expand Down
1 change: 1 addition & 0 deletions scripts/internal-peer-dependency-range-exceptions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Loading
Loading