@@ -69,17 +69,17 @@ export class DependencyGraph {
69
69
this . #update( specifier ) ;
70
70
}
71
71
72
- #update( specifier : string , __tracing = new Set < string > ( ) ) {
72
+ #update( specifier : string , _set = new Set < string > ( ) ) {
73
73
const module = this . #modules. get ( specifier ) ;
74
74
if ( module ) {
75
75
// deno-lint-ignore ban-ts-comment
76
76
// @ts -ignore
77
77
module . version ++ ;
78
- __tracing . add ( specifier ) ;
78
+ _set . add ( specifier ) ;
79
79
this . #modules. forEach ( ( module ) => {
80
80
if ( module . deps ?. find ( ( dep ) => dep . specifier === specifier ) ) {
81
- if ( ! __tracing . has ( module . specifier ) ) {
82
- this . #update( module . specifier , __tracing ) ;
81
+ if ( ! _set . has ( module . specifier ) ) {
82
+ this . #update( module . specifier , _set ) ;
83
83
}
84
84
}
85
85
} ) ;
@@ -90,12 +90,12 @@ export class DependencyGraph {
90
90
this . #lookup( specifier , callback ) ;
91
91
}
92
92
93
- #lookup( specifier : string , callback : ( specifier : string ) => void | false , __tracing = new Set < string > ( ) ) {
94
- __tracing . add ( specifier ) ;
93
+ #lookup( specifier : string , callback : ( specifier : string ) => void | false , _set = new Set < string > ( ) ) {
94
+ _set . add ( specifier ) ;
95
95
for ( const module of this . #modules. values ( ) ) {
96
96
if ( module . deps ?. find ( ( dep ) => dep . specifier === specifier ) ) {
97
- if ( ! __tracing . has ( module . specifier ) && callback ( module . specifier ) !== false ) {
98
- this . #lookup( module . specifier , callback , __tracing ) ;
97
+ if ( ! _set . has ( module . specifier ) && callback ( module . specifier ) !== false ) {
98
+ this . #lookup( module . specifier , callback , _set ) ;
99
99
}
100
100
}
101
101
}
@@ -105,14 +105,14 @@ export class DependencyGraph {
105
105
this . #walk( specifier , callback ) ;
106
106
}
107
107
108
- #walk( specifier : string , callback : ( mod : Module ) => void , __tracing = new Set < string > ( ) ) {
108
+ #walk( specifier : string , callback : ( mod : Module ) => void , _set = new Set < string > ( ) ) {
109
109
if ( this . #modules. has ( specifier ) ) {
110
110
const mod = this . #modules. get ( specifier ) ! ;
111
111
callback ( mod ) ;
112
- __tracing . add ( specifier ) ;
112
+ _set . add ( specifier ) ;
113
113
mod . deps ?. forEach ( ( dep ) => {
114
- if ( ! __tracing . has ( dep . specifier ) ) {
115
- this . #walk( dep . specifier , callback , __tracing ) ;
114
+ if ( ! _set . has ( dep . specifier ) ) {
115
+ this . #walk( dep . specifier , callback , _set ) ;
116
116
}
117
117
} ) ;
118
118
}
0 commit comments