angular/packages/localize
Pete Bacon Darwin 9dada8a2dd fix(localize): improve invalid syntax in extraction error message (#40724)
Previously if the code is invalid the error message might look like:

```
Unexpected messageParts for `$localize` (expected an array of strings).
```

This is not very helpful for debugging where the problem occurs.

Now we build a "code-frame" description to give more useful information:

```
TypeError: Cannot create property 'message' on string '.../src/app/app.component.js:
Unexpected messageParts for `$localize` (expected an array of strings).
  4 | export class AppComponent {
  5 |     constructor() {
> 6 |         this.title = $localize(a = ['myapp'], []);
    |                                ^^^^^^^^^^^^^
  7 |     }
  8 | }
  ```

PR Close #40724
2021-02-09 10:52:18 -08:00
..
init build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
schematics fix(localize): update type castings for JSON.parse usage (#40710) 2021-02-09 10:48:43 -08:00
src fix(localize): improve invalid syntax in extraction error message (#40724) 2021-02-09 10:52:18 -08:00
test build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
BUILD.bazel build: provide full paths to ts_api_guardian_test_npm_package and ts_api_guardian_test (#36034) 2020-03-12 09:49:00 -07:00
index.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
localize.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
package.json build: update to latest "yargs" package (#39749) 2020-11-18 16:09:39 -08:00
private.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00