Skip to content
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

NpmConfig uses package 'ini' which adds CRLF on Windows #3545

Open
pavlovecjakePFG opened this issue Apr 29, 2024 · 1 comment
Open

NpmConfig uses package 'ini' which adds CRLF on Windows #3545

pavlovecjakePFG opened this issue Apr 29, 2024 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers windows Issues with running projen on Windows

Comments

@pavlovecjakePFG
Copy link

I ran into an issue where developers on Windows generated a different .npmrc file with the NpmConfig class then developers on Ubuntu. The cause is the use of the 'ini' package for the .npmrc file:

new IniFile(project, ".npmrc", {
.
That package adds CRLF on Windows, but just LF on Ubuntu.

This results in the mutation check constantly failing as different developers commit slightly different versions of the .npmrc file.

I believe this file could just as easily be created with TextFile, which would avoid this problem.

@mrgrain mrgrain added bug Something isn't working windows Issues with running projen on Windows labels Apr 29, 2024
@mrgrain
Copy link
Contributor

mrgrain commented Apr 29, 2024

We can upgrade to the latest version of the ini library and hardcode the platform option to unix.

https://www.npmjs.com/package/ini?activeTab=readme

@mrgrain mrgrain added the good first issue Good for newcomers label May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers windows Issues with running projen on Windows
Projects
None yet
Development

No branches or pull requests

2 participants