Socket
Socket
Sign inDemoInstall

0x

Package Overview
Dependencies
Maintainers
2
Versions
123
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

0x - npm Package Compare versions

Comparing version 4.4.1 to 4.4.2

26

lib/v8-log-to-ticks.js

@@ -6,2 +6,3 @@ 'use strict'

const { extname } = require('path')
const { promisify } = require('util')
const through = require('through2')

@@ -11,4 +12,23 @@ const fs = require('fs')

module.exports = v8LogToTicks
const readFile = promisify(fs.readFile)
const writeFile = promisify(fs.writeFile)
module.exports = wrapper
async function wrapper (isolateLogPath, node) {
const filtered = await filterLinesThatAreTooLong(isolateLogPath)
return v8LogToTicks(filtered, node)
}
// long lines make the --preprocess crash. We are just filtering them beforehand
// as Node.js 8.12.0 would crash if there is any error in the preprocess script
// TODO use streams
async function filterLinesThatAreTooLong (isolateLogPath) {
const dest = isolateLogPath + '.filtered'
let data = await readFile(isolateLogPath, 'utf8')
data = data.split('\n').filter((s) => s.length < 1024).join('\n')
await writeFile(dest, data)
return dest
}
function v8LogToTicks (isolateLogPath, node) {

@@ -28,3 +48,5 @@ const isJson = extname(isolateLogPath) === '.json'

pump(sp.stderr, through((errMsg, _, cb) => {
if (ignore.test(errMsg)) cb()
if (ignore.test(errMsg)) {
cb()
}
else cb(errMsg, _, cb)

@@ -31,0 +53,0 @@ }), process.stderr)

2

package.json
{
"name": "0x",
"version": "4.4.1",
"version": "4.4.2",
"description": "🔥 single-command flamegraph profiling 🔥",

@@ -5,0 +5,0 @@ "main": "index.js",

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