diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a725f7b..ed84007 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cloning repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Push to dokku diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c035361..e77fbc5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -21,7 +21,7 @@ jobs: tests: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: oven-sh/setup-bun@v1 - name: Install dependencies run: bun install diff --git a/package.json b/package.json index 4af8842..4c45e7f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "idonthavespotify", - "version": "1.4.0", + "version": "1.4.1", "scripts": { "dev": "concurrently \"bun run build:dev\" \"bun run --watch www/bin.ts\"", "build:dev": "vite build --mode=development --watch", diff --git a/src/config/constants.ts b/src/config/constants.ts index 46e1d0d..b31970d 100644 --- a/src/config/constants.ts +++ b/src/config/constants.ts @@ -1,5 +1,5 @@ export const SPOTIFY_LINK_REGEX = - /^https:\/\/(open\.spotify\.com\/(track|album|playlist|artist|episode|show)|spotify\.link)\/(\w{11,24})(?:[\?#].*)?$/; + /^https:\/\/(open\.spotify\.com\/(?:intl-[a-z]{2}\/)?(track|album|playlist|artist|episode|show)|spotify\.link)\/(\w{11,24})(?:[\?#].*)?$/; export const SPOTIFY_LINK_MOBILE_REGEX = /^https:\/\/spotify\.link\/(\w+)/; export const SPOTIFY_LINK_DESKTOP_REGEX = diff --git a/tests/integration/search/artist.test.ts b/tests/integration/search/artist.test.ts index 72c027b..f918ff4 100644 --- a/tests/integration/search/artist.test.ts +++ b/tests/integration/search/artist.test.ts @@ -72,7 +72,7 @@ describe('GET /search - Artist', () => { const response = await app.handle(request).then(res => res.json()); expect(response).toEqual({ - id: '6l3HvQ5sa6mXTsMTB19rO5', + id: 'b3Blbi5zcG90aWZ5LmNvbS9hcnRpc3QvNmwzSHZRNXNhNm1YVHNNVEIxOXJPNQ%3D%3D', type: 'artist', title: 'J. Cole', description: 'Artist · 45.1M monthly listeners.', diff --git a/tests/integration/search/playlist.test.ts b/tests/integration/search/playlist.test.ts index 20b254d..f50e08d 100644 --- a/tests/integration/search/playlist.test.ts +++ b/tests/integration/search/playlist.test.ts @@ -72,7 +72,7 @@ describe('GET /search - Playlist', () => { const response = await app.handle(request).then(res => res.json()); expect(response).toEqual({ - id: '37i9dQZF1DX2apWzyECwyZ', + id: 'b3Blbi5zcG90aWZ5LmNvbS9wbGF5bGlzdC8zN2k5ZFFaRjFEWDJhcFd6eUVDd3la', type: 'playlist', title: 'This Is Bad Bunny', description: 'This Is Bad Bunny · Playlist · 109 songs · 5.2M likes', diff --git a/tests/integration/search/show.test.ts b/tests/integration/search/show.test.ts index 3467d79..6108b40 100644 --- a/tests/integration/search/show.test.ts +++ b/tests/integration/search/show.test.ts @@ -64,7 +64,7 @@ describe('GET /search - Podcast Show', () => { const response = await app.handle(request).then(res => res.json()); expect(response).toEqual({ - id: '6o81QuW22s5m2nfcXWjucc', + id: 'b3Blbi5zcG90aWZ5LmNvbS9zaG93LzZvODFRdVcyMnM1bTJuZmNYV2p1Y2M%3D', type: 'show', title: 'Waveform: The MKBHD Podcast', description: