Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency vue-router to v4.5.0 #16

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Mar 26, 2023

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
vue-router 4.0.0-rc.6 -> 4.5.0 age adoption passing confidence

Release Notes

vuejs/router (vue-router)

v4.5.0

Compare Source

Please refer to CHANGELOG.md for details.

v4.4.5

Compare Source

Please refer to CHANGELOG.md for details.

v4.4.4

Compare Source

Please refer to CHANGELOG.md for details.

v4.4.3

Compare Source

Please refer to CHANGELOG.md for details.

v4.4.2

Compare Source

Please refer to CHANGELOG.md for details.

v4.4.1

Compare Source

v4.4.0

Compare Source

Please refer to CHANGELOG.md for details.

v4.3.3

Compare Source

Please refer to CHANGELOG.md for details.

v4.3.2

Compare Source

Please refer to CHANGELOG.md for details.

v4.3.1

Compare Source

Please refer to CHANGELOG.md for details.

v4.3.0

Compare Source

Please refer to CHANGELOG.md for details.

v4.2.5

Compare Source

Please refer to CHANGELOG.md for details.

v4.2.4

Compare Source

Please refer to CHANGELOG.md for details.

v4.2.3

Compare Source

Please refer to CHANGELOG.md for details.

v4.2.2

Compare Source

Please refer to CHANGELOG.md for details.

v4.2.1

Compare Source

Please refer to CHANGELOG.md for details.

v4.2.0

Compare Source

Please refer to CHANGELOG.md for details.

v4.1.6

Compare Source

Please refer to CHANGELOG.md for details.

v4.1.5

Compare Source

Please refer to CHANGELOG.md for details.

v4.1.4

Compare Source

Please refer to CHANGELOG.md for details.

v4.1.3

Compare Source

Please refer to CHANGELOG.md for details.

v4.1.2

Compare Source

Please refer to CHANGELOG.md for details.

v4.1.1

Compare Source

Please refer to CHANGELOG.md for details.

v4.1.0

Compare Source

Vue Router 4.1

We are excited to announce the release of Vue Router 4.1 with a few new interesting features, better support for Node ESM and no breaking changes.

Omitting the component/components option in routes

It's now possible to completely omit the component option when defining routes with children. While nested routes are about defining layouts, they are also directly connected to a path and users often found themselves defining a pass through component that would just render a <RouterView> component to reuse the path structure. You can now simplify this to:

- import { RouterView } from 'vue-router'
- import { h } from 'vue'
-
 const routes = [
   {
     path: '/admin',
-     component: () => h(RouterView),
     children: [
       { path: 'users', component: AdminUserList },
       { path: 'users/:id', component: AdminUserDetails },
     ],
   },
 ]

In other words, you can now nest paths without having to define a component.

Passing History State in navigations

Passing History State through router.push() has been implemented and used by the router since its version 4.0 but hasn't been exposed as a public API until now. This enables passing a state property when calling router.push() or router.replace(). This is useful to pass global state to be associated with the history entry that cannot be shared by copying the URL. One common example of this are Modals:

// go to /users/24 but show a modal instead
router.push({ name: 'UserDetail', params: { id: 24 } state: { backgroundView: ... } })

To see a full example, check the modal e2e test, it has been updated to use the state property.

It's worth noting this shouldn't be used to pass fetched data or complex objects such as classes because of type and size limitations. Check the History State documentation for more information about the state property.

Given the nature of the <RouterView>'s route prop, there is also a new function loadRouteLocation() that can be used on a resolved route location to load a route with lazy loading:

import { loadRouteLocation } from 'vue-router'

const loadedRoute = await loadRouteLocation(router.resolve('/users/24'))

Typed Routes

RouterLink to autocomplete

In v4.1 we were initially planning to introduce types to automatically detect the params from a path property, creating autocomplete and type safety in router.push() and <RouterLink>'s to prop. It was implemented but also turned out to be extremely slow after ~50 routes due to the nature of the types relying on nesting and complex unions. Instead, we are introducing a build plugin to generate the types of the routes for you based your file structure. This is similar to Nuxt and Vite Plugin Pages but with full type support (similar to nuxt-typed-router) while allowing you to keep using the exact same API, just with Autocompletion and typing hints 😄. The plugin currently supports Vite, Webpack (with some caveats), and rollup and it's currently experimental to gather feedback from the community and build a flexible solution. We hope to release a stable version in the following months.

Check out the plugin GitHub repository for installation instructions and documentation.

Here are some other examples of how much this plugin can improves your developer experience:

params validation in RouterLink Route infer from if condition Typed routes in navigation guards

CJS/MJS support for Node

We now expose a few extra entry points for Node but kept the old ones as well to prevent any disruption to the existing users. You can find more information about this in the corresponding pull request.


Please refer to CHANGELOG.md for details.

v4.0.16

Compare Source

Please refer to CHANGELOG.md for details.

v4.0.15

Compare Source

Please refer to CHANGELOG.md for details.

v4.0.14

Compare Source

Please refer to CHANGELOG.md for details.

v4.0.13

Compare Source

Please refer to CHANGELOG.md for details.

v4.0.12

Compare Source

Please refer to CHANGELOG.md for details.

v4.0.11

Compare Source

Please refer to CHANGELOG.md for details.

v4.0.10

Compare Source

Please refer to CHANGELOG.md for details.

v4.0.9

Compare Source

Please refer to CHANGELOG.md for details.

v4.0.8

Compare Source

Please refer to CHANGELOG.md for details.

v4.0.7

Compare Source

Please refer to CHANGELOG.md for details.

v4.0.6

Compare Source

Please refer to CHANGELOG.md for details.

v4.0.5

Compare Source

Please refer to CHANGELOG.md for details.

v4.0.4

Compare Source

Please refer to CHANGELOG.md for details.

v4.0.3

Compare Source

Please refer to CHANGELOG.md for details.

v4.0.2

Compare Source

Please refer to CHANGELOG.md for details.

v4.0.1

Compare Source

Please refer to CHANGELOG.md for details.

v4.0.0

Compare Source

Vue logo

A more complete but lighter Router

Today Vue Router 4 is officially released as stable.
After 14 alphas, 13 betas and 6 release candidates, Vue Router v4 is ready to bring the best of routing to your Vue 3 applications with improved bundle size, TypeScript integration, new features and consistency improvements for modern apps.

It has taken almost 2 years of work, around 1500 commits, 15 RFCs, and the help of many users and their bug reports and feature requests to get here. Thank you all for your very much appreciated help!

Project Organization improvements

Vue Router is now divided in three modules:

  • History implementation: handles the address bar and is specific to the environment Vue Router runs on (Node, Browser, Mobile, etc)
  • Router Matcher: handles the parsing of routes /users/:id and its ranking
  • Router: connects everything together and handle routing specific features like navigation guards
Dynamic Routing

One the most wanted features on Vue Router is Dynamic Routing. It makes the router more flexible and powerful and open possibilities for applications that were not possible before! This is possible thanks to an advanced path parsing with automatic ranking, allowing the router to guess what route should be matched based on the URL string representation, allowing user to define routes in any order.

Improved Navigation system

The new navigation system is more consistent and improves the experience of Scroll Behavior to match native browser behavior. It also gives users almost more information about the status of a navigation and allow using that information to improve user experience through global UI elements like progress bars and modals.

More powerful Devtools

Thanks to the new Vue Devtools, Vue Router is able to create more advanced integrations: navigation in the timeline and a complete route directory that helps you debug routes.

Better Navigation guards

Say good bye to next and avoid easy-to-make mistakes inside navigation guards: return any value you were passing to next. The previous version is still supported to ease migration!

More information on the updated documentation.

Consistent encoding in routes

Encoding has been adapted to make it consistent across different browsers and route location properties (params, query and hash). You don't need to encode these properties when passing them to router.push() and they will always appear decoded in the route locations (e.g. $route and useRoute()).

Small migration path

Vue Router 4 focus on improving the existing Router while keeping a very similar API, migration should be short and almost limited to a few renames if you were using the basics of Vue Router. You can check the full migration guide on the documentation

The future of the Router

Vue Router has been effectively stable for the past couple of months and makes it possible to now focus on:

  • Better Developer experience with existing tooling (Vetur, Vite, Devtools, etc)
  • Better integration with modern features like Suspense
  • RFCs to improve the existing API or bring new ones
  • Lighter versions of the router

Trying It Out

If you want to give Vue Router 4 a quick try, you can check this CodeSandbox, this Vite template with Tailwind CSS, or use the CLI to get started.

To Learn more about Vue Router 4, check out our new documentation. If you are an existing Vue 2.x user, go directly to the Migration Guide.

Supporting Vue Router Development

If your company uses Vue Router, please consider supporting its development by supporting me 🙏 . It will mean a lot and really help me to keep working on improving the Vue Ecosystem.


