angular/packages/compiler-cli/src
Pete Bacon Darwin 9066ca9e92 test(compiler-cli): add support for source-map checks in compliance tests (#39939)
This commit allows compliance test-cases to be written that specify
source-map mappings between the source and generated code.

To check a mapping, add a `// SOURCE:` comment to the end of a line:

```
<generated code> // SOURCE: "<source-url>" <source code>
```

The generated code will still be checked, stripped of the `// SOURCE` comment,
as normal by the `expectEmit()` helper.

In addition, the source-map segments are checked to ensure that there is a
mapping from `<generated code>` to `<source code>` found in the file at
`<source-url>`.

Note:

* The source-url should be absolute, with the directory containing the
  TEST_CASES.json file assumed to be `/`.
* Whitespace is important and will be included when comparing the segments.
* There is a single space character between each part of the line.
* Newlines within a mapping must be escaped since the mapping and comment
  must all appear on a single line of this file.

PR Close #39939
2020-12-07 16:21:05 -08:00
..
diagnostics build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
metadata refactor(compiler-cli): remove TypeScript 3.9 workarounds (#39586) 2020-11-06 15:26:51 -08:00
ngtsc test(compiler-cli): add support for source-map checks in compliance tests (#39939) 2020-12-07 16:21:05 -08:00
transformers feat(compiler): support tagged template literals in code generator (#39122) 2020-12-07 16:20:04 -08:00
extract_i18n.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
language_services.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
main.ts style(compiler-cli): remove unused constant (#38441) 2020-08-13 13:32:41 -07:00
perform_compile.ts refactor(language-service): language_service_adapter -> adapters (#39619) 2020-11-17 14:45:09 -08:00
perform_watch.ts build: support building with TypeScript 4.1 (#39571) 2020-11-25 11:10:01 -08:00
tooling.ts refactor(compiler-cli): skip class decorators in tooling constructor parameters transform (#37545) 2020-06-15 12:47:57 -07:00
typescript_support.ts feat(compiler-cli): add support for using TypeScript 4.1 (#39571) 2020-11-25 11:10:00 -08:00
version.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00