fix: Document lightning-fs gotcha#2291
Conversation
📝 WalkthroughWalkthroughThe PR updates README.md to add a warning under the browser usage section that LightningFS may apply file operations out of order, risking repository corruption on crash, and advises calling Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
README.md (1)
80-82: Consider fixing the naming inconsistency.Line 80 uses "LightningFS" (PascalCase) while line 82 uses "lightning-fs" (lowercase with hyphen). For consistency, consider using the same casing throughout.
📝 Suggested fix
-⚠️ lightning-fs may apply file operations out of order, which can lead to repository corruption if the process crashes. You can mitigate this by calling `fs.flush()` after Git operations. +⚠️ LightningFS may apply file operations out of order, which can lead to repository corruption if the process crashes. You can mitigate this by calling `fs.flush()` after Git operations.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@README.md` around lines 80 - 82, Update the README to use a consistent name for the library: replace occurrences of "lightning-fs" with the chosen canonical form "LightningFS" (or vice versa) so line references like the mention on line 80 ("LightningFS") and the warning on line 82 ("lightning-fs") match; ensure links and any code references (e.g., fs.flush()) remain correct and adjust their casing only in prose, not in code snippets or URLs.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@README.md`:
- Around line 80-82: Update the README to use a consistent name for the library:
replace occurrences of "lightning-fs" with the chosen canonical form
"LightningFS" (or vice versa) so line references like the mention on line 80
("LightningFS") and the warning on line 82 ("lightning-fs") match; ensure links
and any code references (e.g., fs.flush()) remain correct and adjust their
casing only in prose, not in code snippets or URLs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
README.md (1)
80-80: Tiny wording polish on Line 80.Consider changing “The easiest to setup” to “The easiest to set up” for grammar/readability.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@README.md` at line 80, Change the phrase "The easiest to setup and most performant library is [LightningFS]..." to "The easiest to set up and most performant library is [LightningFS]..." in the README sentence that mentions LightningFS so the grammar is corrected.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@README.md`:
- Line 80: Change the phrase "The easiest to setup and most performant library
is [LightningFS]..." to "The easiest to set up and most performant library is
[LightningFS]..." in the README sentence that mentions LightningFS so the
grammar is corrected.
|
Thanks for the PR. |
|
🎉 This PR is included in version 1.37.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I'm fixing a bug or typo
npm run add-contributorand follow the prompts to add yourself to the READMEfixes #2290
Summary by CodeRabbit