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 reclassifies @antelopejs/interface-core from a runtime dependency to a peerDependency (mirrored in devDependencies), which is the correct pattern for a host-provided singleton that should not be duplicated in the dependency tree.

  • @antelopejs/interface-core is removed from dependencies and added to both peerDependencies and devDependencies with the range >=0.0.3 <1.0.0, allowing the host to control which version is used at runtime.
  • The lockfile is updated accordingly; the resolved dev version remains 0.0.3.
  • The declared peer range upper bound (<1.0.0) is wider than the PR description's example (<0.1.0), which may be intentional but differs from the stated rationale of bounding to the current minor.

Confidence Score: 5/5

Safe to merge — the change is a straightforward dependency reclassification with no runtime logic altered.

The only change is moving a dependency to peerDependencies/devDependencies. No source code is modified, the lockfile resolves correctly, and the peer range covers the currently published version. The range upper bound is wider than the PR description's example, but this does not break anything today.

No files require special attention; both changed files are configuration only.

Important Files Changed

Filename Overview
package.json Moves @antelopejs/interface-core from dependencies to peerDependencies + devDependencies with range >=0.0.3 <1.0.0; removes it from runtime dependencies
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["Downstream consumer\ninstalls interface-redis"] --> B{Dependency type}
    B -->|"Before (dependency)"| C["npm/pnpm installs\ninterface-core@^0.0.3\ninto interface-redis node_modules"]
    B -->|"After (peerDependency)"| D["Host must provide\ninterface-core >=0.0.3 <1.0.0\nin its own node_modules"]
    C --> E["Risk: dual installs,\nversion overrides downstream"]
    D --> F["interface-core resolved\nonce from host tree"]
    F --> G["devDependencies: >=0.0.3 <1.0.0\n(for local build & CI)"]
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["Downstream consumer\ninstalls interface-redis"] --> B{Dependency type}
    B -->|"Before (dependency)"| C["npm/pnpm installs\ninterface-core@^0.0.3\ninto interface-redis node_modules"]
    B -->|"After (peerDependency)"| D["Host must provide\ninterface-core >=0.0.3 <1.0.0\nin its own node_modules"]
    C --> E["Risk: dual installs,\nversion overrides downstream"]
    D --> F["interface-core resolved\nonce from host tree"]
    F --> G["devDependencies: >=0.0.3 <1.0.0\n(for local build & CI)"]
Loading

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

Comment thread package.json Outdated
"ioredis": "^5.10.1"
},
"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 devDependencies range only covers the peer range floor

^0.0.5 resolves to >=0.0.5 <0.0.6 (semver caret on a 0.0.x version locks the patch digit), so the installed dev/CI copy is pinned to exactly 0.0.5. The declared peer range is >=0.0.5 <0.1.0, meaning future patch releases like 0.0.6 or 0.0.7 fall within the stated compatibility window but are never exercised in development. Consider aligning the devDependency specifier with the peer range — e.g. >=0.0.5 <0.1.0 — so local builds and CI always pick up the latest compatible release.

Prompt To Fix With AI
This is a comment left during a code review.
Path: package.json
Line: 45

Comment:
**devDependencies range only covers the peer range floor**

`^0.0.5` resolves to `>=0.0.5 <0.0.6` (semver caret on a `0.0.x` version locks the patch digit), so the installed dev/CI copy is pinned to exactly `0.0.5`. The declared peer range is `>=0.0.5 <0.1.0`, meaning future patch releases like `0.0.6` or `0.0.7` fall within the stated compatibility window but are never exercised in development. Consider aligning the devDependency specifier with the peer range — e.g. `>=0.0.5 <0.1.0` — so local builds and CI always pick up the latest compatible release.

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 3356376 to 1bbd606 Compare June 15, 2026 21:52
@Upd4ting

Copy link
Copy Markdown
Member Author

@greptileai review

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