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: remove src/TaskQueue #5826

Merged
merged 2 commits into from May 7, 2020
Merged

chore: remove src/TaskQueue #5826

merged 2 commits into from May 7, 2020

Commits on May 7, 2020

  1. chore: Remove src/TaskQueue

    The only place it's used is in `src/Page.ts` to have a chain of
    screenshot promises. Rather than initialize a task queue in `Browser`
    and pass it through a chain of constructors we instead move the class
    into `src/Page` and define it inline.
    
    In the future we might want to create a helpers folder to contain small
    utilities like that (`src/Page.ts` is already far too large) but I'm
    leaving that for a future PR.
    
    `TaskQueue` isn't documented in `api.md` so I don't think this is a
    breaking change.
    
    I updated the type of `screenshot()` to return `Promise<string | Buffer
    | void>` because if a promise rejects it's silently swallowed. I'd like
    to change this behaviour but one step at a time. This type only had to
    change as now we type the screenshot task queue correctly rather than
    using `any` which then exposed the incorrect `screenshot()` types.
    jackfranklin committed May 7, 2020
    Copy the full SHA
    dcab975 View commit details
    Browse the repository at this point in the history
  2. prettier

    jackfranklin committed May 7, 2020
    Copy the full SHA
    15f9e09 View commit details
    Browse the repository at this point in the history