Skip to content

Commit c7a3b72

Browse files
authored
Merge pull request #105 from lumalabs/release-please--branches--main--changes--next--components--lumaai
release: 1.7.2
2 parents 1eed11e + 53d6a57 commit c7a3b72

10 files changed

Lines changed: 53 additions & 6 deletions

File tree

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.7.1"
2+
".": "1.7.2"
33
}

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Changelog
22

3+
## 1.7.2 (2025-04-04)
4+
5+
Full Changelog: [v1.7.1...v1.7.2](https://github.com/lumalabs/lumaai-node/compare/v1.7.1...v1.7.2)
6+
7+
### Bug Fixes
8+
9+
* **api:** improve type resolution when importing as a package ([#109](https://github.com/lumalabs/lumaai-node/issues/109)) ([019d3a9](https://github.com/lumalabs/lumaai-node/commit/019d3a9b0507cc9630bc5e4dec0f9033da4408bb))
10+
* **client:** send `X-Stainless-Timeout` in seconds ([#107](https://github.com/lumalabs/lumaai-node/issues/107)) ([01c1441](https://github.com/lumalabs/lumaai-node/commit/01c1441a0f1445fe2a53d0879b3c4fce16f48918))
11+
* **internal:** work around https://github.com/vercel/next.js/issues/76881 ([#104](https://github.com/lumalabs/lumaai-node/issues/104)) ([8f853dd](https://github.com/lumalabs/lumaai-node/commit/8f853dd8471237b847b2bc92aa0a4c5a39ebf1a8))
12+
13+
14+
### Chores
15+
16+
* **internal:** add aliases for Record and Array ([#108](https://github.com/lumalabs/lumaai-node/issues/108)) ([6eba380](https://github.com/lumalabs/lumaai-node/commit/6eba38067c001022a6c1eaebbd5d9df1de1e937a))
17+
318
## 1.7.1 (2025-03-27)
419

520
Full Changelog: [v1.7.0...v1.7.1](https://github.com/lumalabs/lumaai-node/compare/v1.7.0...v1.7.1)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lumaai",
3-
"version": "1.7.1",
3+
"version": "1.7.2",
44
"description": "The official TypeScript library for the LumaAI API",
55
"author": "LumaAI <support+api@lumalabs.ai>",
66
"types": "dist/index.d.ts",

packages/mcp-server/src/tools.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './tools/index';

src/_shims/index-deno.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,5 @@ export declare class FsReadStream extends Readable {
108108
const _ReadableStream = ReadableStream;
109109
type _ReadableStream = ReadableStream;
110110
export { _ReadableStream as ReadableStream };
111+
112+
export const init = () => {};

src/_shims/index.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,5 @@ export function fileFromPath(path: string, options?: FileFromPathOptions): Promi
7979
export function fileFromPath(path: string, filename?: string, options?: FileFromPathOptions): Promise<File>;
8080

8181
export function isFsReadStream(value: any): value is FsReadStream;
82+
83+
export const init: () => void;

src/_shims/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@
33
*/
44
const shims = require('./registry');
55
const auto = require('lumaai/_shims/auto/runtime');
6-
if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true });
6+
exports.init = () => {
7+
if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true });
8+
};
79
for (const property of Object.keys(shims)) {
810
Object.defineProperty(exports, property, {
911
get() {
1012
return shims[property];
1113
},
1214
});
1315
}
16+
17+
exports.init();

src/_shims/index.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,9 @@
33
*/
44
import * as shims from './registry.mjs';
55
import * as auto from 'lumaai/_shims/auto/runtime';
6-
if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true });
6+
export const init = () => {
7+
if (!shims.kind) shims.setShims(auto.getRuntime(), { auto: true });
8+
};
79
export * from './registry.mjs';
10+
11+
init();

src/core.ts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ import {
1616
type RequestInit,
1717
type Response,
1818
type HeadersInit,
19+
init,
1920
} from './_shims/index';
21+
22+
// try running side effects outside of _shims/index to workaround https://github.com/vercel/next.js/issues/76881
23+
init();
24+
2025
export { type Response };
2126
import { BlobLike, isBlobLike, isMultipartBody } from './uploads';
2227
export {
@@ -28,6 +33,20 @@ export {
2833

2934
export type Fetch = (url: RequestInfo, init?: RequestInit) => Promise<Response>;
3035

36+
/**
37+
* An alias to the builtin `Array` type so we can
38+
* easily alias it in import statements if there are name clashes.
39+
*/
40+
type _Array<T> = Array<T>;
41+
42+
/**
43+
* An alias to the builtin `Record` type so we can
44+
* easily alias it in import statements if there are name clashes.
45+
*/
46+
type _Record<K extends keyof any, T> = Record<K, T>;
47+
48+
export type { _Array as Array, _Record as Record };
49+
3150
type PromiseOrValue<T> = T | Promise<T>;
3251

3352
type APIResponseProps = {
@@ -366,7 +385,7 @@ export abstract class APIClient {
366385
getHeader(headers, 'x-stainless-timeout') === undefined &&
367386
options.timeout
368387
) {
369-
reqHeaders['x-stainless-timeout'] = String(options.timeout);
388+
reqHeaders['x-stainless-timeout'] = String(Math.trunc(options.timeout / 1000));
370389
}
371390

372391
this.validateHeaders(reqHeaders, headers);

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const VERSION = '1.7.1'; // x-release-please-version
1+
export const VERSION = '1.7.2'; // x-release-please-version

0 commit comments

Comments
 (0)