@intlify/vue-router-bridge
Advanced tools
Comparing version 0.3.6 to 0.4.0-493702c
@@ -147,5 +147,5 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
/** | ||
* Define dummy vue-router 3 class | ||
* Define stub vue-router 3 class | ||
*/ | ||
declare class VueRouter3 { | ||
declare class VueRouterLegacy { | ||
constructor(options?: RouterOptions) | ||
@@ -173,4 +173,4 @@ } | ||
// Export dummy VueRouter class | ||
export default VueRouter3 | ||
export default VueRouterLegacy | ||
/* eslint-enable @typescript-eslint/no-explicit-any */ |
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
import VueRouter from 'vue-router' | ||
import type { ComputedRef, ComponentPublicInstance } from '@vue/composition-api' | ||
import type { ComponentPublicInstance } from 'vue-demi' | ||
import type { Route, RouterOptions } from 'vue-router' | ||
@@ -409,3 +409,3 @@ | ||
*/ | ||
declare function useRoute<T = ComputedRef<Route>>(): T | ||
declare function useRoute<T = RouteLocationNormalizedLoaded>(): T | ||
@@ -412,0 +412,0 @@ /** |
@@ -147,5 +147,5 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
/** | ||
* Define dummy vue-router 3 class | ||
* Define stub vue-router 3 class | ||
*/ | ||
declare class VueRouter3 { | ||
declare class VueRouterLegacy { | ||
constructor(options?: RouterOptions) | ||
@@ -173,4 +173,4 @@ } | ||
// Export dummy VueRouter class | ||
export default VueRouter3 | ||
export default VueRouterLegacy | ||
/* eslint-enable @typescript-eslint/no-explicit-any */ |
{ | ||
"name": "@intlify/vue-router-bridge", | ||
"version": "0.3.6", | ||
"version": "0.4.0-493702c", | ||
"description": "Vue Router bridging for Vue 2 & Vue 3", | ||
"scripts": { | ||
"postinstall": "node ./scripts/postinstall.js" | ||
"dependencies": { | ||
"vue-demi": "^0.13.5" | ||
}, | ||
@@ -15,2 +15,5 @@ "peerDependencies": { | ||
"optional": true | ||
}, | ||
"vue-router": { | ||
"optional": true | ||
} | ||
@@ -54,2 +57,3 @@ }, | ||
}, | ||
"funding": "https://github.com/sponsors/kazupon", | ||
"homepage": "https://github.com/intlify/bridging/tree/main/packages/vue-router-bridge#readme", | ||
@@ -69,3 +73,6 @@ "repository": { | ||
"access": "public" | ||
}, | ||
"scripts": { | ||
"postinstall": "node ./scripts/postinstall.js" | ||
} | ||
} | ||
} |
@@ -52,8 +52,19 @@ const fs = require('fs') // eslint-disable-line @typescript-eslint/no-var-requires | ||
function checkVCA() { | ||
const VCA = loadModule('@vue/composition-api') | ||
if (!VCA) { | ||
warn('Composition API plugin is not found. Please run "npm install @vue/composition-api" to install.') | ||
const demi = loadModule('vue-demi') | ||
if (!demi) { | ||
return false | ||
} | ||
return true | ||
if (demi.Vue.version.startsWith('2.7.')) { | ||
return true | ||
} else if (demi.Vue.version.startsWith('2.')) { | ||
const VCA = loadModule('@vue/composition-api') | ||
if (!VCA) { | ||
warn('Composition API plugin is not found. Please run "npm install @vue/composition-api" to install.') | ||
return false | ||
} | ||
return true | ||
} else { | ||
return false | ||
} | ||
} | ||
@@ -60,0 +71,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36380
951
3
+ Addedvue-demi@^0.13.5
+ Addedvue-demi@0.13.11(transitive)