Skip to content

Commit 58d2a2f

Browse files
authored
feat: Support for the logical assignment operator
* Fixes #1172 * chore: Update test fixture to last release
1 parent 35c635f commit 58d2a2f

File tree

5 files changed

+24
-5
lines changed

5 files changed

+24
-5
lines changed

__tests__/__snapshots__/bin-readme.js.snap

+6
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ exports[`readme autodetection of different filenames updates readme.markdown 1`]
1010
### Table of Contents
1111
1212
- [foo](#foo)
13+
1314
- [Parameters](#parameters)
1415
- [bar](#bar)
16+
1517
- [Parameters](#parameters-1)
1618
1719
## foo
@@ -46,8 +48,10 @@ exports[`readme command --readme-file 1`] = `
4648
### Table of Contents
4749
4850
- [foo](#foo)
51+
4952
- [Parameters](#parameters)
5053
- [bar](#bar)
54+
5155
- [Parameters](#parameters-1)
5256
5357
## foo
@@ -82,8 +86,10 @@ exports[`readme command updates README.md 1`] = `
8286
### Table of Contents
8387
8488
- [foo](#foo)
89+
8590
- [Parameters](#parameters)
8691
- [bar](#bar)
92+
8793
- [Parameters](#parameters-1)
8894
8995
## foo

__tests__/__snapshots__/bin.js.snap

+12
Original file line numberDiff line numberDiff line change
@@ -1858,27 +1858,35 @@ exports[`build --document-exported 1`] = `
18581858
### Table of Contents
18591859
18601860
- [z][1]
1861+
18611862
- [zMethod][2]
18621863
- [x][3]
1864+
18631865
- [Parameters][4]
18641866
- [Class][5]
1867+
18651868
- [Parameters][6]
18661869
- [classMethod][7]
18671870
- [classGetter][8]
18681871
- [classSetter][9]
1872+
18691873
- [Parameters][10]
18701874
- [staticMethod][11]
18711875
- [staticGetter][12]
18721876
- [staticSetter][13]
1877+
18731878
- [Parameters][14]
18741879
- [T5][15]
18751880
- [y2Default][16]
18761881
- [y4][17]
1882+
18771883
- [Parameters][18]
18781884
- [object][19]
1885+
18791886
- [method][20]
18801887
- [getter][21]
18811888
- [setter][22]
1889+
18821890
- [Parameters][23]
18831891
- [prop][24]
18841892
- [func][25]
@@ -1888,12 +1896,16 @@ exports[`build --document-exported 1`] = `
18881896
- [T2][29]
18891897
- [T4][30]
18901898
- [f4][31]
1899+
18911900
- [Parameters][32]
18921901
- [o1][33]
1902+
18931903
- [om1][34]
18941904
- [f5][35]
1905+
18951906
- [Parameters][36]
18961907
- [o2][37]
1908+
18971909
- [om2][38]
18981910
18991911
## z

__tests__/__snapshots__/test.js.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -1387,7 +1387,7 @@ exports[`html nested.input.js 1`] = `
13871387
<html>
13881388
<head>
13891389
<meta charset='utf-8' />
1390-
<title>-alpha.1 | Documentation</title>
1390+
<title> | Documentation</title>
13911391
<meta name='viewport' content='width=device-width,initial-scale=1'>
13921392
<link href='assets/bass.css' type='text/css' rel='stylesheet' />
13931393
<link href='assets/style.css' type='text/css' rel='stylesheet' />
@@ -1400,7 +1400,7 @@ exports[`html nested.input.js 1`] = `
14001400
<div id='split-left' class='overflow-auto fs0 height-viewport-100'>
14011401
<div class='py1 px2'>
14021402
<h3 class='mb0 no-anchor'>documentation</h3>
1403-
<div class='mb1'><code>9.0.0-alpha.1</code></div>
1403+
<div class='mb1'></div>
14041404
<input
14051405
placeholder='Filter'
14061406
id='filter-input'

__tests__/test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ describe('html', function() {
106106
.map(r =>
107107
r.contents
108108
.toString()
109-
.replace(/documentation \d+\.\d+\.\d+/g, '')
110-
.replace(/<code>\d+\.\d+\.\d+<\/code>/g, '')
109+
.replace(/documentation \d+\.\d+\.\d+(-\w+(\.\d+)?)?/g, '')
110+
.replace(/<code>\d+\.\d+\.\d+(-\w+(\.\d+)?)?<\/code>/g, '')
111111
)
112112
.join('\n');
113113
expect(clean).toMatchSnapshot();

src/parsers/parse_to_ast.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ const opts = {
1919
'functionSent',
2020
'jsx',
2121
'objectRestSpread',
22-
'dynamicImport'
22+
'dynamicImport',
23+
'logicalAssignment'
2324
]
2425
};
2526

0 commit comments

Comments
 (0)