@@ -45,7 +45,7 @@ It turns the tree into a string of JavaScript.
45
45
## Install
46
46
47
47
This package is [ ESM only] [ esm ] .
48
- In Node.js (version 14.14+ and 16.0 +), install with [ npm] [ ] :
48
+ In Node.js (version 16 +), install with [ npm] [ ] :
49
49
50
50
``` sh
51
51
npm install esast-util-from-js
@@ -117,7 +117,7 @@ Yields:
117
117
118
118
## API
119
119
120
- This package exports the identifier [ ` fromJs ` ] [ fromjs ] .
120
+ This package exports the identifier [ ` fromJs ` ] [ api-from-js ] .
121
121
There is no default export.
122
122
123
123
### ` fromJs(value[, options]) `
@@ -126,9 +126,9 @@ Parse JavaScript to an esast.
126
126
127
127
###### Parameters
128
128
129
- * ` value ` ([ ` Value ` ] [ value ] )
129
+ * ` value ` ([ ` Value ` ] [ api- value] )
130
130
— serialized JavaScript to parse
131
- * ` options ` ([ ` Options ` ] [ options ] , optional)
131
+ * ` options ` ([ ` Options ` ] [ api- options] , optional)
132
132
— configuration
133
133
134
134
###### Returns
@@ -152,7 +152,7 @@ Configuration (TypeScript type).
152
152
153
153
###### ` version `
154
154
155
- JavaScript version ([ ` Version ` ] [ version ] , default: ` 'latest' ` ).
155
+ JavaScript version ([ ` Version ` ] [ api- version] , default: ` 'latest' ` ).
156
156
157
157
When a number, must be a year in the range ` 2015 ` and ` 2023 ` (both including).
158
158
` 'latest' ` is the same as passing the latest supported year.
@@ -190,7 +190,7 @@ Whether a shell hasbang is allowed (`boolean`, default: `false`).
190
190
191
191
###### ` plugins `
192
192
193
- List of acorn plugins ([ ` Array<Plugin> ` ] [ plugin ] , default: ` [] ` ).
193
+ List of acorn plugins ([ ` Array<Plugin> ` ] [ api- plugin] , default: ` [] ` ).
194
194
Examples are [ ` acorn-jsx ` ] [ acorn-jsx ] and [ ` acorn-stage3 ` ] [ acorn-stage3 ] .
195
195
196
196
### ` Plugin `
@@ -230,15 +230,20 @@ type Version = 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 'l
230
230
## Types
231
231
232
232
This package is fully typed with [TypeScript][].
233
- It exports the additional types [ ` Options ` ][options], [ ` Plugin ` ][plugin],
234
- [ ` Value ` ][value], and [ ` Version ` ][version].
233
+ It exports the additional types [ ` Options ` ][api-options],
234
+ [ ` Plugin ` ][api-plugin],
235
+ [ ` Value ` ][api-value], and
236
+ [ ` Version ` ][api-version].
235
237
236
238
## Compatibility
237
239
238
- Projects maintained by the unified collective are compatible with all maintained
240
+ Projects maintained by the unified collective are compatible with maintained
239
241
versions of Node.js.
240
- As of now, that is Node.js 14.14+ and 16.0+.
241
- Our projects sometimes work with older versions, but this is not guaranteed.
242
+
243
+ When we cut a new major release, we drop support for unmaintained versions of
244
+ Node.
245
+ This means we try to keep the current release line, ` esast -util -from -js @^1 ` ,
246
+ compatible with Node.js 12.
242
247
243
248
## Contribute
244
249
@@ -268,9 +273,9 @@ abide by its terms.
268
273
269
274
[downloads]: https://www.npmjs.com/package/esast-util-from-js
270
275
271
- [size-badge]: https://img.shields.io/bundlephobia/minzip/ esast-util-from-js.svg
276
+ [size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q= esast-util-from-js
272
277
273
- [size]: https://bundlephobia .com/result?p =esast-util-from-js
278
+ [size]: https://bundlejs .com/?q =esast-util-from-js
274
279
275
280
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
276
281
@@ -322,12 +327,12 @@ abide by its terms.
322
327
323
328
[vfile-message]: https://github.com/vfile/vfile-message
324
329
325
- [fromjs ]: #fromjsvalue-options
330
+ [api-from-js ]: #fromjsvalue-options
326
331
327
- [options]: #options
332
+ [api- options]: #options
328
333
329
- [plugin]: #plugin
334
+ [api- plugin]: #plugin
330
335
331
- [value]: #value
336
+ [api- value]: #value
332
337
333
- [version]: #version-1
338
+ [api- version]: #version-1
0 commit comments