Skip to content

release: 0.1.1 #10

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

Merged
Merged
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.1.0-alpha.4"
".": "0.1.1"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 111
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-988164042da1361feb3d28364c6f14fee775ceab496b9d79d048141c0fa6da19.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-4e3ac088751d52ff03184c39a009d093a7457f4e25dc489a938fe25ad5d83d98.yml
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## 0.1.1 (2025-02-14)

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)

### Features

* **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))


### Bug Fixes

* **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))


### Chores

* **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))

## 0.1.0-alpha.4 (2025-02-13)

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)
Expand Down
3 changes: 2 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default tseslint.config(
parserOptions: { sourceType: 'module' },
},
files: ['**/*.ts', '**/*.mts', '**/*.cts', '**/*.js', '**/*.mjs', '**/*.cjs'],
ignores: ['dist/**'],
plugins: {
'@typescript-eslint': tseslint.plugin,
'unused-imports': unusedImports,
Expand All @@ -24,7 +25,7 @@ export default tseslint.config(
{
patterns: [
{
group: ['@gitpod/sdk', '@gitpod/sdk/*'],
regex: '^@gitpod/sdk(/.*)?',
message: 'Use a relative import, not a package import.',
},
],
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": "@gitpod/sdk",
"version": "0.1.0-alpha.4",
"version": "0.1.1",
"description": "The official TypeScript library for the Gitpod API",
"author": "Gitpod <dev-feedback@gitpod.com>",
"types": "dist/index.d.ts",
Expand Down
8 changes: 4 additions & 4 deletions scripts/utils/postprocess-files.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ async function postprocess() {
if (entry.isDirectory() && entry.name !== 'src' && entry.name !== 'internal' && entry.name !== 'bin') {
const subpath = './' + entry.name;
newExports[subpath + '/*.mjs'] = {
default: subpath + '/*.mjs',
default: [subpath + '/*.mjs', subpath + '/*/index.mjs'],
};
newExports[subpath + '/*.js'] = {
default: subpath + '/*.js',
default: [subpath + '/*.js', subpath + '/*/index.js'],
};
newExports[subpath + '/*'] = {
import: subpath + '/*.mjs',
require: subpath + '/*.js',
import: [subpath + '/*.mjs', subpath + '/*/index.mjs'],
require: [subpath + '/*.js', subpath + '/*/index.js'],
};
} else if (entry.isFile() && /\.[cm]?js$/.test(entry.name)) {
const { name, ext } = path.parse(entry.name);
Expand Down
4 changes: 2 additions & 2 deletions src/internal/uploads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ interface FileLike extends BlobLike {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */
readonly lastModified: number;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */
readonly name: string;
readonly name?: string | undefined;
}
declare var FileClass: {
prototype: FileLike;
Expand Down Expand Up @@ -126,7 +126,7 @@ export async function toFile(
if (File && value instanceof File) {
return value;
}
return makeFile([await value.arrayBuffer()], value.name);
return makeFile([await value.arrayBuffer()], value.name ?? 'unknown_file');
}

if (isResponseLike(value)) {
Expand Down
4 changes: 2 additions & 2 deletions src/resources/users/pats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ export class Pats extends APIResource {
* ListPersonalAccessTokens
*/
list(
params: PatListParams,
params: PatListParams | null | undefined = {},
options?: RequestOptions,
): PagePromise<PersonalAccessTokensPersonalAccessTokensPage, PersonalAccessToken> {
const { token, pageSize, ...body } = params;
const { token, pageSize, ...body } = params ?? {};
return this._client.getAPIList(
'/gitpod.v1.UserService/ListPersonalAccessTokens',
PersonalAccessTokensPage<PersonalAccessToken>,
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.1.0-alpha.4'; // x-release-please-version
export const VERSION = '0.1.1'; // x-release-please-version
18 changes: 17 additions & 1 deletion tests/api-resources/users/pats.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const client = new Gitpod({
describe('resource pats', () => {
// skipped: tests are disabled for the time being
test.skip('list', async () => {
const responsePromise = client.users.pats.list({});
const responsePromise = client.users.pats.list();
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
const response = await responsePromise;
Expand All @@ -20,6 +20,22 @@ describe('resource pats', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});

// skipped: tests are disabled for the time being
test.skip('list: request options and params are passed correctly', async () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
client.users.pats.list(
{
token: 'token',
pageSize: 0,
filter: { userIds: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'] },
pagination: { token: 'token', pageSize: 100 },
},
{ path: '/_stainless_unknown_path' },
),
).rejects.toThrow(Gitpod.NotFoundError);
});

// skipped: tests are disabled for the time being
test.skip('delete', async () => {
const responsePromise = client.users.pats.delete({});
Expand Down