Skip to content

Commit 6a04cdb

Browse files
authoredFeb 14, 2025··
release: 0.1.1 (#10)
* codegen metadata * chore(internal): update eslint config (#9) * fix(client): fix export map for index exports, accept BunFile (#11) * feat(api): dummy change to cause a version PR (#12) * release: 0.1.1 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent bdb1c14 commit 6a04cdb

File tree

10 files changed

+49
-14
lines changed

10 files changed

+49
-14
lines changed
 

‎.release-please-manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.1.0-alpha.4"
2+
".": "0.1.1"
33
}

‎.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 111
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-988164042da1361feb3d28364c6f14fee775ceab496b9d79d048141c0fa6da19.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-4e3ac088751d52ff03184c39a009d093a7457f4e25dc489a938fe25ad5d83d98.yml

‎CHANGELOG.md

+18
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# Changelog
22

3+
## 0.1.1 (2025-02-14)
4+
5+
Full Changelog: [v0.1.0-alpha.4...v0.1.1](https://github.com/gitpod-io/gitpod-sdk-typescript/compare/v0.1.0-alpha.4...v0.1.1)
6+
7+
### Features
8+
9+
* **api:** dummy change to cause a version PR ([#12](https://github.com/gitpod-io/gitpod-sdk-typescript/issues/12)) ([394d363](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/394d36352fafe2331e4e554fdeaa4c002cf879ea))
10+
11+
12+
### Bug Fixes
13+
14+
* **client:** fix export map for index exports, accept BunFile ([#11](https://github.com/gitpod-io/gitpod-sdk-typescript/issues/11)) ([26ada5f](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/26ada5f30ba94e0fa0640b1e4645a7c37f30385a))
15+
16+
17+
### Chores
18+
19+
* **internal:** update eslint config ([#9](https://github.com/gitpod-io/gitpod-sdk-typescript/issues/9)) ([9729975](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/9729975380bd7890239e813c30df668b5a7ff63d))
20+
321
## 0.1.0-alpha.4 (2025-02-13)
422

523
Full Changelog: [v0.0.1-alpha.0...v0.1.0-alpha.4](https://github.com/gitpod-io/gitpod-sdk-typescript/compare/v0.0.1-alpha.0...v0.1.0-alpha.4)

‎eslint.config.mjs

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export default tseslint.config(
1010
parserOptions: { sourceType: 'module' },
1111
},
1212
files: ['**/*.ts', '**/*.mts', '**/*.cts', '**/*.js', '**/*.mjs', '**/*.cjs'],
13+
ignores: ['dist/**'],
1314
plugins: {
1415
'@typescript-eslint': tseslint.plugin,
1516
'unused-imports': unusedImports,
@@ -24,7 +25,7 @@ export default tseslint.config(
2425
{
2526
patterns: [
2627
{
27-
group: ['@gitpod/sdk', '@gitpod/sdk/*'],
28+
regex: '^@gitpod/sdk(/.*)?',
2829
message: 'Use a relative import, not a package import.',
2930
},
3031
],

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gitpod/sdk",
3-
"version": "0.1.0-alpha.4",
3+
"version": "0.1.1",
44
"description": "The official TypeScript library for the Gitpod API",
55
"author": "Gitpod <dev-feedback@gitpod.com>",
66
"types": "dist/index.d.ts",

‎scripts/utils/postprocess-files.cjs

+4-4
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ async function postprocess() {
5050
if (entry.isDirectory() && entry.name !== 'src' && entry.name !== 'internal' && entry.name !== 'bin') {
5151
const subpath = './' + entry.name;
5252
newExports[subpath + '/*.mjs'] = {
53-
default: subpath + '/*.mjs',
53+
default: [subpath + '/*.mjs', subpath + '/*/index.mjs'],
5454
};
5555
newExports[subpath + '/*.js'] = {
56-
default: subpath + '/*.js',
56+
default: [subpath + '/*.js', subpath + '/*/index.js'],
5757
};
5858
newExports[subpath + '/*'] = {
59-
import: subpath + '/*.mjs',
60-
require: subpath + '/*.js',
59+
import: [subpath + '/*.mjs', subpath + '/*/index.mjs'],
60+
require: [subpath + '/*.js', subpath + '/*/index.js'],
6161
};
6262
} else if (entry.isFile() && /\.[cm]?js$/.test(entry.name)) {
6363
const { name, ext } = path.parse(entry.name);

‎src/internal/uploads.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ interface FileLike extends BlobLike {
5252
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */
5353
readonly lastModified: number;
5454
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */
55-
readonly name: string;
55+
readonly name?: string | undefined;
5656
}
5757
declare var FileClass: {
5858
prototype: FileLike;
@@ -126,7 +126,7 @@ export async function toFile(
126126
if (File && value instanceof File) {
127127
return value;
128128
}
129-
return makeFile([await value.arrayBuffer()], value.name);
129+
return makeFile([await value.arrayBuffer()], value.name ?? 'unknown_file');
130130
}
131131

132132
if (isResponseLike(value)) {

‎src/resources/users/pats.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ export class Pats extends APIResource {
1111
* ListPersonalAccessTokens
1212
*/
1313
list(
14-
params: PatListParams,
14+
params: PatListParams | null | undefined = {},
1515
options?: RequestOptions,
1616
): PagePromise<PersonalAccessTokensPersonalAccessTokensPage, PersonalAccessToken> {
17-
const { token, pageSize, ...body } = params;
17+
const { token, pageSize, ...body } = params ?? {};
1818
return this._client.getAPIList(
1919
'/gitpod.v1.UserService/ListPersonalAccessTokens',
2020
PersonalAccessTokensPage<PersonalAccessToken>,

‎src/version.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const VERSION = '0.1.0-alpha.4'; // x-release-please-version
1+
export const VERSION = '0.1.1'; // x-release-please-version

‎tests/api-resources/users/pats.test.ts

+17-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const client = new Gitpod({
1010
describe('resource pats', () => {
1111
// skipped: tests are disabled for the time being
1212
test.skip('list', async () => {
13-
const responsePromise = client.users.pats.list({});
13+
const responsePromise = client.users.pats.list();
1414
const rawResponse = await responsePromise.asResponse();
1515
expect(rawResponse).toBeInstanceOf(Response);
1616
const response = await responsePromise;
@@ -20,6 +20,22 @@ describe('resource pats', () => {
2020
expect(dataAndResponse.response).toBe(rawResponse);
2121
});
2222

23+
// skipped: tests are disabled for the time being
24+
test.skip('list: request options and params are passed correctly', async () => {
25+
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
26+
await expect(
27+
client.users.pats.list(
28+
{
29+
token: 'token',
30+
pageSize: 0,
31+
filter: { userIds: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'] },
32+
pagination: { token: 'token', pageSize: 100 },
33+
},
34+
{ path: '/_stainless_unknown_path' },
35+
),
36+
).rejects.toThrow(Gitpod.NotFoundError);
37+
});
38+
2339
// skipped: tests are disabled for the time being
2440
test.skip('delete', async () => {
2541
const responsePromise = client.users.pats.delete({});

0 commit comments

Comments
 (0)
Please sign in to comment.