alleyinteractive / alleyinteractive/alley-scripts

oxlint-config: semver issues / clashing peer dependencies

Ouverte
#906 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
TypeScript
Étoiles
10
Forks
3
Merge moyen
4 j 22 h
PR mergées (30 j)
2

Description

### Description of the bug

`oxlint` recently updated and includes a dependency change that clashes with a `peerDependency` in `@alleyinteractive/oxlint-config`.

We declare `oxlint^1.52` as a `devDependency`. Oxlint doesn't appear to use an expected semver format, and in fact I see "BREAKING CHANGES" for minor version changes (e.g., oxlint `1.37.0`).

And since `^1.52` resolves to `>=1.52.0 && <2.0.0`, when I install I'm getting the recently-released (today 🙃) `1.69.0`.

The issue:
- `oxlint@1.69.0` pulls in `vite-plus@0.1.24` which pins `oxlint-tsgolint@0.23.0`.
- `@alleyinteractive/oxlint-config` declares a `peerDependency` of `oxlint-tsgolint: ^0.22`.

These ranges are not compatible.

We could use a range for the peer dependencies, but after looking through the oxlint repo I think we should declare the oxlint dependencies using a `~` so only patch version changes are allowed. Otherwise a release with a breaking change may sneak in.

### Steps To Reproduce

```
npm i @alleyinteractive/oxlint-config --save-dev
```

### Additional Information

```
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error Found: oxlint-tsgolint@0.23.0
npm error node_modules/oxlint-tsgolint
npm error peerOptional oxlint-tsgolint@">=0.22.1" from oxlint@1.69.0
npm error node_modules/oxlint
npm error peer oxlint@"^1.52" from @alleyinteractive/oxlint-config@0.2.1
npm error node_modules/@alleyinteractive/oxlint-config
npm error dev @alleyinteractive/oxlint-config@"^0.2.1" from the root project
npm error oxlint-tsgolint@"=0.23.0" from vite-plus@0.1.24
npm error node_modules/vite-plus
npm error peerOptional vite-plus@"*" from oxlint@1.69.0
npm error node_modules/oxlint
npm error peer oxlint@"^1.52" from @alleyinteractive/oxlint-config@0.2.1
npm error node_modules/@alleyinteractive/oxlint-config
npm error dev @alleyinteractive/oxlint-config@"^0.2.1" from the root project
npm error
npm error Could not resolve dependency:
npm error peer oxlint-tsgolint@"^0.22" from @alleyinteractive/oxlint-config@0.2.1
npm error node_modules/@alleyinteractive/oxlint-config
npm error dev @alleyinteractive/oxlint-config@"^0.2.1" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
```

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.