Skip to content

Restore vue-router v4 support in the peer dependency range. - #23

Open
jameseaster wants to merge 2 commits into
mainfrom
vue-router-v5-peer
Open

Restore vue-router v4 support in the peer dependency range.#23
jameseaster wants to merge 2 commits into
mainfrom
vue-router-v5-peer

Conversation

@jameseaster

Copy link
Copy Markdown

Widens the vue-router peer range to ^4.0.15 || ^5.0.0. 5.2.0 replaced ^4.0.15 with ^5.1.0 instead of widening it, which leaves the release unresolvable for any consumer still on v4. Nothing here imports vue-router, and the only calls are addRoute, currentRoute and beforeEach, all unchanged in v5, so both majors work. Verified by packing this as 5.2.1 and installing it into a webpack-based host app on vue-router@5.3.0: strict npm install resolves, the bundle builds, the app serves. Background in #22. Second commit drops an unrelated stale eslint-disable.

@dlongley dlongley left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving with the needed note in the changelog. We should release v6 shortly after this with vue-router v5 and move on from v5 wherever possible.

Comment thread CHANGELOG.md
on v4. The range is now `^4.0.15 || ^5.0.0`. Both majors work: this library
imports nothing from `vue-router` and calls only `addRoute`, `currentRoute`
and `beforeEach` on the router the host app supplies, none of which changed
in v5.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
in v5.
in v5. This is an unusual measure to support two different major versions
of a peer dependency; upgrading to version 6 is strongly recommended, it
will only support a single major version of peer dependencies.

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.

2 participants