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

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

Closed
devversion opened this Issue Jan 7, 2019 · 2 comments

Comments

Projects
None yet
3 participants
@devversion
Copy link
Member

devversion commented Jan 7, 2019

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

This comment has been minimized.

Copy link
Member

devversion commented Jan 7, 2019

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.

@mgechev

This comment has been minimized.

Copy link
Member

mgechev commented Jan 8, 2019

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

alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jan 11, 2019

refactor: use `.template` suffix for all schematic files
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 angular#13378

alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jan 11, 2019

refactor: use `.template` suffix for all schematic files
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 angular#13378

alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jan 11, 2019

refactor: use `.template` suffix for all schematic files
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 angular#13378

alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jan 11, 2019

refactor: use `.template` suffix for all schematic files
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 angular#13378

alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jan 14, 2019

refactor: use `.template` suffix for all schematic files
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 angular#13378

alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jan 15, 2019

refactor: use `.template` suffix for all schematic files
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 angular#13378

alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jan 16, 2019

refactor: use `.template` suffix for all schematic files
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 angular#13378

kyliau added a commit that referenced this issue Jan 16, 2019

refactor: use `.template` suffix for all schematic files
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment