Skip to content

Use ".template" suffix for schematic template files #13378

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
devversion opened this issue Jan 7, 2019 · 3 comments · Fixed by #13410
Closed

Use ".template" suffix for schematic template files #13378

devversion opened this issue Jan 7, 2019 · 3 comments · Fixed by #13410
Assignees
Labels
area: @schematics/angular feature Issue that requests a new feature
Milestone

Comments

@devversion
Copy link
Member

Currently in the cli-hello-world-ivy integration test for angular/angular:

Failed to read entry point info from /home/circleci/ng/integration/cli-hello-world-ivy/node_modules/@schematics/angular/workspace/files/package.json with error SyntaxError: Unexpected token < in JSON at position 1121.

It looks like this happens because ngcc just tries to read all package.json files and @schematics/angular ships their templated package.json file without using the .template suffix.

If there is nothing opposed to switching the package.json to use package.json.template, I think that it would make sense in order to avoid such warnings/errors in general.

Note that this initially caused errors for NGCC, but has been switched to a warning in angular/angular#26539.

@devversion
Copy link
Member Author

It's technically not really an issue because nothing is wrong with packaging such templated package.json files into an NPM package, but since there already is the possibility to suffix template files with .template, I wanted to see if there is a reason why this hasn't been done for the these files.

@alan-agius4 alan-agius4 added needs: discussion On the agenda for team meeting to determine next steps feature Issue that requests a new feature area: @schematics/angular labels Jan 7, 2019
@ngbot ngbot bot added this to the Backlog milestone Jan 7, 2019
@mgechev
Copy link
Member

mgechev commented Jan 8, 2019

Makes sense to me. @alan-agius4 pushed it into the queue for discussion this week.

@mgechev mgechev removed the needs: discussion On the agenda for team meeting to determine next steps label Jan 10, 2019
kyliau pushed a commit that referenced this issue Jan 16, 2019
Currently when using `ivy-ngcc` it will print out a warning

```
Failed to read entry point info from //node_modules/@schematics/angular/workspace/files/package.json with error SyntaxError: Unexpected token < in JSON at position 1121.
```

Fixes #13378
@angular-automatic-lock-bot
Copy link

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 Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: @schematics/angular feature Issue that requests a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants