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

[Snyk] Upgrade vue-router from 3.6.5 to 4.1.6 #113

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

Conversation

podarok
Copy link
Contributor

@podarok podarok commented May 24, 2023

This PR was automatically created by Snyk using the credentials of a real user.


Snyk has created this PR to upgrade vue-router from 3.6.5 to 4.1.6.

ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


Warning: This is a major version upgrade, and may be a breaking change.

  • The recommended version is 68 versions ahead of your current version.
  • The recommended version was released 7 months ago, on 2022-10-24.
Release notes
Package name: vue-router
  • 4.1.6 - 2022-10-24

    Please refer to CHANGELOG.md for details.

  • 4.1.5 - 2022-08-26

    Please refer to CHANGELOG.md for details.

  • 4.1.4 - 2022-08-22

    Please refer to CHANGELOG.md for details.

  • 4.1.3 - 2022-07-27

    Please refer to CHANGELOG.md for details.

  • 4.1.2 - 2022-07-11

    Please refer to CHANGELOG.md for details.

  • 4.1.1 - 2022-07-05

    Please refer to CHANGELOG.md for details.

  • 4.1.0 - 2022-07-04

    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.

  • 4.1.0-c113369 - 2022-05-16
  • 4.1.0-beta.2 - 2022-07-01
  • 4.1.0-beta.1 - 2022-06-29
  • 4.1.0-beta.0 - 2022-06-29
  • 4.1.0-aabe509 - 2022-05-09
  • 4.1.0-9e62c00 - 2022-06-10
  • 4.1.0-730eb15 - 2022-06-14
  • 4.1.0-51021cc - 2022-06-15
  • 4.1.0-4da5e55 - 2022-05-16
  • 4.0.16 - 2022-06-09

    Please refer to CHANGELOG.md for details.

  • 4.0.15 - 2022-05-04

    Please refer to CHANGELOG.md for details.

  • 4.0.14 - 2022-03-10

    Please refer to CHANGELOG.md for details.

  • 4.0.13 - 2022-02-28
  • 4.0.12 - 2021-10-14
  • 4.0.11 - 2021-08-09
  • 4.0.10 - 2021-06-21
  • 4.0.9 - 2021-06-16
  • 4.0.8 - 2021-05-13
  • 4.0.7 - 2021-05-13
  • 4.0.6 - 2021-04-06
  • 4.0.5 - 2021-03-11
  • 4.0.4 - 2021-02-19
  • 4.0.3 - 2021-01-11
  • 4.0.2 - 2020-12-27
  • 4.0.1 - 2020-12-07
  • 4.0.0 - 2020-12-07
  • 4.0.0-rc.6 - 2020-11-30
  • 4.0.0-rc.5 - 2020-11-21
  • 4.0.0-rc.4 - 2020-11-20
  • 4.0.0-rc.3 - 2020-11-14
  • 4.0.0-rc.2 - 2020-11-05
  • 4.0.0-rc.1 - 2020-10-23
  • 4.0.0-beta.13 - 2020-10-02
  • 4.0.0-beta.12 - 2020-09-25
  • 4.0.0-beta.11 - 2020-09-20
  • 4.0.0-beta.10 - 2020-09-18
  • 4.0.0-beta.9 - 2020-09-01
  • 4.0.0-beta.8 - 2020-09-01
  • 4.0.0-beta.7 - 2020-08-19
  • 4.0.0-beta.6 - 2020-08-05
  • 4.0.0-beta.5 - 2020-08-03
  • 4.0.0-beta.4 - 2020-07-25
  • 4.0.0-beta.3 - 2020-07-21
  • 4.0.0-beta.2 - 2020-07-07
  • 4.0.0-beta.1 - 2020-07-03
  • 4.0.0-alpha.14 - 2020-07-01
  • 4.0.0-alpha.13 - 2020-06-18
  • 4.0.0-alpha.12 - 2020-05-19
  • 4.0.0-alpha.11 - 2020-05-12
  • 4.0.0-alpha.10 - 2020-05-05
  • 4.0.0-alpha.9 - 2020-04-29
  • 4.0.0-alpha.8 - 2020-04-29
  • 4.0.0-alpha.7 - 2020-04-17
  • 4.0.0-alpha.6 - 2020-04-17
  • 4.0.0-alpha.5 - 2020-04-08
  • 4.0.0-alpha.4 - 2020-03-28
  • 4.0.0-alpha.3 - 2020-03-14
  • 4.0.0-alpha.2 - 2020-03-14
  • 4.0.0-alpha.1 - 2020-02-26
  • 4.0.0-alpha.0 - 2020-02-21
  • 4.0.0-329e962 - 2021-10-19
  • 3.6.5 - 2022-09-06
from vue-router GitHub release notes

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

For more information:

🧐 View latest project report

🛠 Adjust upgrade PR settings

🔕 Ignore this dependency or unsubscribe from future upgrade PRs

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