vinyl-contents-tostring
Advanced tools
Comparing version 6.1.1 to 7.0.0
@@ -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" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4266
11
Updatedbl@^6.0.12
Updatedp-from-callback@^1.0.1