sveltejs / svelte-ecosystem-ci

Svelte Ecosystem CI
MIT License
5 stars 4 forks source link

Libraries that utilize monorepos don't have their svelte dependencies replaced during tests #14

Open AdrianGonz97 opened 10 months ago

AdrianGonz97 commented 10 months ago

While investigating #13, I noticed that libraries who utilize monorepos aren't getting their svelte dependencies (like @sveltejs/kit) replaced. e.g. Skeleton and Melt both use SK v1, yet Melt fails and Skeleton does not.

Here are two more libraries that I used to test locally to confirm (they both also use SK v1):

Test for bits-ui (normal repo, fails):

// bits-ui.ts
import { runInRepo } from '../utils'
import { RunOptions } from '../types'

export async function test(options: RunOptions) {
    await runInRepo({
        ...options,
        repo: 'huntabyte/bits-ui',
        branch: 'main',
        test: 'pnpm test',
    })
}

Test for svelte-ux (monorepo, passes):

// svelte-ux.ts
import { runInRepo } from '../utils'
import { RunOptions } from '../types'

export async function test(options: RunOptions) {
    await runInRepo({
        ...options,
        repo: 'techniq/svelte-ux',
        branch: 'main',
        test: 'pnpm test:unit',
    })
}
dominikg commented 9 months ago

if you want other dependencies besides svelte itself overridden (eg sveltekit, vite-plugin-svelte) you have to add them as overrides. Available overrides are defined in the builds directory

https://github.com/sveltejs/svelte-ecosystem-ci/tree/main/builds

how do use them can be seen here https://github.com/sveltejs/svelte-ecosystem-ci/blob/677fb3bce71f6ce2222d09bf1447aaf9630087bc/tests/sveltekit.ts#L9