Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-i18n-routing

Package Overview
Dependencies
Maintainers
1
Versions
239
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-i18n-routing - npm Package Compare versions

Comparing version 0.11.0 to 0.12.0-a0f568e

29

dist/vue-i18n-routing.d.ts

@@ -661,2 +661,18 @@ import type { Composer } from '@intlify/vue-i18n-bridge';

/**
* The function that resolves the route base name.
*
* @remarks
* The parameter signatures of this function is the same as {@link getRouteBaseName}.
*
* @param givenRoute - A route location. The path or name of the route or an object for more complex routes.
*
* @returns The route base name, if route name is not defined, return `null`.
*
* @see {@link useRouteBaseName}
*
* @public
*/
export declare type RouteBaseNameFunction = (givenRoute?: Route | RouteLocationNormalizedLoaded) => string | undefined;
/**
* Route config for lagacy vue-router v3

@@ -844,17 +860,14 @@ *

/**
* The `useRouteBaseName` composable returns the route base name.
* The `useRouteBaseName` composable returns a function which returns the route base name.
*
* @remarks
* The `useRouteBaseName` is the composable function which is {@link getRouteBaseName} wrapper.
* The function returned by `useRouteBaseName` is the wrapper function with the same signature as {@link getRouteBaseName}.
*
* @param givenRoute - A route object. if not provided, the route is returned with `useRoute` will be used internally
* @param options - An options, which has `router` and `routesNameSeparator` fields. see about details {@link I18nCommonRoutingOptionsWithComposable} for these option fields.
* @param options - An options see about details {@link I18nCommonRoutingOptionsWithComposable}.
*
* @returns The route base name, if route name is not defined, return `null`.
* @returns A {@link RouteBaseNameFunction}.
*
* @see {@link getRouteBaseName}
*
* @public
*/
export declare function useRouteBaseName(givenRoute?: Route | RouteLocationNormalizedLoaded, { router, routesNameSeparator }?: I18nCommonRoutingOptionsWithComposable): string | undefined;
export declare function useRouteBaseName({ router, route, i18n, defaultLocale, defaultLocaleRouteNameSuffix, routesNameSeparator, strategy, trailingSlash }?: I18nCommonRoutingOptionsWithComposable): RouteBaseNameFunction;

@@ -861,0 +874,0 @@ /**

@@ -961,9 +961,16 @@ var VueI18nRouting = function(exports, VueRouter3, vueDemi, vueI18nBridge) {

}
function useRouteBaseName(givenRoute = VueRouter3.useRoute(), { router = VueRouter3.useRouter(), routesNameSeparator = void 0 } = {}) {
const proxy = {
router,
route: givenRoute,
routesNameSeparator
};
return getRouteBaseName.call(proxy, givenRoute);
function useRouteBaseName({
router = VueRouter3.useRouter(),
route = VueRouter3.useRoute(),
i18n = vueI18nBridge.useI18n(),
defaultLocale = void 0,
defaultLocaleRouteNameSuffix = void 0,
routesNameSeparator = void 0,
strategy = void 0,
trailingSlash = void 0
} = {}) {
return proxyForComposable(
{ router, route, i18n, defaultLocale, defaultLocaleRouteNameSuffix, routesNameSeparator, strategy, trailingSlash },
getRouteBaseName
);
}

@@ -1115,3 +1122,3 @@ function useLocalePath({

}
const VERSION = "0.11.0";
const VERSION = "0.12.0";
exports.DEFAULT_BASE_URL = DEFAULT_BASE_URL;

@@ -1118,0 +1125,0 @@ exports.DEFAULT_DETECTION_DIRECTION = DEFAULT_DETECTION_DIRECTION;

@@ -964,9 +964,16 @@ "use strict";

}
function useRouteBaseName(givenRoute = VueRouter3.useRoute(), { router = VueRouter3.useRouter(), routesNameSeparator = void 0 } = {}) {
const proxy = {
router,
route: givenRoute,
routesNameSeparator
};
return getRouteBaseName.call(proxy, givenRoute);
function useRouteBaseName({
router = VueRouter3.useRouter(),
route = VueRouter3.useRoute(),
i18n = vueI18nBridge.useI18n(),
defaultLocale = void 0,
defaultLocaleRouteNameSuffix = void 0,
routesNameSeparator = void 0,
strategy = void 0,
trailingSlash = void 0
} = {}) {
return proxyForComposable(
{ router, route, i18n, defaultLocale, defaultLocaleRouteNameSuffix, routesNameSeparator, strategy, trailingSlash },
getRouteBaseName
);
}

@@ -1118,3 +1125,3 @@ function useLocalePath({

}
const VERSION = "0.11.0";
const VERSION = "0.12.0";
exports.DEFAULT_BASE_URL = DEFAULT_BASE_URL;

@@ -1121,0 +1128,0 @@ exports.DEFAULT_DETECTION_DIRECTION = DEFAULT_DETECTION_DIRECTION;

{
"name": "vue-i18n-routing",
"description": "The i18n routing with using vue-i18n",
"version": "0.11.0",
"scripts": {
"dev": "vite",
"build": "vite build",
"typecheck": "tsc -p . --noEmit",
"switch:2": "vue-demi-switch 2 vue2 && vue-router-switch 3 vue-router3 && vue-i18n-switch 8 vue-i18n-legacy",
"switch:3": "vue-demi-switch 3 && vue-router-switch 4 && vue-i18n-switch 9",
"test": "vitest run",
"test:watch": "vitest",
"test:cover": "vitest --coverage",
"build:docs": "api-docs-gen ./temp/vue-i18n-routing.api.json -c ./docsgen.config.js -o ./ -g noprefix"
},
"version": "0.12.0-a0f568e",
"dependencies": {

@@ -120,3 +109,14 @@ "@intlify/shared": "next",

},
"sideEffects": false
}
"sideEffects": false,
"scripts": {
"dev": "vite",
"build": "vite build",
"typecheck": "tsc -p . --noEmit",
"switch:2": "vue-demi-switch 2 vue2 && vue-router-switch 3 vue-router3 && vue-i18n-switch 8 vue-i18n-legacy",
"switch:3": "vue-demi-switch 3 && vue-router-switch 4 && vue-i18n-switch 9",
"test": "vitest run",
"test:watch": "vitest",
"test:cover": "vitest --coverage",
"build:docs": "api-docs-gen ./temp/vue-i18n-routing.api.json -c ./docsgen.config.js -o ./ -g noprefix"
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc