antfu-collective / taze

🥦 A modern cli tool that keeps your deps fresh
MIT License
2.88k stars 85 forks source link

Taze strips all the comments out of my pnpm-workspace.yaml #131

Closed dflock closed 3 months ago

dflock commented 4 months ago

Describe the bug

When I ran taze after creating a pnpm-workspace.yaml file to use a catalog, taze stripped all the comments out of the yaml file.

When I said yes to "write to package.json", taze also re-wrote my pnpm-workspace.yaml file, normalizing the quoting of values - but also stripping out all the comments. There were no version changes made to anything in the catalog, so the workspace file didn't need to be touched at all.

Please don't strip out the comments - they're one of the best features of using yaml files for this, allowing me to document why I'm making these version choices, the purpose of the catalogs, etc...

Reproduction

https://github.com/dflock/taze-bug-repo

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (16) x64 Intel(R) Core(TM) i7-10700T CPU @ 2.00GHz
    Memory: 10.36 GB / 31.71 GB
  Binaries:
    Node: 20.15.1 - ~\scoop\apps\nodejs-lts\current\node.EXE
    npm: 10.7.0 - ~\scoop\apps\nodejs-lts\current\npm.CMD
    pnpm: 9.6.0 - ~\dev\photonic-web-ui\node_modules\.bin\pnpm.CMD
  Browsers:
    Edge: Chromium (126.0.2592.113)
    Internet Explorer: 11.0.19041.4355

Used Package Manager

pnpm

Validations

Contributions

Wxh16144 commented 4 months ago

I tried to fix this problem, but it is an upstream dependency error. There are many related discussions https://github.com/nodeca/js-yaml/issues/689#issuecomment-1283968823