File tree 1 file changed +2
-1
lines changed
typescript/src/completions
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,8 @@ export default () => {
60
60
const files = collected . filter ( f => f . endsWith ( ext ) )
61
61
for ( const file of files ) {
62
62
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 } `
64
65
const lastModified = nodeModules . fs . statSync ( fullPath ) . mtime
65
66
const lastModifiedFormatted = timeDifference ( Date . now ( ) , lastModified . getTime ( ) )
66
67
const importPath = ( item . importPath ?? '$path' ) . replaceAll ( '$path' , relativeToFile )
You can’t perform that action at this time.
0 commit comments