ttag-org / ttag

:orange_book: simple approach for javascript localization
https://ttag.js.org/
MIT License
344 stars 43 forks source link

Terminal is polluted with babel warnings about `@babel/plugin-proposal-private-property-in-object` loose property #234

Open vovkvlad opened 3 years ago

vovkvlad commented 3 years ago

Hi! While running ttag update command to update my .po files I receive a ton of messages stating next:

> ttag update --sortByMsgid true --addComments 'translator:' --extractLocation never "locales/ja.po" "src/"

⠋ [ttag] updating locales/ja.po ...Though the "loose" option was set to "false" in your @babel/preset-env config, it will not be used for @babel/plugin-proposal-private-property-in-object since the "loose" mode option was set to "true" for @babel/plugin-proposal-class-properties.
The "loose" option must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can silence this warning by explicitly adding
    ["@babel/plugin-proposal-private-property-in-object", { "loose": true }]
to the "plugins" section of your Babel config.
Though the "loose" option was set to "false" in your @babel/preset-env config, it will not be used for @babel/plugin-proposal-private-methods since the "loose" mode option was set to "true" for @babel/plugin-proposal-private-property-in-object.
The "loose" option must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can silence this warning by explicitly adding
    ["@babel/plugin-proposal-private-methods", { "loose": true }]
to the "plugins" section of your Babel config.
✔ locales/ja.po updated

Initially, I thought that it somehow messing around with my project's babel config, but after looking into it for a while, I managed to reproduce it on an empty project with no babel config at all with only 1 file that uses ttag functionality. Here is a test empty repo where the bug can be reproduced: https://github.com/vovkvlad/ttag-test-repo

My current version of the libs I'm using:

"ttag": "1.7.24"
"ttag-cli": "1.9.3"

If you need any additional info - please, let me know. If this bug should go under ttag-cli repo please, let me know as well, I'll transfer it there then.

Thanks in advance!

zansinergise commented 2 years ago

Was this solved in the latest version or does it still appear?

extremegf commented 2 years ago

Still see this warning on:

    "ttag-cli": "^1.9.3"
    "ttag": "^1.7.24"