We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
After the first run of npx -y update-browserslist-db@latest in our project, it messed up package-lock.json formatting, see:
npx -y update-browserslist-db@latest
package-lock.json
This is on my colleague's PC (windows, I believe)
This is on my PC (Ubuntu, WSL2):
This is my output:
After that, I changed nothing re-running the command worked just fine. Can't reproduce anymore.
The text was updated successfully, but these errors were encountered:
Here's a reproduction:
const DEFAULT_INDENT = " "; const INDENT_REGEXP = /^(\s+)[^\s]/m; function detectIndent(text) { try { return INDENT_REGEXP.exec(text)[1] || DEFAULT_INDENT; } catch (e) { /* c8 ignore next 2 */ return DEFAULT_INDENT; } } const text = `{\r\n \"name\": \"my-project\",\r\n`; console.log(JSON.stringify(detectIndent(text)));
will print "\n "
"\n "
As you can see, it includes \n into the detected indentation.
\n
The problem is with this function: https://github1s.com/browserslist/update-db/blob/HEAD/index.js#L10-L17
Sorry, something went wrong.
My colleague and I would like to take on this issue if that's ok
Successfully merging a pull request may close this issue.
After the first run of
npx -y update-browserslist-db@latest
in our project, it messed uppackage-lock.json
formatting, see:This is on my colleague's PC (windows, I believe)
This is on my PC (Ubuntu, WSL2):
This is my output:
After that, I changed nothing re-running the command worked just fine. Can't reproduce anymore.
The text was updated successfully, but these errors were encountered: