File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
typescript/src/completions Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,8 @@ export default () => {
6060 const files = collected . filter ( f => f . endsWith ( ext ) )
6161 for ( const file of files ) {
6262 const fullPath = nodeModules . path . join ( root , file )
63- const relativeToFile = nodeModules . path . relative ( nodeModules . path . dirname ( sourceFile . fileName ) , fullPath ) . replaceAll ( '\\' , '/' )
63+ let relativeToFile = nodeModules . path . relative ( nodeModules . path . dirname ( sourceFile . fileName ) , fullPath ) . replaceAll ( '\\' , '/' )
64+ if ( ! relativeToFile . startsWith ( '.' ) ) relativeToFile = `./${ relativeToFile } `
6465 const lastModified = nodeModules . fs . statSync ( fullPath ) . mtime
6566 const lastModifiedFormatted = timeDifference ( Date . now ( ) , lastModified . getTime ( ) )
6667 const importPath = ( item . importPath ?? '$path' ) . replaceAll ( '$path' , relativeToFile )
You can’t perform that action at this time.
0 commit comments