diff --git a/.github/workflows/ecosystem-ci-from-pr.yml b/.github/workflows/ecosystem-ci-from-pr.yml index dbb7ee2b..4a06eef8 100644 --- a/.github/workflows/ecosystem-ci-from-pr.yml +++ b/.github/workflows/ecosystem-ci-from-pr.yml @@ -31,8 +31,11 @@ on: - "-" - eslint-plugin-svelte - language-tools + - mdsvex - prettier-plugin-svelte - rollup-plugin-svelte + - skeleton + - svelte-eslint-parser - svelte-loader - svelte-preprocess - sveltekit @@ -99,8 +102,11 @@ jobs: suite: - eslint-plugin-svelte - language-tools + - mdsvex - prettier-plugin-svelte - rollup-plugin-svelte + - skeleton + - svelte-eslint-parser - svelte-loader - svelte-preprocess - sveltekit diff --git a/.github/workflows/ecosystem-ci-selected.yml b/.github/workflows/ecosystem-ci-selected.yml index 18249b88..67b45de4 100644 --- a/.github/workflows/ecosystem-ci-selected.yml +++ b/.github/workflows/ecosystem-ci-selected.yml @@ -36,8 +36,11 @@ on: options: - eslint-plugin-svelte - language-tools + - mdsvex - prettier-plugin-svelte - rollup-plugin-svelte + - skeleton + - svelte-eslint-parser - svelte-loader - svelte-preprocess - sveltekit diff --git a/.github/workflows/ecosystem-ci.yml b/.github/workflows/ecosystem-ci.yml index 1a536833..c1522837 100644 --- a/.github/workflows/ecosystem-ci.yml +++ b/.github/workflows/ecosystem-ci.yml @@ -42,8 +42,11 @@ jobs: suite: - eslint-plugin-svelte - language-tools + - mdsvex - prettier-plugin-svelte - rollup-plugin-svelte + - skeleton + - svelte-eslint-parser - svelte-loader - svelte-preprocess - sveltekit diff --git a/builds/language-tools.ts b/builds/language-tools.ts new file mode 100644 index 00000000..e3ad7f92 --- /dev/null +++ b/builds/language-tools.ts @@ -0,0 +1,15 @@ +import { runInRepo } from '../utils' +import { RunOptions } from '../types' + +export async function build(options: RunOptions) { + return runInRepo({ + ...options, + repo: 'sveltejs/language-tools', + branch: 'master', + build: 'build', + }) +} + +export const packages = { + 'svelte-check': 'packages/svelte-check', +} diff --git a/builds/rollup-plugin-svelte.ts b/builds/rollup-plugin-svelte.ts new file mode 100644 index 00000000..f5efff0a --- /dev/null +++ b/builds/rollup-plugin-svelte.ts @@ -0,0 +1,14 @@ +import { runInRepo } from '../utils' +import { RunOptions } from '../types' + +export async function build(options: RunOptions) { + return runInRepo({ + ...options, + repo: 'sveltejs/rollup-plugin-svelte', + branch: 'master', + }) +} + +export const packages = { + 'rollup-plugin-svelte': '.', +} diff --git a/ecosystem-ci.ts b/ecosystem-ci.ts index 863594a0..b72f90d9 100644 --- a/ecosystem-ci.ts +++ b/ecosystem-ci.ts @@ -17,7 +17,9 @@ const cli = cac() cli .command('[...suites]', 'build svelte and run selected suites') .option('--verify', 'verify checkouts by running tests', { default: false }) - .option('--repo ', 'svelte repository to use', { default: 'sveltejs/svelte' }) + .option('--repo ', 'svelte repository to use', { + default: 'sveltejs/svelte', + }) .option('--branch ', 'svelte branch to use', { default: 'version-4' }) .option('--tag ', 'svelte tag to use') .option('--commit ', 'svelte commit sha to use') @@ -52,7 +54,9 @@ cli .option('--verify', 'verify svelte checkout by running tests', { default: false, }) - .option('--repo ', 'svelte repository to use', { default: 'sveltejs/svelte' }) + .option('--repo ', 'svelte repository to use', { + default: 'sveltejs/svelte', + }) .option('--branch ', 'svelte branch to use', { default: 'main' }) .option('--tag ', 'svelte tag to use') .option('--commit ', 'svelte commit sha to use') @@ -69,7 +73,9 @@ cli 'verify checkout by running tests before using local svelte', { default: false }, ) - .option('--repo ', 'svelte repository to use', { default: 'sveltejs/svelte' }) + .option('--repo ', 'svelte repository to use', { + default: 'sveltejs/svelte', + }) .option('--release ', 'svelte release to use from npm registry') .action(async (suites, options: CommandOptions) => { const { root, sveltePath, workspace } = await setupEnvironment() @@ -93,7 +99,9 @@ cli ) .option('--good ', 'last known good ref, e.g. a previous tag. REQUIRED!') .option('--verify', 'verify checkouts by running tests', { default: false }) - .option('--repo ', 'svelte repository to use', { default: 'sveltejs/svelte' }) + .option('--repo ', 'svelte repository to use', { + default: 'sveltejs/svelte', + }) .option('--branch ', 'svelte branch to use', { default: 'version-4' }) .option('--tag ', 'svelte tag to use') .option('--commit ', 'svelte commit sha to use') diff --git a/package.json b/package.json index a57afe46..d3f9075c 100644 --- a/package.json +++ b/package.json @@ -19,11 +19,11 @@ "*": [ "prettier --write --ignore-unknown" ], - "**/*.js": [ + "*.ts": [ "eslint" ] }, - "packageManager": "pnpm@8.4.0", + "packageManager": "pnpm@8.6.0", "type": "module", "engines": { "node": ">=18", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 53a05247..7d942a60 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,4 +1,8 @@ -lockfileVersion: '6.0' +lockfileVersion: '6.1' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false dependencies: '@actions/core': diff --git a/tests/_carbon-components-svelte.ts b/tests/_carbon-components-svelte.ts new file mode 100644 index 00000000..decd55e0 --- /dev/null +++ b/tests/_carbon-components-svelte.ts @@ -0,0 +1,16 @@ +import { runInRepo } from '../utils' +import { RunOptions } from '../types' + +export async function test(options: RunOptions) { + await runInRepo({ + ...options, + repo: 'carbon-design-system/carbon-components-svelte', + branch: 'master', + build: 'build:lib', + test: 'test:types', + overrides: { + 'rollup-plugin-svelte': true, + 'svelte-check': 'latest', // should be true but building it is currently broken + }, + }) +} diff --git a/tests/_selftest.ts b/tests/_selftest.ts index 023f54b6..95561c41 100644 --- a/tests/_selftest.ts +++ b/tests/_selftest.ts @@ -17,7 +17,7 @@ export async function test(options: RunOptions) { ) } pkg.scripts.selftestscript = - "[ -f ../../svelte/compiler.cjs ] || (echo 'svelte build failed' && exit 1)" + "[ -f ../../svelte/packages/svelte/compiler.cjs ] || (echo 'svelte build failed' && exit 1)" await fs.promises.writeFile( pkgFile, JSON.stringify(pkg, null, 2), diff --git a/tests/mdsvex.ts b/tests/mdsvex.ts new file mode 100644 index 00000000..8f3b524a --- /dev/null +++ b/tests/mdsvex.ts @@ -0,0 +1,12 @@ +import { runInRepo } from '../utils' +import { RunOptions } from '../types' + +export async function test(options: RunOptions) { + await runInRepo({ + ...options, + repo: 'pngwn/MDsveX', + branch: 'master', + build: 'pnpm -r build', + test: 'pnpm test', + }) +} diff --git a/tests/skeleton.ts b/tests/skeleton.ts new file mode 100644 index 00000000..80b45537 --- /dev/null +++ b/tests/skeleton.ts @@ -0,0 +1,16 @@ +import { runInRepo } from '../utils' +import { RunOptions } from '../types' + +export async function test(options: RunOptions) { + await runInRepo({ + ...options, + repo: 'skeletonlabs/skeleton', + branch: 'dev', + test: ['test', 'check'].map( + (script) => `pnpm --dir packages/skeleton ${script}`, + ), + overrides: { + 'svelte-check': 'latest', // needed for svelte-4, should be `true` but language-tools build still fails + }, + }) +} diff --git a/tests/svelte-eslint-parser.ts b/tests/svelte-eslint-parser.ts new file mode 100644 index 00000000..c0ee7a97 --- /dev/null +++ b/tests/svelte-eslint-parser.ts @@ -0,0 +1,12 @@ +import { runInRepo } from '../utils' +import { RunOptions } from '../types' + +export async function test(options: RunOptions) { + await runInRepo({ + ...options, + repo: 'sveltejs/svelte-eslint-parser', + branch: 'main', + build: 'build', + test: 'test', + }) +}