13 Commits

Author SHA1 Message Date
Ash Ramirez
434a3740f0 refactor(@angular/cli): update aio links -> adev links
Updates for all angular.io links to the new angular.dev domain. Additionally, adjustment to new resources where the equivalent does not exist on the new site (e.g. Tour of Heroes tutorial)
2024-06-06 11:12:06 +02:00
Alan Agius
1e364bd00c fix(@schematics/angular): retain existing EOL when updating JSON files
This commit updates the JSON utility to retain the existing EOF when updating files.
2024-01-05 16:30:06 +01:00
Alan Agius
e763db8691 refactor: change JSONFile to private instead of internal
This is so that this can be used in the Universal repo which is not failing because the type is not available.

https://app.circleci.com/pipelines/github/angular/universal/4483/workflows/25535db2-4a9c-43b0-84a5-3a55071013c6/jobs/20263
2023-01-12 14:32:16 +00:00
Charles Lyding
a0e3de2b5f refactor(@schematics/angular): use Tree's newly introduced readText and readJSON functionality
Code related to decoding buffers into strings and parsing content into JSON can now be removed by using the
support provided directly from the Tree instance for the executing schematic.
2022-04-26 19:24:55 -04:00
Alan Agius
e992c9a70b build: update files to be fix eslint header/header failures 2021-05-04 09:59:40 -04:00
Charles Lyding
37a06a7c37 build: format all files
All files are now formatted using the ng-dev tools via prettier.
2021-04-28 16:05:49 -07:00
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