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
If an executor has an option of type string and you want to provide it with a string containing a number such '123', then the schema validation currently stops you:
$ nx run my-app:deploy --otp='123'> nx run my-app:deploy --otp=123
Property 'otp' does not match the schema. '123' should be a 'string'.
Expected Behavior
Nx should not convert the number-looking string to a number. It should first look at the executor's schema and then decide whether converting the type makes sense. The same goes for boolean-looking strings.
Property 'otp' does not match the schema. '123' should be a 'string'.
The ngx-deploy-npm:deploy executor has an optional otp string parameter, which is the right type as the current npm 2fa implementation just happens to use numbers.
The --dryRun is just a fail-safe to avoid publishing to npm in case it for some reason does work. You can omit it and the result will be the same.
Failure Logs
Environment
Node : 16.16.0
OS : darwin x64
pnpm : 7.9.0
nx : 14.3.6
@nrwl/angular : Not Found
@nrwl/cypress : 14.3.6
@nrwl/detox : Not Found
@nrwl/devkit : 14.3.6
@nrwl/eslint-plugin-nx : 14.3.6
@nrwl/express : Not Found
@nrwl/jest : 14.3.6
@nrwl/js : 14.3.6
@nrwl/linter : 14.3.6
@nrwl/nest : Not Found
@nrwl/next : 14.3.6
@nrwl/node : Not Found
@nrwl/nx-cloud : 14.3.0
@nrwl/nx-plugin : 14.3.6
@nrwl/react : 14.3.6
@nrwl/react-native : Not Found
@nrwl/schematics : Not Found
@nrwl/storybook : 14.3.6
@nrwl/web : 14.3.6
@nrwl/workspace : 14.3.6
typescript : 4.7.4
---------------------------------------
Community plugins:
@jscutlery/semver: 2.25.2
ngx-deploy-npm: 4.1.2
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏
Current Behavior
If an executor has an option of type
string
and you want to provide it with a string containing a number such'123'
, then the schema validation currently stops you:Expected Behavior
Nx should not convert the number-looking string to a number. It should first look at the executor's schema and then decide whether converting the type makes sense. The same goes for boolean-looking strings.
Steps to Reproduce
A minimal repo is available here: https://github.com/Phault/ngx-deploy-npm-repro-351
Running
nx run my-lib:deploy --dryRun --otp 123
will output:The
ngx-deploy-npm:deploy
executor has an optionalotp
string parameter, which is the right type as the current npm 2fa implementation just happens to use numbers.The
--dryRun
is just a fail-safe to avoid publishing to npm in case it for some reason does work. You can omit it and the result will be the same.Failure Logs
Environment
The text was updated successfully, but these errors were encountered: