Skip to content

Commit bb7f548

Browse files
committed
Update dev-dependencies
1 parent 6e5bf5a commit bb7f548

File tree

2 files changed

+81
-20
lines changed

2 files changed

+81
-20
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"devDependencies": {
4242
"acorn": "^8.0.0",
4343
"mdast-util-from-markdown": "^0.8.0",
44-
"micromark-extension-mdx-jsx": "^0.1.0",
44+
"micromark-extension-mdx-jsx": "^0.2.0",
4545
"nyc": "^15.0.0",
4646
"prettier": "^2.0.0",
4747
"remark-cli": "^9.0.0",

test.js

Lines changed: 80 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -294,17 +294,54 @@ test('markdown -> mdast', function (t) {
294294
value: '...b',
295295
data: {
296296
estree: {
297-
type: 'SpreadElement',
298-
start: 3,
299-
end: 7,
300-
loc: {start: {line: 1, column: 3}, end: {line: 1, column: 7}},
301-
argument: {
302-
type: 'Identifier',
303-
start: 6,
304-
end: 7,
305-
loc: {start: {line: 1, column: 6}, end: {line: 1, column: 7}},
306-
name: 'b'
307-
}
297+
type: 'Program',
298+
start: 4,
299+
end: 8,
300+
body: [
301+
{
302+
type: 'ExpressionStatement',
303+
expression: {
304+
type: 'ObjectExpression',
305+
start: 4,
306+
end: 8,
307+
loc: {
308+
start: {line: 1, column: 4},
309+
end: {line: 1, column: 8}
310+
},
311+
properties: [
312+
{
313+
type: 'SpreadElement',
314+
start: 4,
315+
end: 8,
316+
loc: {
317+
start: {line: 1, column: 4},
318+
end: {line: 1, column: 8}
319+
},
320+
argument: {
321+
type: 'Identifier',
322+
start: 7,
323+
end: 8,
324+
loc: {
325+
start: {line: 1, column: 7},
326+
end: {line: 1, column: 8}
327+
},
328+
name: 'b',
329+
range: [7, 8]
330+
},
331+
range: [4, 8]
332+
}
333+
],
334+
range: [4, 8]
335+
},
336+
start: 4,
337+
end: 8,
338+
loc: {start: {line: 1, column: 4}, end: {line: 1, column: 8}},
339+
range: [4, 8]
340+
}
341+
],
342+
sourceType: 'module',
343+
loc: {start: {line: 1, column: 4}, end: {line: 1, column: 8}},
344+
range: [4, 8]
308345
}
309346
}
310347
}
@@ -338,12 +375,36 @@ test('markdown -> mdast', function (t) {
338375
value: '1',
339376
data: {
340377
estree: {
341-
type: 'Literal',
342-
start: 0,
343-
end: 1,
344-
loc: {start: {line: 1, column: 0}, end: {line: 1, column: 1}},
345-
value: 1,
346-
raw: '1'
378+
type: 'Program',
379+
start: 6,
380+
end: 7,
381+
body: [
382+
{
383+
type: 'ExpressionStatement',
384+
expression: {
385+
type: 'Literal',
386+
start: 6,
387+
end: 7,
388+
loc: {
389+
start: {line: 1, column: 6},
390+
end: {line: 1, column: 7}
391+
},
392+
value: 1,
393+
raw: '1',
394+
range: [6, 7]
395+
},
396+
start: 6,
397+
end: 7,
398+
loc: {
399+
start: {line: 1, column: 6},
400+
end: {line: 1, column: 7}
401+
},
402+
range: [6, 7]
403+
}
404+
],
405+
sourceType: 'module',
406+
loc: {start: {line: 1, column: 6}, end: {line: 1, column: 7}},
407+
range: [6, 7]
347408
}
348409
}
349410
}
@@ -361,7 +422,7 @@ test('markdown -> mdast', function (t) {
361422
mdastExtensions: [mdxJsx.fromMarkdown]
362423
})
363424
},
364-
/Could not parse expression with acorn: SyntaxError: Unexpected token/,
425+
/Could not parse expression with acorn: Unexpected token/,
365426
'should crash on a non-spread attribute expression'
366427
)
367428

@@ -372,7 +433,7 @@ test('markdown -> mdast', function (t) {
372433
mdastExtensions: [mdxJsx.fromMarkdown]
373434
})
374435
},
375-
/Could not parse expression with acorn: SyntaxError: Unexpected token/,
436+
/Could not parse expression with acorn: Unexpected token/,
376437
'should crash on invalid JS in an attribute expression'
377438
)
378439

0 commit comments

Comments
 (0)