Why does yarn remove "private": "true", in my package.json?

529 views Asked by At

When I run yarn in a directory that includes a package.json file with a "private": "true", field, this line is silently removed. This behavior is in yarn 3.1.0, but not in npm 8.5.5, for example.

1

There are 1 answers

0
Nuke On BEST ANSWER

Running yarn seems to be type sensitive!

  • "private": "true", -> {a string} is removed.
  • "private": true, -> {a boolean} is untouched, and should work as intended.