Skip to content

Commit

Permalink
refactor: use $ instead of Glob
Browse files Browse the repository at this point in the history
  • Loading branch information
metonym committed Sep 2, 2024
1 parent 1613bf9 commit 236296f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
10 changes: 2 additions & 8 deletions scripts/upgrade-examples.ts
Original file line number Diff line number Diff line change
@@ -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`;
}
10 changes: 2 additions & 8 deletions tests/test-e2e.ts
Original file line number Diff line number Diff line change
@@ -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`;
Expand Down

0 comments on commit 236296f

Please sign in to comment.