chore(web): clear kit 3's alias and Vite's config-loader deprecations (#5021)
release / govulncheck (push) Successful in 23s
release / web (push) Successful in 1m22s
release / go (push) Successful in 1m41s
release / integration (push) Successful in 4m49s
release / android (push) Successful in 5m32s
release / Build signed APK (releases and dev) (push) Successful in 5m39s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 28s
release / Verify release artifacts (tag releases only) (push) Skipped
release / govulncheck (push) Successful in 23s
release / web (push) Successful in 1m22s
release / go (push) Successful in 1m41s
release / integration (push) Successful in 4m49s
release / android (push) Successful in 5m32s
release / Build signed APK (releases and dev) (push) Successful in 5m39s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 28s
release / Verify release artifacts (tag releases only) (push) Skipped
CI run 8789 warned on both: - kit 3 deprecates `config.alias`. The $test-utils alias becomes a `#test-utils/*` subpath import, matching #lib, and its 43 import sites move with it. - Vite's coming native config loader needs the extension on vitest.config.ts's import of vite.config. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { describe, expect, test, vi } from 'vitest';
|
||||
import { render, screen, fireEvent, waitFor } from '@testing-library/svelte';
|
||||
import { readable } from 'svelte/store';
|
||||
import { makeTrack } from '$test-utils/fixtures/track';
|
||||
import { makeTrack } from '#test-utils/fixtures/track.js';
|
||||
|
||||
const playlistsData = vi.hoisted(() => ({
|
||||
owned: [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { describe, expect, test, vi } from 'vitest';
|
||||
import { render, screen } from '@testing-library/svelte';
|
||||
import { pageUrlModule } from '$test-utils/mocks/appState';
|
||||
import { pageUrlModule } from '#test-utils/mocks/appState.js';
|
||||
|
||||
const state = vi.hoisted(() => ({
|
||||
pageUrl: new URL('http://localhost/admin')
|
||||
|
||||
@@ -4,7 +4,7 @@ import type { AlbumRef, AlbumDetail, TrackRef } from '#lib/api/types.js';
|
||||
import { FALLBACK_COVER } from '#lib/media/covers.js';
|
||||
import { emptyLikesMock } from '../../test-utils/mocks/likes';
|
||||
import { apiClientMock } from '../../test-utils/mocks/client';
|
||||
import { makeTrack } from '$test-utils/fixtures/track';
|
||||
import { makeTrack } from '#test-utils/fixtures/track.js';
|
||||
|
||||
vi.mock('#lib/api/client.js', () => apiClientMock());
|
||||
vi.mock('#lib/player/store.svelte.js', () => ({
|
||||
|
||||
@@ -3,7 +3,7 @@ import { render, screen, fireEvent, waitFor } from '@testing-library/svelte';
|
||||
import { emptyLikesMock } from '../../test-utils/mocks/likes';
|
||||
import { emptyPlaylistsMock } from '../../test-utils/mocks/playlists';
|
||||
import type { TrackRef } from '#lib/api/types.js';
|
||||
import { makeTracks } from '$test-utils/fixtures/track';
|
||||
import { makeTracks } from '#test-utils/fixtures/track.js';
|
||||
|
||||
vi.mock('$app/navigation', () => ({ goto: vi.fn() }));
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { render, screen, fireEvent } from '@testing-library/svelte';
|
||||
import { emptyLikesMock } from '../../test-utils/mocks/likes';
|
||||
import { apiClientMock } from '../../test-utils/mocks/client';
|
||||
import type { ArtistRef, TrackRef } from '#lib/api/types.js';
|
||||
import { makeTrack, makeTracks } from '$test-utils/fixtures/track';
|
||||
import { makeTrack, makeTracks } from '#test-utils/fixtures/track.js';
|
||||
|
||||
vi.mock('#lib/api/client.js', () => apiClientMock());
|
||||
vi.mock('#lib/player/store.svelte.js', () => ({
|
||||
|
||||
@@ -3,7 +3,7 @@ import { render, screen, fireEvent, waitFor } from '@testing-library/svelte';
|
||||
import { emptyLikesMock } from '../../test-utils/mocks/likes';
|
||||
import { emptyPlaylistsMock } from '../../test-utils/mocks/playlists';
|
||||
import type { TrackRef } from '#lib/api/types.js';
|
||||
import { makeTracks } from '$test-utils/fixtures/track';
|
||||
import { makeTracks } from '#test-utils/fixtures/track.js';
|
||||
|
||||
vi.mock('$app/navigation', () => ({ goto: vi.fn() }));
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import type { TrackRef } from '#lib/api/types.js';
|
||||
import { emptyLikesMock } from '../../test-utils/mocks/likes';
|
||||
import { emptyPlaylistsMock } from '../../test-utils/mocks/playlists';
|
||||
import { emptyQuarantineMock } from '../../test-utils/mocks/quarantine';
|
||||
import { makeTracks } from '$test-utils/fixtures/track';
|
||||
import { makeTracks } from '#test-utils/fixtures/track.js';
|
||||
|
||||
vi.mock('#lib/api/likes.js', () => emptyLikesMock());
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { describe, expect, test, vi } from 'vitest';
|
||||
import { render, screen } from '@testing-library/svelte';
|
||||
import { pageUrlModule } from '$test-utils/mocks/appState';
|
||||
import { pageUrlModule } from '#test-utils/mocks/appState.js';
|
||||
|
||||
const state = vi.hoisted(() => ({
|
||||
pageUrl: new URL('http://localhost/discover')
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { afterEach, describe, expect, test, vi } from 'vitest';
|
||||
import { render, screen, fireEvent } from '@testing-library/svelte';
|
||||
import FlagPopover from './FlagPopover.svelte';
|
||||
import { makeTrack } from '$test-utils/fixtures/track';
|
||||
import { makeTrack } from '#test-utils/fixtures/track.js';
|
||||
|
||||
const invalidateMock = vi.fn();
|
||||
vi.mock('@tanstack/svelte-query', async (orig) => {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { describe, it, expect, vi, beforeEach } from 'vitest';
|
||||
import { render, screen, fireEvent } from '@testing-library/svelte';
|
||||
import HistoryRow from './HistoryRow.svelte';
|
||||
import type { HistoryEvent } from '#lib/api/history.js';
|
||||
import { makeTrack } from '$test-utils/fixtures/track';
|
||||
import { makeTrack } from '#test-utils/fixtures/track.js';
|
||||
|
||||
const playQueue = vi.fn();
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { render, screen, fireEvent, within } from '@testing-library/svelte';
|
||||
import type { TrackRef } from '#lib/api/types.js';
|
||||
import { emptyLikesMock } from '../../test-utils/mocks/likes';
|
||||
import { emptyQuarantineMock } from '../../test-utils/mocks/quarantine';
|
||||
import { makeTrack } from '$test-utils/fixtures/track';
|
||||
import { makeTrack } from '#test-utils/fixtures/track.js';
|
||||
|
||||
// Mutable state the mocked store reads from.
|
||||
const state = vi.hoisted(() => ({
|
||||
|
||||
@@ -2,7 +2,7 @@ import { describe, it, expect, vi, beforeEach } from 'vitest';
|
||||
import { render, screen, fireEvent } from '@testing-library/svelte';
|
||||
import { emptyLikesMock } from '../../test-utils/mocks/likes';
|
||||
import type { TrackRef } from '#lib/api/types.js';
|
||||
import { makeTrack } from '$test-utils/fixtures/track';
|
||||
import { makeTrack } from '#test-utils/fixtures/track.js';
|
||||
|
||||
// QueueTrackRow (rendered inside QueueDrawer → QueueList) now renders a
|
||||
// LikeButton, which reads createLikedIdsQuery. Stub the likes API so the
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
||||
import { render, screen, fireEvent } from '@testing-library/svelte';
|
||||
import { emptyLikesMock } from '../../test-utils/mocks/likes';
|
||||
import { makeTrack } from '$test-utils/fixtures/track';
|
||||
import { makeTrack } from '#test-utils/fixtures/track.js';
|
||||
|
||||
// QueueTrackRow now renders a LikeButton, which reads createLikedIdsQuery.
|
||||
// Stub the likes API so the row doesn't need a real QueryClient in context.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest';
|
||||
import { render, screen, fireEvent } from '@testing-library/svelte';
|
||||
import { pageUrlModule } from '$test-utils/mocks/appState';
|
||||
import { pageUrlModule } from '#test-utils/mocks/appState.js';
|
||||
|
||||
const state = vi.hoisted(() => ({
|
||||
pageUrl: new URL('http://localhost/')
|
||||
|
||||
@@ -3,7 +3,7 @@ import { render, screen, fireEvent, waitFor } from '@testing-library/svelte';
|
||||
import { emptyLikesMock } from '../../test-utils/mocks/likes';
|
||||
import { emptyPlaylistsMock } from '../../test-utils/mocks/playlists';
|
||||
import { emptyQuarantineMock } from '../../test-utils/mocks/quarantine';
|
||||
import { makeTrack } from '$test-utils/fixtures/track';
|
||||
import { makeTrack } from '#test-utils/fixtures/track.js';
|
||||
|
||||
// Mutable mock-user handle so individual tests can flip is_admin / null
|
||||
// without re-importing the module under test.
|
||||
|
||||
@@ -3,7 +3,7 @@ import { render, screen, fireEvent } from '@testing-library/svelte';
|
||||
import type { TrackRef } from '#lib/api/types.js';
|
||||
import { emptyLikesMock } from '../../test-utils/mocks/likes';
|
||||
import { emptyQuarantineMock } from '../../test-utils/mocks/quarantine';
|
||||
import { makeTrack } from '$test-utils/fixtures/track';
|
||||
import { makeTrack } from '#test-utils/fixtures/track.js';
|
||||
|
||||
vi.mock('#lib/player/store.svelte.js', () => ({
|
||||
playQueue: vi.fn(),
|
||||
|
||||
Reference in New Issue
Block a user