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

refactor: move to yargs, use chalk #144

Merged
merged 52 commits into from
Jul 9, 2021

Conversation

OsmanAltun
Copy link
Contributor

@OsmanAltun OsmanAltun commented Sep 14, 2020

What is the purpose of this pull request? (put an "X" next to item)

[x] Documentation update
[x] Bug fix
[x] New feature
[x] Other, please explain:

Project revamp. I tried both CommanderJS and Yargs. I also tried making a custom wrapper for minimist, however it took too much effort. I decided to stick with Yargs.

What changes did you make? (Give an overview)
Lots.

  1. OpenPlayer function now uses child_process.spawn instead of child_process.exec.
  2. Removed the openIINA function which was a weird function.
  3. Merged PLAYER_ARGS with PLAYER_EXEC into playerArgs.
  4. replaced Minimist with Yargs.
  5. Created init function. This function contains some if else statements which used to be on the root.
  6. Cleanup of dependencies and added comments.
  7. Feature: Ability to give player specific arguments.
  8. Updated README.md file.
  9. If the given port is busy, it will pick a random port.
  10. Replace Clivas with the combined use of Chalk and console.log.

Which issue (if any) does this pull request address?

Is there anything you'd like reviewers to focus on?
Refer to changes.

@OsmanAltun OsmanAltun changed the title Replaced Minimist with Yargs and bugfixes Revamped the project: Bugfixes, a new feature and replaced Minimist with Yargs Sep 14, 2020
@OsmanAltun OsmanAltun changed the title Revamped the project: Bugfixes, a new feature and replaced Minimist with Yargs Revamp [wip] Nov 14, 2020
@feross feross self-assigned this Nov 17, 2020
@DiegoRBaquero
Copy link
Member

I feel this PR could be broken down into smaller ones, hard to review so many changes

@OsmanAltun
Copy link
Contributor Author

OsmanAltun commented May 31, 2021

Forget rebasing, I don't want to break anything 😅

It is difficult to split this PR, because there are many trial/error commits.
I think it is easier to look at the current state of the code instead of looking at changes of each commit.


I have been using my version for quite a while (since the last commit of 2020), no issues so far.

.gitignore Outdated Show resolved Hide resolved
bin/cmd.js Outdated Show resolved Hide resolved
bin/cmd.js Show resolved Hide resolved
@DiegoRBaquero DiegoRBaquero changed the title Revamp refactor: move to yargs, use chalk Jun 3, 2021
.gitignore Outdated Show resolved Hide resolved
@DiegoRBaquero DiegoRBaquero self-assigned this Jun 4, 2021
.gitignore Outdated Show resolved Hide resolved
Copy link
Member

@DiegoRBaquero DiegoRBaquero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM, need to test app

@DiegoRBaquero DiegoRBaquero added this to Review needed in June Sprint via automation Jun 8, 2021
@DiegoRBaquero DiegoRBaquero merged commit 177bc48 into webtorrent:master Jul 9, 2021
June Sprint automation moved this from Review needed to Done Jul 9, 2021
@welcome
Copy link

welcome bot commented Jul 9, 2021

🎉 Congrats on getting your first pull request landed!

webtorrent-bot pushed a commit that referenced this pull request Jul 9, 2021
## [3.3.1](v3.3.0...v3.3.1) (2021-07-09)

### Code Refactoring

* move to yargs, use chalk ([#144](#144)) ([177bc48](177bc48))

### BREAKING CHANGES

* * Create new branch: revamp

* Complete revamp

* Added quote function

* Bugfixes

* Bugfixes

* Replace console.log with process.stdout.write

* Bugfixes

* Cleanup dependencies

* Added feature

* Standard --fix

* Update docs

* Standard --fix

* Fix small bug

* Standard --fix

* Multiple torrent downloads fix

* Less hard coding

* Small adjustments

* Fix optiongroup order

* Replace yargs with minimist wrapper

* Revert commit: 94c561c

* Pull changes 3.2.1

* Pull changes 3.2.1

* Fix busy port issue

* Small fixes

* Small changes

* Small fixes

* Small fixes

* Small changes

* Remove unnecessary complexity

* Webtorrent 0.112.0

* Small fixes

* Small fix

* Remove clivas.flush

* Revert removal

* Replace Clivas with Chalk and console.log

* Yargs 16.2.0

* Small fix

* Small improvements

* dependency fix

* Yargs 17.0.1

* Update .gitignore

* Update .gitignore

* Add [default] to download description

* Remove regions

* Update .gitignore

Co-authored-by: Osman Altun <oaltun@quintor.local>
Co-authored-by: Diego Rodríguez Baquero <github@diegorbaquero.com>
@webtorrent-bot
Copy link

🎉 This PR is included in version 3.3.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@ghost
Copy link

ghost commented Sep 25, 2022

Is there anyway to use --ytdl-format= & --audio-channels= ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
4 participants