If you were already using the release candidate version of vue router, you can find the list of improvements on the CHANGELOG.md.


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/vue-router-4.x-lockfile branch from 8b19087 to b98b1b6 Compare April 10, 2023 23:38
@renovate renovate bot force-pushed the renovate/vue-router-4.x-lockfile branch from b98b1b6 to 039197f Compare May 11, 2023 11:48
@renovate renovate bot changed the title Update dependency vue-router to v4.1.6 Update dependency vue-router to v4.2.0 May 11, 2023
@renovate renovate bot force-pushed the renovate/vue-router-4.x-lockfile branch 3 times, most recently from 6efb729 to 88b7202 Compare May 18, 2023 08:16
@renovate renovate bot force-pushed the renovate/vue-router-4.x-lockfile branch 2 times, most recently from e092f0f to a0c9fbd Compare May 18, 2023 17:52
@renovate renovate bot changed the title Update dependency vue-router to v4.2.0 Update dependency vue-router to v4.2.1 May 18, 2023
@renovate renovate bot changed the title Update dependency vue-router to v4.2.1 Update dependency vue-router to v4.2.2 May 29, 2023
@renovate renovate bot force-pushed the renovate/vue-router-4.x-lockfile branch from a0c9fbd to 910c81f Compare May 29, 2023 11:05
@renovate renovate bot changed the title Update dependency vue-router to v4.2.2 Update dependency vue-router to v4.2.3 Jul 5, 2023
@renovate renovate bot force-pushed the renovate/vue-router-4.x-lockfile branch from 910c81f to 29e91a5 Compare July 5, 2023 14:23
@renovate renovate bot changed the title Update dependency vue-router to v4.2.3 Update dependency vue-router to v4.2.4 Jul 6, 2023
@renovate renovate bot force-pushed the renovate/vue-router-4.x-lockfile branch from 29e91a5 to 3ed83ac Compare July 6, 2023 17:46
@pull-request-size pull-request-size bot removed the size/M label Jul 6, 2023
@renovate renovate bot force-pushed the renovate/vue-router-4.x-lockfile branch from 3ed83ac to 8c64e9e Compare September 22, 2023 09:40
@renovate renovate bot changed the title Update dependency vue-router to v4.2.4 Update dependency vue-router to v4.2.5 Sep 22, 2023
@renovate renovate bot force-pushed the renovate/vue-router-4.x-lockfile branch from 8c64e9e to e56f611 Compare October 25, 2023 05:35
@renovate renovate bot force-pushed the renovate/vue-router-4.x-lockfile branch from e56f611 to 84725ef Compare November 6, 2023 11:36
@renovate renovate bot force-pushed the renovate/vue-router-4.x-lockfile branch from 84725ef to 877e4f1 Compare November 25, 2023 13:49
@renovate renovate bot force-pushed the renovate/vue-router-4.x-lockfile branch from 877e4f1 to 990f056 Compare December 19, 2023 11:19
@renovate renovate bot changed the title Update dependency vue-router to v4.2.5 Update dependency vue-router to v4.3.0 Feb 21, 2024
@renovate renovate bot force-pushed the renovate/vue-router-4.x-lockfile branch from 990f056 to cc4078c Compare February 21, 2024 19:14
@renovate renovate bot force-pushed the renovate/vue-router-4.x-lockfile branch from cc4078c to ce25584 Compare April 17, 2024 09:27
@renovate renovate bot changed the title Update dependency vue-router to v4.3.0 Update dependency vue-router to v4.3.1 Apr 17, 2024
Copy link

coderabbitai bot commented Apr 17, 2024

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@renovate renovate bot force-pushed the renovate/vue-router-4.x-lockfile branch from ce25584 to c3c44d4 Compare April 18, 2024 10:25
@renovate renovate bot changed the title Update dependency vue-router to v4.3.1 Update dependency vue-router to v4.3.2 Apr 18, 2024
@renovate renovate bot force-pushed the renovate/vue-router-4.x-lockfile branch from c3c44d4 to 5e180a8 Compare June 10, 2024 16:50
@renovate renovate bot changed the title Update dependency vue-router to v4.3.2 Update dependency vue-router to v4.3.3 Jun 10, 2024
@renovate renovate bot force-pushed the renovate/vue-router-4.x-lockfile branch from 5e180a8 to 708c8c5 Compare June 21, 2024 17:00
@renovate renovate bot changed the title Update dependency vue-router to v4.3.3 Update dependency vue-router to v4.4.0 Jun 21, 2024
@renovate renovate bot force-pushed the renovate/vue-router-4.x-lockfile branch from 708c8c5 to 8b578a1 Compare July 31, 2024 19:15
@renovate renovate bot changed the title Update dependency vue-router to v4.4.0 Update dependency vue-router to v4.4.1 Jul 31, 2024
@renovate renovate bot force-pushed the renovate/vue-router-4.x-lockfile branch from 8b578a1 to 3ef5e6c Compare August 1, 2024 09:29
@renovate renovate bot changed the title Update dependency vue-router to v4.4.1 Update dependency vue-router to v4.4.2 Aug 1, 2024
@renovate renovate bot force-pushed the renovate/vue-router-4.x-lockfile branch from 3ef5e6c to d9bceb1 Compare August 6, 2024 18:03
@renovate renovate bot changed the title Update dependency vue-router to v4.4.2 Update dependency vue-router to v4.4.3 Aug 6, 2024
@renovate renovate bot force-pushed the renovate/vue-router-4.x-lockfile branch from d9bceb1 to 0e3d9c6 Compare September 10, 2024 19:03
@renovate renovate bot changed the title Update dependency vue-router to v4.4.3 Update dependency vue-router to v4.4.4 Sep 10, 2024
@renovate renovate bot changed the title Update dependency vue-router to v4.4.4 Update dependency vue-router to v4.4.5 Sep 13, 2024
@renovate renovate bot force-pushed the renovate/vue-router-4.x-lockfile branch from 0e3d9c6 to 3680776 Compare September 13, 2024 08:20
@renovate renovate bot force-pushed the renovate/vue-router-4.x-lockfile branch from 3680776 to f7f6f58 Compare November 25, 2024 16:44
@renovate renovate bot changed the title Update dependency vue-router to v4.4.5 Update dependency vue-router to v4.5.0 Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants