angular-cn/packages/language-service
Keen Yee Liau 0264f76e94 fix(language-service): LSParseConfigHost.resolve should not concat abs paths (#40242)
`ts.server.ServerHost.resolvePath()` is different from Angular's
`FileSystem.resolve()` because the signature of the former is

```ts
resolvePath(path: string): string;	// ts.server.ServerHost
```

whereas the signature of the latter is
```ts
resolve(...paths: string[]): AbsoluteFsPath; // FileSystem on compiler-cli
```

The current implementation calls `path.join()` to concatenate all the input
paths and pass the result to `ts.server.ServerHost.resolvePath()`, but doing
so results in filenames like
```
/foo/bar/baz/foo/bar/baz/tsconfig.json
```
if both input paths are absolute.

`ts.server.ServerHost` should not be used to implement the
`resolve()` method expected by Angular's `FileSystem`.
We should use Node's `path.resolve()` instead, which will correctly collapse
the absolute paths.

Fix https://github.com/angular/vscode-ng-language-service/issues/1035

PR Close #40242
2021-01-06 10:54:40 -08:00
..
bundles build(language-service): remove typescript from ivy bundle (#38088) 2020-07-16 11:04:57 -07:00
ivy fix(language-service): LSParseConfigHost.resolve should not concat abs paths (#40242) 2021-01-06 10:54:40 -08:00
src fix(language-service): do not treat file URIs as general URLs (#39917) 2020-12-03 13:45:30 -08:00
test fix(language-service): do not treat file URIs as general URLs (#39917) 2020-12-03 13:45:30 -08:00
BUILD.bazel build(language-service): include sources for Ivy LS (#39748) 2020-11-20 09:23:45 -08:00
build.sh build(language-service): install @angular/language-service in root node_modules (#40058) 2020-12-10 13:48:04 -08:00
index.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
language-service.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
package.json build(language-service): Remove ls_rollup_bundle (#38086) 2020-07-16 11:04:28 -07:00