Skip to content
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

release: 1.2.5 #245

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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ yarn-error.log
codegen.log
Brewfile.lock.json
dist
/deno
dist-deno
/*.tgz
.idea/

2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.2.4"
".": "1.2.5"
}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>",
"types": "dist/index.d.ts",
Expand Down
10 changes: 5 additions & 5 deletions src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -668,17 +668,17 @@ export abstract class AbstractPage<Item> implements AsyncIterable<Item> {
return await this.#client.requestAPIList(this.constructor as any, nextOptions);
}

async *iterPages() {
async *iterPages(): AsyncGenerator<this> {
// eslint-disable-next-line @typescript-eslint/no-this-alias
let page: AbstractPage<Item> = this;
let page: this = this;
yield page;
while (page.hasNextPage()) {
page = await page.getNextPage();
yield page;
}
}

async *[Symbol.asyncIterator]() {
async *[Symbol.asyncIterator](): AsyncGenerator<Item> {
for await (const page of this.iterPages()) {
for (const item of page.getPaginatedItems()) {
yield item;
Expand Down Expand Up @@ -721,7 +721,7 @@ export class PagePromise<
* console.log(item)
* }
*/
async *[Symbol.asyncIterator]() {
async *[Symbol.asyncIterator](): AsyncGenerator<Item> {
const page = await this;
for await (const item of page) {
yield item;
Expand Down
2 changes: 1 addition & 1 deletion src/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) });
}
Expand Down
28 changes: 15 additions & 13 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
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 = '1.2.4'; // x-release-please-version
export const VERSION = '1.2.5'; // x-release-please-version
11 changes: 3 additions & 8 deletions tsconfig.deno.json
Original file line number Diff line number Diff line change
@@ -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
}
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"isolatedModules": false,

"skipLibCheck": true
}
Expand Down