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: replicate/replicate-javascript
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.34.0
Choose a base ref
...
head repository: replicate/replicate-javascript
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 19 commits
  • 17 files changed
  • 8 contributors

Commits on Sep 27, 2024

  1. Configuration menu
    Copy the full SHA
    be0f323 View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2024

  1. Bug fixes for the wait option in replicate.run (#315)

    There were a couple of small bugs in the current implementation:
    
    1. We would pass non-boolean, non-integer values through to `predictions.create` when it was an object with an interval, resulting in the blocking mode being used accidentally.
    2. We would pass the boolean/integer values through to `wait` which would create a runtime error when the `wait` function expects an object.
    3. We continued to poll for the prediction despite the blocking response returning the output data.
    
    This PR addresses these three issues by checking if the run should be blocking and passing the correct arguments in the correct places. We also assume that if the returned prediction is not in `starting` state then it is completed. This isn't ideal but works for the moment.
    
    Lastly, in  the case where the blocking request times out the client will fall back to polling at the default interval.
    aron authored Oct 1, 2024
    Configuration menu
    Copy the full SHA
    c1a12b0 View commit details
    Browse the repository at this point in the history
  2. 0.34.1

    mattt committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    a7dfbfd View commit details
    Browse the repository at this point in the history

Commits on Oct 9, 2024

  1. Configuration menu
    Copy the full SHA
    abe1029 View commit details
    Browse the repository at this point in the history
  2. Enable FileObject and blocking mode by default (#316)

    * Enable FileObject and blocking mode by default
    
    * 1.0.0-beta.1
    aron authored Oct 9, 2024
    Configuration menu
    Copy the full SHA
    6ad79c8 View commit details
    Browse the repository at this point in the history
  3. 1.0.0

    zeke committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    2b55fcb View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2024

  1. Update deployments.createPrediction to use wait

    A first draft of this interface used `block`, but we ended up going with `wait`
    (as either a boolean or a number) for the predictions.createPrediction method.
    This commit brings the two implementations inline, removing the undocumented
    and unintended `block` parameter.
    evilstreak committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    ec31f40 View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2024

  1. Configuration menu
    Copy the full SHA
    8b75b39 View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2024

  1. Document the FileOutput and wait parameters (#326)

    This commit takes a first pass at documenting the `FileOutput` and `wait` parameters introduced in 1.0.0 as well as calling out various potential gotchas with the API around URLs and data-uris based on feedback from the issues.
    aron authored Oct 24, 2024
    Configuration menu
    Copy the full SHA
    d031695 View commit details
    Browse the repository at this point in the history

Commits on Oct 28, 2024

  1. Update README.md (#329)

    Radovenchyk authored Oct 28, 2024
    Configuration menu
    Copy the full SHA
    6a338aa View commit details
    Browse the repository at this point in the history

Commits on Oct 30, 2024

  1. Remove mention of returning data URLs from sync API (#330)

    This change has now been reverted while we figure out how to provide a more consistent implementation.
    aron authored Oct 30, 2024
    Configuration menu
    Copy the full SHA
    5a98ca7 View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2024

  1. Configuration menu
    Copy the full SHA
    0b7c8eb View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2025

  1. Configuration menu
    Copy the full SHA
    720f786 View commit details
    Browse the repository at this point in the history
  2. Remove usage of webcrypto from node:crypto in Node 18

    The original code was intended to shim in support for the webcrypto
    interface in Node 18, which was included indirectly as `webcrypto`
    in the "node:crypto" module or globally via the
    `--no-experimental-global-webcrypto` flag.
    
    This change has caused many issues with bundlers and static analyzers
    which do not like the obfuscated call to `require()`.
    
    Node 18 will no longer receive security support as of 30 April 2025[1]
    and as such it feels like we can now drop this workaround in favor of
    documenting alternative approaches.
    
    [1]: https://endoflife.date/nodejs
    aron committed Mar 26, 2025
    Configuration menu
    Copy the full SHA
    01c4e09 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2d42001 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    37aa363 View commit details
    Browse the repository at this point in the history
  5. Add support for AbortSignal to all API methods (#339)

    This PR adds support for passing `AbortSignal` to all API methods that
    make HTTP requests, these are passed directly into the native `fetch()`
    implementation, so it's up to the user to handle the `AbortError` raised,
    if any.
    
    ```js
    const controller = new AbortController();
    try {
      const prediction = await replicate.predictions.create({
        version: 'xyz',
        ...,
        signal: controller.signal,
      });
    } catch (err) {
      if (err instanceof DOMException && err.name === "AbortError") {
        ...
      }
    }
    ```
    
    The `paginate` function also checks to see whether the signal was
    aborted before proceeding to the next iteration. If so it returns immediately
    to avoid making a redundant fetch call.
    
    This allows the client to take advantage of various frameworks that provide
    an `AbortSignal` instance to tear down any in flight requests.
    aron authored Mar 26, 2025
    Configuration menu
    Copy the full SHA
    ac5caba View commit details
    Browse the repository at this point in the history
  6. Update interface for replicate.models.versions.list() (#349)

    The endpoint returns a paginated list rather than an array
    aron authored Mar 26, 2025
    Configuration menu
    Copy the full SHA
    5ccf9f3 View commit details
    Browse the repository at this point in the history

Commits on May 12, 2025

  1. 1.1.0-0 (#352)

    mattrothenberg authored May 12, 2025
    Configuration menu
    Copy the full SHA
    f8ab2e8 View commit details
    Browse the repository at this point in the history
Loading