Skip to content

Commit bdb1c14

Browse files
release: 0.1.0-alpha.4 (#2)
* chore: go live (#1) * chore(internal): remove unused method (#3) * chore(internal): migrate to eslint v9 (#4) * feat(api): update with latest API spec (#5) * feat(api): manual updates (#6) * feat(api): Overview page updates (#7) * release: 0.1.0-alpha.4 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 5c68c60 commit bdb1c14

33 files changed

+1045
-737
lines changed

.eslintrc.js

-29
This file was deleted.

.github/workflows/create-releases.yml

-41
This file was deleted.

.github/workflows/publish-npm.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
# workflow for re-running publishing to NPM in case it fails for some reason
2-
# you can run this workflow by navigating to https://www.github.com/gitpod-io/gitpod-sdk-typescript/actions/workflows/publish-npm.yml
1+
# This workflow is triggered when a GitHub release is created.
2+
# It can also be run manually to re-publish to NPM in case it failed for some reason.
3+
# You can run this workflow by navigating to https://www.github.com/gitpod-io/gitpod-sdk-typescript/actions/workflows/publish-npm.yml
34
name: Publish NPM
45
on:
56
workflow_dispatch:
67

8+
release:
9+
types: [published]
10+
711
jobs:
812
publish:
913
name: publish

.github/workflows/release-doctor.yml

-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,5 @@ jobs:
1818
run: |
1919
bash ./bin/check-release-environment
2020
env:
21-
STAINLESS_API_KEY: ${{ secrets.STAINLESS_API_KEY }}
2221
NPM_TOKEN: ${{ secrets.GITPOD_NPM_TOKEN || secrets.NPM_TOKEN }}
2322

.release-please-manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.0.1-alpha.0"
2+
".": "0.1.0-alpha.4"
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-36f9d46890bf3667f5a6529bdb156fe1560834ad8187c4271aa0b0024de1adb5.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-988164042da1361feb3d28364c6f14fee775ceab496b9d79d048141c0fa6da19.yml

CHANGELOG.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Changelog
2+
3+
## 0.1.0-alpha.4 (2025-02-13)
4+
5+
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)
6+
7+
### Features
8+
9+
* **api:** manual updates ([5c68c60](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/5c68c60a7762bd7b848859694b940cd5dd964d43))
10+
* **api:** manual updates ([d849bff](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/d849bff6aebcaf5f1a105e549aae1adb0a11edc5))
11+
* **api:** manual updates ([56d5f57](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/56d5f57d2e1f7dea579ce9fe42b17ea62c6c65ad))
12+
* **api:** manual updates ([d762a2d](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/d762a2dc396245e439f934a76d027811326622c9))
13+
* **api:** manual updates ([#6](https://github.com/gitpod-io/gitpod-sdk-typescript/issues/6)) ([78dba3a](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/78dba3a84e0f7c8c1756f6409e29839b49139843))
14+
* **api:** Overview page updates ([#7](https://github.com/gitpod-io/gitpod-sdk-typescript/issues/7)) ([02120d9](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/02120d96844eeaa4e0de4c24d05eb79f2eef768e))
15+
* **api:** switch to new typescript design ([d6254ed](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/d6254ed59ff136362bd409ec0700f655d8ac55cd))
16+
* **api:** update with latest API spec ([#5](https://github.com/gitpod-io/gitpod-sdk-typescript/issues/5)) ([a0e6a16](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/a0e6a16857ed8d1cb985303d27c58e8cfc8bfa47))
17+
18+
19+
### Chores
20+
21+
* go live ([#1](https://github.com/gitpod-io/gitpod-sdk-typescript/issues/1)) ([92314de](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/92314dea88f7a096397e0e15f0621e86eab33df4))
22+
* **internal:** migrate to eslint v9 ([#4](https://github.com/gitpod-io/gitpod-sdk-typescript/issues/4)) ([0bbb2de](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/0bbb2de50b0c2c8f8f8bfd084da763a2f4a94e1e))
23+
* **internal:** remove unused method ([#3](https://github.com/gitpod-io/gitpod-sdk-typescript/issues/3)) ([e8497fb](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/e8497fb8c7509cd376f8e8513f6b89c847776c2c))

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
This library provides convenient access to the Gitpod REST API from server-side TypeScript or JavaScript.
66

7-
The REST API documentation can be found on [docs.gitpod.com](https://docs.gitpod.com). The full API of this library can be found in [api.md](api.md).
7+
The REST API documentation can be found on [docs.gitpod.io](https://docs.gitpod.io). The full API of this library can be found in [api.md](api.md).
88

99
It is generated with [Stainless](https://www.stainlessapi.com/).
1010

bin/check-release-environment

-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22

33
errors=()
44

5-
if [ -z "${STAINLESS_API_KEY}" ]; then
6-
errors+=("The STAINLESS_API_KEY secret has not been set. Please contact Stainless for an API key & set it in your organization secrets on GitHub.")
7-
fi
8-
95
if [ -z "${NPM_TOKEN}" ]; then
106
errors+=("The GITPOD_NPM_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets")
117
fi

eslint.config.mjs

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// @ts-check
2+
import tseslint from 'typescript-eslint';
3+
import unusedImports from 'eslint-plugin-unused-imports';
4+
import prettier from 'eslint-plugin-prettier';
5+
6+
export default tseslint.config(
7+
{
8+
languageOptions: {
9+
parser: tseslint.parser,
10+
parserOptions: { sourceType: 'module' },
11+
},
12+
files: ['**/*.ts', '**/*.mts', '**/*.cts', '**/*.js', '**/*.mjs', '**/*.cjs'],
13+
plugins: {
14+
'@typescript-eslint': tseslint.plugin,
15+
'unused-imports': unusedImports,
16+
prettier,
17+
},
18+
rules: {
19+
'no-unused-vars': 'off',
20+
'prettier/prettier': 'error',
21+
'unused-imports/no-unused-imports': 'error',
22+
'no-restricted-imports': [
23+
'error',
24+
{
25+
patterns: [
26+
{
27+
group: ['@gitpod/sdk', '@gitpod/sdk/*'],
28+
message: 'Use a relative import, not a package import.',
29+
},
30+
],
31+
},
32+
],
33+
},
34+
},
35+
{
36+
files: ['tests/**', 'examples/**'],
37+
rules: {
38+
'no-restricted-imports': 'off',
39+
},
40+
},
41+
);

package.json

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gitpod/sdk",
3-
"version": "0.0.1-alpha.0",
3+
"version": "0.1.0-alpha.4",
44
"description": "The official TypeScript library for the Gitpod API",
55
"author": "Gitpod <[email protected]>",
66
"types": "dist/index.d.ts",
@@ -30,11 +30,12 @@
3030
"@swc/jest": "^0.2.29",
3131
"@types/jest": "^29.4.0",
3232
"@types/node": "^20.17.6",
33-
"@typescript-eslint/eslint-plugin": "^6.7.0",
34-
"@typescript-eslint/parser": "^6.0.0",
35-
"eslint": "^8.49.0",
36-
"eslint-plugin-prettier": "^5.0.1",
37-
"eslint-plugin-unused-imports": "^3.0.0",
33+
"typescript-eslint": "^8.24.0",
34+
"@typescript-eslint/eslint-plugin": "^8.24.0",
35+
"@typescript-eslint/parser": "^8.24.0",
36+
"eslint": "^9.20.1",
37+
"eslint-plugin-prettier": "^5.2.3",
38+
"eslint-plugin-unused-imports": "^4.1.4",
3839
"iconv-lite": "^0.6.3",
3940
"jest": "^29.4.0",
4041
"prettier": "^3.0.0",

scripts/format

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ set -e
55
cd "$(dirname "$0")/.."
66

77
echo "==> Running eslint --fix"
8-
ESLINT_USE_FLAT_CONFIG="false" ./node_modules/.bin/eslint --fix --ext ts,js .
8+
./node_modules/.bin/eslint --fix .

scripts/lint

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -e
55
cd "$(dirname "$0")/.."
66

77
echo "==> Running eslint"
8-
ESLINT_USE_FLAT_CONFIG="false" ./node_modules/.bin/eslint --ext ts,js .
8+
./node_modules/.bin/eslint .
99

1010
echo "==> Building"
1111
./scripts/build # also checks types

src/client.ts

-18
Original file line numberDiff line numberDiff line change
@@ -472,24 +472,6 @@ export class Gitpod {
472472
return url.toString();
473473
}
474474

475-
private calculateContentLength(body: unknown): string | null {
476-
if (typeof body === 'string') {
477-
if (typeof (globalThis as any).Buffer !== 'undefined') {
478-
return (globalThis as any).Buffer.byteLength(body, 'utf8').toString();
479-
}
480-
481-
if (typeof (globalThis as any).TextEncoder !== 'undefined') {
482-
const encoder = new (globalThis as any).TextEncoder();
483-
const encoded = encoder.encode(body);
484-
return encoded.length.toString();
485-
}
486-
} else if (ArrayBuffer.isView(body)) {
487-
return body.byteLength.toString();
488-
}
489-
490-
return null;
491-
}
492-
493475
/**
494476
* Used as a callback for mutating the given `FinalRequestOptions` object.
495477
*/

src/pagination.ts

-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ export abstract class AbstractPage<Item> implements AsyncIterable<Item> {
4646
}
4747

4848
async *iterPages(): AsyncGenerator<this> {
49-
// eslint-disable-next-line @typescript-eslint/no-this-alias
5049
let page: this = this;
5150
yield page;
5251
while (page.hasNextPage()) {

0 commit comments

Comments
 (0)