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

timer-logs

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

timer-logs - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

7

index.ts

@@ -71,2 +71,3 @@ import * as crypto from 'crypto'

this.uniqueId = crypto.randomBytes(8).toString('hex')
this.start('operationTime')
this.start(this.config.label)

@@ -151,2 +152,3 @@ }

this.finishTime = Date.now()
this.stop('operationTime')
if (this.mostRecentlyStartedLabel && !this.savedTimes[this.mostRecentlyStartedLabel].finishTime) this.end()

@@ -216,2 +218,3 @@ const printObject: { [label: string]: string | number } = {

const errorDetails = new Map(Object.entries(e))
if(!errorDetails.has('message')) errorDetails.set('message', 'Postgres error code '+e.code)
errorDetails.set("databaseType", "postgres")

@@ -290,2 +293,6 @@ this.printLog(errorDetails, Severity.ERROR)

private printLog(details: Map<string, string | number | boolean | null | undefined>, severity: Severity) {
if(!details.has('message')){
// this should never be triggered. Always pass a message in the details map. Just a backup:
details.set('message', 'timer-logs unset message in file '+this.config.filename)
}
const log: { [label: string]: string | number | boolean | null | undefined } = {

@@ -292,0 +299,0 @@ severity: severity,

2

package.json
{
"name": "timer-logs",
"version": "1.2.1",
"version": "1.2.2",
"devDependencies": {

@@ -5,0 +5,0 @@ "@types/node": "^15.00.0"

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