Skip to content

release: 0.1.0-alpha.4 #2

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
29 changes: 0 additions & 29 deletions .eslintrc.js

This file was deleted.

41 changes: 0 additions & 41 deletions .github/workflows/create-releases.yml

This file was deleted.

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

release:
types: [published]

jobs:
publish:
name: publish
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,5 @@ jobs:
run: |
bash ./bin/check-release-environment
env:
STAINLESS_API_KEY: ${{ secrets.STAINLESS_API_KEY }}
NPM_TOKEN: ${{ secrets.GITPOD_NPM_TOKEN || secrets.NPM_TOKEN }}

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.0.1-alpha.0"
".": "0.1.0-alpha.4"
}
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-36f9d46890bf3667f5a6529bdb156fe1560834ad8187c4271aa0b0024de1adb5.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-988164042da1361feb3d28364c6f14fee775ceab496b9d79d048141c0fa6da19.yml
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Changelog

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

### Features

* **api:** manual updates ([5c68c60](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/5c68c60a7762bd7b848859694b940cd5dd964d43))
* **api:** manual updates ([d849bff](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/d849bff6aebcaf5f1a105e549aae1adb0a11edc5))
* **api:** manual updates ([56d5f57](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/56d5f57d2e1f7dea579ce9fe42b17ea62c6c65ad))
* **api:** manual updates ([d762a2d](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/d762a2dc396245e439f934a76d027811326622c9))
* **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))
* **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))
* **api:** switch to new typescript design ([d6254ed](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/d6254ed59ff136362bd409ec0700f655d8ac55cd))
* **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))


### Chores

* go live ([#1](https://github.com/gitpod-io/gitpod-sdk-typescript/issues/1)) ([92314de](https://github.com/gitpod-io/gitpod-sdk-typescript/commit/92314dea88f7a096397e0e15f0621e86eab33df4))
* **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))
* **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))
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

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

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

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

Expand Down
4 changes: 0 additions & 4 deletions bin/check-release-environment
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

errors=()

if [ -z "${STAINLESS_API_KEY}" ]; then
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.")
fi

if [ -z "${NPM_TOKEN}" ]; then
errors+=("The GITPOD_NPM_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets")
fi
Expand Down
41 changes: 41 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// @ts-check
import tseslint from 'typescript-eslint';
import unusedImports from 'eslint-plugin-unused-imports';
import prettier from 'eslint-plugin-prettier';

export default tseslint.config(
{
languageOptions: {
parser: tseslint.parser,
parserOptions: { sourceType: 'module' },
},
files: ['**/*.ts', '**/*.mts', '**/*.cts', '**/*.js', '**/*.mjs', '**/*.cjs'],
plugins: {
'@typescript-eslint': tseslint.plugin,
'unused-imports': unusedImports,
prettier,
},
rules: {
'no-unused-vars': 'off',
'prettier/prettier': 'error',
'unused-imports/no-unused-imports': 'error',
'no-restricted-imports': [
'error',
{
patterns: [
{
group: ['@gitpod/sdk', '@gitpod/sdk/*'],
message: 'Use a relative import, not a package import.',
},
],
},
],
},
},
{
files: ['tests/**', 'examples/**'],
rules: {
'no-restricted-imports': 'off',
},
},
);
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gitpod/sdk",
"version": "0.0.1-alpha.0",
"version": "0.1.0-alpha.4",
"description": "The official TypeScript library for the Gitpod API",
"author": "Gitpod <[email protected]>",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -30,11 +30,12 @@
"@swc/jest": "^0.2.29",
"@types/jest": "^29.4.0",
"@types/node": "^20.17.6",
"@typescript-eslint/eslint-plugin": "^6.7.0",
"@typescript-eslint/parser": "^6.0.0",
"eslint": "^8.49.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-unused-imports": "^3.0.0",
"typescript-eslint": "^8.24.0",
"@typescript-eslint/eslint-plugin": "^8.24.0",
"@typescript-eslint/parser": "^8.24.0",
"eslint": "^9.20.1",
"eslint-plugin-prettier": "^5.2.3",
"eslint-plugin-unused-imports": "^4.1.4",
"iconv-lite": "^0.6.3",
"jest": "^29.4.0",
"prettier": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion scripts/format
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ set -e
cd "$(dirname "$0")/.."

echo "==> Running eslint --fix"
ESLINT_USE_FLAT_CONFIG="false" ./node_modules/.bin/eslint --fix --ext ts,js .
./node_modules/.bin/eslint --fix .
2 changes: 1 addition & 1 deletion scripts/lint
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e
cd "$(dirname "$0")/.."

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

echo "==> Building"
./scripts/build # also checks types
Expand Down
18 changes: 0 additions & 18 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,24 +472,6 @@ export class Gitpod {
return url.toString();
}

private calculateContentLength(body: unknown): string | null {
if (typeof body === 'string') {
if (typeof (globalThis as any).Buffer !== 'undefined') {
return (globalThis as any).Buffer.byteLength(body, 'utf8').toString();
}

if (typeof (globalThis as any).TextEncoder !== 'undefined') {
const encoder = new (globalThis as any).TextEncoder();
const encoded = encoder.encode(body);
return encoded.length.toString();
}
} else if (ArrayBuffer.isView(body)) {
return body.byteLength.toString();
}

return null;
}

/**
* Used as a callback for mutating the given `FinalRequestOptions` object.
*/
Expand Down
1 change: 0 additions & 1 deletion src/pagination.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export abstract class AbstractPage<Item> implements AsyncIterable<Item> {
}

async *iterPages(): AsyncGenerator<this> {
// eslint-disable-next-line @typescript-eslint/no-this-alias
let page: this = this;
yield page;
while (page.hasNextPage()) {
Expand Down
Loading