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

@docusaurus/logger

Package Overview
Dependencies
Maintainers
4
Versions
1149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@docusaurus/logger - npm Package Compare versions

Comparing version 3.7.0-canary-6193 to 3.7.0-canary-6194

13

lib/perfLogger.js

@@ -74,5 +74,14 @@ "use strict";

});
const readMark = (label) => {
const startMark = performance.getEntriesByName(label, 'mark')?.[0];
if (!startMark) {
throw new Error(`No performance start mark for label=${label}`);
}
performance.clearMarks(label);
return startMark;
};
const end = (label) => {
const { duration, detail: { memoryUsage }, } = performance.measure(label);
performance.clearMarks(label);
const startMark = readMark(label);
const duration = performance.now() - startMark.startTime;
const { detail: { memoryUsage }, } = startMark;
printPerfLog({

@@ -79,0 +88,0 @@ label: applyParentPrefix(label),

4

package.json
{
"name": "@docusaurus/logger",
"version": "3.7.0-canary-6193",
"version": "3.7.0-canary-6194",
"description": "An encapsulated logger for semantically formatting console messages.",

@@ -32,3 +32,3 @@ "main": "./lib/index.js",

},
"gitHead": "9abfde23486f800556b7ef9e75a88e7e7d089eb8"
"gitHead": "c0f66b14b97127d64562c4ab28b0a911fdedbe0f"
}

@@ -117,8 +117,20 @@ /**

const readMark = (label: string) => {
const startMark = performance.getEntriesByName(
label,
'mark',
)?.[0] as PerformanceMark;
if (!startMark) {
throw new Error(`No performance start mark for label=${label}`);
}
performance.clearMarks(label);
return startMark;
};
const end: PerfLoggerAPI['end'] = (label) => {
const startMark = readMark(label);
const duration = performance.now() - startMark.startTime;
const {
duration,
detail: {memoryUsage},
} = performance.measure(label);
performance.clearMarks(label);
} = startMark;
printPerfLog({

@@ -125,0 +137,0 @@ label: applyParentPrefix(label),

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