|
|
|
|
|
by mdaniel
1493 days ago
|
|
> We use a YAML parser (JSON is a subset of YAML) I believe that has more sharp edges than one might suspect --json "{username: testuser, password: testpassword, birthdate: 2022-05-10}"
...,"birthdate":"2022-05-10T00:00:00.000Z"}
The user may be less surprised if the flag were named "--yaml-as-json" or whatever DX friendly variant one wishes, in order to more clearly mark that string as yaml. The user is actually told about the "JSON or YAML", but only if they try to include some scalar value that isn't legal yamlAlso, I appreciate that every service should strive to respond in 10s, but there wasn't an obvious way to get it to be more patient RequestError: Timeout awaiting 'request' for 10000ms
at ClientRequest.<anonymous> (/home/node/node_modules/got/dist/source/core/index.js:962:65)
followed by a ginormous stacktrace and a console.error dump of some event object |
|
you’re right on that YAML-as-JSON thing. If everything is quoted as JSON, those type conversions shouldn’t kick in. Otherwise there’s room for surprises - perhaps we can do something to make those cases more obvious.