Projen removes trailing newline from `package.json` while npm adds it back
See original GitHub issueThere is a conflict with with projen and npm@8, where projen prefers no trailing new lines in the package.json
file, but npm prefers having one, so there is sometimes a git diff for no reason.
A good example is running projen --no-post
which will write the package.json
file, but not run the npm install
as a post job. You’ll see that the package.json
is not in a dirty state.
Issue Analytics
- State:
- Created a year ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Removes trailing newline in package.json · Issue #21 - GitHub
The problem is that most editors are configured to add trailing newlines on save, since this is better for git diffs in general....
Read more >How to re-write json to a file so as not to get "\ No newline at ...
Manually add a newline to the end of your package.json before running your node script as It's good practice to include a trailing...
Read more >API Reference | projen
NodePackage, Represents the npm package.json file. javascript. ... If addPattern() is called after this, the pattern will be added again.
Read more >projen - npm
projen synthesizes project configuration files such as package.json , tsconfig.json , .gitignore , GitHub Workflows, eslint, jest, etc from a well-typed ...
Read more >A Beginner's Guide to Create AWS CDK Construct Library with ...
With projen, you no longer need to manage files such as package.json by yourself. projen does not only generate various files during project ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@dj-rabel Did such a great job, that I think his issue should remain open and this should be closed 😁
Thank you both! I followed the rule to keep the older issue. Hope you understand. 😃