Visitar URL original
refactor(@schematics/angular): add `jsonc-parser` to parse and modify JSON by alan-agius4 · Pull Request #17835 · angular/angular-cli · GitHub
The Wayback Machine - https://web.archive.org/web/20260519011156/https://github.com/angular/angular-cli/pull/17835
Skip to content

refactor(@schematics/angular): add jsonc-parser to parse and modify JSON#17835

Merged
alan-agius4 merged 2 commits into
angular:masterfrom
alan-agius4:json-utils
Jul 7, 2020
Merged

refactor(@schematics/angular): add jsonc-parser to parse and modify JSON#17835
alan-agius4 merged 2 commits into
angular:masterfrom
alan-agius4:json-utils

Conversation

@alan-agius4
Copy link
Copy Markdown
Collaborator

@alan-agius4 alan-agius4 commented Jun 1, 2020 •

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.

@alan-agius4 alan-agius4 changed the title wip! jsonc-parser refactor(@schematics/angular): add jsonc-parser to parse and modify JSON Jun 23, 2020
@alan-agius4 alan-agius4 added the target: major This PR is targeted for the next major release label Jun 23, 2020
@alan-agius4 alan-agius4 marked this pull request as ready for review June 23, 2020 09:33
@alan-agius4 alan-agius4 requested a review from clydin June 23, 2020 09:33
clydin
clydin previously requested changes Jun 25, 2020
Copy link
Copy Markdown
Member

@clydin clydin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice cleanup.

Comment thread packages/schematics/angular/utility/json-file.ts Outdated
@alan-agius4
Copy link
Copy Markdown
Collaborator Author

Ps: there are still some schematics that use the old methods, but I’ll continue the cleanup later on.

I want to get this in asap, so that I can write the 10.1 migration using this new method.

@alan-agius4 alan-agius4 requested a review from clydin June 26, 2020 08:02
… 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.
@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label Jul 7, 2020
@alan-agius4 alan-agius4 merged commit d1623c6 into angular:master Jul 7, 2020
@alan-agius4 alan-agius4 deleted the json-utils branch July 7, 2020 06:45
@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Aug 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants