Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vuejs/router
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.4.2
Choose a base ref
...
head repository: vuejs/router
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.4.3
Choose a head ref
  • 5 commits
  • 4 files changed
  • 5 contributors

Commits on Aug 1, 2024

  1. Verified

    This commit was signed with the committer’s verified signature.
    ericwyles Eric Wyles
    Copy the full SHA
    29670ca View commit details
  2. fix: reorder exports in package.json (#2323)

    serkodev authored Aug 1, 2024
    Copy the full SHA
    7422b15 View commit details

Commits on Aug 5, 2024

  1. chore: use with instead of assert in rollup.mjs (#2326)

    negezor authored Aug 5, 2024
    Copy the full SHA
    7d1db18 View commit details

Commits on Aug 6, 2024

  1. Section about deprecated onDemand and onAbort callback arguments (#2330)

    * Added deprecated onDemand and onAbort callback arguments to migration guide
    
    The  onDemand and onAbort  callbacks for router.push and .replace were deprecated in v4. I added a section to the migration guide explaining that users should replace them with the thenable Promise the methods return.
    
    * Apply suggestions from code review
    
    * Update packages/docs/guide/migration/index.md [skip ci]
    
    ---------
    
    Co-authored-by: Eduardo San Martin Morote <posva@users.noreply.github.com>
    DangerousDetlef and posva authored Aug 6, 2024
    Copy the full SHA
    9f95fb7 View commit details
  2. release: vue-router@4.4.3

    posva committed Aug 6, 2024
    Copy the full SHA
    b157f1a View commit details
Showing with 27 additions and 12 deletions.
  1. +6 −0 packages/docs/guide/migration/index.md
  2. +9 −0 packages/router/CHANGELOG.md
  3. +11 −11 packages/router/package.json
  4. +1 −1 packages/router/rollup.config.mjs
6 changes: 6 additions & 0 deletions packages/docs/guide/migration/index.md
Original file line number Diff line number Diff line change
@@ -443,6 +443,12 @@ Given any [normalized route location](/api/#RouteLocationNormalized):

**Reason**: This allows to easily copy existing properties of a location when calling `router.push()` and `router.resolve()`, and make the resulting route location consistent across browsers. `router.push()` is now idempotent, meaning that calling `router.push(route.fullPath)`, `router.push({ hash: route.hash })`, `router.push({ query: route.query })`, and `router.push({ params: route.params })` will not create extra encoding.

### `$router.push()` and `$router.replace()` - `onComplete` and `onAbort` callbacks

Previously, `$router.push()` and `$router.replace()` accepted two callbacks, `onComplete` and `onAbort`, as second and third arguments. They were called after a navigation based on the result. With the introduction of a Promise based API, these callbacks are redundant and have been removed. See [Navigation Failures](/guide/advanced/navigation-failures.md) for more information on how to detect successful and failed navigations.

**Reason**: Reduce library size by adapting to established JS standards (Promises).

### TypeScript changes

To make typings more consistent and expressive, some types have been renamed:
9 changes: 9 additions & 0 deletions packages/router/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [4.4.3](https://github.com/vuejs/router/compare/v4.4.2...v4.4.3) (2024-08-06)

### Bug Fixes

- reorder exports in `package.json` ([#2323](https://github.com/vuejs/router/issues/2323)) ([7422b15](https://github.com/vuejs/router/commit/7422b15e6fcf57819f82a1384c9a2a73e32e186f))

## [4.4.2](https://github.com/vuejs/router/compare/v4.4.1...v4.4.2) (2024-08-01)

### Bug Fixes
@@ -8,6 +14,9 @@

### Bug Fixes

> [!IMPORTANT]
> This release replaces `declare module '@vue/runtime-core'` with `declare module 'vue'` [like it's supposed to be](https://vuejs.org/guide/typescript/options-api.html#augmenting-global-properties). If you are also augmenting `@vue/runtime-core`, you will likely have to change it to `vue`. It is also recommended to use an up-to-date TypeScript version (>=5.4) and `"moduleResolution": "Bundler"` in your `tsconfig.json`.
- router typescript definitions related to vue package ([#2295](https://github.com/vuejs/router/issues/2295)) ([a495ce0](https://github.com/vuejs/router/commit/a495ce0e1d545d521673d21af43e63a761b53e27))
- **types:** stricter meta with required fields ([423d9f7](https://github.com/vuejs/router/commit/423d9f763ed033dd6687ce7687c859c92554a60d))

22 changes: 11 additions & 11 deletions packages/router/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "vue-router",
"version": "4.4.2",
"version": "4.4.3",
"main": "index.js",
"unpkg": "dist/vue-router.global.js",
"jsdelivr": "dist/vue-router.global.js",
"module": "dist/vue-router.mjs",
"types": "dist/vue-router.d.ts",
"exports": {
"./auto-routes": {
"types": "./vue-router-auto-routes.d.ts",
".": {
"types": "./dist/vue-router.d.ts",
"node": {
"import": {
"production": "./dist/vue-router.node.mjs",
@@ -24,8 +24,11 @@
"import": "./dist/vue-router.mjs",
"require": "./index.js"
},
"./auto": {
"types": "./vue-router-auto.d.ts",
"./dist/*": "./dist/*",
"./vetur/*": "./vetur/*",
"./package.json": "./package.json",
"./auto-routes": {
"types": "./vue-router-auto-routes.d.ts",
"node": {
"import": {
"production": "./dist/vue-router.node.mjs",
@@ -41,8 +44,8 @@
"import": "./dist/vue-router.mjs",
"require": "./index.js"
},
".": {
"types": "./dist/vue-router.d.ts",
"./auto": {
"types": "./vue-router-auto.d.ts",
"node": {
"import": {
"production": "./dist/vue-router.node.mjs",
@@ -57,10 +60,7 @@
},
"import": "./dist/vue-router.mjs",
"require": "./index.js"
},
"./dist/*": "./dist/*",
"./vetur/*": "./vetur/*",
"./package.json": "./package.json"
}
},
"sideEffects": false,
"author": {
2 changes: 1 addition & 1 deletion packages/router/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ import replace from '@rollup/plugin-replace'
import resolve from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import chalk from 'chalk'
import pkg from './package.json' assert { type: 'json' }
import pkg from './package.json' with { type: 'json' }
import terser from '@rollup/plugin-terser'

const name = pkg.name