-
Notifications
You must be signed in to change notification settings - Fork 225
Comparing changes
Open a pull request
base repository: replicate/replicate-javascript
base: v0.34.0
head repository: replicate/replicate-javascript
compare: main
- 19 commits
- 17 files changed
- 8 contributors
Commits on Sep 27, 2024
-
Configuration menu - View commit details
-
Copy full SHA for be0f323 - Browse repository at this point
Copy the full SHA be0f323View commit details
Commits on Oct 1, 2024
-
Bug fixes for the
wait
option inreplicate.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.
Configuration menu - View commit details
-
Copy full SHA for c1a12b0 - Browse repository at this point
Copy the full SHA c1a12b0View commit details -
Configuration menu - View commit details
-
Copy full SHA for a7dfbfd - Browse repository at this point
Copy the full SHA a7dfbfdView commit details
Commits on Oct 9, 2024
-
Configuration menu - View commit details
-
Copy full SHA for abe1029 - Browse repository at this point
Copy the full SHA abe1029View commit details -
Enable FileObject and blocking mode by default (#316)
* Enable FileObject and blocking mode by default * 1.0.0-beta.1
Configuration menu - View commit details
-
Copy full SHA for 6ad79c8 - Browse repository at this point
Copy the full SHA 6ad79c8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2b55fcb - Browse repository at this point
Copy the full SHA 2b55fcbView commit details
Commits on Oct 16, 2024
-
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.
Configuration menu - View commit details
-
Copy full SHA for ec31f40 - Browse repository at this point
Copy the full SHA ec31f40View commit details
Commits on Oct 21, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 8b75b39 - Browse repository at this point
Copy the full SHA 8b75b39View commit details
Commits on Oct 24, 2024
-
Document the
FileOutput
andwait
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.
Configuration menu - View commit details
-
Copy full SHA for d031695 - Browse repository at this point
Copy the full SHA d031695View commit details
Commits on Oct 28, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 6a338aa - Browse repository at this point
Copy the full SHA 6a338aaView commit details
Commits on Oct 30, 2024
-
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.
Configuration menu - View commit details
-
Copy full SHA for 5a98ca7 - Browse repository at this point
Copy the full SHA 5a98ca7View commit details
Commits on Nov 8, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 0b7c8eb - Browse repository at this point
Copy the full SHA 0b7c8ebView commit details
Commits on Mar 26, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 720f786 - Browse repository at this point
Copy the full SHA 720f786View commit details -
Remove usage of webcrypto from
node:crypto
in Node 18The 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
Configuration menu - View commit details
-
Copy full SHA for 01c4e09 - Browse repository at this point
Copy the full SHA 01c4e09View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2d42001 - Browse repository at this point
Copy the full SHA 2d42001View commit details -
Configuration menu - View commit details
-
Copy full SHA for 37aa363 - Browse repository at this point
Copy the full SHA 37aa363View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for ac5caba - Browse repository at this point
Copy the full SHA ac5cabaView commit details -
Update interface for replicate.models.versions.list() (#349)
The endpoint returns a paginated list rather than an array
Configuration menu - View commit details
-
Copy full SHA for 5ccf9f3 - Browse repository at this point
Copy the full SHA 5ccf9f3View commit details
Commits on May 12, 2025
-
Configuration menu - View commit details
-
Copy full SHA for f8ab2e8 - Browse repository at this point
Copy the full SHA f8ab2e8View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v0.34.0...main