From 7d09f894abc590b8a5b5ffe7af381ab8960de28a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 16:52:29 +0000 Subject: [PATCH 1/2] chore: rebuild project due to codegen change (#244) --- .gitignore | 2 +- src/core.ts | 10 +++++----- src/error.ts | 2 +- src/index.ts | 28 +++++++++++++++------------- tsconfig.deno.json | 11 +++-------- tsconfig.json | 1 + 6 files changed, 26 insertions(+), 28 deletions(-) diff --git a/.gitignore b/.gitignore index 3eed6dd..d98d51a 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ yarn-error.log codegen.log Brewfile.lock.json dist -/deno +dist-deno /*.tgz .idea/ diff --git a/src/core.ts b/src/core.ts index 72a9a51..0d1e232 100644 --- a/src/core.ts +++ b/src/core.ts @@ -396,7 +396,7 @@ export abstract class APIClient { error: Object | undefined, message: string | undefined, headers: Headers | undefined, - ) { + ): APIError { return APIError.generate(status, error, message, headers); } @@ -668,9 +668,9 @@ export abstract class AbstractPage implements AsyncIterable { return await this.#client.requestAPIList(this.constructor as any, nextOptions); } - async *iterPages() { + async *iterPages(): AsyncGenerator { // eslint-disable-next-line @typescript-eslint/no-this-alias - let page: AbstractPage = this; + let page: this = this; yield page; while (page.hasNextPage()) { page = await page.getNextPage(); @@ -678,7 +678,7 @@ export abstract class AbstractPage implements AsyncIterable { } } - async *[Symbol.asyncIterator]() { + async *[Symbol.asyncIterator](): AsyncGenerator { for await (const page of this.iterPages()) { for (const item of page.getPaginatedItems()) { yield item; @@ -721,7 +721,7 @@ export class PagePromise< * console.log(item) * } */ - async *[Symbol.asyncIterator]() { + async *[Symbol.asyncIterator](): AsyncGenerator { const page = await this; for await (const item of page) { yield item; diff --git a/src/error.ts b/src/error.ts index 5a933e2..640877d 100644 --- a/src/error.ts +++ b/src/error.ts @@ -47,7 +47,7 @@ export class APIError extends OnebusawaySDKError { errorResponse: Object | undefined, message: string | undefined, headers: Headers | undefined, - ) { + ): APIError { if (!status) { return new APIConnectionError({ message, cause: castToError(errorResponse) }); } diff --git a/src/index.ts b/src/index.ts index cc97999..d35d2b3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -269,19 +269,21 @@ export class OnebusawaySDK extends Core.APIClient { static fileFromPath = Uploads.fileFromPath; } -export const OnebusawaySDKError = Errors.OnebusawaySDKError; -export const APIError = Errors.APIError; -export const APIConnectionError = Errors.APIConnectionError; -export const APIConnectionTimeoutError = Errors.APIConnectionTimeoutError; -export const APIUserAbortError = Errors.APIUserAbortError; -export const NotFoundError = Errors.NotFoundError; -export const ConflictError = Errors.ConflictError; -export const RateLimitError = Errors.RateLimitError; -export const BadRequestError = Errors.BadRequestError; -export const AuthenticationError = Errors.AuthenticationError; -export const InternalServerError = Errors.InternalServerError; -export const PermissionDeniedError = Errors.PermissionDeniedError; -export const UnprocessableEntityError = Errors.UnprocessableEntityError; +export { + OnebusawaySDKError, + APIError, + APIConnectionError, + APIConnectionTimeoutError, + APIUserAbortError, + NotFoundError, + ConflictError, + RateLimitError, + BadRequestError, + AuthenticationError, + InternalServerError, + PermissionDeniedError, + UnprocessableEntityError, +} from './error'; export import toFile = Uploads.toFile; export import fileFromPath = Uploads.fileFromPath; diff --git a/tsconfig.deno.json b/tsconfig.deno.json index 01ce651..849e070 100644 --- a/tsconfig.deno.json +++ b/tsconfig.deno.json @@ -1,19 +1,14 @@ { "extends": "./tsconfig.json", - "include": ["deno"], + "include": ["dist-deno"], "exclude": [], "compilerOptions": { - "rootDir": "./deno", + "rootDir": "./dist-deno", "lib": ["es2020", "DOM"], - "paths": { - "onebusaway-sdk/_shims/auto/*": ["deno/_shims/auto/*-deno"], - "onebusaway-sdk/*": ["deno/*"], - "onebusaway-sdk": ["deno/index.ts"], - }, "noEmit": true, "declaration": true, "declarationMap": true, - "outDir": "deno", + "outDir": "dist-deno", "pretty": true, "sourceMap": true } diff --git a/tsconfig.json b/tsconfig.json index e5001c3..20db1e0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -32,6 +32,7 @@ "noUncheckedIndexedAccess": true, "noImplicitOverride": true, "noPropertyAccessFromIndexSignature": true, + "isolatedModules": false, "skipLibCheck": true } From 9d343993ef777846e72f744a5a15b4fa1780888e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 16:52:45 +0000 Subject: [PATCH 2/2] release: 1.2.5 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ package-lock.json | 4 ++-- package.json | 2 +- src/version.ts | 2 +- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 8d35a90..7454888 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.2.4" + ".": "1.2.5" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 00ae10c..a8e13ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.2.5 (2024-11-01) + +Full Changelog: [v1.2.4...v1.2.5](https://github.com/OneBusAway/js-sdk/compare/v1.2.4...v1.2.5) + +### Chores + +* rebuild project due to codegen change ([#244](https://github.com/OneBusAway/js-sdk/issues/244)) ([7d09f89](https://github.com/OneBusAway/js-sdk/commit/7d09f894abc590b8a5b5ffe7af381ab8960de28a)) + ## 1.2.4 (2024-11-01) Full Changelog: [v1.2.3...v1.2.4](https://github.com/OneBusAway/js-sdk/compare/v1.2.3...v1.2.4) diff --git a/package-lock.json b/package-lock.json index 7358748..da64033 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "onebusaway-sdk", - "version": "1.2.4", + "version": "1.2.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "onebusaway-sdk", - "version": "1.2.4", + "version": "1.2.5", "license": "Apache-2.0", "dependencies": { "@types/node": "^18.11.18", diff --git a/package.json b/package.json index c501b73..365187b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "onebusaway-sdk", - "version": "1.2.4", + "version": "1.2.5", "description": "The official TypeScript library for the Onebusaway SDK API", "author": "Onebusaway SDK ", "types": "dist/index.d.ts", diff --git a/src/version.ts b/src/version.ts index c4d4505..2b01f88 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '1.2.4'; // x-release-please-version +export const VERSION = '1.2.5'; // x-release-please-version