| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
… and dependency management" This reverts commit 511f737.
…ew editor theme, and update dependencies for v0.10.0 release
|
I've tested on macOS and Windows, and it works fine |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This Pull Request introduces a persistent database into the application and implements one of the most important features for user experience: change history with Undo/Redo.
To achieve this, SQLite has been integrated via the better-sqlite3 package, chosen for its excellent performance and solid integration with the Node.js/Electron environment. The introduction of the database lays the foundation for future features that require data persistence.
The main changes included in this PR are:
Database Integration with SQLite (better-sqlite3) The better-sqlite3 dependency has been added to provide a robust, fast, local SQL database. All database interaction logic is handled in Electron's main process to ensure security and performance. The build process has been updated to correctly handle this native dependency across all platforms (macOS, Windows, Linux).
Migration System: A basic migration logic has been added to manage the evolution of the database schema in a controlled and versioned manner. On application startup, the migration script checks the user's database state and applies any necessary changes, ensuring the schema is always up-to-date with the latest required version.
Code History with Undo/Redo: A complete history of code changes has been implemented for each tab, offering users a safety net during editing. The history is non-destructive and uses a pointer-based system to navigate between past and future code states. It saves not only the code content but also the exact cursor position for a faithful restoration of the editing state. It supports standard keyboard shortcuts: Ctrl/Cmd+Z for Undo and Ctrl/Cmd+Y (or Ctrl/Cmd+Shift+Z) for Redo. To optimize performance, a new state is added only if the code has actually changed, avoiding unnecessary duplicates.
Related Improvements to the Build Process
To properly support the native better-sqlite3 dependency across all platforms, the build and Continuous Integration process has been significantly improved. These changes are intended to resolve the previous cross-platform build failures: The build scripts (package.json, build.js) have been refactored to follow electron-builder best practices. The GitHub Actions workflow (.github/workflows/build.yml) has been updated to use npm ci and OS-specific caches, resolving previous build failures and ensuring maximum reliability. Builds for macOS, Windows, and Linux are now stable, reliable, and fully automated.
How to Test
Pull this branch.
Let me know if you have any questions or feedback!