You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
changeset version reformats package.json files #1434
sadly, to this day of writing the comment, there isn't...
I hate to be doing this in a another package's thread..., but I ended up switching to another tool on npm, called lvlup, which doesn't format your package.json at all, and only works for a single repo (not a monorepo with many packages) and just performs a simple find & replace.
Full Disclosure ⚠️
The tool barely has weekly downloads,
as I am the developer/maintainer of it. I find myself often creating new packages and needed an appropriate tool.
I have this problem too and it is frustrating, I hope some sort of post publish step in CI becomes available so I can run the formatter, it's annoying getting formatting issues in the main branch every time after publishing.
changed the title [-]npm changeset version command formats the package.json[/-][+]`changeset version` reformats `package.json` files[/+]on May 12, 2026
Activity
with-heart commentedon Aug 8, 2024
B. That's how
JSON.stringifystringifies JSON when using thespaceparameter.A. If the
spaceparameter isn't used,JSON.stringifystringifies JSON as a single line.You can see the difference here: https://stackblitz.com/edit/vitejs-vite-f9dpnq?file=src%2Fmain.ts
moroshko commentedon Nov 20, 2024
Is there a way to tell changesets to run a custom npm script that formats the file?
For example:
It would need to run after changesets updates
package.jsonand before it creates a Pull Request.talkohavy commentedon Nov 20, 2024
sadly, to this day of writing the comment, there isn't...
I hate to be doing this in a another package's thread..., but I ended up switching to another tool on npm, called
lvlup, which doesn't format yourpackage.jsonat all, and only works for a single repo (not a monorepo with many packages) and just performs a simple find & replace.Full Disclosure⚠️
The tool barely has weekly downloads,
as I am the developer/maintainer of it. I find myself often creating new packages and needed an appropriate tool.
chore: disable package.json formatting in biome
Hugos68 commentedon Jan 2, 2025
I have this problem too and it is frustrating, I hope some sort of post publish step in CI becomes available so I can run the formatter, it's annoying getting formatting issues in the
mainbranch every time after publishing.tk-o commentedon Feb 20, 2025
You can turn prettier auto-formatting off now with this release:
Hugos68 commentedon Feb 20, 2025
@tk-o Awesome, thank you!
with-heart commentedon Feb 20, 2025
@Andarist I think this can be closed now ❤
shrugs commentedon Apr 8, 2025
still seeing this behavior despite
prettier: falsein my changeset configHugos68 commentedon Apr 9, 2025
@shrugs did you update your changeset package?
beeequeue commentedon Apr 30, 2026
@shrugs if you still have this issue let me know and i'll re-open the issue!
beeequeue commentedon Apr 30, 2026
actually sorry, this is related to the package.json writing which is unaffected by Prettier. i will create an umbrella issue for this later
changeset versioncommand keeps changing my package.json array formatting #1591 as a duplicate of this issue[-]npm changeset version command formats the package.json[/-][+]`changeset version` reformats `package.json` files[/+]