Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: airtasker/spot
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.11.0
Choose a base ref
...
head repository: airtasker/spot
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.12.0
Choose a head ref
  • 6 commits
  • 24 files changed
  • 2 contributors

Commits on Oct 9, 2023

  1. [NT] Normalise paths before proxying. (#2068)

    ## Description, Motivation and Context
    
    Due to various layers of proxying, sometimes a proxied request ends up
    with multiple leading slashes. Some web servers do not not normalise
    request paths, leading to 404's.
    
    This PR normalises the received request path on the mock server before
    matching against contract paths, and normalises the received request
    paths when proxying the request.
    
    ## Checklist:
    
    - [x] I've added/updated tests to cover my changes
    - [x] I've created an issue associated with this PR
    timdawborn authored Oct 9, 2023
    Configuration menu
    Copy the full SHA
    996cef8 View commit details
    Browse the repository at this point in the history

Commits on Oct 10, 2023

  1. [NT] Correct the hostname for proxy configurations with port numbers (#…

    …2069)
    
    ## Description, Motivation and Context
    
    This PR fixes a bug in the proxy hostname parsing, where we currently
    accidentally use the wrong field from the parsed `URL` object to refer
    to the hostname of the proxy.
    https://developer.mozilla.org/en-US/docs/Web/API/URL — the `host`
    attribute is of the form `<host>:<port>` if present, whereas `hostname`
    is just `<host>`. How we use the parsed attribute expects just a
    hostname without a port number.
    
    This PR fixes this bug by using the `hostname` attribute of the parsed
    URL instead of the `host` attribute. While I was here, I also added
    tests for this proxy URL parsing function given there were none before.
    
    ## Checklist:
    
    - [x] I've added/updated tests to cover my changes
    - [x] I've created an issue associated with this PR
    timdawborn authored Oct 10, 2023
    Configuration menu
    Copy the full SHA
    837de71 View commit details
    Browse the repository at this point in the history

Commits on Oct 12, 2023

  1. [NT] Optional proxy server for draft endpoints (#2070)

    ## Description, Motivation and Context
    
    This PR introduces a new option, `--proxyMockBaseUrl`, which can be used
    to proxy requests for draft contracts to a HTTP server instead of
    returning mocked response. With this, we now have the functionality to
    have a local implementation of a particular new draft contract while
    using existing live implementations for all other contracts and
    non-contract requests. For example, what I've been using this for
    locally is:
    
    ```
    spot mock \
        --port 5601 \
        --proxyBaseUrl https://api.dev.company.com \
        --proxyFallbackBaseUrl https://api.dev.company.com \
        --proxyMockBaseUrl http://127.0.0.1:3000 \  # Hit a locally running server for draft requests
        ~/some/path/to/spots/api.ts
    ```
    
    The diff of this PR is best viewed with whitespace ignored, as there's a
    large block of indentation changes:
    https://github.com/airtasker/spot/pull/2070/files?diff=split&w=1
    
    ## Checklist:
    
    - [x] I've added/updated tests to cover my changes
    - [x] I've created an issue associated with this PR
    timdawborn authored Oct 12, 2023
    Configuration menu
    Copy the full SHA
    b455e5f View commit details
    Browse the repository at this point in the history
  2. [NT] Run CI across multiple NodeJS versions (#2071)

    Run CI across multiple NodeJS versions to help ensure we make forwards
    and backwards compatible changes.
    timdawborn authored Oct 12, 2023
    Configuration menu
    Copy the full SHA
    67dba6e View commit details
    Browse the repository at this point in the history
  3. update ts-morph to 18.0.0 (#2061)

    Updates dependencies to make spot work with later TS versions and
    monorepos (yarn workspaces)
    dhmw authored Oct 12, 2023
    Configuration menu
    Copy the full SHA
    6354896 View commit details
    Browse the repository at this point in the history
  4. Release v1.12.0 (#2073)

    timdawborn authored Oct 12, 2023
    Configuration menu
    Copy the full SHA
    1b64d06 View commit details
    Browse the repository at this point in the history
Loading