From 5ac3724a8aad0f4eea633be44a662d58090a0ebc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 11:13:44 +0000 Subject: [PATCH 1/9] chore(internal): upgrade pnpm version --- .github/workflows/ci.yml | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4425acb..5c3bc43 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: - name: Set up pnpm uses: pnpm/action-setup@v4 with: - version: '10.27.0' + version: '10.30.1' - name: Bootstrap run: ./scripts/bootstrap @@ -56,7 +56,7 @@ jobs: - name: Set up pnpm uses: pnpm/action-setup@v4 with: - version: '10.27.0' + version: '10.30.1' - name: Bootstrap run: ./scripts/bootstrap @@ -94,7 +94,7 @@ jobs: - name: Set up pnpm uses: pnpm/action-setup@v4 with: - version: '10.27.0' + version: '10.30.1' - name: Bootstrap run: ./scripts/bootstrap diff --git a/package.json b/package.json index 3f548fe..979fde9 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "type": "commonjs", "repository": "github:stainless-commons/spotify-typescript", "license": "Apache-2.0", - "packageManager": "pnpm@10.27.0", + "packageManager": "pnpm@10.30.1", "files": [ "**/*" ], From 2218729071f9670d3499d27cac7e064da28db02a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 11:20:36 +0000 Subject: [PATCH 2/9] fix(docs/contributing): correct pnpm link command --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7f6274b..239d0c9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -60,7 +60,7 @@ $ yarn link @stainless-commons/spotify # With pnpm $ pnpm link --global $ cd ../my-package -$ pnpm link -—global @stainless-commons/spotify +$ pnpm link --global @stainless-commons/spotify ``` ## Running tests From 6e16469e131fee1d5b928d3bf09098bd7fa9a94e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Feb 2026 11:05:18 +0000 Subject: [PATCH 3/9] chore(internal): move stringifyQuery implementation to internal function --- src/client.ts | 10 +++++----- src/internal/utils.ts | 1 + src/internal/utils/query.ts | 7 +++++++ tests/stringifyQuery.test.ts | 6 ++---- 4 files changed, 15 insertions(+), 9 deletions(-) create mode 100644 src/internal/utils/query.ts diff --git a/src/client.ts b/src/client.ts index c7d35fc..970d2a2 100644 --- a/src/client.ts +++ b/src/client.ts @@ -11,7 +11,7 @@ import type { APIResponseProps } from './internal/parse'; import { getPlatformHeaders } from './internal/detect-platform'; import * as Shims from './internal/shims'; import * as Opts from './internal/request-options'; -import * as qs from './internal/qs'; +import { stringifyQuery } from './internal/utils/query'; import { VERSION } from './version'; import * as Errors from './core/error'; import * as Pagination from './core/pagination'; @@ -369,8 +369,8 @@ export class Spotify { return buildHeaders([{ Authorization: `Bearer ${token.access_token}` }]); } - protected stringifyQuery(query: Record): string { - return qs.stringify(query, { arrayFormat: 'comma' }); + protected stringifyQuery(query: object | Record): string { + return stringifyQuery(query); } private getUserAgent(): string { @@ -407,7 +407,7 @@ export class Spotify { } if (typeof query === 'object' && query && !Array.isArray(query)) { - url.search = this.stringifyQuery(query as Record); + url.search = this.stringifyQuery(query); } return url.toString(); @@ -877,7 +877,7 @@ export class Spotify { ) { return { bodyHeaders: { 'content-type': 'application/x-www-form-urlencoded' }, - body: this.stringifyQuery(body as Record), + body: this.stringifyQuery(body), }; } else { return this.#encoder({ body, headers }); diff --git a/src/internal/utils.ts b/src/internal/utils.ts index 3cbfacc..c591353 100644 --- a/src/internal/utils.ts +++ b/src/internal/utils.ts @@ -6,3 +6,4 @@ export * from './utils/env'; export * from './utils/log'; export * from './utils/uuid'; export * from './utils/sleep'; +export * from './utils/query'; diff --git a/src/internal/utils/query.ts b/src/internal/utils/query.ts new file mode 100644 index 0000000..0139cac --- /dev/null +++ b/src/internal/utils/query.ts @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import * as qs from '../qs/stringify'; + +export function stringifyQuery(query: object | Record) { + return qs.stringify(query, { arrayFormat: 'comma' }); +} diff --git a/tests/stringifyQuery.test.ts b/tests/stringifyQuery.test.ts index 7558682..dbe5755 100644 --- a/tests/stringifyQuery.test.ts +++ b/tests/stringifyQuery.test.ts @@ -1,8 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { Spotify } from '@stainless-commons/spotify'; - -const { stringifyQuery } = Spotify.prototype as any; +import { stringifyQuery } from '@stainless-commons/spotify/internal/utils/query'; describe(stringifyQuery, () => { for (const [input, expected] of [ @@ -15,7 +13,7 @@ describe(stringifyQuery, () => { 'e=f', )}=${encodeURIComponent('g&h')}`, ], - ]) { + ] as const) { it(`${JSON.stringify(input)} -> ${expected}`, () => { expect(stringifyQuery(input)).toEqual(expected); }); From f5b1d5de361659231e7dce85d9eaaea58c7a275e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 6 Mar 2026 06:26:36 +0000 Subject: [PATCH 4/9] feat(api): api update --- .stats.yml | 4 ++-- src/resources/albums.ts | 4 ++-- src/resources/me/albums.ts | 2 +- src/resources/shared.ts | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.stats.yml b/.stats.yml index 68be857..e6299da 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 97 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/stainless-commons%2Fspotify-7ac9fe2ee73e38b2892f0393435f2d3a275d04b1d0728708382dd752da1d44de.yml -openapi_spec_hash: 6be3d4faa079ee82335208bec39c917a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/stainless-commons%2Fspotify-3ba45faf550c5b93f0307503d17c023c0e732e13835821995c97b2661af26f11.yml +openapi_spec_hash: 3232d211ced286eec6129772a2ef5105 config_hash: 130d32e101fcd29858ba4453473724d6 diff --git a/src/resources/albums.ts b/src/resources/albums.ts index c46757e..298026c 100644 --- a/src/resources/albums.ts +++ b/src/resources/albums.ts @@ -128,7 +128,7 @@ export interface AlbumRetrieveResponse { copyrights?: Array; /** - * @deprecated Known external IDs for the album. + * Known external IDs for the album. */ external_ids?: Shared.ExternalIDObject; @@ -300,7 +300,7 @@ export namespace AlbumBulkRetrieveResponse { copyrights?: Array; /** - * @deprecated Known external IDs for the album. + * Known external IDs for the album. */ external_ids?: Shared.ExternalIDObject; diff --git a/src/resources/me/albums.ts b/src/resources/me/albums.ts index 394bdd0..16c0ad1 100644 --- a/src/resources/me/albums.ts +++ b/src/resources/me/albums.ts @@ -186,7 +186,7 @@ export namespace AlbumListResponse { copyrights?: Array; /** - * @deprecated Known external IDs for the album. + * Known external IDs for the album. */ external_ids?: Shared.ExternalIDObject; diff --git a/src/resources/shared.ts b/src/resources/shared.ts index d92cf03..73916b4 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -1246,7 +1246,7 @@ export interface TrackObject { explicit?: boolean; /** - * @deprecated Known external IDs for the track. + * Known external IDs for the track. */ external_ids?: ExternalIDObject; From c989f3d049fb2bfb57a643fc966ce7aa1b005516 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 6 Mar 2026 22:34:52 +0000 Subject: [PATCH 5/9] chore(internal): codegen related update --- src/client.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client.ts b/src/client.ts index 970d2a2..d0a21ca 100644 --- a/src/client.ts +++ b/src/client.ts @@ -743,9 +743,9 @@ export class Spotify { } } - // If the API asks us to wait a certain amount of time (and it's a reasonable amount), - // just do what it says, but otherwise calculate a default - if (!(timeoutMillis && 0 <= timeoutMillis && timeoutMillis < 60 * 1000)) { + // If the API asks us to wait a certain amount of time, just do what it + // says, but otherwise calculate a default + if (timeoutMillis === undefined) { const maxRetries = options.maxRetries ?? this.maxRetries; timeoutMillis = this.calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries); } From 79c0b67c68c33383378838b706eda20d45510d5d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 7 Mar 2026 21:26:07 +0000 Subject: [PATCH 6/9] chore(ci): skip uploading artifacts on stainless-internal branches --- .github/workflows/ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c3bc43..def2284 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,14 +65,18 @@ jobs: run: ./scripts/build - name: Get GitHub OIDC Token - if: github.repository == 'stainless-sdks/spotify-typescript' + if: |- + github.repository == 'stainless-sdks/spotify-typescript' && + !startsWith(github.ref, 'refs/heads/stl/') id: github-oidc uses: actions/github-script@v8 with: script: core.setOutput('github_token', await core.getIDToken()); - name: Upload tarball - if: github.repository == 'stainless-sdks/spotify-typescript' + if: |- + github.repository == 'stainless-sdks/spotify-typescript' && + !startsWith(github.ref, 'refs/heads/stl/') env: URL: https://pkg.stainless.com/s AUTH: ${{ steps.github-oidc.outputs.github_token }} From e5856a1b2b4d98f9676985a2b48c895709e32cab Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 7 Mar 2026 21:38:16 +0000 Subject: [PATCH 7/9] fix(client): preserve URL params already embedded in path --- src/client.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/client.ts b/src/client.ts index d0a21ca..cff252a 100644 --- a/src/client.ts +++ b/src/client.ts @@ -402,8 +402,9 @@ export class Spotify { : new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path)); const defaultQuery = this.defaultQuery(); - if (!isEmptyObj(defaultQuery)) { - query = { ...defaultQuery, ...query }; + const pathQuery = Object.fromEntries(url.searchParams); + if (!isEmptyObj(defaultQuery) || !isEmptyObj(pathQuery)) { + query = { ...pathQuery, ...defaultQuery, ...query }; } if (typeof query === 'object' && query && !Array.isArray(query)) { From 1a98d5a46eef1f95d70a4d1044bbeb915e8b523f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 10 Mar 2026 06:38:53 +0000 Subject: [PATCH 8/9] chore(internal): update dependencies to address dependabot vulnerabilities --- package.json | 11 +++++++++++ pnpm-lock.yaml | 45 ++++++++++----------------------------------- 2 files changed, 21 insertions(+), 35 deletions(-) diff --git a/package.json b/package.json index 979fde9..628a65a 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,17 @@ "typescript": "5.8.3", "typescript-eslint": "8.31.1" }, + "overrides": { + "minimatch": "^9.0.5" + }, + "pnpm": { + "overrides": { + "minimatch": "^9.0.5" + } + }, + "resolutions": { + "minimatch": "^9.0.5" + }, "exports": { ".": { "import": "./dist/index.mjs", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 12cca20..c2b6b50 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,6 +4,9 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +overrides: + minimatch: ^9.0.5 + importers: .: @@ -743,9 +746,6 @@ packages: resolution: {integrity: sha512-B0xUquLkiGLgHhpPBqvl7GWegWBUNuujQ6kXd/r1U38ElPT6Ok8KZ8e+FpUGEc2ZoRQUzq/aUnaKFc/svWUGSg==} hasBin: true - brace-expansion@1.1.12: - resolution: {integrity: sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==} - brace-expansion@2.0.2: resolution: {integrity: sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==} @@ -840,9 +840,6 @@ packages: resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} engines: {node: '>=14'} - concat-map@0.0.1: - resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} @@ -1486,13 +1483,6 @@ packages: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} engines: {node: '>=6'} - minimatch@3.1.2: - resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} - - minimatch@5.1.6: - resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} - engines: {node: '>=10'} - minimatch@9.0.5: resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} @@ -2274,7 +2264,7 @@ snapshots: dependencies: '@eslint/object-schema': 2.1.7 debug: 4.4.3 - minimatch: 3.1.2 + minimatch: 9.0.5 transitivePeerDependencies: - supports-color @@ -2295,7 +2285,7 @@ snapshots: ignore: 5.3.2 import-fresh: 3.3.1 js-yaml: 4.1.1 - minimatch: 3.1.2 + minimatch: 9.0.5 strip-json-comments: 3.1.1 transitivePeerDependencies: - supports-color @@ -2862,11 +2852,6 @@ snapshots: baseline-browser-mapping@2.9.14: {} - brace-expansion@1.1.12: - dependencies: - balanced-match: 1.0.2 - concat-map: 0.0.1 - brace-expansion@2.0.2: dependencies: balanced-match: 1.0.2 @@ -2955,8 +2940,6 @@ snapshots: commander@10.0.1: {} - concat-map@0.0.1: {} - convert-source-map@2.0.0: {} create-jest@29.7.0(@types/node@20.19.11)(ts-node@10.7.0(@swc/core@1.4.16)(@types/node@20.19.11)(typescript@5.8.3)): @@ -3081,7 +3064,7 @@ snapshots: is-glob: 4.0.3 json-stable-stringify-without-jsonify: 1.0.1 lodash.merge: 4.6.2 - minimatch: 3.1.2 + minimatch: 9.0.5 natural-compare: 1.4.0 optionator: 0.9.4 transitivePeerDependencies: @@ -3210,7 +3193,7 @@ snapshots: fs.realpath: 1.0.0 inflight: 1.0.6 inherits: 2.0.4 - minimatch: 3.1.2 + minimatch: 9.0.5 once: 1.4.0 path-is-absolute: 1.0.1 @@ -3219,7 +3202,7 @@ snapshots: fs.realpath: 1.0.0 inflight: 1.0.6 inherits: 2.0.4 - minimatch: 5.1.6 + minimatch: 9.0.5 once: 1.4.0 globals@14.0.0: {} @@ -3255,7 +3238,7 @@ snapshots: ignore-walk@5.0.1: dependencies: - minimatch: 5.1.6 + minimatch: 9.0.5 ignore@5.3.2: {} @@ -3744,14 +3727,6 @@ snapshots: mimic-fn@2.1.0: {} - minimatch@3.1.2: - dependencies: - brace-expansion: 1.1.12 - - minimatch@5.1.6: - dependencies: - brace-expansion: 2.0.2 - minimatch@9.0.5: dependencies: brace-expansion: 2.0.2 @@ -4046,7 +4021,7 @@ snapshots: dependencies: '@istanbuljs/schema': 0.1.3 glob: 7.2.3 - minimatch: 3.1.2 + minimatch: 9.0.5 thenify-all@1.6.0: dependencies: From 8b6e043887d11b3e19ef98dc35d1eca1795c901c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 10 Mar 2026 06:39:08 +0000 Subject: [PATCH 9/9] release: 0.5.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 23 +++++++++++++++++++++++ package.json | 2 +- src/version.ts | 2 +- 4 files changed, 26 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2537c1f..f1c1e58 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.4.0" + ".": "0.5.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 909c76c..d36fb0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,28 @@ # Changelog +## 0.5.0 (2026-03-10) + +Full Changelog: [v0.4.0...v0.5.0](https://github.com/stainless-commons/spotify-typescript/compare/v0.4.0...v0.5.0) + +### Features + +* **api:** api update ([f5b1d5d](https://github.com/stainless-commons/spotify-typescript/commit/f5b1d5de361659231e7dce85d9eaaea58c7a275e)) + + +### Bug Fixes + +* **client:** preserve URL params already embedded in path ([e5856a1](https://github.com/stainless-commons/spotify-typescript/commit/e5856a1b2b4d98f9676985a2b48c895709e32cab)) +* **docs/contributing:** correct pnpm link command ([2218729](https://github.com/stainless-commons/spotify-typescript/commit/2218729071f9670d3499d27cac7e064da28db02a)) + + +### Chores + +* **ci:** skip uploading artifacts on stainless-internal branches ([79c0b67](https://github.com/stainless-commons/spotify-typescript/commit/79c0b67c68c33383378838b706eda20d45510d5d)) +* **internal:** codegen related update ([c989f3d](https://github.com/stainless-commons/spotify-typescript/commit/c989f3d049fb2bfb57a643fc966ce7aa1b005516)) +* **internal:** move stringifyQuery implementation to internal function ([6e16469](https://github.com/stainless-commons/spotify-typescript/commit/6e16469e131fee1d5b928d3bf09098bd7fa9a94e)) +* **internal:** update dependencies to address dependabot vulnerabilities ([1a98d5a](https://github.com/stainless-commons/spotify-typescript/commit/1a98d5a46eef1f95d70a4d1044bbeb915e8b523f)) +* **internal:** upgrade pnpm version ([5ac3724](https://github.com/stainless-commons/spotify-typescript/commit/5ac3724a8aad0f4eea633be44a662d58090a0ebc)) + ## 0.4.0 (2026-02-23) Full Changelog: [v0.3.0...v0.4.0](https://github.com/stainless-commons/spotify-typescript/compare/v0.3.0...v0.4.0) diff --git a/package.json b/package.json index 628a65a..2439507 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stainless-commons/spotify", - "version": "0.4.0", + "version": "0.5.0", "description": "Stainless Commons TypeScript SDK for the Spotify API", "author": "Spotify ", "types": "dist/index.d.ts", diff --git a/src/version.ts b/src/version.ts index 4e7f788..1f5d158 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.4.0'; // x-release-please-version +export const VERSION = '0.5.0'; // x-release-please-version