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.8.1-4d399bf to 0.8.1-c51828f

29

dist/vue-i18n-routing.iife.js

@@ -1,2 +0,2 @@

var VueI18nRouting = function(exports, vueDemi, VueRouter3, vueI18nBridge) {
var VueI18nRouting = function(exports, VueRouter3, vueDemi, vueI18nBridge) {
"use strict";

@@ -601,2 +601,25 @@ const _interopDefaultLegacy = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };

}
function split(str, index) {
const result = [str.slice(0, index), str.slice(index)];
return result;
}
function resolve(router, route, strategy, locale) {
if (vueDemi.isVue3 && strategy === "prefix") {
if (isArray(route.matched) && route.matched.length > 0) {
return route.matched[0];
}
const [rootSlash, restPath] = split(route.path, 1);
const targetPath = `${rootSlash}${locale}${restPath === "" ? restPath : `/${restPath}`}`;
const _route = router.options.routes.find((r) => r.path === targetPath);
if (_route == null) {
return route;
} else {
const _resolevableRoute = assign({}, _route);
_resolevableRoute.path = targetPath;
return router.resolve(_resolevableRoute);
}
} else {
return router.resolve(route);
}
}
const RESOLVED_PREFIXED = /* @__PURE__ */ new Set(["prefix_and_default", "prefix_except_default"]);

@@ -648,3 +671,3 @@ function prefixable(optons) {

try {
_resolvedRoute = router.resolve(localizedRoute);
_resolvedRoute = resolve(router, localizedRoute, strategy, _locale);
} catch {

@@ -1115,2 +1138,2 @@ }

return exports;
}({}, VueDemi, VueRouter, VueI18n);
}({}, VueRouter, VueDemi, VueI18n);
"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const VueRouter3 = require("@intlify/vue-router-bridge");
const vueDemi = require("vue-demi");
const VueRouter3 = require("@intlify/vue-router-bridge");
const vueI18nBridge = require("@intlify/vue-i18n-bridge");

@@ -604,2 +604,25 @@ const _interopDefaultLegacy = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };

}
function split(str, index) {
const result = [str.slice(0, index), str.slice(index)];
return result;
}
function resolve(router, route, strategy, locale) {
if (vueDemi.isVue3 && strategy === "prefix") {
if (isArray(route.matched) && route.matched.length > 0) {
return route.matched[0];
}
const [rootSlash, restPath] = split(route.path, 1);
const targetPath = `${rootSlash}${locale}${restPath === "" ? restPath : `/${restPath}`}`;
const _route = router.options.routes.find((r) => r.path === targetPath);
if (_route == null) {
return route;
} else {
const _resolevableRoute = assign({}, _route);
_resolevableRoute.path = targetPath;
return router.resolve(_resolevableRoute);
}
} else {
return router.resolve(route);
}
}
const RESOLVED_PREFIXED = /* @__PURE__ */ new Set(["prefix_and_default", "prefix_except_default"]);

@@ -651,3 +674,3 @@ function prefixable(optons) {

try {
_resolvedRoute = router.resolve(localizedRoute);
_resolvedRoute = resolve(router, localizedRoute, strategy, _locale);
} catch {

@@ -654,0 +677,0 @@ }

12

package.json
{
"name": "vue-i18n-routing",
"description": "The i18n routing with using vue-i18n",
"version": "0.8.1-4d399bf",
"version": "0.8.1-c51828f",
"dependencies": {

@@ -9,4 +9,4 @@ "@intlify/shared": "next",

"@intlify/vue-router-bridge": "^0.7.0",
"ufo": "^0.8.5",
"vue-demi": "^0.13.5"
"ufo": "^0.8.6",
"vue-demi": "^0.13.11"
},

@@ -16,6 +16,6 @@ "devDependencies": {

"api-docs-gen": "^0.4.0",
"typescript": "^4.8.3",
"vite": "^3.1.2",
"typescript": "^4.8.4",
"vite": "^3.2.2",
"vite-plugin-dts": "^0.9.6",
"vitest": "^0.23.4",
"vitest": "^0.24.5",
"vue": "^3.2.27",

@@ -22,0 +22,0 @@ "vue-i18n": "npm:vue-i18n@next",

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