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: release main #463

Merged
merged 18 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
5ea6f8b
feat(client): make request-id header more accessible (#462)
stainless-app[bot] Jul 10, 2024
cc405a8
chore(ci): also run workflows for PRs targeting `next` (#464)
stainless-app[bot] Jul 11, 2024
c1fd563
chore(internal): minor changes to tests (#465)
stainless-app[bot] Jul 14, 2024
50b9f2b
chore(docs): minor update to formatting of API link in README (#467)
stainless-app[bot] Jul 15, 2024
968a7fb
chore(docs): mention lack of support for web browser runtimes (#468)
stainless-app[bot] Jul 16, 2024
8961ebf
chore(docs): use client instead of package name in Node examples (#469)
stainless-app[bot] Jul 18, 2024
b493aa4
chore: sync spec (#470)
stainless-app[bot] Jul 18, 2024
e1a7f9f
chore(docs): rename anthropic const to client (#471)
linus-amg Jul 23, 2024
0f6190a
chore(bedrock): use `chunk` for internal SSE parsing instead of `comp…
RobertCraigie Jul 23, 2024
6f21ecf
chore(tests): update prism version (#473)
stainless-app[bot] Jul 23, 2024
a8ca93c
fix: use relative paths (#475)
Jul 23, 2024
d2d4e36
refactor: extract model out to a named type and rename partialjson (#…
stainless-app[bot] Jul 24, 2024
8b08161
feat: add back compat alias for InputJsonDelta
yjp20 Jul 24, 2024
75f5710
fix(compat): remove ReadableStream polyfill redundant since node v16 …
stainless-app[bot] Jul 25, 2024
a247935
chore(docs): fix incorrect client var names (#479)
stainless-app[bot] Jul 26, 2024
8dc9afc
chore(internal): remove old reference to check-test-server
RobertCraigie Jul 29, 2024
dc89753
chore(internal): add constant for default timeout (#480)
stainless-app[bot] Jul 29, 2024
830fd2f
chore: release main
stainless-app[bot] Jul 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
pull_request:
branches:
- main
- next

jobs:
lint:
Expand Down
6 changes: 3 additions & 3 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
".": "0.24.3",
"packages/vertex-sdk": "0.4.0",
"packages/bedrock-sdk": "0.10.1"
".": "0.25.0",
"packages/vertex-sdk": "0.4.1",
"packages/bedrock-sdk": "0.10.2"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 2
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic-ce067ae8303fa9b7aae2e8ebf0b6e9e41509f169ba93c1807e6ed9c9e541be1a.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic-5903ec2fd4efd7f261908bc4ec8ecd6b19cb9efa79637ad273583f1b763f80fd.yml
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,41 @@
# Changelog

## 0.25.0 (2024-07-29)

Full Changelog: [sdk-v0.24.3...sdk-v0.25.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.24.3...sdk-v0.25.0)

### Features

* add back compat alias for InputJsonDelta ([8b08161](https://github.com/anthropics/anthropic-sdk-typescript/commit/8b081613a50821b8dfa8a1251d42337a20607411))
* **client:** make request-id header more accessible ([#462](https://github.com/anthropics/anthropic-sdk-typescript/issues/462)) ([5ea6f8b](https://github.com/anthropics/anthropic-sdk-typescript/commit/5ea6f8be0696e3753d8624f72328a5cba3a86056))


### Bug Fixes

* **compat:** remove ReadableStream polyfill redundant since node v16 ([#478](https://github.com/anthropics/anthropic-sdk-typescript/issues/478)) ([75f5710](https://github.com/anthropics/anthropic-sdk-typescript/commit/75f5710d57e6f72b6770d32d9c6dd71bbfb43d85))
* use relative paths ([#475](https://github.com/anthropics/anthropic-sdk-typescript/issues/475)) ([a8ca93c](https://github.com/anthropics/anthropic-sdk-typescript/commit/a8ca93cc40464dc76118f7dd72e94c52693f3d63))


### Chores

* **bedrock:** use `chunk` for internal SSE parsing instead of `completion` ([#472](https://github.com/anthropics/anthropic-sdk-typescript/issues/472)) ([0f6190a](https://github.com/anthropics/anthropic-sdk-typescript/commit/0f6190a69d8986ac3779441eba43d345ec3fb342))
* **ci:** also run workflows for PRs targeting `next` ([#464](https://github.com/anthropics/anthropic-sdk-typescript/issues/464)) ([cc405a8](https://github.com/anthropics/anthropic-sdk-typescript/commit/cc405a8cc4ea26389b9d857d75818722d0bcbfcd))
* **docs:** fix incorrect client var names ([#479](https://github.com/anthropics/anthropic-sdk-typescript/issues/479)) ([a247935](https://github.com/anthropics/anthropic-sdk-typescript/commit/a247935a86b87b90209f493921661d20c9bc6457))
* **docs:** mention lack of support for web browser runtimes ([#468](https://github.com/anthropics/anthropic-sdk-typescript/issues/468)) ([968a7fb](https://github.com/anthropics/anthropic-sdk-typescript/commit/968a7fbb6cb779d17d9f6c485c0b61f241e327bc))
* **docs:** minor update to formatting of API link in README ([#467](https://github.com/anthropics/anthropic-sdk-typescript/issues/467)) ([50b9f2b](https://github.com/anthropics/anthropic-sdk-typescript/commit/50b9f2b0c3feb4707af2b9e5f006a3f726782803))
* **docs:** rename anthropic const to client ([#471](https://github.com/anthropics/anthropic-sdk-typescript/issues/471)) ([e1a7f9f](https://github.com/anthropics/anthropic-sdk-typescript/commit/e1a7f9f813077fb033c732c004c7bda85738a321))
* **docs:** use client instead of package name in Node examples ([#469](https://github.com/anthropics/anthropic-sdk-typescript/issues/469)) ([8961ebf](https://github.com/anthropics/anthropic-sdk-typescript/commit/8961ebf54bbab898667119c8d9551e33a4de6846))
* **internal:** add constant for default timeout ([#480](https://github.com/anthropics/anthropic-sdk-typescript/issues/480)) ([dc89753](https://github.com/anthropics/anthropic-sdk-typescript/commit/dc897537789c6b4bc31ee8238aad8ffaaa65df5e))
* **internal:** minor changes to tests ([#465](https://github.com/anthropics/anthropic-sdk-typescript/issues/465)) ([c1fd563](https://github.com/anthropics/anthropic-sdk-typescript/commit/c1fd563693bd354a81e0ae55c7355144f06b7f0b))
* **internal:** remove old reference to check-test-server ([8dc9afc](https://github.com/anthropics/anthropic-sdk-typescript/commit/8dc9afcf00c4a38c2d85171ebceafc5f6a47c117))
* sync spec ([#470](https://github.com/anthropics/anthropic-sdk-typescript/issues/470)) ([b493aa4](https://github.com/anthropics/anthropic-sdk-typescript/commit/b493aa49d3d6e67be22c3e8255dd4286e6bbcdeb))
* **tests:** update prism version ([#473](https://github.com/anthropics/anthropic-sdk-typescript/issues/473)) ([6f21ecf](https://github.com/anthropics/anthropic-sdk-typescript/commit/6f21ecfd781d04a7dc83641f069bb38d5584a320))


### Refactors

* extract model out to a named type and rename partialjson ([#477](https://github.com/anthropics/anthropic-sdk-typescript/issues/477)) ([d2d4e36](https://github.com/anthropics/anthropic-sdk-typescript/commit/d2d4e36b995cc84e8a3a7c64eb614011df399c5e))

## 0.24.3 (2024-07-01)

Full Changelog: [sdk-v0.24.2...sdk-v0.24.3](https://github.com/anthropics/anthropic-sdk-typescript/compare/sdk-v0.24.2...sdk-v0.24.3)
Expand Down
41 changes: 22 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

This library provides convenient access to the Anthropic REST API from server-side TypeScript or JavaScript.

The REST API documentation can be found [on docs.anthropic.com](https://docs.anthropic.com/claude/reference/). The full API of this library can be found in [api.md](api.md).
The REST API documentation can be found on [docs.anthropic.com](https://docs.anthropic.com/claude/reference/). The full API of this library can be found in [api.md](api.md).

## Installation

Expand All @@ -20,12 +20,12 @@ The full API of this library can be found in [api.md](api.md).
```js
import Anthropic from '@anthropic-ai/sdk';

const anthropic = new Anthropic({
const client = new Anthropic({
apiKey: process.env['ANTHROPIC_API_KEY'], // This is the default and can be omitted
});

async function main() {
const message = await anthropic.messages.create({
const message = await client.messages.create({
max_tokens: 1024,
messages: [{ role: 'user', content: 'Hello, Claude' }],
model: 'claude-3-opus-20240229',
Expand All @@ -44,9 +44,9 @@ We provide support for streaming responses using Server Sent Events (SSE).
```ts
import Anthropic from '@anthropic-ai/sdk';

const anthropic = new Anthropic();
const client = new Anthropic();

const stream = await anthropic.messages.create({
const stream = await client.messages.create({
max_tokens: 1024,
messages: [{ role: 'user', content: 'Hello, Claude' }],
model: 'claude-3-opus-20240229',
Expand All @@ -68,7 +68,7 @@ This library includes TypeScript definitions for all request params and response
```ts
import Anthropic from '@anthropic-ai/sdk';

const anthropic = new Anthropic({
const client = new Anthropic({
apiKey: process.env['ANTHROPIC_API_KEY'], // This is the default and can be omitted
});

Expand All @@ -78,7 +78,7 @@ async function main() {
messages: [{ role: 'user', content: 'Hello, Claude' }],
model: 'claude-3-opus-20240229',
};
const message: Anthropic.Message = await anthropic.messages.create(params);
const message: Anthropic.Message = await client.messages.create(params);
}

main();
Expand Down Expand Up @@ -149,7 +149,7 @@ a subclass of `APIError` will be thrown:
<!-- prettier-ignore -->
```ts
async function main() {
const message = await anthropic.messages
const message = await client.messages
.create({
max_tokens: 1024,
messages: [{ role: 'user', content: 'Hello, Claude' }],
Expand Down Expand Up @@ -193,12 +193,12 @@ You can use the `maxRetries` option to configure or disable this:
<!-- prettier-ignore -->
```js
// Configure the default for all requests:
const anthropic = new Anthropic({
const client = new Anthropic({
maxRetries: 0, // default is 2
});

// Or, configure per-request:
await anthropic.messages.create({ max_tokens: 1024, messages: [{ role: 'user', content: 'Hello, Claude' }], model: 'claude-3-opus-20240229' }, {
await client.messages.create({ max_tokens: 1024, messages: [{ role: 'user', content: 'Hello, Claude' }], model: 'claude-3-opus-20240229' }, {
maxRetries: 5,
});
```
Expand All @@ -210,12 +210,12 @@ Requests time out after 10 minutes by default. You can configure this with a `ti
<!-- prettier-ignore -->
```ts
// Configure the default for all requests:
const anthropic = new Anthropic({
const client = new Anthropic({
timeout: 20 * 1000, // 20 seconds (default is 10 minutes)
});

// Override per-request:
await anthropic.messages.create({ max_tokens: 1024, messages: [{ role: 'user', content: 'Hello, Claude' }], model: 'claude-3-opus-20240229' }, {
await client.messages.create({ max_tokens: 1024, messages: [{ role: 'user', content: 'Hello, Claude' }], model: 'claude-3-opus-20240229' }, {
timeout: 5 * 1000,
});
```
Expand All @@ -235,9 +235,9 @@ Be aware that doing so may result in incorrect types and other unexpected or und
```ts
import Anthropic from '@anthropic-ai/sdk';

const anthropic = new Anthropic();
const client = new Anthropic();

const message = await anthropic.messages.create(
const message = await client.messages.create(
{
max_tokens: 1024,
messages: [{ role: 'user', content: 'Hello, Claude' }],
Expand All @@ -257,9 +257,9 @@ You can also use the `.withResponse()` method to get the raw `Response` along wi

<!-- prettier-ignore -->
```ts
const anthropic = new Anthropic();
const client = new Anthropic();

const response = await anthropic.messages
const response = await client.messages
.create({
max_tokens: 1024,
messages: [{ role: 'user', content: 'Hello, Claude' }],
Expand All @@ -269,7 +269,7 @@ const response = await anthropic.messages
console.log(response.headers.get('X-My-Header'));
console.log(response.statusText); // access the underlying Response object

const { data: message, response: raw } = await anthropic.messages
const { data: message, response: raw } = await client.messages
.create({
max_tokens: 1024,
messages: [{ role: 'user', content: 'Hello, Claude' }],
Expand Down Expand Up @@ -376,12 +376,12 @@ import http from 'http';
import { HttpsProxyAgent } from 'https-proxy-agent';

// Configure the default for all requests:
const anthropic = new Anthropic({
const client = new Anthropic({
httpAgent: new HttpsProxyAgent(process.env.PROXY_URL),
});

// Override per-request:
await anthropic.messages.create(
await client.messages.create(
{
max_tokens: 1024,
messages: [{ role: 'user', content: 'Hello, Claude' }],
Expand Down Expand Up @@ -419,6 +419,9 @@ The following runtimes are supported:
- Jest 28 or greater with the `"node"` environment (`"jsdom"` is not supported at this time).
- Nitro v2.6 or greater.

> [!WARNING]
> Web browser runtimes aren't supported. The SDK will throw an error if used in a browser environment.

Note that React Native is not supported at this time.

If you are interested in other runtime environments, please open or upvote an issue on GitHub.
3 changes: 2 additions & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ Types:
- <code><a href="./src/resources/messages.ts">ContentBlockStartEvent</a></code>
- <code><a href="./src/resources/messages.ts">ContentBlockStopEvent</a></code>
- <code><a href="./src/resources/messages.ts">ImageBlockParam</a></code>
- <code><a href="./src/resources/messages.ts">InputJsonDelta</a></code>
- <code><a href="./src/resources/messages.ts">InputJSONDelta</a></code>
- <code><a href="./src/resources/messages.ts">Message</a></code>
- <code><a href="./src/resources/messages.ts">MessageDeltaEvent</a></code>
- <code><a href="./src/resources/messages.ts">MessageDeltaUsage</a></code>
- <code><a href="./src/resources/messages.ts">MessageParam</a></code>
- <code><a href="./src/resources/messages.ts">MessageStartEvent</a></code>
- <code><a href="./src/resources/messages.ts">MessageStopEvent</a></code>
- <code><a href="./src/resources/messages.ts">MessageStreamEvent</a></code>
- <code><a href="./src/resources/messages.ts">Model</a></code>
- <code><a href="./src/resources/messages.ts">RawContentBlockDeltaEvent</a></code>
- <code><a href="./src/resources/messages.ts">RawContentBlockStartEvent</a></code>
- <code><a href="./src/resources/messages.ts">RawContentBlockStopEvent</a></code>
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@anthropic-ai/sdk",
"version": "0.24.3",
"version": "0.25.0",
"description": "The official TypeScript library for the Anthropic API",
"author": "Anthropic <[email protected]>",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -30,8 +30,7 @@
"agentkeepalive": "^4.2.1",
"form-data-encoder": "1.7.2",
"formdata-node": "^4.3.2",
"node-fetch": "^2.6.7",
"web-streams-polyfill": "^3.2.1"
"node-fetch": "^2.6.7"
},
"devDependencies": {
"@swc/core": "^1.3.102",
Expand Down
10 changes: 10 additions & 0 deletions packages/bedrock-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 0.10.2 (2024-07-29)

Full Changelog: [bedrock-sdk-v0.10.1...bedrock-sdk-v0.10.2](https://github.com/anthropics/anthropic-sdk-typescript/compare/bedrock-sdk-v0.10.1...bedrock-sdk-v0.10.2)

### Chores

* **bedrock:** use `chunk` for internal SSE parsing instead of `completion` ([#472](https://github.com/anthropics/anthropic-sdk-typescript/issues/472)) ([0f6190a](https://github.com/anthropics/anthropic-sdk-typescript/commit/0f6190a69d8986ac3779441eba43d345ec3fb342))
* **docs:** rename anthropic const to client ([#471](https://github.com/anthropics/anthropic-sdk-typescript/issues/471)) ([e1a7f9f](https://github.com/anthropics/anthropic-sdk-typescript/commit/e1a7f9f813077fb033c732c004c7bda85738a321))
* **internal:** remove old reference to check-test-server ([8dc9afc](https://github.com/anthropics/anthropic-sdk-typescript/commit/8dc9afcf00c4a38c2d85171ebceafc5f6a47c117))

## 0.10.1 (2024-06-25)

Full Changelog: [bedrock-sdk-v0.10.0...bedrock-sdk-v0.10.1](https://github.com/anthropics/anthropic-sdk-typescript/compare/bedrock-sdk-v0.10.0...bedrock-sdk-v0.10.1)
Expand Down
4 changes: 2 additions & 2 deletions packages/bedrock-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import { AnthropicBedrock } from '@anthropic-ai/bedrock-sdk';
// file or `AWS_ACCESS_KEY_ID` & `AWS_SECRET_ACCESS_KEY` environment variables.
//
// https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/setting-credentials-node.html
const anthropic = new AnthropicBedrock();
const client = new AnthropicBedrock();

async function main() {
const message = await anthropic.messages.create({
const message = await client.messages.create({
model: 'anthropic.claude-3-sonnet-20240229-v1:0',
messages: [
{
Expand Down
4 changes: 2 additions & 2 deletions packages/bedrock-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@anthropic-ai/bedrock-sdk",
"version": "0.10.1",
"version": "0.10.2",
"description": "The official TypeScript library for the Anthropic Bedrock API",
"author": "Anthropic <[email protected]>",
"types": "dist/index.d.ts",
Expand All @@ -11,7 +11,7 @@
"packageManager": "[email protected]",
"private": false,
"scripts": {
"test": "bin/check-test-server && yarn jest",
"test": "echo 'no tests defined yet' && exit 1",
"build": "bash ./build",
"prepack": "echo 'to pack, run yarn build && (cd dist; yarn pack)' && exit 1",
"prepublishOnly": "echo 'to publish, run yarn build && (cd dist; yarn publish)' && exit 1",
Expand Down
4 changes: 2 additions & 2 deletions packages/bedrock-sdk/src/streaming.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class Stream<Item> extends CoreStream<Item> {
for await (const event of eventStream) {
if (event.chunk && event.chunk.bytes) {
const s = toUtf8(event.chunk.bytes);
yield { event: 'completion', data: s, raw: [] };
yield { event: 'chunk', data: s, raw: [] };
} else if (event.internalServerException) {
yield { event: 'error', data: 'InternalServerException', raw: [] };
} else if (event.modelStreamErrorException) {
Expand All @@ -69,7 +69,7 @@ export class Stream<Item> extends CoreStream<Item> {
let done = false;
try {
for await (const sse of iterMessages()) {
if (sse.event === 'completion') {
if (sse.event === 'chunk') {
try {
yield JSON.parse(sse.data);
} catch (e) {
Expand Down
2 changes: 1 addition & 1 deletion packages/bedrock-sdk/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

"@anthropic-ai/sdk@file:../../dist":
# x-release-please-start-version
version "0.24.3"
version "0.25.0"
# x-release-please-end-version
dependencies:
"@types/node" "^18.11.18"
Expand Down
8 changes: 8 additions & 0 deletions packages/vertex-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.4.1 (2024-07-29)

Full Changelog: [vertex-sdk-v0.4.0...vertex-sdk-v0.4.1](https://github.com/anthropics/anthropic-sdk-typescript/compare/vertex-sdk-v0.4.0...vertex-sdk-v0.4.1)

### Chores

* **internal:** remove old reference to check-test-server ([8dc9afc](https://github.com/anthropics/anthropic-sdk-typescript/commit/8dc9afcf00c4a38c2d85171ebceafc5f6a47c117))

## 0.4.0 (2024-05-30)

Full Changelog: [vertex-sdk-v0.3.7...vertex-sdk-v0.4.0](https://github.com/anthropics/anthropic-sdk-typescript/compare/vertex-sdk-v0.3.7...vertex-sdk-v0.4.0)
Expand Down
4 changes: 2 additions & 2 deletions packages/vertex-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@anthropic-ai/vertex-sdk",
"version": "0.4.0",
"version": "0.4.1",
"description": "The official TypeScript library for the Anthropic Vertex API",
"author": "Anthropic <[email protected]>",
"types": "dist/index.d.ts",
Expand All @@ -11,7 +11,7 @@
"packageManager": "[email protected]",
"private": false,
"scripts": {
"test": "bin/check-test-server && yarn jest",
"test": "echo 'no tests defined yet' && exit 1",
"build": "bash ./build",
"prepack": "echo 'to pack, run yarn build && (cd dist; yarn pack)' && exit 1",
"prepublishOnly": "echo 'to publish, run yarn build && (cd dist; yarn publish)' && exit 1",
Expand Down
2 changes: 1 addition & 1 deletion packages/vertex-sdk/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

"@anthropic-ai/sdk@file:../../dist":
# x-release-please-start-version
version "0.24.3"
version "0.25.0"
# x-release-please-end-version
dependencies:
"@types/node" "^18.11.18"
Expand Down
4 changes: 2 additions & 2 deletions scripts/mock
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ echo "==> Starting mock server with URL ${URL}"

# Run prism mock on the given spec
if [ "$1" == "--daemon" ]; then
npm exec --package=@stoplight/prism-cli@~5.8 -- prism mock "$URL" &> .prism.log &
npm exec --package=@stainless-api/[email protected].4 -- prism mock "$URL" &> .prism.log &

# Wait for server to come online
echo -n "Waiting for server"
Expand All @@ -37,5 +37,5 @@ if [ "$1" == "--daemon" ]; then

echo
else
npm exec --package=@stoplight/prism-cli@~5.8 -- prism mock "$URL"
npm exec --package=@stainless-api/[email protected].4 -- prism mock "$URL"
fi
4 changes: 1 addition & 3 deletions src/_shims/node-runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ import { Readable } from 'node:stream';
import { type RequestOptions } from '../core';
import { MultipartBody } from './MultipartBody';
import { type Shims } from './registry';

// @ts-ignore (this package does not have proper export maps for this export)
import { ReadableStream } from 'web-streams-polyfill/dist/ponyfill.es2018.js';
import { ReadableStream } from 'node:stream/web';

type FileFromPathOptions = Omit<FilePropertyBag, 'lastModified'>;

Expand Down
Loading
Loading