angular-cn/packages
ayazhafiz 3b700985f0 fix(language-service): do not treat file URIs as general URLs (#39917)
In the past, the legacy (VE-based) language service would use a
`UrlResolver` instance to resolve file paths, primarily for compiler
resources like external templates. The problem with this is that the
UrlResolver is designed to resolve URLs in general, and so for a path
like `/a/b/#c`, `#c` is treated as hash/fragment rather than as part
of the path, which can lead to unexpected path resolution (f.x.,
`resolve('a/b/#c/d.ts', './d.html')` would produce `'a/b/d.html'` rather
than the expected `'a/b/#c/d.html'`).

This commit resolves the issue by using Node's `path` module to resolve
file paths directly, which aligns more with how resources are resolved
in the Ivy compiler.

The testing story here is not great, and the API for validating a file
path could be a little bit prettier/robust. However, since the VE-based
language service is going into more of a "maintenance mode" now that
there is a clear path for the Ivy-based LS moving forward, I think it is
okay not to spend too much time here.

Closes https://github.com/angular/vscode-ng-language-service/issues/892
Closes https://github.com/angular/vscode-ng-language-service/issues/1001

PR Close #39917
2020-12-03 13:45:30 -08:00
..
animations build: support building with TypeScript 4.1 (#39571) 2020-11-25 11:10:01 -08:00
bazel build: support building with TypeScript 4.1 (#39571) 2020-11-25 11:10:01 -08:00
benchpress build: support building with TypeScript 4.1 (#39571) 2020-11-25 11:10:01 -08:00
common docs(common): fix typo in HttpClient docs (#39904) 2020-12-02 11:16:43 -08:00
compiler feat(compiler): allow trailing comma in array literal (#22277) 2020-12-02 14:57:05 -08:00
compiler-cli fix(compiler-cli): correct incremental behavior even with broken imports (#39923) 2020-12-03 13:42:13 -08:00
core fix(core): unsubscribe from the `onError` when the root view is removed (#39940) 2020-12-03 13:44:17 -08:00
docs docs(di): fix typo in advanced di doc (#36634) 2020-05-01 09:50:28 -07:00
elements fix(elements): update the view of an `OnPush` component when inputs change (#39452) 2020-11-06 09:31:46 -08:00
examples fix(core): Allow passing AbstractType to the inject function (#37958) 2020-11-24 10:42:21 -08:00
forms docs(forms): fix example 'Reset the form group values and disabled status' (#33137) 2020-12-02 11:14:25 -08:00
language-service fix(language-service): do not treat file URIs as general URLs (#39917) 2020-12-03 13:45:30 -08:00
localize feat(localize): support Application Resource Bundle (ARB) translation file format (#36795) 2020-11-25 10:55:40 -08:00
misc/angular-in-memory-web-api docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
platform-browser feat(platform-browser): add doubletap HammerJS support (#26362) 2020-11-24 08:45:49 -08:00
platform-browser-dynamic docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
platform-server build: support building with TypeScript 4.1 (#39571) 2020-11-25 11:10:01 -08:00
private/testing build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
router docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
service-worker fix(service-worker): correctly handle failed cache-busted request (#39786) 2020-11-23 14:59:55 -08:00
upgrade build: support building with TypeScript 4.1 (#39571) 2020-11-25 11:10:01 -08:00
zone.js fix(zone.js): patch child method that overrides an already patched method (#39850) 2020-12-02 12:52:27 -08:00
BUILD.bazel build: replace @types/trusted-types dep with minimal type defs (#39211) 2020-10-15 09:08:00 -07:00
README.md docs: add doc reference to npm package readme (#33911) 2019-11-20 14:46:23 -08:00
circular-deps-test.conf.js fix(platform-webworker): remove platform-webworker and platform-webworker-dynamic (#38846) 2020-09-30 09:13:59 -04:00
empty.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
goog.d.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
license-banner.txt build: bump year (#34651) 2020-01-13 07:21:43 -08:00
system.d.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
tsconfig-build-no-strict.json refactor(core): ensure compatibility with typescript strict flag (#30993) 2019-07-18 14:21:25 -07:00
tsconfig-build.json refactor(core): ensure compatibility with typescript strict flag (#30993) 2019-07-18 14:21:25 -07:00
tsconfig-test.json refactor: fix typescript strict flag failures in all tests (#30993) 2019-07-18 14:21:26 -07:00
tsconfig.json fix(platform-webworker): remove platform-webworker and platform-webworker-dynamic (#38846) 2020-09-30 09:13:59 -04:00
types.d.ts build: replace @types/trusted-types dep with minimal type defs (#39211) 2020-10-15 09:08:00 -07:00

README.md

Angular

The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.

Usage information and reference details can be found in Angular documentation.

License: MIT