diff --git a/scripts/upgrade-examples.ts b/scripts/upgrade-examples.ts index fbc6c75..e55fecf 100644 --- a/scripts/upgrade-examples.ts +++ b/scripts/upgrade-examples.ts @@ -1,11 +1,5 @@ -import { $, Glob } from "bun"; +import { $ } from "bun"; -const dirs = new Glob("*").scanSync({ - cwd: "examples", - onlyFiles: false, - absolute: true, -}); - -for await (const dir of dirs) { +for await (const dir of $`find examples -maxdepth 1 -mindepth 1 -type d`.lines()) { await $`cd ${dir} && bun update`; } diff --git a/tests/test-e2e.ts b/tests/test-e2e.ts index de168df..466bcbb 100644 --- a/tests/test-e2e.ts +++ b/tests/test-e2e.ts @@ -1,15 +1,9 @@ -import { $, Glob } from "bun"; +import { $ } from "bun"; import { name } from "../package.json"; await $`bun run build && bun link`; -const dirs = new Glob("*").scanSync({ - cwd: "examples", - onlyFiles: false, - absolute: true, -}); - -for await (const dir of dirs) { +for await (const dir of $`find examples -maxdepth 1 -mindepth 1 -type d`.lines()) { await $`cd ${dir} && bun link ${name}`; await $`cd ${dir} && bun install`; await $`cd ${dir} && bun run build`;