ember-codemods / ember-native-class-codemod

A codemod-cli project for converting Ember objects to es6 native classes
68 stars 38 forks source link

Codemod still mis-handling boolean CLI args as strings #522

Closed gitKrystan closed 1 year ago

gitKrystan commented 1 year ago

For example, trying to pass --classic-decorator=false to the CLI throws an error.

[error] [CLI]: CONFIG ERROR: 
[
   {
     "code": "invalid_type",
     "expected": "boolean",
     "received": "string",
     "path": [
       "classicDecorator"
     ],
     "message": "Expected boolean, received string"
   }
 ]

Using a .codemods.json file with a boolean works ok.

gitKrystan commented 1 year ago

I am unable to reproduce this bug, and based on the error message, I am pretty sure this is from an old version of the codemod. In the latest version it would look like:

2023-03-15T21:09:30.599Z [error] [CLI]: CONFIG ERROR: 
    [classicDecorator] Expected boolean, received string

Closing unless we get other reports.