Socket
Socket
Sign inDemoInstall

vinyl-contents-tostring

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vinyl-contents-tostring - npm Package Compare versions

Comparing version 6.1.1 to 7.0.0

4

index.js

@@ -1,2 +0,1 @@

import { pipeline } from 'node:stream';
import Vinyl from 'vinyl';

@@ -6,3 +5,2 @@ import bl from 'bl';

const noop = () => {}; // TODO: remove and replace with node:stream/promises (node>=16)
const { isVinyl } = Vinyl; // TODO: Use named imports when available

@@ -13,4 +11,4 @@ export default (file, enc) => (isVinyl(file)

: file.isStream()
? fromCallback((cb) => pipeline(file.contents, bl(cb), noop)).then((buf) => buf.toString(enc))
? fromCallback((cb) => file.contents.pipe(bl(cb))).then((buf) => buf.toString(enc))
: Promise.resolve()
: Promise.reject(new TypeError('First argument must be a Vinyl file')));
{
"name": "vinyl-contents-tostring",
"version": "6.1.1",
"version": "7.0.0",
"description": "Convert vinyl file content to string",

@@ -11,3 +11,3 @@ "type": "module",

"engines": {
"node": ">=14.0"
"node": ">=18.0"
},

@@ -37,20 +37,20 @@ "scripts": {

"dependencies": {
"bl": "^6.0.0",
"p-from-callback": "^1.0.0",
"bl": "^6.0.12",
"p-from-callback": "^1.0.1",
"vinyl": "^3.0.0"
},
"devDependencies": {
"c8": "^7.12.0",
"chai": "^4.3.7",
"@eslint-community/eslint-plugin-eslint-comments": "^4.3.0",
"c8": "^9.1.0",
"chai": "^4.3.10",
"chai-as-promised": "^7.1.1",
"env-test": "^1.0.0",
"eslint": "^8.33.0",
"eslint": "^8.57.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-mocha": "^10.1.0",
"eslint-plugin-n": "^15.6.1",
"eslint-plugin-unicorn": "^45.0.2",
"mocha": "^10.2.0"
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-mocha": "^10.4.3",
"eslint-plugin-n": "^17.4.0",
"eslint-plugin-unicorn": "^52.0.0",
"mocha": "^10.4.0"
}
}
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