feat(DEP0153): add dns lookup options codemod#473
Conversation
AugustinMauroy
left a comment
There was a problem hiding this comment.
Nice work ! But cold you add more jsDocs around sub function to know why/when/how is it useful
test suite seem good bases on issue
in readme you said
This recipe only changes literal option values. Dynamic values such as
{ family: familyOption }need manual review.
what if we use semantic analitic you can found where the option is defined and maybe update it https://docs.codemod.com/jssg/semantic-analysis#api-reference
|
Added JSDoc around the option rewrite path and noted why identifier propagation is left for manual review. Checked with:
|
AugustinMauroy
left a comment
There was a problem hiding this comment.
there are still comment from my previous review that need be addressed
|
Updated the lookup call query to use call_expression/function matching, removed the spread path, applied the shorter guards, and switched the value handling to cached kind/switch checks. Checked with:
|
Signed-off-by: Herrtian <70463940+Herrtian@users.noreply.github.com>
Refs #409.
Adds a DEP0153 recipe for literal
dns.lookup()anddnsPromises.lookup()option values. Dynamic option values are left unchanged for manual review.Checked with:
npm run test --workspace @nodejs/dns-lookup-options-coercionnpm run type-checknpm run lintgit diff --check