Skip to content

Commit 1df2287

Browse files
committed
Use tspath.ResolvePath instead of CombinePaths
1 parent 854be04 commit 1df2287

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

internal/pnp/pnpapi.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func (p *PnpApi) ResolveToUnqualified(specifier string, parentPath string) (stri
119119
dependencyPkg = p.GetPackage(&Locator{Name: referenceOrAlias.Ident, Reference: referenceOrAlias.Reference})
120120
}
121121

122-
return tspath.CombinePaths(p.manifest.dirPath, dependencyPkg.PackageLocation, modulePath), nil
122+
return tspath.ResolvePath(p.manifest.dirPath, dependencyPkg.PackageLocation, modulePath), nil
123123
}
124124

125125
func (p *PnpApi) findClosestPnpManifest() (*PnpManifestData, error) {
@@ -278,7 +278,7 @@ func (p *PnpApi) GetPnpTypeRoots(currentDirectory string) []string {
278278
if strings.HasPrefix(dep.Ident, "@types/") && dep.Reference != "" {
279279
packageInfo := p.GetPackage(&Locator{Name: dep.Ident, Reference: dep.Reference})
280280
typeRoots = append(typeRoots, tspath.GetDirectoryPath(
281-
tspath.CombinePaths(p.manifest.dirPath, packageInfo.PackageLocation),
281+
tspath.ResolvePath(p.manifest.dirPath, packageInfo.PackageLocation),
282282
))
283283
}
284284
}
@@ -316,7 +316,7 @@ func (p *PnpApi) GetPackageLocationAbsolutePath(packageInfo *PackageInfo) string
316316
}
317317

318318
packageLocation := packageInfo.PackageLocation
319-
return tspath.CombinePaths(p.manifest.dirPath, packageLocation)
319+
return tspath.ResolvePath(p.manifest.dirPath, packageLocation)
320320
}
321321

322322
func (p *PnpApi) IsInPnpModule(fromFileName string, toFileName string) bool {

0 commit comments

Comments
 (0)