Skip to content

Commit

Permalink
fix: pick correct output file by svelte major for selftest script
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikg committed Apr 4, 2024
1 parent 180f7eb commit daa60dc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/_selftest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ export async function test(options: RunOptions) {
`invalid checkout, expected package.json with "name":"svelte-ecosystem-ci" in ${dir}`,
)
}
pkg.scripts.selftestscript =
"[ -f ../../svelte/packages/svelte/compiler.cjs ] || (echo 'svelte build failed' && exit 1)"
const compilerOutputFile =
options.svelteMajor === 4
? ' ../../svelte/packages/svelte/compiler.cjs'
: '../../svelte/packages/svelte/compiler/index.js'
pkg.scripts.selftestscript = `[ -f ${compilerOutputFile} ] || (echo 'svelte build failed' && exit 1)`
await fs.promises.writeFile(
pkgFile,
JSON.stringify(pkg, null, 2),
Expand Down

0 comments on commit daa60dc

Please sign in to comment.