Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.3.0"
".": "0.3.1"
}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.3.1 (2026-01-07)

Full Changelog: [v0.3.0...v0.3.1](https://github.com/warpdotdev/warp-sdk-typescript/compare/v0.3.0...v0.3.1)

### Chores

* break long lines in snippets into multiline ([98aa96c](https://github.com/warpdotdev/warp-sdk-typescript/commit/98aa96ceed31e121df6b97593289bbc663178a8c))

## 0.3.0 (2026-01-05)

Full Changelog: [v0.2.0...v0.3.0](https://github.com/warpdotdev/warp-sdk-typescript/compare/v0.2.0...v0.3.0)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "warp-agent-sdk",
"version": "0.3.0",
"version": "0.3.1",
"description": "The official TypeScript library for the Warp API API",
"author": "Warp API <>",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '0.3.0'; // x-release-please-version
export const VERSION = '0.3.1'; // x-release-please-version
66 changes: 55 additions & 11 deletions tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ describe('instantiate client', () => {
error: jest.fn(),
};

const client = new WarpAPI({ logger: logger, logLevel: 'debug', apiKey: 'My API Key' });
const client = new WarpAPI({
logger: logger,
logLevel: 'debug',
apiKey: 'My API Key',
});

await forceAPIResponseForClient(client);
expect(debugMock).toHaveBeenCalled();
Expand All @@ -107,7 +111,11 @@ describe('instantiate client', () => {
error: jest.fn(),
};

const client = new WarpAPI({ logger: logger, logLevel: 'info', apiKey: 'My API Key' });
const client = new WarpAPI({
logger: logger,
logLevel: 'info',
apiKey: 'My API Key',
});

await forceAPIResponseForClient(client);
expect(debugMock).not.toHaveBeenCalled();
Expand Down Expand Up @@ -157,7 +165,11 @@ describe('instantiate client', () => {
};

process.env['WARP_API_LOG'] = 'debug';
const client = new WarpAPI({ logger: logger, logLevel: 'off', apiKey: 'My API Key' });
const client = new WarpAPI({
logger: logger,
logLevel: 'off',
apiKey: 'My API Key',
});

await forceAPIResponseForClient(client);
expect(debugMock).not.toHaveBeenCalled();
Expand All @@ -173,7 +185,11 @@ describe('instantiate client', () => {
};

process.env['WARP_API_LOG'] = 'not a log level';
const client = new WarpAPI({ logger: logger, logLevel: 'debug', apiKey: 'My API Key' });
const client = new WarpAPI({
logger: logger,
logLevel: 'debug',
apiKey: 'My API Key',
});
expect(client.logLevel).toBe('debug');
expect(warnMock).not.toHaveBeenCalled();
});
Expand Down Expand Up @@ -267,7 +283,11 @@ describe('instantiate client', () => {
return new Response(JSON.stringify({}), { headers: { 'Content-Type': 'application/json' } });
};

const client = new WarpAPI({ baseURL: 'http://localhost:5000/', apiKey: 'My API Key', fetch: testFetch });
const client = new WarpAPI({
baseURL: 'http://localhost:5000/',
apiKey: 'My API Key',
fetch: testFetch,
});

await client.patch('/foo');
expect(capturedRequest?.method).toEqual('PATCH');
Expand Down Expand Up @@ -345,7 +365,11 @@ describe('instantiate client', () => {

describe('withOptions', () => {
test('creates a new client with overridden options', async () => {
const client = new WarpAPI({ baseURL: 'http://localhost:5000/', maxRetries: 3, apiKey: 'My API Key' });
const client = new WarpAPI({
baseURL: 'http://localhost:5000/',
maxRetries: 3,
apiKey: 'My API Key',
});

const newClient = client.withOptions({
maxRetries: 5,
Expand Down Expand Up @@ -385,7 +409,11 @@ describe('instantiate client', () => {
});

test('respects runtime property changes when creating new client', () => {
const client = new WarpAPI({ baseURL: 'http://localhost:5000/', timeout: 1000, apiKey: 'My API Key' });
const client = new WarpAPI({
baseURL: 'http://localhost:5000/',
timeout: 1000,
apiKey: 'My API Key',
});

// Modify the client properties directly after creation
client.baseURL = 'http://localhost:6000/';
Expand Down Expand Up @@ -531,7 +559,11 @@ describe('retries', () => {
return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } });
};

const client = new WarpAPI({ apiKey: 'My API Key', timeout: 10, fetch: testFetch });
const client = new WarpAPI({
apiKey: 'My API Key',
timeout: 10,
fetch: testFetch,
});

expect(await client.request({ path: '/foo', method: 'get' })).toEqual({ a: 1 });
expect(count).toEqual(2);
Expand Down Expand Up @@ -561,7 +593,11 @@ describe('retries', () => {
return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } });
};

const client = new WarpAPI({ apiKey: 'My API Key', fetch: testFetch, maxRetries: 4 });
const client = new WarpAPI({
apiKey: 'My API Key',
fetch: testFetch,
maxRetries: 4,
});

expect(await client.request({ path: '/foo', method: 'get' })).toEqual({ a: 1 });

Expand All @@ -585,7 +621,11 @@ describe('retries', () => {
capturedRequest = init;
return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } });
};
const client = new WarpAPI({ apiKey: 'My API Key', fetch: testFetch, maxRetries: 4 });
const client = new WarpAPI({
apiKey: 'My API Key',
fetch: testFetch,
maxRetries: 4,
});

expect(
await client.request({
Expand Down Expand Up @@ -647,7 +687,11 @@ describe('retries', () => {
capturedRequest = init;
return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } });
};
const client = new WarpAPI({ apiKey: 'My API Key', fetch: testFetch, maxRetries: 4 });
const client = new WarpAPI({
apiKey: 'My API Key',
fetch: testFetch,
maxRetries: 4,
});

expect(
await client.request({
Expand Down