vinyl-contents-tostring
Advanced tools
Comparing version 4.1.1 to 5.0.0
{ | ||
"name": "vinyl-contents-tostring", | ||
"version": "4.1.1", | ||
"version": "5.0.0", | ||
"description": "Convert vinyl file content to string", | ||
"type": "module", | ||
"main": "dist/index.cjs", | ||
"exports": { | ||
".": { | ||
"import": "./dist/index.js", | ||
"require": "./dist/index.cjs" | ||
} | ||
".": "./index.js", | ||
"./package.json": "./package.json" | ||
}, | ||
"engines": { | ||
"node": ">=12.2" | ||
"node": ">=14.0" | ||
}, | ||
"scripts": { | ||
"lint": "eslint --cache .", | ||
"build": "rollup -c", | ||
"test": "mocha", | ||
"cover": "c8 npm test", | ||
"prepare": "npm run build" | ||
"cover": "c8 npm test" | ||
}, | ||
@@ -28,3 +23,3 @@ "repository": { | ||
"files": [ | ||
"dist" | ||
"index.js" | ||
], | ||
@@ -42,18 +37,19 @@ "keywords": [ | ||
"dependencies": { | ||
"stream-to-string": "^1.2.0", | ||
"bl": "^5.0.0", | ||
"p-from-callback": "^1.0.0", | ||
"vinyl": "^2.2.1" | ||
}, | ||
"devDependencies": { | ||
"c8": "^7.10.0", | ||
"chai": "^4.3.4", | ||
"c8": "^7.11.3", | ||
"chai": "^4.3.6", | ||
"chai-as-promised": "^7.1.1", | ||
"env-test": "^1.0.0", | ||
"eslint": "^8.1.0", | ||
"eslint-config-airbnb-base": "^14.2.1", | ||
"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" | ||
"eslint": "^8.16.0", | ||
"eslint-config-airbnb-base": "^15.0.0", | ||
"eslint-plugin-import": "^2.26.0", | ||
"eslint-plugin-mocha": "^10.0.5", | ||
"eslint-plugin-n": "^15.2.0", | ||
"eslint-plugin-unicorn": "^42.0.0", | ||
"mocha": "^10.0.0" | ||
} | ||
} |
# vinyl-contents-tostring | ||
[![Travis][build-badge]][build] | ||
[![Build Status][build-badge]][build] | ||
[![npm package][npm-badge]][npm] | ||
[![Coverage Status][coveralls-badge]][coveralls] | ||
[![Dependency Status][dependency-status-badge]][dependency-status] | ||
[![devDependency Status][dev-dependency-status-badge]][dev-dependency-status] | ||
@@ -21,13 +19,10 @@ > Convert vinyl content into string | ||
```js | ||
const vfs = require('vinyl-fs'); | ||
const map = require('map-stream'); | ||
const asCallback = require('ascallback'); | ||
const vinylToString = require('vinyl-contents-tostring'); | ||
import { callbackify } from 'node:util'; | ||
import vfs from 'vinyl-fs'; | ||
import map from 'map-stream'; | ||
import toString from 'vinyl-contents-tostring'; | ||
vfs.src(['./package.json']) | ||
.pipe(map( | ||
(file, cb) => asCallback( | ||
vinylToString(file).then(contents => console.log(contents)), | ||
cb, | ||
), | ||
callbackify(file => toString(file).then(contents => console.log(contents))), | ||
)); | ||
@@ -54,7 +49,1 @@ ``` | ||
[coveralls]: https://coveralls.io/r/dotcore64/vinyl-contents-tostring | ||
[dependency-status-badge]: https://david-dm.org/dotcore64/vinyl-contents-tostring.svg?style=flat-square | ||
[dependency-status]: https://david-dm.org/dotcore64/vinyl-contents-tostring | ||
[dev-dependency-status-badge]: https://david-dm.org/dotcore64/vinyl-contents-tostring/dev-status.svg?style=flat-square | ||
[dev-dependency-status]: https://david-dm.org/dotcore64/vinyl-contents-tostring#info=devDependencies |
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
4406
3
4
13
48
+ Addedbl@^5.0.0
+ Addedp-from-callback@^1.0.0
+ Addedbase64-js@1.5.1(transitive)
+ Addedbl@5.1.0(transitive)
+ Addedbuffer@6.0.3(transitive)
+ Addedieee754@1.2.1(transitive)
+ Addedp-from-callback@1.0.1(transitive)
+ Addedreadable-stream@3.6.2(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedstring_decoder@1.3.0(transitive)
- Removedstream-to-string@^1.2.0
- Removedpromise-polyfill@1.1.6(transitive)
- Removedstream-to-string@1.2.1(transitive)