(file)
| 262 | } |
| 263 | |
| 264 | path(file) { |
| 265 | if (this.mapOpts.absolute) return file |
| 266 | if (file.charCodeAt(0) === 60 /* `<` */) return file |
| 267 | if (/^\w+:\/\//.test(file)) return file |
| 268 | let cached = this.memoizedPaths.get(file) |
| 269 | if (cached) return cached |
| 270 | |
| 271 | let from = this.opts.to ? dirname(this.opts.to) : '.' |
| 272 | |
| 273 | if (typeof this.mapOpts.annotation === 'string') { |
| 274 | from = dirname(resolve(from, this.mapOpts.annotation)) |
| 275 | } |
| 276 | |
| 277 | let path = relative(from, file) |
| 278 | this.memoizedPaths.set(file, path) |
| 279 | |
| 280 | return path |
| 281 | } |
| 282 | |
| 283 | previous() { |
| 284 | if (!this.previousMaps) { |
no test coverage detected