File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ This service needs some other services. To be able to mock and
1919
2020![ Dependencies Graph] ( ./DEPENDENCIES.mmd.png )
2121
22- [ See in context] ( ./src/jsarch.js#L53-L64 )
22+ [ See in context] ( ./src/jsarch.js#L66-L77 )
2323
2424
2525
@@ -34,7 +34,7 @@ architecture notes. It should be structured like that:
3434{body}
3535```
3636
37- [See in context](./src/jsarch.js#L184-L194 )
37+ [See in context](./src/jsarch.js#L197-L207 )
3838
3939
4040
@@ -64,7 +64,7 @@ If you wish to add the architecture notes in a README.md file
6464 you will have to set the `titleLevel` option to as much `#`
6565 as necessar to fit the title hierarchy of you README file.
6666
67- [See in context](./src/jsarch.js#L29-L37 )
67+ [See in context](./src/jsarch.js#L42-L50 )
6868
6969
7070
@@ -76,5 +76,5 @@ By default, links to the architecture notes right in the code
7676
7777To override it, use the `base` option.
7878
79- [See in context](./src/jsarch.js#L40-L48 )
79+ [See in context](./src/jsarch.js#L53-L61 )
8080
Original file line number Diff line number Diff line change @@ -14,8 +14,21 @@ const espree = require('espree', {
1414 } ,
1515} ) ;
1616const types = require ( 'ast-types' ) ;
17+ const def = types . Type . def ;
1718const { compareNotes } = require ( './compareNotes' ) ;
1819
20+ // Temporary fix to make jsarch work
21+ // on codebases parsed with espree
22+ def ( 'ExperimentalSpreadProperty' )
23+ . bases ( 'Node' )
24+ . build ( 'argument' )
25+ . field ( 'argument' , def ( 'Expression' ) ) ;
26+ def ( 'ExperimentalRestProperty' )
27+ . bases ( 'Node' )
28+ . build ( 'argument' )
29+ . field ( 'argument' , def ( 'Expression' ) ) ;
30+ types . finalize ( ) ;
31+
1932const ARCHITECTURE_NOTE_REGEXP = / ^ \s * A r c h i t e c t u r e N o t e # ( (?: \d + (?: \. (? = \d ) | ) ) { 1 , 8 } ) : \s + ( [ ^ \r \n $ ] * ) / ;
2033const SHEBANG_REGEXP = / # ! ( \/ \w + ) + n o d e / ;
2134const EOL_REGEXP = / \n / g;
You can’t perform that action at this time.
0 commit comments