Comments (8)
by the way, when I run tests on latest master, I get the same errors
And some other errors because of incorrect usage of Command
and program
from commander:
packages/fuels/src/cli/commands/withBinaryPaths.test.ts:
1 import { program } from 'commander';
15 const command = program
16 .command(Commands.versions)
It is not creating new command, but rather use the global one. That leads to such error messages:
Error: cannot add command 'versions' as already have command 'versions'
For me seems better way is:
1 import { Command } from 'commander';
15 const command = new Command()
16 .command(Commands.versions)
from fuels-ts.
hello, I can try it
@YaTut1901 Go for it! If you need any help, don't hesitate to ask 😄
from fuels-ts.
@petertonysmith94, I am running tests with bumped dependency and they are failing because of commands clashing. Here it is, in file packages/fuels/src/cli.ts:
45: const pathOption = new Option('-p, --path <path>', 'Path to project root').default(process.cwd());
58: .addOption(new Option(`-p, --predicates ${arg}`, `${desc} Predicates`).conflicts('workspace'))
updated commander doesn`t want to accept same options "-p", should they be renamed?
from fuels-ts.
@petertonysmith94, I am running tests with bumped dependency and they are failing because of commands clashing. Here it is, in file packages/fuels/src/cli.ts:
45: const pathOption = new Option('-p, --path <path>', 'Path to project root').default(process.cwd()); 58: .addOption(new Option(`-p, --predicates ${arg}`, `${desc} Predicates`).conflicts('workspace'))
updated commander doesn't want to accept same options "-p", should they be renamed?
@YaTut1901 Great catch!
Not sure how this hasn't been an issue before, as they are conflicting flags. I'd suggest changing the path
option to be capital P
, as I would guess this would be a less breaking change to end users.
const pathOption = new Option('-P, --path <path>', 'Path to project root').default(process.cwd());
from fuels-ts.
Oh wow, how come did this get this far? 🤦♂️
@petertonysmith94 I'd say we don't need a shortcut for path
, so it can be just --path
. In my experience, the --path
option is not very used, and having a case where we'd have -P
and -p
simultaneously may look weird. It works, but we can avoid it and favor clarity over brevity.
It is good to note that this will be a [small] breaking change.
from fuels-ts.
hello, I can try it
from fuels-ts.
@petertonysmith94 is there any other issues need to be completed?
from fuels-ts.
@YaTut1901 Check out the good first issues
- just pop a message on the issue :D
from fuels-ts.
Related Issues (20)
- Migrate snippets from `guide/contracts`
- Migrate snippets from `guide/cookbook`
- Migrate snippets from `guide/create-fuels`
- Migrate snippets from `guide/encoding`
- Migrate snippets from `guide/introduction`
- Migrate snippets from `guide/predicates`
- Migrate snippets from `guide/provider`
- Migrate snippets from `guide/scripts`
- Migrate snippets from `guide/testing`
- Migrate snippets from `guide/transactions`
- Migrate snippets from `guide/types`
- Migrate snippets from `guide/utilities`
- Migrate snippets from `guide/wallet-manager`
- Migrate snippets from `guide/wallets`
- Explore options to achieve Runnable Snippets
- Calling `wallet.createTransfer()` throws `InsufficientFeeAmount` error HOT 4
- Explore more ergonomic API for funding/estimate
- Explore more ergonomic API around custom TXs
- Flaky tests HOT 2
- Inform users if their `fuels` version is outdated
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fuels-ts.