@@ -44,7 +44,7 @@ with a tool such as recast or Babel.
44
44
## Install
45
45
46
46
This package is [ ESM only] [ esm ] .
47
- In Node.js (version 14.14+ and 16.0 +), install with [ npm] [ ] :
47
+ In Node.js (version 16 +), install with [ npm] [ ] :
48
48
49
49
``` sh
50
50
npm install estree-util-attach-comments
@@ -86,7 +86,7 @@ const code = String(await fs.readFile('x.js'))
86
86
const comments = []
87
87
const tree = parse (code, {
88
88
sourceType: ' module' ,
89
- ecmaVersion: 2020 ,
89
+ ecmaVersion: ' latest ' ,
90
90
onComment: comments
91
91
})
92
92
120
120
121
121
## API
122
122
123
- This package exports the identifier [ ` attachComments ` ] [ attachcomments ] .
123
+ This package exports the identifier [ ` attachComments ` ] [ api-attach-comments ] .
124
124
There is no default export.
125
125
126
126
### ` attachComments(tree, comments) `
@@ -163,10 +163,13 @@ It exports no additional types.
163
163
164
164
## Compatibility
165
165
166
- Projects maintained by the unified collective are compatible with all maintained
166
+ Projects maintained by the unified collective are compatible with maintained
167
167
versions of Node.js.
168
- As of now, that is Node.js 14.14+ and 16.0+.
169
- Our projects sometimes work with older versions, but this is not guaranteed.
168
+
169
+ When we cut a new major release, we drop support for unmaintained versions of
170
+ Node.
171
+ This means we try to keep the current release line,
172
+ ` estree-util-attach-comments@^2 ` , compatible with Node.js 12.
170
173
171
174
## Contribute
172
175
@@ -196,9 +199,9 @@ abide by its terms.
196
199
197
200
[ downloads ] : https://www.npmjs.com/package/estree-util-attach-comments
198
201
199
- [ size-badge ] : https://img.shields.io/bundlephobia/minzip/ estree-util-attach-comments.svg
202
+ [ size-badge ] : https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q= estree-util-attach-comments
200
203
201
- [ size ] : https://bundlephobia .com/result?p =estree-util-attach-comments
204
+ [ size ] : https://bundlejs .com/?q =estree-util-attach-comments
202
205
203
206
[ sponsors-badge ] : https://opencollective.com/unified/sponsors/badge.svg
204
207
@@ -236,4 +239,4 @@ abide by its terms.
236
239
237
240
[ program ] : https://github.com/estree/estree/blob/master/es5.md#programs
238
241
239
- [ attachcomments ] : #attachcommentstree-comments
242
+ [ api-attach-comments ] : #attachcommentstree-comments
0 commit comments