Socket
Socket
Sign inDemoInstall

@vuepress/utils

Package Overview
Dependencies
Maintainers
6
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vuepress/utils - npm Package Compare versions

Comparing version 2.0.0-beta.53 to 2.0.0-beta.54

6

dist/index.d.ts

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

export { default as chalk } from 'chalk';
export { default as debug } from 'debug';

@@ -8,2 +7,3 @@ export { default as fs } from 'fs-extra';

export { default as ora } from 'ora';
export { default as colors } from 'picocolors';
export { default as path } from 'upath';

@@ -61,4 +61,6 @@ import { HeadConfig, HeadAttrsConfig } from '@vuepress/shared';

declare const sanitizeFileName: (name: string) => string;
declare const withSpinner: (msg: string) => <T>(target: (spinner?: Ora) => Promise<T>) => Promise<T>;
export { createError, error, formatMs, getDirname, importFile, importFileDefault, info, isChildPath, logger, renderHead, renderHeadAttrs, success, tip, warn, withSpinner };
export { createError, error, formatMs, getDirname, importFile, importFileDefault, info, isChildPath, logger, renderHead, renderHeadAttrs, sanitizeFileName, success, tip, warn, withSpinner };
// src/index.ts
import chalk2 from "chalk";
import debug from "debug";

@@ -8,2 +7,3 @@ import fs from "fs-extra";

import ora2 from "ora";
import colors2 from "picocolors";
import path3 from "upath";

@@ -41,17 +41,17 @@

// src/logger.ts
import chalk from "chalk";
import colors from "picocolors";
var info = (...args) => {
console.log(chalk.cyan("info"), ...args);
console.log(colors.cyan("info"), ...args);
};
var tip = (...args) => {
console.log(chalk.blue("tip"), ...args);
console.log(colors.blue("tip"), ...args);
};
var success = (...args) => {
console.log(chalk.green("success"), ...args);
console.log(colors.green("success"), ...args);
};
var warn = (...args) => {
console.warn(chalk.yellow("warning"), ...args);
console.warn(colors.yellow("warning"), ...args);
};
var error = (...args) => {
console.error(chalk.red("error"), ...args);
console.error(colors.red("error"), ...args);
};

@@ -89,2 +89,10 @@ var createError = (message) => {

// src/sanitizeFileName.ts
var INVALID_CHAR_REGEX = /[\x00-\x1F\x7F<>*#"{}|^[\]`;?:&=+$,]/g;
var DRIVE_LETTER_REGEX = /^[a-z]:/i;
var sanitizeFileName = (name) => {
const driveLetter = DRIVE_LETTER_REGEX.exec(name)?.[0] || "";
return driveLetter + name.substring(driveLetter.length).replace(INVALID_CHAR_REGEX, "_").replace(/^_+/, "");
};
// src/withSpinner.ts

@@ -110,3 +118,3 @@ import process from "process";

export {
chalk2 as chalk,
colors2 as colors,
createError,

@@ -129,2 +137,3 @@ debug,

renderHeadAttrs,
sanitizeFileName,
success,

@@ -131,0 +140,0 @@ tip,

{
"name": "@vuepress/utils",
"version": "2.0.0-beta.53",
"version": "2.0.0-beta.54",
"description": "Utils package of VuePress",

@@ -33,10 +33,10 @@ "keywords": [

"@types/hash-sum": "^1.0.0",
"@vuepress/shared": "2.0.0-beta.53",
"chalk": "^5.1.2",
"debug": "^4.3.4",
"fs-extra": "^10.1.0",
"fs-extra": "^11.1.0",
"globby": "^13.1.2",
"hash-sum": "^2.0.0",
"ora": "^6.1.2",
"upath": "^2.0.1"
"picocolors": "^1.0.0",
"upath": "^2.0.1",
"@vuepress/shared": "2.0.0-beta.54"
},

@@ -43,0 +43,0 @@ "publishConfig": {

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