unified
Advanced tools
Comparing version 9.0.0 to 9.1.0
{ | ||
"name": "unified", | ||
"version": "9.0.0", | ||
"version": "9.1.0", | ||
"description": "Interface for parsing, inspecting, transforming, and serializing content through syntax trees", | ||
@@ -58,10 +58,10 @@ "license": "MIT", | ||
"prettier": "^2.0.0", | ||
"remark-cli": "^7.0.0", | ||
"remark-preset-wooorm": "^6.0.0", | ||
"tape": "^4.0.0", | ||
"remark-cli": "^8.0.0", | ||
"remark-preset-wooorm": "^7.0.0", | ||
"tape": "^5.0.0", | ||
"tinyify": "^2.0.0", | ||
"xo": "^0.28.0" | ||
"xo": "^0.32.0" | ||
}, | ||
"scripts": { | ||
"format": "remark . -qfo && prettier --write \"**/{*.js,*.ts}\" && xo --fix", | ||
"format": "remark . -qfo && prettier . --write && xo --fix", | ||
"build-bundle": "browserify index.js -s unified -o unified.js", | ||
@@ -87,5 +87,6 @@ "build-mangle": "browserify index.js -s unified -p tinyify -o unified.min.js", | ||
"rules": { | ||
"import/no-extraneous-dependencies": "off", | ||
"unicorn/catch-error-name": "off", | ||
"unicorn/prefer-optional-catch-binding": "off", | ||
"unicorn/prefer-reflect-apply": "off", | ||
"unicorn/prefer-type-error": "off", | ||
"unicorn/prefer-reflect-apply": "off", | ||
"guard-for-in": "off" | ||
@@ -100,9 +101,3 @@ }, | ||
"plugins": [ | ||
"preset-wooorm", | ||
[ | ||
"toc", | ||
{ | ||
"heading": "contents" | ||
} | ||
] | ||
"preset-wooorm" | ||
] | ||
@@ -109,0 +104,0 @@ }, |
@@ -23,3 +23,3 @@ # [![unified][logo]][site] | ||
month on npm: you’re probably using it. | ||
Some notable users are [Node.js][], [ZEIT][], [Netlify][], [GitHub][], | ||
Some notable users are [Node.js][], [Vercel][], [Netlify][], [GitHub][], | ||
[Mozilla][], [WordPress][], [Adobe][], [Facebook][], [Google][], and many more. | ||
@@ -32,3 +32,3 @@ | ||
* Questions? | ||
Get help on [our Spectrum community][spectrum]! | ||
Get help on [our Spectrum community][chat]! | ||
* Check out [Contribute][] below to find out how to help out, or become a | ||
@@ -39,3 +39,3 @@ backer or sponsor on [OpenCollective][collective] | ||
<!--lint ignore no-html maximum-line-length--> | ||
<!--lint ignore no-html--> | ||
@@ -49,8 +49,8 @@ <table> | ||
<td width="33.33%" align="center" colspan="2"> | ||
<a href="https://zeit.co">ZEIT</a><br>🥇<br><br> | ||
<a href="https://vercel.com">Vercel</a><br>🥇<br><br> | ||
<!--OC has a sharper image--> | ||
<a href="https://zeit.co"><img src="https://images.opencollective.com/zeit/d8a5bee/logo/512.png"></a> | ||
<a href="https://vercel.com"><img src="https://images.opencollective.com/vercel/d8a5bee/logo/512.png"></a> | ||
</td> | ||
<td width="33.33%" align="center" colspan="2"> | ||
<a href="https://www.netlify.com">Netlify</a><br>🥇<br><br> | ||
<a href="https://www.netlify.com">Netlify</a><br><br><br> | ||
<!--OC has a sharper image--> | ||
@@ -73,3 +73,7 @@ <a href="https://www.netlify.com"><img src="https://images.opencollective.com/netlify/4087de2/logo/512.png"></a> | ||
</td> | ||
<td width="50%" align="center" colspan="3"> | ||
<td width="16.67%" align="center"> | ||
<a href="https://expo.io">Expo</a><br>🥉<br><br> | ||
<a href="https://expo.io"><img src="https://avatars1.githubusercontent.com/u/12504344?s=300&v=4"></a> | ||
</td> | ||
<td width="50%" align="center" colspan="2"> | ||
<br><br><br><br> | ||
@@ -1241,7 +1245,7 @@ <a href="https://opencollective.com/unified"><strong>You?</strong></a> | ||
[contributing]: https://github.com/unifiedjs/.github/blob/master/contributing.md | ||
[contributing]: https://github.com/unifiedjs/.github/blob/HEAD/contributing.md | ||
[support]: https://github.com/unifiedjs/.github/blob/master/support.md | ||
[support]: https://github.com/unifiedjs/.github/blob/HEAD/support.md | ||
[coc]: https://github.com/unifiedjs/.github/blob/master/code-of-conduct.md | ||
[coc]: https://github.com/unifiedjs/.github/blob/HEAD/code-of-conduct.md | ||
@@ -1264,4 +1268,2 @@ [awesome]: https://github.com/unifiedjs/awesome-unified | ||
[spectrum]: https://spectrum.chat/unified | ||
[rehype]: https://github.com/rehypejs/rehype | ||
@@ -1359,7 +1361,7 @@ | ||
[remark-plugins]: https://github.com/remarkjs/remark/blob/master/doc/plugins.md#list-of-plugins | ||
[remark-plugins]: https://github.com/remarkjs/remark/blob/HEAD/doc/plugins.md#list-of-plugins | ||
[rehype-plugins]: https://github.com/rehypejs/rehype/blob/master/doc/plugins.md#list-of-plugins | ||
[rehype-plugins]: https://github.com/rehypejs/rehype/blob/HEAD/doc/plugins.md#list-of-plugins | ||
[retext-plugins]: https://github.com/retextjs/retext/blob/master/doc/plugins.md#list-of-plugins | ||
[retext-plugins]: https://github.com/retextjs/retext/blob/HEAD/doc/plugins.md#list-of-plugins | ||
@@ -1388,3 +1390,3 @@ [stream]: https://github.com/unifiedjs/unified-stream | ||
[zeit]: https://zeit.co | ||
[vercel]: https://vercel.com | ||
@@ -1391,0 +1393,0 @@ [netlify]: https://www.netlify.com |
// TypeScript Version: 3.4 | ||
import {Node} from 'unist' | ||
import {VFile, VFileContents, VFileOptions, VFileCompatible} from 'vfile' | ||
import vfile = require('vfile') | ||
import {VFile, VFileCompatible} from 'vfile' | ||
@@ -13,12 +12,4 @@ declare namespace unified { | ||
*/ | ||
interface Processor<P = Settings> { | ||
interface Processor<P = Settings> extends FrozenProcessor<P> { | ||
/** | ||
* Clone current processor | ||
* | ||
* @returns New unfrozen processor which is configured to function the same as its ancestor. | ||
* But when the descendant processor is configured in the future it does not affect the ancestral processor. | ||
*/ | ||
(): Processor<P> | ||
/** | ||
* Configure the processor to use a plugin and optionally configure that plugin with options. | ||
@@ -66,4 +57,20 @@ * | ||
use(processorSettings: ProcessorSettings<P>): Processor<P> | ||
} | ||
/** | ||
* A frozen processor is just like a regular processor, except no additional plugins can be added. | ||
* A frozen processor can be created by calling `.freeze()` on a processor. | ||
* | ||
* @see Processor | ||
*/ | ||
interface FrozenProcessor<P = Settings> { | ||
/** | ||
* Clone current processor | ||
* | ||
* @returns New unfrozen processor which is configured to function the same as its ancestor. | ||
* But when the descendant processor is configured in the future it does not affect the ancestral processor. | ||
*/ | ||
(): Processor<P> | ||
/** | ||
* Parse text to a syntax tree. | ||
@@ -206,3 +213,3 @@ * | ||
*/ | ||
freeze(): Processor<P> | ||
freeze(): FrozenProcessor<P> | ||
} | ||
@@ -209,0 +216,0 @@ |
67479
749
1397