Skip to content

Commit f39111c

Browse files
committed
Update esast-util-from-estree
1 parent ad5606a commit f39111c

File tree

6 files changed

+8
-6
lines changed

6 files changed

+8
-6
lines changed

lib/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,5 @@ export function fromJs(value, options) {
134134

135135
tree.comments = comments
136136

137-
// @ts-expect-error: Program in, program out.
138137
return fromEstree(tree)
139138
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"dependencies": {
3838
"@types/estree-jsx": "^1.0.0",
3939
"acorn": "^8.0.0",
40-
"esast-util-from-estree": "^1.0.0",
40+
"esast-util-from-estree": "^2.0.0",
4141
"vfile-message": "^4.0.0"
4242
},
4343
"devDependencies": {

test/fixtures/stage3-and-jsx/index.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@
121121
},
122122
{
123123
"type": "MethodDefinition",
124-
"kind": "method",
125124
"static": false,
126125
"computed": false,
127126
"key": {
@@ -140,6 +139,7 @@
140139
}
141140
}
142141
},
142+
"kind": "method",
143143
"value": {
144144
"type": "FunctionExpression",
145145
"id": null,

test/fixtures/stage3/index.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474
},
7575
{
7676
"type": "MethodDefinition",
77-
"kind": "method",
7877
"static": false,
7978
"computed": false,
8079
"key": {
@@ -93,6 +92,7 @@
9392
}
9493
}
9594
},
95+
"kind": "method",
9696
"value": {
9797
"type": "FunctionExpression",
9898
"id": null,

test/fixtures/values/index.json

-2
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,6 @@
547547
"arguments": [
548548
{
549549
"type": "Literal",
550-
"value": null,
551550
"regex": {
552551
"pattern": "(?:)",
553552
"flags": ""
@@ -649,7 +648,6 @@
649648
"arguments": [
650649
{
651650
"type": "Literal",
652-
"value": null,
653651
"bigint": "0",
654652
"position": {
655653
"start": {

test/index.js

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import assert from 'node:assert/strict'
66
import fs from 'node:fs/promises'
7+
import process from 'node:process'
78
import test from 'node:test'
89
import jsx from 'acorn-jsx'
910
// @ts-expect-error: untyped.
@@ -280,6 +281,10 @@ test('fixtures', async function (t) {
280281
let expected
281282

282283
try {
284+
if ('UPDATE' in process.env) {
285+
throw new Error('Update')
286+
}
287+
283288
expected = JSON.parse(String(await fs.readFile(treeUrl)))
284289
} catch {
285290
// New fixture.

0 commit comments

Comments
 (0)