$.verbose = false
if (!/pnpm/.test(process.env.npm_config_user_agent ?? ''))
- throw new Error('Please use pnpm (\'pnpm run snapshot\') to generate snapshots!')
+ throw new Error("Please use pnpm ('pnpm run snapshot') to generate snapshots!")
const featureFlags = ['typescript', 'jsx', 'router', 'pinia', 'vitest', 'cypress', 'playwright']
const featureFlagsDenylist = [['cypress', 'playwright']]
flagCombinations.push(['default'])
// Filter out combinations that are not allowed
-flagCombinations = flagCombinations.filter(combination => !featureFlagsDenylist.some(denylist => denylist.every(flag => combination.includes(flag))))
+flagCombinations = flagCombinations.filter(
+ (combination) =>
+ !featureFlagsDenylist.some((denylist) => denylist.every((flag) => combination.includes(flag)))
+)
// `--with-tests` are equivalent of `--vitest --cypress`
// Previously it means `--cypress` without `--vitest`.
import 'zx/globals'
// Vitest would otherwise enable watch mode by default.
-process.env.CI = '1';
+process.env.CI = '1'
const playgroundDir = path.resolve(__dirname, '../playground/')
-let projects = fs.readdirSync(playgroundDir, { withFileTypes: true })
- .filter(dirent => dirent.isDirectory())
- .map(dirent => dirent.name)
- .filter(name => !name.startsWith('.') && name !== 'node_modules')
+let projects = fs
+ .readdirSync(playgroundDir, { withFileTypes: true })
+ .filter((dirent) => dirent.isDirectory())
+ .map((dirent) => dirent.name)
+ .filter((name) => !name.startsWith('.') && name !== 'node_modules')
-if (process.argv[3])
- projects = projects.filter(project => project.includes(process.argv[3]))
+if (process.argv[3]) projects = projects.filter((project) => project.includes(process.argv[3]))
cd(playgroundDir)
console.log('Installing playground dependencies')
for (const projectName of projects) {
cd(path.resolve(playgroundDir, projectName))
- const packageJSON = require(path.resolve(playgroundDir, projectName, 'package.json'));
+ const packageJSON = require(path.resolve(playgroundDir, projectName, 'package.json'))
console.log(`Building ${projectName}`)
await $`pnpm build`