New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

koishi-utils

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koishi-utils - npm Package Compare versions

Comparing version 3.1.3 to 3.1.4

5

dist/logger.d.ts

@@ -8,3 +8,3 @@ /// <reference types="node" />

export declare class Logger {
private name;
name: string;
private showDiff;

@@ -25,2 +25,3 @@ static readonly SUCCESS = 1;

private displayName;
stream: NodeJS.WritableStream;
constructor(name: string, showDiff?: boolean);

@@ -30,5 +31,5 @@ private color;

get level(): number;
extend: (namespace: string) => Logger;
extend: (namespace: string, showDiff?: boolean) => Logger;
format: (format: any, ...param: any[]) => string;
}
export {};

9

dist/logger.js

@@ -19,4 +19,5 @@ "use strict";

this.showDiff = showDiff;
this.extend = (namespace) => {
return new Logger(`${this.name}:${namespace}`);
this.stream = process.stderr;
this.extend = (namespace, showDiff = this.showDiff) => {
return new Logger(`${this.name}:${namespace}`, showDiff);
};

@@ -33,3 +34,3 @@ this.format = (...args) => {

if (match === '%%')
return match;
return '%';
index += 1;

@@ -81,3 +82,3 @@ const formatter = Logger.formatters[format];

return;
process.stderr.write(prefix + this.displayName + this.format(...args) + '\n');
this.stream.write(prefix + this.displayName + this.format(...args) + '\n');
};

@@ -84,0 +85,0 @@ }

@@ -36,3 +36,10 @@ "use strict";

Time.fromDateNumber = fromDateNumber;
const timeRegExp = /^(\d+(?:\.\d+)?w(?:eek(?:s)?)?)?(\d+(?:\.\d+)?d(?:ay(?:s)?)?)?(\d+(?:\.\d+)?h(?:our(?:s)?)?)?(\d+(?:\.\d+)?m(?:in(?:ute)?(?:s)?)?)?(\d+(?:\.\d+)?s(?:ec(?:ond)?(?:s)?)?)?$/;
const numeric = /\d+(?:\.\d+)?/.source;
const timeRegExp = new RegExp(`^${[
'w(?:eek(?:s)?)?',
'd(?:ay(?:s)?)?',
'h(?:our(?:s)?)?',
'm(?:in(?:ute)?(?:s)?)?',
's(?:ec(?:ond)?(?:s)?)?',
].map(unit => `(${numeric}${unit})?`).join('')}$`);
function parseTime(source) {

@@ -39,0 +46,0 @@ const capture = timeRegExp.exec(source);

{
"name": "koishi-utils",
"description": "Utilities for Koishi",
"version": "3.1.3",
"version": "3.1.4",
"main": "dist/index.js",

@@ -36,4 +36,3 @@ "typings": "dist/index.d.ts",

"@types/supports-color": "^5.3.0",
"mockdate": "^3.0.2",
"koishi-test-utils": "^4.0.0"
"koishi-test-utils": "^5.0.0"
},

@@ -40,0 +39,0 @@ "dependencies": {

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