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

Attempt to add undici interceptor #3

Closed
wants to merge 21 commits into from

Commits on Aug 25, 2022

  1. ci: set .nvmrc to latest node v18 and add Node v18 to CI strategy matrix

    The tests appear to pass, but there is a new console.error produced in
    the browser tests, apparently due to page-with
    milesrichardson committed Aug 25, 2022
    Configuration menu
    Copy the full SHA
    b679392 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4fa0b5a View commit details
    Browse the repository at this point in the history
  3. build: upgrade jest and related dependencies

    Upgrade to Jest 28, which is necessary because earlier versions
    do not export the `fetch` global (among others). In Jest 28
    the system for injecting globals is changed to fix this issue.
    
    See: https://jestjs.io/blog/2022/04/25/jest-28#all-nodejs-globals
    
    Also upgrade related dependencies and update import path
    of `AsymmetricMatchers` which was moved in this version.
    milesrichardson committed Aug 25, 2022
    Configuration menu
    Copy the full SHA
    53b46e1 View commit details
    Browse the repository at this point in the history
  4. test(node18-ipv6): change default host from localhost to 127.0.0.1

    Starting in Node v18, Node resolves an address (like `localhost`)
    by returning IP addresses in the order they are returned from the
    OS resolver/DNS. [0] This means that on default-IPv6 systems like
    a GitHub Actions runner, the link-local address `::1` is returned
    instead of `127.0.0.1`.
    
    Unfortunately this new behavior causes a bug in `@open-draft/test-server`,
    which serializes an IPv6 host into an invalid URL, because it
    incorrectly does not surround the host with square brackets
    like it should (e.g. `http://[::1]:8181`).
    
    Since I could not locate the source of `@open-draft/test-server`
    to fix this bug, the work-around is to replace all references
    to `localhost` with `127.0.0.1` directly - AFAICT there is no
    good reason to test this resolution behavior anyway.
    
    [0] nodejs/node#40537
    milesrichardson committed Aug 25, 2022
    Configuration menu
    Copy the full SHA
    a85c13b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    97d81cc View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5263e07 View commit details
    Browse the repository at this point in the history
  7. chore(node18-ipv6): add bugfix shim TestHttpServer to fix @open-draft…

    …/http-server IPv6 behavior
    milesrichardson committed Aug 25, 2022
    Configuration menu
    Copy the full SHA
    810f38b View commit details
    Browse the repository at this point in the history
  8. chore(node18-ipv6): replace @open-draft imports with TestHttpServer

    Replace all imports _in test files_ that imported `@open-draft/http-server`
    with the `TestHttpServer` shim that applies the bugfix to
    serialize IPv6 hosts into valid URLs.
    
    Note this does not replace any imports in `src/`, of which there
    are two, but they import `until` from `@open-draft`, and do not
    use it for creating any `HttpServer` instance
    milesrichardson committed Aug 25, 2022
    Configuration menu
    Copy the full SHA
    3f88929 View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2022

  1. Configuration menu
    Copy the full SHA
    1213a23 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    201da27 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d4705a2 View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2022

  1. Configuration menu
    Copy the full SHA
    030ae11 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    312be57 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f3cb46f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d28b855 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e1c7658 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    587ead4 View commit details
    Browse the repository at this point in the history
  7. chore(wip): set resolutions to force latest memfs transitive depe…

    …ndency
    
    The `page-with` package introduces a transitive dependency on `memfs`,
    and specifies a semver range that excludes the latest version of `memfs`
    which is compatible with Node v18.
    
    Use the `resolutions` field of `package.json` to force Yarn classic
    to install the (currently) latest version of `memfs` regardless of
    semver range requested by `page-with`
    
    This fixes at least one bug in `memfs` running in Node v18, which
    caused excessive `console.error` spam which rightfully complained
    of leaking file descriptors.
    
    For docs on `resolutions` field behavior of Yarn classic, see:
    https://classic.yarnpkg.com/en/docs/selective-version-resolutions
    milesrichardson committed Aug 27, 2022
    Configuration menu
    Copy the full SHA
    c187e3b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    fee1b66 View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2022

  1. Configuration menu
    Copy the full SHA
    3ef6c3b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ce8a81c View commit details
    Browse the repository at this point in the history