Skip to content

Commit b9cad84

Browse files
authored
Merge pull request #24 from onkernel/release-please--branches--main--changes--next--components--sdk
release: 0.5.0
2 parents f48215c + 457ed8c commit b9cad84

File tree

19 files changed

+119
-112
lines changed

19 files changed

+119
-112
lines changed

.release-please-manifest.json

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

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 11
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-64ccdff4ca5d73d79d89e817fe83ccfd3d529696df3e6818c3c75e586ae00801.yml
3-
openapi_spec_hash: 21c7b8757fc0cc9415cda1bc06251de6
4-
config_hash: b3fcacd707da56b21d31ce0baf4fb87d
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-4502c65bef0843a6ae96d23bba075433af6bab49b55b544b1522f63e7881c00c.yml
3+
openapi_spec_hash: 3e67b77bbc8cd6155b8f66f3271f2643
4+
config_hash: c6bab7ac8da570a5abbcfb19db119b6b

CHANGELOG.md

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

3+
## 0.5.0 (2025-06-04)
4+
5+
Full Changelog: [v0.4.0...v0.5.0](https://github.com/onkernel/kernel-node-sdk/compare/v0.4.0...v0.5.0)
6+
7+
### Features
8+
9+
* **api:** update via SDK Studio ([8622a14](https://github.com/onkernel/kernel-node-sdk/commit/8622a147a7919f2edd3aa41dfa3ab0a89a7146c8))
10+
* **api:** update via SDK Studio ([285e2b1](https://github.com/onkernel/kernel-node-sdk/commit/285e2b18ef1458eee08daa75e26ac65884cbac92))
11+
12+
13+
### Bug Fixes
14+
15+
* compat with more runtimes ([9862639](https://github.com/onkernel/kernel-node-sdk/commit/98626394921ac1b3ec0b91d4800d0070e90373aa))
16+
17+
18+
### Chores
19+
20+
* adjust eslint.config.mjs ignore pattern ([8e7e28a](https://github.com/onkernel/kernel-node-sdk/commit/8e7e28aac90753040d3eb24320c6a758266d4391))
21+
* **deps:** bump eslint-plugin-prettier ([d3c4417](https://github.com/onkernel/kernel-node-sdk/commit/d3c4417538150b91be13854d837938113ce6a09f))
22+
* **docs:** use top-level-await in example snippets ([ac334e0](https://github.com/onkernel/kernel-node-sdk/commit/ac334e0fb49f98a15e1318c6754838ae17b036d9))
23+
* **internal:** codegen related update ([1d16505](https://github.com/onkernel/kernel-node-sdk/commit/1d16505b24c6ee4236cf982ac710bb351006b955))
24+
* **internal:** fix readablestream types in node 20 ([77cdbc2](https://github.com/onkernel/kernel-node-sdk/commit/77cdbc227d624567aa460e3659bdb30678548a26))
25+
* **internal:** update jest config ([3248860](https://github.com/onkernel/kernel-node-sdk/commit/3248860f264c1a24c3721eeb5a79c59f6f53dd7f))
26+
* **internal:** version bump ([870e534](https://github.com/onkernel/kernel-node-sdk/commit/870e534210b2ccdebdbeee4f1346d32bb321c756))
27+
328
## 0.4.0 (2025-05-28)
429

530
Full Changelog: [v0.3.0...v0.4.0](https://github.com/onkernel/kernel-node-sdk/compare/v0.3.0...v0.4.0)

README.md

Lines changed: 23 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,14 @@ const client = new Kernel({
2727
environment: 'development', // defaults to 'production'
2828
});
2929

30-
async function main() {
31-
const deployment = await client.apps.deployments.create({
32-
entrypoint_rel_path: 'main.ts',
33-
file: fs.createReadStream('path/to/file'),
34-
env_vars: { OPENAI_API_KEY: 'x' },
35-
version: '1.0.0',
36-
});
37-
38-
console.log(deployment.apps);
39-
}
30+
const deployment = await client.apps.deployments.create({
31+
entrypoint_rel_path: 'main.ts',
32+
file: fs.createReadStream('path/to/file'),
33+
env_vars: { OPENAI_API_KEY: 'x' },
34+
version: '1.0.0',
35+
});
4036

41-
main();
37+
console.log(deployment.apps);
4238
```
4339

4440
### Request & Response types
@@ -54,15 +50,11 @@ const client = new Kernel({
5450
environment: 'development', // defaults to 'production'
5551
});
5652

57-
async function main() {
58-
const params: Kernel.BrowserCreateParams = {
59-
invocation_id: 'REPLACE_ME',
60-
persistence: { id: 'browser-for-user-1234' },
61-
};
62-
const browser: Kernel.BrowserCreateResponse = await client.browsers.create(params);
63-
}
64-
65-
main();
53+
const params: Kernel.BrowserCreateParams = {
54+
invocation_id: 'REPLACE_ME',
55+
persistence: { id: 'browser-for-user-1234' },
56+
};
57+
const browser: Kernel.BrowserCreateResponse = await client.browsers.create(params);
6658
```
6759

6860
Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
@@ -119,21 +111,17 @@ a subclass of `APIError` will be thrown:
119111

120112
<!-- prettier-ignore -->
121113
```ts
122-
async function main() {
123-
const browser = await client.browsers
124-
.create({ invocation_id: 'REPLACE_ME', persistence: { id: 'browser-for-user-1234' } })
125-
.catch(async (err) => {
126-
if (err instanceof Kernel.APIError) {
127-
console.log(err.status); // 400
128-
console.log(err.name); // BadRequestError
129-
console.log(err.headers); // {server: 'nginx', ...}
130-
} else {
131-
throw err;
132-
}
133-
});
134-
}
135-
136-
main();
114+
const browser = await client.browsers
115+
.create({ invocation_id: 'REPLACE_ME', persistence: { id: 'browser-for-user-1234' } })
116+
.catch(async (err) => {
117+
if (err instanceof Kernel.APIError) {
118+
console.log(err.status); // 400
119+
console.log(err.name); // BadRequestError
120+
console.log(err.headers); // {server: 'nginx', ...}
121+
} else {
122+
throw err;
123+
}
124+
});
137125
```
138126

139127
Error codes are as follows:

eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default tseslint.config(
1010
parserOptions: { sourceType: 'module' },
1111
},
1212
files: ['**/*.ts', '**/*.mts', '**/*.cts', '**/*.js', '**/*.mjs', '**/*.cjs'],
13-
ignores: ['dist/**'],
13+
ignores: ['dist/'],
1414
plugins: {
1515
'@typescript-eslint': tseslint.plugin,
1616
'unused-imports': unusedImports,

jest.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const config: JestConfigWithTsJest = {
1515
'<rootDir>/dist/',
1616
'<rootDir>/deno/',
1717
'<rootDir>/deno_tests/',
18+
'<rootDir>/packages/',
1819
],
1920
testPathIgnorePatterns: ['scripts'],
2021
};

package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@onkernel/sdk",
3-
"version": "0.4.0",
3+
"version": "0.5.0",
44
"description": "The official TypeScript library for the Kernel API",
55
"author": "Kernel <>",
66
"types": "dist/index.d.ts",
@@ -34,7 +34,7 @@
3434
"@typescript-eslint/eslint-plugin": "8.31.1",
3535
"@typescript-eslint/parser": "8.31.1",
3636
"eslint": "^9.20.1",
37-
"eslint-plugin-prettier": "^5.2.3",
37+
"eslint-plugin-prettier": "^5.4.1",
3838
"eslint-plugin-unused-imports": "^4.1.4",
3939
"iconv-lite": "^0.6.3",
4040
"jest": "^29.4.0",
@@ -46,9 +46,6 @@
4646
"tsconfig-paths": "^4.0.0",
4747
"typescript": "5.8.3"
4848
},
49-
"resolutions": {
50-
"synckit": "0.8.8"
51-
},
5249
"imports": {
5350
"@onkernel/sdk": ".",
5451
"@onkernel/sdk/*": "./src/*"

scripts/build

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ npm exec tsc-multi
3737
# when building .mjs
3838
node scripts/utils/fix-index-exports.cjs
3939
cp tsconfig.dist-src.json dist/src/tsconfig.json
40-
cp src/internal/shim-types.d.ts dist/internal/shim-types.d.ts
41-
cp src/internal/shim-types.d.ts dist/internal/shim-types.d.mts
4240

4341
node scripts/utils/postprocess-files.cjs
4442

src/internal/detect-platform.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ const getPlatformProperties = (): PlatformProperties => {
8585
return {
8686
'X-Stainless-Lang': 'js',
8787
'X-Stainless-Package-Version': VERSION,
88-
'X-Stainless-OS': normalizePlatform((globalThis as any).process.platform),
89-
'X-Stainless-Arch': normalizeArch((globalThis as any).process.arch),
88+
'X-Stainless-OS': normalizePlatform((globalThis as any).process.platform ?? 'unknown'),
89+
'X-Stainless-Arch': normalizeArch((globalThis as any).process.arch ?? 'unknown'),
9090
'X-Stainless-Runtime': 'node',
91-
'X-Stainless-Runtime-Version': (globalThis as any).process.version,
91+
'X-Stainless-Runtime-Version': (globalThis as any).process.version ?? 'unknown',
9292
};
9393
}
9494

src/internal/shim-types.d.ts

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)