-
Notifications
You must be signed in to change notification settings - Fork 0
docs(file-ops): add README, CHANGELOG, and TSDoc comments #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
galligan
wants to merge
1
commit into
p3-4/logging/docs
Choose a base branch
from
p3-4/file-ops/docs
base: p3-4/logging/docs
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+577
−55
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 tasks
Contributor
Author
This was referenced Jan 23, 2026
This was referenced Jan 23, 2026
This was referenced Jan 23, 2026
1c1023e to
917c94b
Compare
1962bd8 to
2da15de
Compare
This was referenced Jan 23, 2026
Greptile Summary
|
| Filename | Overview |
|---|---|
| packages/file-ops/src/index.ts | Added comprehensive TSDoc documentation to all exported functions and interfaces with security warnings and usage examples |
| packages/file-ops/README.md | New comprehensive API documentation with installation guide, security model, and detailed usage examples for all features |
| packages/file-ops/CHANGELOG.md | New changelog documenting initial 0.1.0 release with complete feature inventory |
Confidence score: 5/5
- This PR is extremely safe to merge as it only adds documentation without any functional code changes
- Score reflects documentation-only changes with no risk to existing functionality or behavior
- No files require special attention as all changes are purely additive documentation
Sequence Diagram
sequenceDiagram
participant User
participant FileOps as "@outfitter/file-ops"
participant FileSystem as "File System"
participant BunGlob as "Bun.Glob"
Note over User, FileSystem: Workspace Detection Flow
User->>FileOps: "findWorkspaceRoot(startPath, options?)"
FileOps->>FileOps: "resolve(startPath)"
loop "Walk up directory tree"
FileOps->>FileSystem: "stat(markerPath)"
FileSystem-->>FileOps: "marker exists/not found"
alt "marker found"
FileOps-->>User: "Result.ok(workspaceRoot)"
else "continue search"
FileOps->>FileOps: "dirname(currentDir)"
end
end
Note over User, FileSystem: Secure Path Validation Flow
User->>FileOps: "securePath(path, basePath)"
FileOps->>FileOps: "validate null bytes"
FileOps->>FileOps: "check path traversal"
FileOps->>FileOps: "normalize and join paths"
FileOps->>FileOps: "verify within basePath"
FileOps-->>User: "Result.ok(safePath)"
Note over User, BunGlob: Glob Pattern Matching Flow
User->>FileOps: "glob(pattern, options?)"
FileOps->>BunGlob: "new Bun.Glob(pattern)"
FileOps->>FileOps: "createIgnoreFilter(options.ignore)"
FileOps->>BunGlob: "glob.scan(scanOptions)"
loop "for each matched file"
BunGlob-->>FileOps: "file path"
FileOps->>FileOps: "apply ignore filter"
FileOps->>FileOps: "resolve to absolute path"
end
FileOps-->>User: "Result.ok(absolutePaths[])"
Note over User, FileSystem: File Locking Flow
User->>FileOps: "withLock(path, callback)"
FileOps->>FileOps: "acquireLock(path)"
FileOps->>FileSystem: "writeFile(lockPath, metadata, {flag: 'wx'})"
FileSystem-->>FileOps: "lock acquired"
FileOps->>User: "execute callback()"
User-->>FileOps: "callback result"
FileOps->>FileSystem: "unlink(lockPath)"
FileSystem-->>FileOps: "lock released"
FileOps-->>User: "Result.ok(callbackResult)"
Note over User, FileSystem: Atomic Write Flow
User->>FileOps: "atomicWrite(path, content, options?)"
FileOps->>FileSystem: "mkdir(parentDir, {recursive: true})"
FileOps->>FileOps: "generate tempPath"
FileOps->>FileSystem: "writeFile(tempPath, content)"
FileSystem-->>FileOps: "temp file written"
FileOps->>FileSystem: "rename(tempPath, path)"
FileSystem-->>FileOps: "atomic rename complete"
FileOps-->>User: "Result.ok()"
917c94b to
3149937
Compare
2da15de to
58d4fe5
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Summary
Adds comprehensive documentation to
@outfitter/file-opspackage:@param,@returns, and@exampleHighlights
withLock()patternTest plan
bun run typecheckpassesbun run buildsucceeds🤖 Generated with Claude Code