Skip to content

Detect and preserve npm package-lock.json file indentation #5

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

Merged
merged 2 commits into from
Sep 1, 2022

Conversation

alexanderanchishkin
Copy link

I used detect-indent package as it was used for npm install fix

@ai
Copy link
Member

ai commented Sep 1, 2022

Can we avoid extra dependency and write a small function to do it? Our use case is very simple to use extra dependency for that.

@ai ai merged commit bd745fa into browserslist:main Sep 1, 2022
@alexanderanchishkin
Copy link
Author

Sure. I fixed it.
But I discovered interesting fact. Really npm v7+ doesn't preserve indentation style after npm install (and we use it for updating). More information about it here. It uses indentation of package.json file.
So this PR was useful only for npm version less v7.
Our team use npm v6 now so we'll find it useful.

@ai
Copy link
Member

ai commented Sep 1, 2022

Thanks. Released in 1.0.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants