@@ -156,11 +156,11 @@ impl<Fs: FileSystem> ResolverGeneric<Fs> {
156156 self . cache . clear ( ) ;
157157 }
158158
159- /// Resolve `specifier` at an absolute ` path`.
159+ /// Resolve `specifier` at an absolute path to a `directory `.
160160 ///
161161 /// A specifier is the string passed to require or import, i.e. `require("specifier")` or `import "specifier"`.
162162 ///
163- /// `path ` must be an **absolute** path to a directory where the specifier is resolved against.
163+ /// `directory ` must be an **absolute** path to a directory where the specifier is resolved against.
164164 /// For CommonJS modules, it is the `__dirname` variable that contains the absolute path to the folder containing current module.
165165 /// For ECMAScript modules, it is the value of `import.meta.url`.
166166 ///
@@ -169,11 +169,11 @@ impl<Fs: FileSystem> ResolverGeneric<Fs> {
169169 /// * See [ResolveError]
170170 pub fn resolve < P : AsRef < Path > > (
171171 & self ,
172- path : P ,
172+ directory : P ,
173173 specifier : & str ,
174174 ) -> Result < Resolution , ResolveError > {
175175 let mut ctx = Ctx :: default ( ) ;
176- self . resolve_tracing ( path . as_ref ( ) , specifier, & mut ctx)
176+ self . resolve_tracing ( directory . as_ref ( ) , specifier, & mut ctx)
177177 }
178178
179179 /// Resolve `specifier` at absolute `path` with [ResolveContext]
@@ -183,13 +183,13 @@ impl<Fs: FileSystem> ResolverGeneric<Fs> {
183183 /// * See [ResolveError]
184184 pub fn resolve_with_context < P : AsRef < Path > > (
185185 & self ,
186- path : P ,
186+ directory : P ,
187187 specifier : & str ,
188188 resolve_context : & mut ResolveContext ,
189189 ) -> Result < Resolution , ResolveError > {
190190 let mut ctx = Ctx :: default ( ) ;
191191 ctx. init_file_dependencies ( ) ;
192- let result = self . resolve_tracing ( path . as_ref ( ) , specifier, & mut ctx) ;
192+ let result = self . resolve_tracing ( directory . as_ref ( ) , specifier, & mut ctx) ;
193193 if let Some ( deps) = & mut ctx. file_dependencies {
194194 resolve_context. file_dependencies . extend ( deps. drain ( ..) ) ;
195195 }
@@ -202,19 +202,19 @@ impl<Fs: FileSystem> ResolverGeneric<Fs> {
202202 /// Wrap `resolve_impl` with `tracing` information
203203 fn resolve_tracing (
204204 & self ,
205- path : & Path ,
205+ directory : & Path ,
206206 specifier : & str ,
207207 ctx : & mut Ctx ,
208208 ) -> Result < Resolution , ResolveError > {
209- let span = tracing:: debug_span!( "resolve" , path = ?path , specifier = specifier) ;
209+ let span = tracing:: debug_span!( "resolve" , path = ?directory , specifier = specifier) ;
210210 let _enter = span. enter ( ) ;
211- let r = self . resolve_impl ( path , specifier, ctx) ;
211+ let r = self . resolve_impl ( directory , specifier, ctx) ;
212212 match & r {
213213 Ok ( r) => {
214- tracing:: debug!( options = ?self . options, path = ?path , specifier = specifier, ret = ?r. path) ;
214+ tracing:: debug!( options = ?self . options, path = ?directory , specifier = specifier, ret = ?r. path) ;
215215 }
216216 Err ( err) => {
217- tracing:: debug!( options = ?self . options, path = ?path , specifier = specifier, err = ?err) ;
217+ tracing:: debug!( options = ?self . options, path = ?directory , specifier = specifier, err = ?err) ;
218218 }
219219 } ;
220220 r
0 commit comments