@@ -46,7 +46,7 @@ When this plugin is used outside of a supported CIs, it doesn’t do anything.
4646## Install
4747
4848This package is [ ESM only] [ esm ] .
49- In Node.js (version 12.20+, 14.14+, 16.0+, or 18.0 +), install with [ npm] [ ] :
49+ In Node.js (version 16 +), install with [ npm] [ ] :
5050
5151``` sh
5252npm install unified-diff
@@ -79,18 +79,19 @@ This is an an example.
7979…and our module ` example.js ` looks as follows:
8080
8181``` js
82- import {read } from ' to-vfile'
83- import {reporter } from ' vfile-reporter'
84- import {unified } from ' unified'
85- import unifiedDiff from ' unified-diff'
82+ import process from ' node:process'
8683import remarkParse from ' remark-parse'
87- import remarkStringify from ' remark-stringify'
8884import remarkRetext from ' remark-retext'
85+ import remarkStringify from ' remark-stringify'
8986import retextEnglish from ' retext-english'
90- import retextRepeatedWords from ' retext-repeated-words'
9187import retextIndefiniteArticle from ' retext-indefinite-article'
88+ import retextRepeatedWords from ' retext-repeated-words'
89+ import {read } from ' to-vfile'
90+ import {unified } from ' unified'
91+ import unifiedDiff from ' unified-diff'
92+ import {reporter } from ' vfile-reporter'
9293
93- const file = unified ()
94+ const file = await unified ()
9495 .use (remarkParse)
9596 .use (
9697 remarkRetext,
@@ -166,7 +167,7 @@ an error, but it’s unrelated to the PR.
166167## API
167168
168169This package exports no identifiers.
169- The default export is ` unifiedDiff ` .
170+ The default export is [ ` unifiedDiff ` ] [ api-unified-diff ] .
170171
171172### ` unified().use(unifiedDiff) `
172173
@@ -184,17 +185,24 @@ nothing.
184185
185186PRs welcome!
186187
188+ ###### Returns
189+
190+ Transform ([ ` Transformer ` ] [ transformer ] ).
191+
187192## Types
188193
189194This package is fully typed with [ TypeScript] [ ] .
190- There are no additional exported types.
195+ It exports no additional types.
191196
192197## Compatibility
193198
194- Projects maintained by the unified collective are compatible with all maintained
199+ Projects maintained by the unified collective are compatible with maintained
195200versions of Node.js.
196- As of now, that is Node.js 12.20+, 14.14+, 16.0+, and 18.0+.
197- Our projects sometimes work with older versions, but this is not guaranteed.
201+
202+ When we cut a new major release, we drop support for unmaintained versions of
203+ Node.
204+ This means we try to keep the current release line, ` unified-diff@^4 ` ,
205+ compatible with Node.js 12.
198206
199207## Contribute
200208
@@ -255,3 +263,7 @@ abide by its terms.
255263[ author ] : https://wooorm.com
256264
257265[ unified ] : https://github.com/unifiedjs/unified
266+
267+ [ transformer ] : https://github.com/unifiedjs/unified?tab=readme-ov-file#transformer
268+
269+ [ api-unified-diff ] : #unifieduseunifieddiff
0 commit comments