Skip to content

chore(deps): interface-core as bounded peer + dev dependency - #10

Merged
Upd4ting merged 1 commit into
mainfrom
chore/peer-interface-deps
Jun 16, 2026
Merged

chore(deps): interface-core as bounded peer + dev dependency#10
Upd4ting merged 1 commit into
mainfrom
chore/peer-interface-deps

Conversation

@Upd4ting

@Upd4ting Upd4ting commented Jun 15, 2026

Copy link
Copy Markdown
Member

Move @antelopejs/interface-core from dependencies to peerDependencies (bounded to the current major, e.g. >=0.0.5 <0.1.0) and mirror it in devDependencies for standalone compilation. interface-core is a host-provided runtime singleton; this avoids dual installs and version-pinning overrides downstream. Verified: install, build, lint.

Greptile Summary

This PR moves @antelopejs/interface-core from dependencies to peerDependencies (mirrored in devDependencies) to avoid duplicate installs and version-pinning conflicts in downstream consumers — a correct architectural direction for a host-provided singleton.

  • Both peerDependencies and devDependencies use >=0.0.3 <1.0.0, but the PR description states the intent as <0.1.0; the wider <1.0.0 bound accepts every 0.x minor release, which is where breaking changes land for a pre-0.1 package.
  • The lock file correctly moves the pinned 0.0.3 resolution from dependencies to devDependencies with no other changes.

Confidence Score: 4/5

The architectural change (moving to peerDependencies) is correct, but both ranges use <1.0.0 instead of the <0.1.0 the PR description describes as the intent, leaving the door open to incompatible minor releases of interface-core.

The range >=0.0.3 <1.0.0 accepts future 0.1.x, 0.2.x, etc. releases of a package still in 0.0.x, where minor bumps are the natural place for breaking API changes. The stated goal was to stay within the current minor series (<0.1.0), and the implementation diverges from that intent in both peerDependencies and devDependencies.

package.json — the version range upper bound needs to be tightened from <1.0.0 to <0.1.0 in both dependency sections.

Important Files Changed

Filename Overview
package.json Moves @antelopejs/interface-core to peerDependencies + devDependencies, but the range >=0.0.3 <1.0.0 is broader than the intended <0.1.0 stated in the PR description, potentially accepting breaking minor-version changes.
pnpm-lock.yaml Lock file updated to reflect the move from dependencies to devDependencies; pinned version remains 0.0.3.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[interface-database published] --> B{dependency type}
    B -->|Before PR| C["dependencies: @antelopejs/interface-core ^0.0.3 - bundled into consumer node_modules"]
    B -->|After PR| D["peerDependencies: >=0.0.3 <1.0.0 - host must provide"]
    D --> E["devDependencies: >=0.0.3 <1.0.0 - installed locally for build and test"]
    C --> F[Risk: dual install and version-pin conflicts downstream]
    D --> G[Benefit: single instance, no version override]
    E --> H[pnpm resolves 0.0.3 in lock file]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[interface-database published] --> B{dependency type}
    B -->|Before PR| C["dependencies: @antelopejs/interface-core ^0.0.3 - bundled into consumer node_modules"]
    B -->|After PR| D["peerDependencies: >=0.0.3 <1.0.0 - host must provide"]
    D --> E["devDependencies: >=0.0.3 <1.0.0 - installed locally for build and test"]
    C --> F[Risk: dual install and version-pin conflicts downstream]
    D --> G[Benefit: single instance, no version override]
    E --> H[pnpm resolves 0.0.3 in lock file]
Loading

Reviews (2): Last reviewed commit: "chore(deps): interface deps as bounded p..." | Re-trigger Greptile

Comment thread package.json Outdated
"@antelopejs/interface-core": "^0.0.3"
},
"devDependencies": {
"@antelopejs/interface-core": "^0.0.5",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 In semver, ^0.0.5 for a 0.0.x version does not mean >=0.0.5 <0.1.0 — it means >=0.0.5 <0.0.6 (only the exact patch). So the devDependencies pin resolves to exactly 0.0.5, while the peerDependencies range accepts any release up to 0.1.0. Any future patch like 0.0.6 that satisfies the peer range will never be tested in development, meaning integration issues would only surface downstream for consumers.

Suggested change
"@antelopejs/interface-core": "^0.0.5",
"@antelopejs/interface-core": ">=0.0.5 <0.1.0",
Prompt To Fix With AI
This is a comment left during a code review.
Path: package.json
Line: 66

Comment:
In semver, `^0.0.5` for a `0.0.x` version does **not** mean `>=0.0.5 <0.1.0` — it means `>=0.0.5 <0.0.6` (only the exact patch). So the `devDependencies` pin resolves to exactly `0.0.5`, while the `peerDependencies` range accepts any release up to `0.1.0`. Any future patch like `0.0.6` that satisfies the peer range will never be tested in development, meaning integration issues would only surface downstream for consumers.

```suggestion
    "@antelopejs/interface-core": ">=0.0.5 <0.1.0",
```

How can I resolve this? If you propose a fix, please make it concise.

Interfaces are host-provided runtime singletons, so they move to
peerDependencies. The range keeps the original lower bound (no forced
upgrade) and is bounded to the current major (<1.0.0). devDependencies
mirror the exact same range so local/CI builds exercise the full supported
window, and the field is grouped with the other dependency sections.
@Upd4ting
Upd4ting force-pushed the chore/peer-interface-deps branch from f680f98 to f763402 Compare June 15, 2026 21:51
@Upd4ting

Copy link
Copy Markdown
Member Author

@greptileai review

@Upd4ting
Upd4ting merged commit 7398db1 into main Jun 16, 2026
3 checks passed
@Upd4ting
Upd4ting deleted the chore/peer-interface-deps branch June 16, 2026 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant