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

argv-parser-rewrite #21

Open
wants to merge 2 commits into
base: refactor1
Choose a base branch
from
Open

argv-parser-rewrite #21

wants to merge 2 commits into from

Commits on Apr 23, 2023

  1. fix test runner: properly catch unhandled exceptions/rejections & exi…

    …t process
    
    previously, if some error occurred, would just continue running, unless:
    a) a node arg `--unhandled-rejections=strict` was specified, or
    b) node version was >= 15 (but would get stuck, instead of exiting properly)
    
    for A, see:
    https://nodejs.org/api/cli.html#--unhandled-rejectionsmode
    
    now, always exits properly.
    kiprasmel committed Apr 23, 2023
    Configuration menu
    Copy the full SHA
    e65e5bb View commit details
    Browse the repository at this point in the history
  2. BREAKING CHANGE: completely overhaul arg parsing & allow invoking CLI…

    … w/o initialBranch if cached
    
    ...as long as the initialBranch was already provided
    in some previous invocation of stacked-rebase, thus cached.
    sometime later, we could have a config for the default initial branch..
    
    - create generic utils for argv parsing (separate package soon?)
    - introduce multiple tests, which caught lots of (mostly new) bugs!
    - tidy up code at start of gitStackedRebase, which now makes great sense & looks nice
      - same in other places
    - clear up mental model of "parsing options" - it's "resolve" instead of "parse"
    
    - move initialBranch parsing into resolveOptions
      - don't want out of sync `resolvedOptions.initialBranch` vs `nameOfInitialBranch`
    
    - get rid of "intial branch is optional for some args" -- non issue
      - because e.g. for --continue to have any meaning, you'd have to have already
        started a stacked rebase & thus would have the initial branch cached.
    kiprasmel committed Apr 23, 2023
    Configuration menu
    Copy the full SHA
    696ef74 View commit details
    Browse the repository at this point in the history