Skip to content
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
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,3 @@ jobs:

- name: Run tests
run: ./scripts/test

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.7.3"
".": "1.8.0"
}
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## 1.8.0 (2025-03-22)

Full Changelog: [v1.7.3...v1.8.0](https://github.com/OneBusAway/js-sdk/compare/v1.7.3...v1.8.0)

### Features

* add SKIP_BREW env var to ./scripts/bootstrap ([#318](https://github.com/OneBusAway/js-sdk/issues/318)) ([a01f726](https://github.com/OneBusAway/js-sdk/commit/a01f726677a32765bf0c9e900e96bf3964db7c1b))
* **client:** accept RFC6838 JSON content types ([#320](https://github.com/OneBusAway/js-sdk/issues/320)) ([c3ab30c](https://github.com/OneBusAway/js-sdk/commit/c3ab30ce2750366423adcffde024c3a69f42410d))


### Bug Fixes

* avoid type error in certain environments ([#324](https://github.com/OneBusAway/js-sdk/issues/324)) ([bdee18e](https://github.com/OneBusAway/js-sdk/commit/bdee18ebf5ee7581cfc88c39aa38bac609e12779))


### Chores

* **exports:** cleaner resource index imports ([#322](https://github.com/OneBusAway/js-sdk/issues/322)) ([30f9c5d](https://github.com/OneBusAway/js-sdk/commit/30f9c5d9d1c15cb848f7fbad6e2540ad7bcbabfc))
* **exports:** stop using path fallbacks ([#323](https://github.com/OneBusAway/js-sdk/issues/323)) ([875ea2e](https://github.com/OneBusAway/js-sdk/commit/875ea2eca7c4308c1d3ba9f028195ca14bf0ada1))
* **internal:** remove extra empty newlines ([#321](https://github.com/OneBusAway/js-sdk/issues/321)) ([1050d0a](https://github.com/OneBusAway/js-sdk/commit/1050d0a5a8cad6a90ce9b0b6db87de820b305696))

## 1.7.3 (2025-03-01)

Full Changelog: [v1.7.2...v1.7.3](https://github.com/OneBusAway/js-sdk/compare/v1.7.2...v1.7.3)
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.

37 changes: 8 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "onebusaway-sdk",
"version": "1.7.3",
"version": "1.8.0",
"description": "The official TypeScript library for the Onebusaway SDK API",
"author": "Onebusaway SDK <info@onebusaway.org>",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -107,38 +107,17 @@
"default": "./dist/index.mjs"
},
"./*.mjs": {
"types": [
"./dist/*.d.ts",
"./dist/*/index.d.ts"
],
"default": [
"./dist/*.mjs",
"./dist/*/index.mjs"
]
"types": "./dist/*.d.ts",
"default": "./dist/*.mjs"
},
"./*.js": {
"types": [
"./dist/*.d.ts",
"./dist/*/index.d.ts"
],
"default": [
"./dist/*.js",
"./dist/*/index.js"
]
"types": "./dist/*.d.ts",
"default": "./dist/*.js"
},
"./*": {
"types": [
"./dist/*.d.ts",
"./dist/*/index.d.ts"
],
"require": [
"./dist/*.js",
"./dist/*/index.js"
],
"default": [
"./dist/*.mjs",
"./dist/*/index.mjs"
]
"types": "./dist/*.d.ts",
"require": "./dist/*.js",
"default": "./dist/*.mjs"
}
}
}
2 changes: 1 addition & 1 deletion scripts/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e

cd "$(dirname "$0")/.."

if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ]; then
brew bundle check >/dev/null 2>&1 || {
echo "==> Installing Homebrew dependencies…"
brew bundle
Expand Down
6 changes: 3 additions & 3 deletions src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ async function defaultParseResponse<T>(props: APIResponseProps): Promise<T> {
}

const contentType = response.headers.get('content-type');
const isJSON =
contentType?.includes('application/json') || contentType?.includes('application/vnd.api+json');
const mediaType = contentType?.split(';')[0]?.trim();
const isJSON = mediaType?.includes('application/json') || mediaType?.endsWith('+json');
if (isJSON) {
const json = await response.json();

Expand Down Expand Up @@ -395,7 +395,7 @@ export abstract class APIClient {
!headers ? {}
: Symbol.iterator in headers ?
Object.fromEntries(Array.from(headers as Iterable<string[]>).map((header) => [...header]))
: { ...headers }
: { ...(headers as any as Record<string, string>) }
);
}

Expand Down
1 change: 1 addition & 0 deletions src/resources.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './resources/index';
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.7.3'; // x-release-please-version
export const VERSION = '1.8.0'; // x-release-please-version