Skip to content

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

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

chore(deps): interface-core as bounded peer + dev dependency#4
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 a runtime dependency to a peerDependency (with a mirrored devDependency), which is the correct pattern for a host-provided singleton to avoid duplicate installs and version-pinning conflicts in consuming projects.

  • The peer dependency version range >=0.0.3 <1.0.0 is broader than the PR description's stated intent ("bounded to the current major, e.g. >=0.0.5 <0.1.0"). For a pre-1.0 package, minor-version bumps (0.1.0, 0.2.0, …) can carry breaking changes, so the safe bound is <0.1.0, not <1.0.0.
  • The devDependencies entry carries the same wide range and should be tightened to match, so local builds exercise the same constraint consumers will see.

Confidence Score: 4/5

The structural intent is correct — moving interface-core to a peer dep is the right pattern — but the version range is wider than intended and could allow incompatible pre-1.0 minor releases to satisfy the constraint downstream.

The peer and dev dependency range >=0.0.3 <1.0.0 permits any 0.x.x version of a pre-1.0 package where minor bumps are not guaranteed to be non-breaking. The PR description explicitly states the goal as bounding to the current minor series, making the wider range an unintentional overshoot that could cause compatibility issues for downstream consumers.

package.json — the peerDependencies and devDependencies version range for @antelopejs/interface-core needs to be tightened from <1.0.0 to <0.1.0

Important Files Changed

Filename Overview
package.json Moves @antelopejs/interface-core from dependencies to peerDependencies + devDependencies; version range widened to >=0.0.3 <1.0.0, which is broader than the PR description's stated intent of bounding to the current minor (0.0.x)
pnpm-lock.yaml Lockfile updated to reflect the move of @antelopejs/interface-core from dependencies to devDependencies; resolved version remains 0.0.3

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["Consumer project\n(installs interface-stripe)"] -->|"peerDependencies\n>=0.0.3 <1.0.0"| B["@antelopejs/interface-core\n(host-provided)"]
    A -->|"dependencies"| C["@antelopejs/interface-stripe"]
    C -->|"runtime dependency"| D["stripe ^18.5.0"]
    C -->|"devDependencies (build only)"| B
    style B fill:#f9c,stroke:#c66
    style C fill:#cdf,stroke:#66c
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["Consumer project\n(installs interface-stripe)"] -->|"peerDependencies\n>=0.0.3 <1.0.0"| B["@antelopejs/interface-core\n(host-provided)"]
    A -->|"dependencies"| C["@antelopejs/interface-stripe"]
    C -->|"runtime dependency"| D["stripe ^18.5.0"]
    C -->|"devDependencies (build only)"| B
    style B fill:#f9c,stroke:#c66
    style C fill:#cdf,stroke:#66c
Loading

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

Comment thread package.json
Comment on lines 49 to 56
"publishConfig": {
"access": "public"
},
"antelopeJs": {}
"antelopeJs": {},
"peerDependencies": {
"@antelopejs/interface-core": ">=0.0.5 <0.1.0"
}
}

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 The peerDependencies field is placed after the custom antelopeJs field rather than grouped with the other dependency fields (dependencies, devDependencies). Conventional package.json ordering puts peer dependencies adjacent to the other dep sections, which improves readability and is expected by most tooling and documentation generators.

Suggested change
"publishConfig": {
"access": "public"
},
"antelopeJs": {}
"antelopeJs": {},
"peerDependencies": {
"@antelopejs/interface-core": ">=0.0.5 <0.1.0"
}
}
"peerDependencies": {
"@antelopejs/interface-core": ">=0.0.5 <0.1.0"
},
"publishConfig": {
"access": "public"
},
"antelopeJs": {}
}
Prompt To Fix With AI
This is a comment left during a code review.
Path: package.json
Line: 49-56

Comment:
The `peerDependencies` field is placed after the custom `antelopeJs` field rather than grouped with the other dependency fields (`dependencies`, `devDependencies`). Conventional package.json ordering puts peer dependencies adjacent to the other dep sections, which improves readability and is expected by most tooling and documentation generators.

```suggestion
  "peerDependencies": {
    "@antelopejs/interface-core": ">=0.0.5 <0.1.0"
  },
  "publishConfig": {
    "access": "public"
  },
  "antelopeJs": {}
}
```

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

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

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 b18e336 to e0b86ad Compare June 15, 2026 21:52
@Upd4ting

Copy link
Copy Markdown
Member Author

@greptileai review

@Upd4ting
Upd4ting merged commit c3dec58 into main Jun 16, 2026
3 checks passed
@Upd4ting
Upd4ting deleted the chore/peer-interface-deps branch June 16, 2026 11:43
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