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

split cli parsing #2553

Closed
wants to merge 26 commits into from
Closed

Commits on Oct 20, 2016

  1. WIP shifted files around

    started separating the mocha cli program into parts to make sections reusable by custom runners.
    rijnhard committed Oct 20, 2016
    Configuration menu
    Copy the full SHA
    e23b447 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    abdf5eb View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2016

  1. got rid of shitty getOptions and fixex program.opts() on Command.

    parse is much much much easier now.
    rijnhard committed Oct 21, 2016
    Configuration menu
    Copy the full SHA
    8774377 View commit details
    Browse the repository at this point in the history
  2. decided to force using makeCommand where possible,

    as its the easiest way to simplify the usage and ensure everything is called as it should be.
    otherwise its too easy to introduce bugs with things like --colours and --opts.
    rijnhard committed Oct 21, 2016
    Configuration menu
    Copy the full SHA
    818492f View commit details
    Browse the repository at this point in the history
  3. new mocha cli (untested)

    rijnhard committed Oct 21, 2016
    Configuration menu
    Copy the full SHA
    53f77c9 View commit details
    Browse the repository at this point in the history
  4. storing globals in a seperate var is pointless.

    its available as program.globals
    rijnhard committed Oct 21, 2016
    Configuration menu
    Copy the full SHA
    7e5e27b View commit details
    Browse the repository at this point in the history
  5. un-dufused the removal of the globals.

    added requires and globals to command once parsed.
    making it really easy to get it.
    rijnhard committed Oct 21, 2016
    Configuration menu
    Copy the full SHA
    ad489f5 View commit details
    Browse the repository at this point in the history
  6. updated cli with changes

    rijnhard committed Oct 21, 2016
    Configuration menu
    Copy the full SHA
    9cc9efd View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2016

  1. fixed parser, it now runs

    rijnhard committed Oct 24, 2016
    Configuration menu
    Copy the full SHA
    1ae8842 View commit details
    Browse the repository at this point in the history
  2. fixed resolveFiles

    rijnhard committed Oct 24, 2016
    Configuration menu
    Copy the full SHA
    639b441 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    eb96de7 View commit details
    Browse the repository at this point in the history
  4. change program.parse to be protected.

    set program.opts before and after parsing. And make it not ennumerable.
    
    rename optsArgs to optsFile
    
    added tests for parser and cli [wip]
    rijnhard committed Oct 24, 2016
    Configuration menu
    Copy the full SHA
    8d583d0 View commit details
    Browse the repository at this point in the history
  5. more tests

    rijnhard committed Oct 24, 2016
    Configuration menu
    Copy the full SHA
    375734d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    411026b View commit details
    Browse the repository at this point in the history
  7. added make test-cli command

    rijnhard committed Oct 24, 2016
    Configuration menu
    Copy the full SHA
    3858674 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    cc3d7cc View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2016

  1. Stopped overriding Command.parse and moved it all to Command.parseOpt…

    …ions
    
    as this allows parseOptions, rawArgs, and parse to work as expected.
    
    relocated all args manipulation out of mocha and _mocha.
    argv is no longer mutated. I tried to avoid implementing such a change
    but its impossible to use multiple makeCommand instances without this safety.
    rijnhard committed Oct 25, 2016
    Configuration menu
    Copy the full SHA
    08ba0ef View commit details
    Browse the repository at this point in the history
  2. fixed regression tests

    fixed oopsie removing Mocha from cli
    added a convenience method loadOptsFile which will surely be a common use case
    rijnhard committed Oct 25, 2016
    Configuration menu
    Copy the full SHA
    6a335ef View commit details
    Browse the repository at this point in the history

Commits on Oct 26, 2016

  1. Cheeky commit: updated Commander options --global --require

    to use Commanders recommended way of collecting multiple values.
    also means less magic in parseOptions.
    rijnhard committed Oct 26, 2016
    Configuration menu
    Copy the full SHA
    8b8db38 View commit details
    Browse the repository at this point in the history

Commits on Nov 10, 2016

  1. removed mkdir in command

    rijnhard committed Nov 10, 2016
    Configuration menu
    Copy the full SHA
    bbc79ca View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2018

  1. Merge branch 'master' of github.com:mochajs/mocha into feature/split_…

    …cli_parsing
    
    # Conflicts:
    #	bin/_mocha
    rijnhard committed Jan 9, 2018
    Configuration menu
    Copy the full SHA
    7fff92a View commit details
    Browse the repository at this point in the history
  2. stripped out hacky Command.parseOptions code

    using a custom parser instead of Commanders.
    updated test cases
    expanded args in `mocha` because it needs to happen before the call to `_mocha`
    rijnhard committed Jan 9, 2018
    Configuration menu
    Copy the full SHA
    5572b50 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    38102ef View commit details
    Browse the repository at this point in the history
  4. addActions can be used on any Command instance

    set program._name in makeCommand instead
    rijnhard committed Jan 9, 2018
    Configuration menu
    Copy the full SHA
    2488485 View commit details
    Browse the repository at this point in the history
  5. fixed loadOptsFile

    added more unit tests
    rijnhard committed Jan 9, 2018
    Configuration menu
    Copy the full SHA
    9668709 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    833413f View commit details
    Browse the repository at this point in the history