question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Projen removes trailing newline from `package.json` while npm adds it back

See original GitHub issue

There 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:closed
  • Created a year ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
moltarcommented, Sep 1, 2022

@dj-rabel Did such a great job, that I think his issue should remain open and this should be closed 😁

1reaction
mrgraincommented, Sep 2, 2022

Thank you both! I followed the rule to keep the older issue. Hope you understand. 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found