@tanstack/router-generator
Advanced tools
Comparing version 1.58.12 to 1.63.5
@@ -29,17 +29,31 @@ import * as fs from "node:fs"; | ||
function logging(config) { | ||
function stripEmojis(str) { | ||
return str.replace( | ||
/[\p{Emoji_Presentation}\p{Extended_Pictographic}]/gu, | ||
"" | ||
); | ||
} | ||
function formatLogArgs(args) { | ||
if (process.env.CI) { | ||
return args.map( | ||
(arg) => typeof arg === "string" ? stripEmojis(arg) : arg | ||
); | ||
} | ||
return args; | ||
} | ||
return { | ||
log: (...args) => { | ||
if (!config.disabled) console["log"](...args); | ||
if (!config.disabled) console.log(...formatLogArgs(args)); | ||
}, | ||
debug: (...args) => { | ||
if (!config.disabled) console.debug(...args); | ||
if (!config.disabled) console.debug(...formatLogArgs(args)); | ||
}, | ||
info: (...args) => { | ||
if (!config.disabled) console.info(...args); | ||
if (!config.disabled) console.info(...formatLogArgs(args)); | ||
}, | ||
warn: (...args) => { | ||
if (!config.disabled) console.warn(...args); | ||
if (!config.disabled) console.warn(...formatLogArgs(args)); | ||
}, | ||
error: (...args) => { | ||
if (!config.disabled) console.error(...args); | ||
if (!config.disabled) console.error(...formatLogArgs(args)); | ||
} | ||
@@ -46,0 +60,0 @@ }; |
{ | ||
"name": "@tanstack/router-generator", | ||
"version": "1.58.12", | ||
"version": "1.63.5", | ||
"description": "Modern and scalable routing for React applications", | ||
@@ -5,0 +5,0 @@ "author": "Tanner Linsley", |
@@ -44,17 +44,33 @@ import * as fs from 'node:fs' | ||
export function logging(config: { disabled: boolean }) { | ||
function stripEmojis(str: string) { | ||
return str.replace( | ||
/[\p{Emoji_Presentation}\p{Extended_Pictographic}]/gu, | ||
'', | ||
) | ||
} | ||
function formatLogArgs(args: Array<any>): Array<any> { | ||
if (process.env.CI) { | ||
return args.map((arg) => | ||
typeof arg === 'string' ? stripEmojis(arg) : arg, | ||
) | ||
} | ||
return args | ||
} | ||
return { | ||
log: (...args: Array<any>) => { | ||
if (!config.disabled) console['log'](...args) | ||
if (!config.disabled) console.log(...formatLogArgs(args)) | ||
}, | ||
debug: (...args: Array<any>) => { | ||
if (!config.disabled) console.debug(...args) | ||
if (!config.disabled) console.debug(...formatLogArgs(args)) | ||
}, | ||
info: (...args: Array<any>) => { | ||
if (!config.disabled) console.info(...args) | ||
if (!config.disabled) console.info(...formatLogArgs(args)) | ||
}, | ||
warn: (...args: Array<any>) => { | ||
if (!config.disabled) console.warn(...args) | ||
if (!config.disabled) console.warn(...formatLogArgs(args)) | ||
}, | ||
error: (...args: Array<any>) => { | ||
if (!config.disabled) console.error(...args) | ||
if (!config.disabled) console.error(...formatLogArgs(args)) | ||
}, | ||
@@ -61,0 +77,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
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
326124
4261
2