Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/cli-peer-evlog-2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@evlog/cli": patch
---

`@evlog/cli` now installs next to evlog 2.31 and later as well as 3.0 betas. Before, `npm i -D @evlog/cli@beta` in a project still on evlog 2.x failed with `ERESOLVE`, because the peer range only allowed 3.0 betas. The minimum is 2.31.0, the first 2.x release the CLI has been built against.
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,32 @@ jobs:
echo "CLI untouched — smoke skipped"
fi

# A project already on evlog 2.x has to be able to add the CLI next to
# it. npm resolves peers strictly here (no --legacy-peer-deps), so a peer
# range that rejects 2.x fails the install with ERESOLVE. Checks the
# lowest 2.x the CLI supports and the 2.33 line it is released against.
- name: CLI installs next to evlog 2.x
if: github.event_name == 'pull_request'
run: |
if git diff --name-only "origin/${{ github.base_ref }}"...HEAD -- packages/cli | grep -q .; then
pnpm exec turbo run dev:prepare --filter=@evlog/cli
pack_dir=$(mktemp -d)
(cd packages/cli && pnpm pack --pack-destination "$pack_dir" >/dev/null)
tarball=$(ls "$pack_dir"/*.tgz)
for evlog in 2.31.0 2.33.1; do
app=$(mktemp -d)
(
cd "$app"
npm init -y >/dev/null
npm install "evlog@$evlog"
npm install --save-dev "$tarball"
./node_modules/.bin/evlog doctor --json >/dev/null
)
done
else
echo "CLI untouched, install check skipped"
fi

examples:
name: Build examples
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"oxc-parser": "^0.152.0"
},
"peerDependencies": {
"evlog": ">=3.0.0-beta.0"
"evlog": "^2.31.0 || >=3.0.0-beta.0"
},
"devDependencies": {
"evlog": "workspace:*",
Expand Down
Loading