Skip to content

Commit 2c99554

Browse files
authored
Merge pull request #6 from stainless-commons/release-please--branches--main--changes--next--components--spotify
release: 0.2.2
2 parents 93b51b0 + 9896770 commit 2c99554

40 files changed

Lines changed: 192 additions & 276 deletions

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.2.1"
2+
".": "0.2.2"
33
}

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## 0.2.2 (2026-02-20)
4+
5+
Full Changelog: [v0.2.1...v0.2.2](https://github.com/stainless-commons/spotify-typescript/compare/v0.2.1...v0.2.2)
6+
7+
### Chores
8+
9+
* **internal:** remove mock server code ([14035d4](https://github.com/stainless-commons/spotify-typescript/commit/14035d4a33e94790f906e6ef5185581519f8a058))
10+
* update mock server docs ([8d85111](https://github.com/stainless-commons/spotify-typescript/commit/8d851110125a087bd687ebf9e4828d972beb23bd))
11+
312
## 0.2.1 (2026-02-18)
413

514
Full Changelog: [v0.2.0...v0.2.1](https://github.com/stainless-commons/spotify-typescript/compare/v0.2.0...v0.2.1)

CONTRIBUTING.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,6 @@ $ pnpm link -—global @stainless-commons/spotify
6565

6666
## Running tests
6767

68-
Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.
69-
70-
```sh
71-
$ npx prism mock path/to/your/openapi.yml
72-
```
73-
7468
```sh
7569
$ yarn run test
7670
```

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@stainless-commons/spotify",
3-
"version": "0.2.1",
3+
"version": "0.2.2",
44
"description": "The official TypeScript library for the Spotify API",
55
"author": "Spotify <commons@stainless.com>",
66
"types": "dist/index.d.ts",

scripts/mock

Lines changed: 0 additions & 41 deletions
This file was deleted.

scripts/test

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -4,53 +4,7 @@ set -e
44

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

7-
RED='\033[0;31m'
8-
GREEN='\033[0;32m'
9-
YELLOW='\033[0;33m'
10-
NC='\033[0m' # No Color
117

12-
function prism_is_running() {
13-
curl --silent "http://localhost:4010" >/dev/null 2>&1
14-
}
15-
16-
kill_server_on_port() {
17-
pids=$(lsof -t -i tcp:"$1" || echo "")
18-
if [ "$pids" != "" ]; then
19-
kill "$pids"
20-
echo "Stopped $pids."
21-
fi
22-
}
23-
24-
function is_overriding_api_base_url() {
25-
[ -n "$TEST_API_BASE_URL" ]
26-
}
27-
28-
if ! is_overriding_api_base_url && ! prism_is_running ; then
29-
# When we exit this script, make sure to kill the background mock server process
30-
trap 'kill_server_on_port 4010' EXIT
31-
32-
# Start the dev server
33-
./scripts/mock --daemon
34-
fi
35-
36-
if is_overriding_api_base_url ; then
37-
echo -e "${GREEN}✔ Running tests against ${TEST_API_BASE_URL}${NC}"
38-
echo
39-
elif ! prism_is_running ; then
40-
echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Prism server"
41-
echo -e "running against your OpenAPI spec."
42-
echo
43-
echo -e "To run the server, pass in the path or url of your OpenAPI"
44-
echo -e "spec to the prism command:"
45-
echo
46-
echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}"
47-
echo
48-
49-
exit 1
50-
else
51-
echo -e "${GREEN}✔ Mock prism server is running with your OpenAPI spec${NC}"
52-
echo
53-
fi
548

559
echo "==> Running tests"
5610
./node_modules/.bin/jest "$@"

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const VERSION = '0.2.1'; // x-release-please-version
1+
export const VERSION = '0.2.2'; // x-release-please-version

tests/api-resources/albums.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const client = new Spotify({
99
});
1010

1111
describe('resource albums', () => {
12-
// Prism tests are disabled
12+
// Mock server tests are disabled
1313
test.skip('retrieve', async () => {
1414
const responsePromise = client.albums.retrieve('4aawyAB9vmqN3uQ7FjRGTy');
1515
const rawResponse = await responsePromise.asResponse();
@@ -21,7 +21,7 @@ describe('resource albums', () => {
2121
expect(dataAndResponse.response).toBe(rawResponse);
2222
});
2323

24-
// Prism tests are disabled
24+
// Mock server tests are disabled
2525
test.skip('retrieve: request options and params are passed correctly', async () => {
2626
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
2727
await expect(
@@ -33,7 +33,7 @@ describe('resource albums', () => {
3333
).rejects.toThrow(Spotify.NotFoundError);
3434
});
3535

36-
// Prism tests are disabled
36+
// Mock server tests are disabled
3737
test.skip('bulkRetrieve: only required params', async () => {
3838
const responsePromise = client.albums.bulkRetrieve({
3939
ids: '382ObEPsp2rxGrnsizN5TX,1A2GTWGtFfWp7KSQTwWOyo,2noRn2Aes5aoNVsU6iWThc',
@@ -47,15 +47,15 @@ describe('resource albums', () => {
4747
expect(dataAndResponse.response).toBe(rawResponse);
4848
});
4949

50-
// Prism tests are disabled
50+
// Mock server tests are disabled
5151
test.skip('bulkRetrieve: required and optional params', async () => {
5252
const response = await client.albums.bulkRetrieve({
5353
ids: '382ObEPsp2rxGrnsizN5TX,1A2GTWGtFfWp7KSQTwWOyo,2noRn2Aes5aoNVsU6iWThc',
5454
market: 'ES',
5555
});
5656
});
5757

58-
// Prism tests are disabled
58+
// Mock server tests are disabled
5959
test.skip('listTracks', async () => {
6060
const responsePromise = client.albums.listTracks('4aawyAB9vmqN3uQ7FjRGTy');
6161
const rawResponse = await responsePromise.asResponse();
@@ -67,7 +67,7 @@ describe('resource albums', () => {
6767
expect(dataAndResponse.response).toBe(rawResponse);
6868
});
6969

70-
// Prism tests are disabled
70+
// Mock server tests are disabled
7171
test.skip('listTracks: request options and params are passed correctly', async () => {
7272
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
7373
await expect(

tests/api-resources/artists.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const client = new Spotify({
99
});
1010

1111
describe('resource artists', () => {
12-
// Prism tests are disabled
12+
// Mock server tests are disabled
1313
test.skip('retrieve', async () => {
1414
const responsePromise = client.artists.retrieve('0TnOYISbd1XYRBk9myaseg');
1515
const rawResponse = await responsePromise.asResponse();
@@ -21,7 +21,7 @@ describe('resource artists', () => {
2121
expect(dataAndResponse.response).toBe(rawResponse);
2222
});
2323

24-
// Prism tests are disabled
24+
// Mock server tests are disabled
2525
test.skip('bulkRetrieve: only required params', async () => {
2626
const responsePromise = client.artists.bulkRetrieve({
2727
ids: '2CIMQHirSU0MQqyYHq0eOx,57dN52uHvrHOxijzpIgu3E,1vCWHaC5f2uS3yhpwWbIA6',
@@ -35,14 +35,14 @@ describe('resource artists', () => {
3535
expect(dataAndResponse.response).toBe(rawResponse);
3636
});
3737

38-
// Prism tests are disabled
38+
// Mock server tests are disabled
3939
test.skip('bulkRetrieve: required and optional params', async () => {
4040
const response = await client.artists.bulkRetrieve({
4141
ids: '2CIMQHirSU0MQqyYHq0eOx,57dN52uHvrHOxijzpIgu3E,1vCWHaC5f2uS3yhpwWbIA6',
4242
});
4343
});
4444

45-
// Prism tests are disabled
45+
// Mock server tests are disabled
4646
test.skip('listAlbums', async () => {
4747
const responsePromise = client.artists.listAlbums('0TnOYISbd1XYRBk9myaseg');
4848
const rawResponse = await responsePromise.asResponse();
@@ -54,7 +54,7 @@ describe('resource artists', () => {
5454
expect(dataAndResponse.response).toBe(rawResponse);
5555
});
5656

57-
// Prism tests are disabled
57+
// Mock server tests are disabled
5858
test.skip('listAlbums: request options and params are passed correctly', async () => {
5959
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
6060
await expect(
@@ -71,7 +71,7 @@ describe('resource artists', () => {
7171
).rejects.toThrow(Spotify.NotFoundError);
7272
});
7373

74-
// Prism tests are disabled
74+
// Mock server tests are disabled
7575
test.skip('listRelatedArtists', async () => {
7676
const responsePromise = client.artists.listRelatedArtists('0TnOYISbd1XYRBk9myaseg');
7777
const rawResponse = await responsePromise.asResponse();
@@ -83,7 +83,7 @@ describe('resource artists', () => {
8383
expect(dataAndResponse.response).toBe(rawResponse);
8484
});
8585

86-
// Prism tests are disabled
86+
// Mock server tests are disabled
8787
test.skip('topTracks', async () => {
8888
const responsePromise = client.artists.topTracks('0TnOYISbd1XYRBk9myaseg');
8989
const rawResponse = await responsePromise.asResponse();
@@ -95,7 +95,7 @@ describe('resource artists', () => {
9595
expect(dataAndResponse.response).toBe(rawResponse);
9696
});
9797

98-
// Prism tests are disabled
98+
// Mock server tests are disabled
9999
test.skip('topTracks: request options and params are passed correctly', async () => {
100100
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
101101
await expect(

tests/api-resources/audio-analysis.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const client = new Spotify({
99
});
1010

1111
describe('resource audioAnalysis', () => {
12-
// Prism tests are disabled
12+
// Mock server tests are disabled
1313
test.skip('retrieve', async () => {
1414
const responsePromise = client.audioAnalysis.retrieve('11dFghVXANMlKmJXsNCbNl');
1515
const rawResponse = await responsePromise.asResponse();

0 commit comments

Comments
 (0)