7 Commits

Author SHA1 Message Date
Joey Perrott
003854257c build: migrate all file header to use Google LLC rather than Google Inc 2021-04-27 08:35:22 +02:00
Alan Agius
07e3766220 fix(@schematics/angular): allow trailing commas in JSON files
Currently, both tsconfigs and workspace configuration files can contain trailing commas

Closes #19576
2020-12-09 09:52:35 -05:00
Alan Agius
5ce88ef7be refactor(@schematics/angular): handle undefined JSON AST Node 2020-11-16 12:59:06 -05:00
Alan Agius
3db588f743 refactor(@schematics/angular): throw on AST parse errors 2020-08-12 19:26:12 +01:00
Charles Lyding
196b3b9f29 fix(@schematics/angular): improve compiler options migration error reporting
This change provides more fine-grained warnings during the `update-module-and-target-compiler-options` migration for V10.0 in the event a TypeScript configuration file could not be updated.  The `JSONFile` utility class was also augmented to directly throw when created to ensure that the `content` property is always initialized.
2020-08-10 09:43:11 +01:00
cexbrayat
ef3bee6e7d fix(@schematics/angular): keep tslint rules ordered
The schematics recently siwtcher to `jsonc-parser` as the JSOn parser, and that introduced a small regression in the tslint.json file where the rules order is not the same as previously.

See https://github.com/cexbrayat/angular-cli-diff/compare/10.0.2...10.1.0-next.0

This commit should fix the issue by providing the insertion index when merging the tslint files.
A test has also been added to avoid further regressions.
2020-07-13 15:54:08 -04:00
Alan Agius
cdff686a76 refactor(@schematics/angular): add jsonc-parser to parse and modify JSON files
Currently, interaction with JSON AST is complex and requires a lot of boiler-platting. With this change we add `jsonc-parser` and add a basic helper class to greatly simplify such interaction.

This would come in handle when writing new migrations in 10.1+

**Note**: this is a private implementation and shouldn't be used by 3rd parties.
2020-07-07 08:45:17 +02:00