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

@discoveryjs/cli

Package Overview
Dependencies
Maintainers
0
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@discoveryjs/cli - npm Package Compare versions

Comparing version 2.7.2 to 2.8.0

12

lib/cache.js

@@ -5,6 +5,6 @@ const fs = require('fs');

const chalk = require('chalk');
const { stringifyStream } = require('@discoveryjs/json-ext');
const { stringifyChunked } = require('@discoveryjs/json-ext');
const { encode: encodeJsonxl } = require('./tmp/jsonxl-snapshot9');
const { getCacheFileInfo, createCacheDispatcher } = require('./shared/cache');
const { logSlugMsg } = require('./shared/utils');
const { logSlugMsg, isReadableStream } = require('./shared/utils');
const bootstrap = require('./shared/bootstrap');

@@ -51,5 +51,7 @@ const ensureDir = require('./shared/ensure-dir');

const startWriteTime = Date.now();
const stream = experimentalJsonxl
? Readable.from(encodeJsonxl(data))
: stringifyStream(data, null, prettyData);
const stream = isReadableStream(data)
? data
: experimentalJsonxl
? Readable.from(encodeJsonxl(data))
: Readable.from(stringifyChunked(data, null, prettyData));

@@ -56,0 +58,0 @@ stream

const path = require('path');
const { fork } = require('child_process');
const { EventEmitter } = require('events');
const chalk = require('chalk');

@@ -112,2 +113,12 @@ const prettyMs = require('pretty-ms');

function isReadableStream(value) {
return (
value instanceof EventEmitter &&
(typeof value.read === 'function' || typeof value._read === 'function') &&
typeof value.pipe === 'function' &&
value.readable !== false &&
value.readableObjectMode === false
);
}
function prepareStdStreamChunkForMessage(chunk) {

@@ -367,3 +378,4 @@ return chunk

buildEntryNameByPattern,
buildAssetNameByPattern
buildAssetNameByPattern,
isReadableStream
};
{
"name": "@discoveryjs/cli",
"version": "2.7.2",
"version": "2.8.0",
"description": "CLI tools to serve & build projects based on Discovery.js",

@@ -32,13 +32,13 @@ "author": "Roman Dvornov <rdvornov@gmail.com> (https://github.com/lahmatiy)",

"dependencies": {
"@discoveryjs/json-ext": "^0.5.6",
"@discoveryjs/json-ext": "^0.6.0",
"archiver": "^5.3.1",
"chalk": "^4.1.2",
"clap": "^3.1.1",
"cron-parser": "^4.7.1",
"cron-parser": "^4.9.0",
"cron-validator": "^1.3.1",
"cronstrue": "^2.21.0",
"esbuild": "^0.20.1",
"express": "^4.18.2",
"cronstrue": "^2.50.0",
"esbuild": "^0.23.0",
"express": "^4.19.2",
"mime": "^3.0.0",
"parse-duration": "^1.0.2",
"parse-duration": "^1.1.0",
"pretty-ms": "^7.0.0"

@@ -48,3 +48,3 @@ },

"eslint": "^8.29.0",
"mocha": "^10.2.0"
"mocha": "^10.6.0"
},

@@ -51,0 +51,0 @@ "files": [

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