Skip to content

peerDependencies locks obsidian to exact 1.8.7 while dependencies use 1.12.3 — blocks co-installation with other Obsidian tooling #198

Description

@addozhang

Bug description

eslint-plugin-obsidianmd pins obsidian to the exact version 1.8.7 in peerDependencies, which makes it impossible to co-install with other official Obsidian tooling that requires a newer Obsidian version.

On the current master branch (commit d7e2239, not yet published), the same package.json is self-contradictory:

"dependencies": {
    "obsidian": "1.12.3"
},
"peerDependencies": {
    "obsidian": "1.8.7"
}

The dependency was bumped to 1.12.3 but the peer range was not updated.

Concrete failure

In a project using both eslint-plugin-obsidianmd and obsidian-integration-testing (peer: obsidian@^1.12.3), no single obsidian version can satisfy =1.8.7 and ^1.12.3 at the same time, so npm install fails outright:

npm error code ERESOLVE
npm error While resolving: obsidian-integration-testing@12.0.0
npm error Found: obsidian@1.8.7
npm error Could not resolve dependency:
npm error peer obsidian@"^1.12.3" from obsidian-integration-testing@12.0.0

Users currently have to work around this with --legacy-peer-deps or an .npmrc with legacy-peer-deps=true, which disables peer validation project-wide.

Suggested fix

Peer dependencies are a compatibility contract, not a lockfile. Please express it as a range, e.g.:

"peerDependencies": {
    "obsidian": ">=1.8.7"
}

or at minimum keep it in sync with dependencies.obsidian (^1.12.3). Since the plugin only uses Obsidian's type definitions for linting, a floor plus open upper bound should be safe and would remove the need for every consumer to set legacy-peer-deps.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions