vinyl-contents-tostring
Advanced tools
Comparing version 4.0.0 to 4.1.0
{ | ||
"name": "vinyl-contents-tostring", | ||
"version": "4.0.0", | ||
"version": "4.1.0", | ||
"description": "Convert vinyl file content to string", | ||
"main": "src/index.js", | ||
"type": "module", | ||
"main": "dist/index.cjs", | ||
"exports": { | ||
".": { | ||
"import": "./dist/index.js", | ||
"require": "./dist/index.cjs" | ||
} | ||
}, | ||
"engines": { | ||
"node": ">=12.2" | ||
}, | ||
"scripts": { | ||
"lint": "eslint 'src/*.js' 'test/*.js'", | ||
"pretest": "npm run lint", | ||
"lint": "eslint --cache .", | ||
"build": "rollup -c", | ||
"test": "mocha", | ||
"cover": "nyc npm test", | ||
"prepare": "npm run test" | ||
"cover": "c8 npm test", | ||
"prepare": "npm run build" | ||
}, | ||
@@ -35,16 +45,14 @@ "repository": { | ||
"devDependencies": { | ||
"@babel/core": "^7.15.5", | ||
"@babel/register": "^7.15.3", | ||
"@istanbuljs/nyc-config-babel": "^3.0.0", | ||
"babel-plugin-istanbul": "^6.0.0", | ||
"c8": "^7.10.0", | ||
"chai": "^4.3.4", | ||
"chai-as-promised": "^7.1.1", | ||
"coveralls": "^3.1.1", | ||
"env-test": "^1.0.0", | ||
"eslint": "^7.32.0", | ||
"eslint": "^8.1.0", | ||
"eslint-config-airbnb-base": "^14.2.1", | ||
"eslint-plugin-import": "^2.24.2", | ||
"mocha": "^9.1.2", | ||
"nyc": "^15.1.0" | ||
"eslint-plugin-import": "^2.25.2", | ||
"eslint-plugin-mocha": "^9.0.0", | ||
"eslint-plugin-node": "^11.1.0", | ||
"mocha": "^9.1.3", | ||
"rollup": "^2.59.0" | ||
} | ||
} |
@@ -1,5 +0,8 @@ | ||
const { isVinyl } = require('vinyl'); | ||
const streamToString = require('stream-to-string'); | ||
// import { isVinyl } from 'vinyl'; | ||
import Vinyl from 'vinyl'; // TODO: Use named imports when available | ||
import streamToString from 'stream-to-string'; | ||
module.exports = (file, enc) => (!isVinyl(file) // eslint-disable-line no-nested-ternary | ||
const { isVinyl } = Vinyl; | ||
export default (file, enc) => (!isVinyl(file) // eslint-disable-line no-nested-ternary | ||
? Promise.reject(new TypeError('First argument must be a Vinyl file')) | ||
@@ -6,0 +9,0 @@ : file.isBuffer() // eslint-disable-line no-nested-ternary |
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
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
5797
11
5
28
0
Yes