Compare commits

...

2 Commits

Author SHA1 Message Date
Claude Bot
2b8e354f3d Add regression test for uppercase directory names in workspaces
Test verifies that `bun --filter` works correctly with workspace
directories containing uppercase letters on case-sensitive filesystems.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-30 05:11:19 +00:00
daku10
e3bd882d9d fix(glob): use original entry name 2025-09-29 18:12:51 +09:00
2 changed files with 57 additions and 1 deletions

View File

@@ -211,7 +211,7 @@ pub const DirEntryAccessor = struct {
pub inline fn next(self: *DirIter) Maybe(?IterResult) {
if (self.value) |*value| {
const nextval = value.next() orelse return .{ .result = null };
const name = nextval.key_ptr.*;
const name = nextval.value_ptr.*.base();
const kind = nextval.value_ptr.*.kind(&FS.instance.fs, true);
const fskind = switch (kind) {
.file => std.fs.File.Kind.file,

View File

@@ -0,0 +1,56 @@
import { spawnSync } from "bun";
import { test, expect } from "bun:test";
import { bunEnv, bunExe, tempDirWithFiles } from "harness";
test("bun --filter works with uppercase directory names on case-sensitive filesystems", () => {
const dir = tempDirWithFiles("issue-11295", {
packages: {
"Pkg-a": {
"package.json": JSON.stringify({
name: "pkg-a",
scripts: {
test: "echo 'pkg-a test'",
},
}),
},
"Pkg-B": {
"package.json": JSON.stringify({
name: "pkg-b",
scripts: {
test: "echo 'pkg-b test'",
},
}),
},
lowercase: {
"package.json": JSON.stringify({
name: "lowercase",
scripts: {
test: "echo 'lowercase test'",
},
}),
},
},
"package.json": JSON.stringify({
name: "root",
workspaces: ["packages/*"],
}),
});
const { exitCode, stdout, stderr } = spawnSync({
cwd: dir,
cmd: [bunExe(), "run", "--filter", "./packages/*", "test"],
env: bunEnv,
stdout: "pipe",
stderr: "pipe",
});
const stderrText = stderr.toString();
const stdoutText = stdout.toString();
expect(stderrText).not.toContain("ENOENT");
expect(exitCode).toBe(0);
expect(stdoutText).toContain("pkg-a test");
expect(stdoutText).toContain("pkg-b test");
expect(stdoutText).toContain("lowercase test");
});