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

unplugin-vue-router

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unplugin-vue-router - npm Package Compare versions

Comparing version 0.5.1 to 0.5.2

dist/chunk-7DJDZ4ID.mjs

2

dist/esbuild.d.ts
import * as esbuild from 'esbuild';
import { O as Options } from './options-dc4b959a.js';
import { O as Options } from './options-fe7d5846.js';
import 'vue-router';

@@ -4,0 +4,0 @@

@@ -189,2 +189,5 @@ "use strict";

}
function appendExtensionListToPattern(filePattern, extensions) {
return filePattern + (extensions.length === 1 ? extensions[0] : `.{${extensions.map((extension) => extension.replace(".", "")).join(",")}}`);
}

@@ -1308,8 +1311,16 @@ // src/core/treeNodeValue.ts

}
const pattern = `**/*` + (options.extensions.length === 1 ? options.extensions[0] : `.{${options.extensions.map((extension) => extension.replace(".", "")).join(",")}}`);
const globalPattern = appendExtensionListToPattern(
options.filePattern,
options.extensions
);
await Promise.all(
routesFolder.map((folder) => {
const watcher = new RoutesFolderWatcher(folder, options);
setupWatcher(watcher);
watchers.push(watcher);
if (startWatchers) {
watchers.push(setupWatcher(new RoutesFolderWatcher(folder, options)));
}
const pattern = folder.filePattern ? appendExtensionListToPattern(
folder.filePattern,
// also override the extensions if the folder has a custom extensions
folder.extensions || options.extensions
) : globalPattern;
return (0, import_fast_glob.default)(pattern, {

@@ -1373,3 +1384,3 @@ cwd: folder.src,

log(`\u{1F916} Scanning files in ${watcher.src}`);
watcher.on("change", async (ctx) => {
return watcher.on("change", async (ctx) => {
await updatePage(ctx);

@@ -1437,3 +1448,8 @@ writeConfigFiles();

function stopWatcher() {
watchers.forEach((watcher) => watcher.close());
if (watchers.length) {
if (options.logs) {
console.log("\u{1F6D1} stopping watcher");
}
watchers.forEach((watcher) => watcher.close());
}
}

@@ -1467,2 +1483,3 @@ let server;

routesFolder: [{ src: "src/pages" }],
filePattern: "**/*",
routeBlockLang: "json5",

@@ -1569,8 +1586,5 @@ getRouteName: getFileBasedRouteName,

buildStart() {
return ctx.scanPages();
return ctx.scanPages(true);
},
buildEnd() {
if (options.logs) {
console.log("\u{1F6D1} stopping watcher");
}
ctx.stopWatcher();

@@ -1577,0 +1591,0 @@ },

import * as unplugin from 'unplugin';
import { R as ResolvedOptions, S as ServerContext, L as LiteralStringUnion, O as Options } from './options-dc4b959a.js';
export { E as EditableTreeNode, T as TreeNode, d as TreeNodeValueParam, e as TreeNodeValueStatic, c as createPrefixTree, b as createTreeNodeValue, g as getFileBasedRouteName, a as getPascalCaseRouteName } from './options-dc4b959a.js';
import { R as ResolvedOptions, S as ServerContext, L as LiteralStringUnion, O as Options } from './options-fe7d5846.js';
export { E as EditableTreeNode, T as TreeNode, d as TreeNodeValueParam, e as TreeNodeValueStatic, c as createPrefixTree, b as createTreeNodeValue, g as getFileBasedRouteName, a as getPascalCaseRouteName } from './options-fe7d5846.js';
import { RouteParamsRaw, RouteParams, RouteMeta, RouteLocationNormalized, RouteRecordName, RouteLocationNormalizedLoaded, RouteQueryAndHash, RouteLocationOptions, RouteLocation, NavigationGuardNext, NavigationFailure, Router, RouteLocationRaw, RouterLinkProps as RouterLinkProps$1 } from 'vue-router';

@@ -5,0 +5,0 @@ import { Ref, AllowedComponentProps, ComponentCustomProps, VNodeProps, UnwrapRef, VNode, ComputedRef } from 'vue';

@@ -217,2 +217,5 @@ "use strict";

}
function appendExtensionListToPattern(filePattern, extensions) {
return filePattern + (extensions.length === 1 ? extensions[0] : `.{${extensions.map((extension) => extension.replace(".", "")).join(",")}}`);
}

@@ -1336,8 +1339,16 @@ // src/core/treeNodeValue.ts

}
const pattern = `**/*` + (options.extensions.length === 1 ? options.extensions[0] : `.{${options.extensions.map((extension) => extension.replace(".", "")).join(",")}}`);
const globalPattern = appendExtensionListToPattern(
options.filePattern,
options.extensions
);
await Promise.all(
routesFolder.map((folder) => {
const watcher = new RoutesFolderWatcher(folder, options);
setupWatcher(watcher);
watchers.push(watcher);
if (startWatchers) {
watchers.push(setupWatcher(new RoutesFolderWatcher(folder, options)));
}
const pattern = folder.filePattern ? appendExtensionListToPattern(
folder.filePattern,
// also override the extensions if the folder has a custom extensions
folder.extensions || options.extensions
) : globalPattern;
return (0, import_fast_glob.default)(pattern, {

@@ -1401,3 +1412,3 @@ cwd: folder.src,

log(`\u{1F916} Scanning files in ${watcher.src}`);
watcher.on("change", async (ctx) => {
return watcher.on("change", async (ctx) => {
await updatePage(ctx);

@@ -1465,3 +1476,8 @@ writeConfigFiles();

function stopWatcher() {
watchers.forEach((watcher) => watcher.close());
if (watchers.length) {
if (options.logs) {
console.log("\u{1F6D1} stopping watcher");
}
watchers.forEach((watcher) => watcher.close());
}
}

@@ -1495,2 +1511,3 @@ let server;

routesFolder: [{ src: "src/pages" }],
filePattern: "**/*",
routeBlockLang: "json5",

@@ -1597,8 +1614,5 @@ getRouteName: getFileBasedRouteName,

buildStart() {
return ctx.scanPages();
return ctx.scanPages(true);
},
buildEnd() {
if (options.logs) {
console.log("\u{1F6D1} stopping watcher");
}
ctx.stopWatcher();

@@ -1605,0 +1619,0 @@ },

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

export { D as DEFAULT_OPTIONS, O as Options, R as ResolvedOptions, h as RoutesFolder, f as RoutesFolderOption, S as ServerContext, i as _OptionsImportMode, _ as _RoutesFolder, r as resolveOptions } from './options-dc4b959a.js';
export { D as DEFAULT_OPTIONS, O as Options, R as ResolvedOptions, h as RoutesFolder, f as RoutesFolderOption, S as ServerContext, i as _OptionsImportMode, _ as _RoutesFolder, r as resolveOptions } from './options-fe7d5846.js';
import 'vue-router';

@@ -64,2 +64,3 @@ "use strict";

routesFolder: [{ src: "src/pages" }],
filePattern: "**/*",
routeBlockLang: "json5",

@@ -66,0 +67,0 @@ getRouteName: getFileBasedRouteName,

import * as rollup from 'rollup';
import { O as Options } from './options-dc4b959a.js';
import { O as Options } from './options-fe7d5846.js';
import 'vue-router';

@@ -4,0 +4,0 @@

@@ -189,2 +189,5 @@ "use strict";

}
function appendExtensionListToPattern(filePattern, extensions) {
return filePattern + (extensions.length === 1 ? extensions[0] : `.{${extensions.map((extension) => extension.replace(".", "")).join(",")}}`);
}

@@ -1308,8 +1311,16 @@ // src/core/treeNodeValue.ts

}
const pattern = `**/*` + (options.extensions.length === 1 ? options.extensions[0] : `.{${options.extensions.map((extension) => extension.replace(".", "")).join(",")}}`);
const globalPattern = appendExtensionListToPattern(
options.filePattern,
options.extensions
);
await Promise.all(
routesFolder.map((folder) => {
const watcher = new RoutesFolderWatcher(folder, options);
setupWatcher(watcher);
watchers.push(watcher);
if (startWatchers) {
watchers.push(setupWatcher(new RoutesFolderWatcher(folder, options)));
}
const pattern = folder.filePattern ? appendExtensionListToPattern(
folder.filePattern,
// also override the extensions if the folder has a custom extensions
folder.extensions || options.extensions
) : globalPattern;
return (0, import_fast_glob.default)(pattern, {

@@ -1373,3 +1384,3 @@ cwd: folder.src,

log(`\u{1F916} Scanning files in ${watcher.src}`);
watcher.on("change", async (ctx) => {
return watcher.on("change", async (ctx) => {
await updatePage(ctx);

@@ -1437,3 +1448,8 @@ writeConfigFiles();

function stopWatcher() {
watchers.forEach((watcher) => watcher.close());
if (watchers.length) {
if (options.logs) {
console.log("\u{1F6D1} stopping watcher");
}
watchers.forEach((watcher) => watcher.close());
}
}

@@ -1467,2 +1483,3 @@ let server;

routesFolder: [{ src: "src/pages" }],
filePattern: "**/*",
routeBlockLang: "json5",

@@ -1569,8 +1586,5 @@ getRouteName: getFileBasedRouteName,

buildStart() {
return ctx.scanPages();
return ctx.scanPages(true);
},
buildEnd() {
if (options.logs) {
console.log("\u{1F6D1} stopping watcher");
}
ctx.stopWatcher();

@@ -1577,0 +1591,0 @@ },

import { Router, RouteLocationNormalized, RouteRecordRaw } from 'vue-router';
import { a as DataLoader } from './defineLoader-bde635fd.js';
export { D as DefineLoaderOptions, d as _defineLoader, s as _stopDataFetchingScope } from './defineLoader-bde635fd.js';
import { A as Awaitable } from './options-dc4b959a.js';
import { A as Awaitable } from './options-fe7d5846.js';
import 'vue';

@@ -6,0 +6,0 @@

import * as vite from 'vite';
import { O as Options } from './options-dc4b959a.js';
import { O as Options } from './options-fe7d5846.js';
import 'vue-router';

@@ -4,0 +4,0 @@

@@ -189,2 +189,5 @@ "use strict";

}
function appendExtensionListToPattern(filePattern, extensions) {
return filePattern + (extensions.length === 1 ? extensions[0] : `.{${extensions.map((extension) => extension.replace(".", "")).join(",")}}`);
}

@@ -1308,8 +1311,16 @@ // src/core/treeNodeValue.ts

}
const pattern = `**/*` + (options.extensions.length === 1 ? options.extensions[0] : `.{${options.extensions.map((extension) => extension.replace(".", "")).join(",")}}`);
const globalPattern = appendExtensionListToPattern(
options.filePattern,
options.extensions
);
await Promise.all(
routesFolder.map((folder) => {
const watcher = new RoutesFolderWatcher(folder, options);
setupWatcher(watcher);
watchers.push(watcher);
if (startWatchers) {
watchers.push(setupWatcher(new RoutesFolderWatcher(folder, options)));
}
const pattern = folder.filePattern ? appendExtensionListToPattern(
folder.filePattern,
// also override the extensions if the folder has a custom extensions
folder.extensions || options.extensions
) : globalPattern;
return (0, import_fast_glob.default)(pattern, {

@@ -1373,3 +1384,3 @@ cwd: folder.src,

log(`\u{1F916} Scanning files in ${watcher.src}`);
watcher.on("change", async (ctx) => {
return watcher.on("change", async (ctx) => {
await updatePage(ctx);

@@ -1437,3 +1448,8 @@ writeConfigFiles();

function stopWatcher() {
watchers.forEach((watcher) => watcher.close());
if (watchers.length) {
if (options.logs) {
console.log("\u{1F6D1} stopping watcher");
}
watchers.forEach((watcher) => watcher.close());
}
}

@@ -1467,2 +1483,3 @@ let server;

routesFolder: [{ src: "src/pages" }],
filePattern: "**/*",
routeBlockLang: "json5",

@@ -1569,8 +1586,5 @@ getRouteName: getFileBasedRouteName,

buildStart() {
return ctx.scanPages();
return ctx.scanPages(true);
},
buildEnd() {
if (options.logs) {
console.log("\u{1F6D1} stopping watcher");
}
ctx.stopWatcher();

@@ -1577,0 +1591,0 @@ },

import * as webpack from 'webpack';
import { O as Options } from './options-dc4b959a.js';
import { O as Options } from './options-fe7d5846.js';
import 'vue-router';

@@ -4,0 +4,0 @@

@@ -189,2 +189,5 @@ "use strict";

}
function appendExtensionListToPattern(filePattern, extensions) {
return filePattern + (extensions.length === 1 ? extensions[0] : `.{${extensions.map((extension) => extension.replace(".", "")).join(",")}}`);
}

@@ -1308,8 +1311,16 @@ // src/core/treeNodeValue.ts

}
const pattern = `**/*` + (options.extensions.length === 1 ? options.extensions[0] : `.{${options.extensions.map((extension) => extension.replace(".", "")).join(",")}}`);
const globalPattern = appendExtensionListToPattern(
options.filePattern,
options.extensions
);
await Promise.all(
routesFolder.map((folder) => {
const watcher = new RoutesFolderWatcher(folder, options);
setupWatcher(watcher);
watchers.push(watcher);
if (startWatchers) {
watchers.push(setupWatcher(new RoutesFolderWatcher(folder, options)));
}
const pattern = folder.filePattern ? appendExtensionListToPattern(
folder.filePattern,
// also override the extensions if the folder has a custom extensions
folder.extensions || options.extensions
) : globalPattern;
return (0, import_fast_glob.default)(pattern, {

@@ -1373,3 +1384,3 @@ cwd: folder.src,

log(`\u{1F916} Scanning files in ${watcher.src}`);
watcher.on("change", async (ctx) => {
return watcher.on("change", async (ctx) => {
await updatePage(ctx);

@@ -1437,3 +1448,8 @@ writeConfigFiles();

function stopWatcher() {
watchers.forEach((watcher) => watcher.close());
if (watchers.length) {
if (options.logs) {
console.log("\u{1F6D1} stopping watcher");
}
watchers.forEach((watcher) => watcher.close());
}
}

@@ -1467,2 +1483,3 @@ let server;

routesFolder: [{ src: "src/pages" }],
filePattern: "**/*",
routeBlockLang: "json5",

@@ -1569,8 +1586,5 @@ getRouteName: getFileBasedRouteName,

buildStart() {
return ctx.scanPages();
return ctx.scanPages(true);
},
buildEnd() {
if (options.logs) {
console.log("\u{1F6D1} stopping watcher");
}
ctx.stopWatcher();

@@ -1577,0 +1591,0 @@ },

{
"name": "unplugin-vue-router",
"version": "0.5.1",
"version": "0.5.2",
"packageManager": "pnpm@7.28.0",

@@ -5,0 +5,0 @@ "description": "File based typed routing for Vue Router",

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 too big to display

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

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