Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix deprecation on Commander method #3210

Merged
merged 4 commits into from
Sep 26, 2024

Conversation

Dhaiwat10
Copy link
Member

@Dhaiwat10 Dhaiwat10 commented Sep 25, 2024

Closes TS-662

Summary

This PR removes the usage of the addHelpCommand method from the commander package that we use for our CLIs. We don't need to replace it with anything since commander now automatically adds a help command for your CLI if it has any sub-commands, which our CLIs do.

Checklist

  • All changes are covered by tests (or not applicable)
  • All changes are documented (or not applicable)
  • I reviewed the entire PR myself (preferably, on GH UI)
  • I described all Breaking Changes (or there's none)

Copy link

vercel bot commented Sep 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
create-fuels-template ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 26, 2024 6:00pm
ts-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 26, 2024 6:00pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
create-fuels-counter-example ⬜️ Ignored (Inspect) Sep 26, 2024 6:00pm

Copy link
Contributor

This PR is published in NPM with version 0.0.0-pr-3210-20240925163330

Copy link

codspeed-hq bot commented Sep 25, 2024

CodSpeed Performance Report

Merging #3210 will degrade performances by 10.36%

Comparing dp/fix-commander-deprecation (3f10f1f) with master (e7c2c30)

Summary

⚡ 1 improvements
❌ 1 regressions
✅ 19 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark master dp/fix-commander-deprecation Change
Instantiate a new Unlocked wallet 106 ms 38.3 ms ×2.8
Instantiate from a constructor 27.9 ms 31.2 ms -10.36%

packages/fuels/src/cli.ts Outdated Show resolved Hide resolved
Copy link
Contributor

Coverage Report:

Lines Branches Functions Statements
76.4%(-0.77%) 71.61%(-0.2%) 75.49%(-0.28%) 76.55%(-0.73%)
Changed Files:
Ok File (✨=New File) Lines Branches Functions Statements
🔴 ✨ apps/docs-snippets2/scripts/launcher-snippet.ts 0%
(+0%)
100%
(+100%)
0%
(+0%)
0%
(+0%)
🔴 ✨ apps/docs-snippets2/scripts/test-template.ts 0%
(+0%)
0%
(+0%)
0%
(+0%)
0%
(+0%)
🔴 ✨ apps/docs-snippets2/scripts/wrap-snippets.ts 0%
(+0%)
0%
(+0%)
0%
(+0%)
0%
(+0%)
🔴 ✨ apps/docs-snippets2/src/env.ts 0%
(+0%)
100%
(+100%)
100%
(+100%)
0%
(+0%)
🔴 ✨ apps/docs-snippets2/src/introduction/connecting-to-localnode.ts 0%
(+0%)
100%
(+100%)
100%
(+100%)
0%
(+0%)
🔴 ✨ apps/docs-snippets2/src/introduction/connecting-to-testnet.ts 0%
(+0%)
100%
(+100%)
100%
(+100%)
0%
(+0%)
🔴 ✨ apps/docs-snippets2/src/transactions/transaction-parameters.ts 0%
(+0%)
100%
(+100%)
100%
(+100%)
0%
(+0%)
🔴 ✨ apps/docs-snippets2/src/typegend/contracts/Counter.ts 66.66%
(+66.66%)
100%
(+100%)
0%
(+0%)
66.66%
(+66.66%)
✨ apps/docs-snippets2/src/typegend/contracts/CounterFactory.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
🔴 ✨ apps/docs-snippets2/src/typegend/scripts/ScriptSum.ts 80%
(+80%)
100%
(+100%)
0%
(+0%)
80%
(+80%)
🔴 packages/account/src/providers/transaction-request/transaction-request.ts 88.57%
(+0%)
76.71%
(-1.37%)
84%
(+0%)
88.81%
(+0%)
🔴 packages/create-fuels/src/cli.ts 87.95%
(+0.78%)
47.61%
(+0.25%)
100%
(+0%)
87.95%
(+0.78%)
🔴 ✨ packages/fuels/scripts/build-proxy-contract.ts 0%
(+0%)
100%
(+100%)
100%
(+100%)
0%
(+0%)
🔴 packages/fuels/src/cli/commands/deploy/deployContract.ts 100%
(+0%)
83.33%
(+33.33%)
100%
(+0%)
100%
(+0%)
🔴 ✨ packages/fuels/src/cli/commands/deploy/proxy/types/Src14OwnedProxy.ts 83.33%
(+83.33%)
100%
(+100%)
75%
(+75%)
91.66%
(+91.66%)
🔴 ✨ packages/fuels/src/cli/commands/deploy/proxy/types/Src14OwnedProxyFactory.ts 66.66%
(+66.66%)
0%
(+0%)
66.66%
(+66.66%)
66.66%
(+66.66%)
🔴 packages/fuels/src/cli/config/forcUtils.ts 92.98%
(-7.02%)
80%
(-20%)
100%
(+0%)
93.44%
(-6.56%)

@Dhaiwat10 Dhaiwat10 merged commit 7cb3457 into master Sep 26, 2024
24 checks passed
@Dhaiwat10 Dhaiwat10 deleted the dp/fix-commander-deprecation branch September 26, 2024 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Issue is a chore
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix deprecation on Commander method
4 participants