There's been a ton of improvements in the `ghw` library since the
v0.13.0 release, including the update of certain transitive dependencies
around Windows and Darwin support libraries.
This patch simply brings in those improvements. The `v0.21.3` release of
`ghw` is fully backwards-compatible with `v0.13.0`.
Signed-off-by: Jay Pipes <jaypipes@gmail.com>
* fix(v2): prevent wails init in non-empty directory with -d flag
When using -d to specify a target directory, wails init now checks if
the directory is non-empty and errors if so. This prevents accidental
data loss (e.g., overwriting .git directories).
Fixes#4940
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* test(v2): add tests for init non-empty directory check
Add tests to verify:
- Install fails when target directory is non-empty
- Install succeeds when target directory is empty
Also update changelog with the fix.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Apply suggestions from code review
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* feat(v2): add runtime.ResetSignalHandlers() for Linux panic recovery
Add a new runtime function that allows users to reset signal handlers
before code that might panic from nil pointer dereferences.
On Linux, WebKit installs signal handlers without the SA_ONSTACK flag,
which prevents Go from properly recovering from panics caused by
SIGSEGV and other signals. This function adds SA_ONSTACK to the
relevant signal handlers (SIGSEGV, SIGBUS, SIGFPE, SIGABRT).
Usage:
```go
go func() {
defer func() {
if err := recover(); err != nil {
log.Printf("Recovered: %v", err)
}
}()
runtime.ResetSignalHandlers()
// Code that might panic...
}()
```
The function is a no-op on macOS and Windows.
Fixes#3965
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* test(v2): add panic-recovery-test example
Add an example that demonstrates the Linux signal handler issue (#3965)
and verifies the fix using runtime.ResetSignalHandlers().
The example includes:
- A Greet function that triggers a nil pointer dereference after a delay
- Auto-call from frontend after 5 seconds
- README with reproduction steps
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* fix: add missing EventsOffAll export to runtime templates
The EventsOffAll function was implemented in the internal runtime
(desktop/events.js) and exported in the wrapper runtime files, but was
missing from the public runtime templates that are generated in user
projects. This caused a type mismatch where EventsOffAll was declared
in the TypeScript definition but the implementation was missing.
This commit adds the EventsOffAll export and type declaration to all
frontend framework templates:
- Common templates (generate/assets/common)
- React / React-TS
- Vue / Vue-TS
- Svelte / Svelte-TS
- Preact / Preact-TS
- Lit / Lit-TS
- Vanilla / Vanilla-TS
Fixes#4703
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* docs: add EventsOffAll to runtime events documentation
Added EventsOffAll function documentation to both English and Chinese
versions of the runtime events reference.
The function was already implemented in Go (pkg/runtime/events.go) and
JavaScript (internal/frontend/runtime/desktop/events.js), but was missing
from the public documentation.
Related to #4703
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* chore: add EventsOffAll fix to changelog
Added entry for the EventsOffAll fix to the Unreleased section
of the changelog.
Related to #4703
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* docs: translate EventsOffAll description to Chinese
Improved consistency in Chinese documentation by translating the
EventsOffAll description from English to Chinese, matching the
style of other event method descriptions.
Related to #4703
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
---------
Co-authored-by: cc <Zhuanz@MacBook-Pro.local>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
* fix(v2/linux): fix crash on panic in JS-bound Go methods
WebKit2GTK installs signal handlers after gtk_main() starts, overriding
our SA_ONSTACK fix. This causes Go panics (e.g., nil pointer dereference)
in JS-bound methods to crash with 'non-Go code set up signal handler
without SA_ONSTACK flag'.
Fix by deferring signal handler installation via g_idle_add() to run
after GTK main loop starts, ensuring we fix handlers AFTER WebKit
has installed its own.
Fixes#3965
* docs: add changelog entry for Linux signal handler fix
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Disable suppressesIncrementalRendering on macOS 26+ (Tahoe) to prevent
WebView crashes when the frontend performs frequent UI updates.
Fixes#4592🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
* enumsort: enumsort
* enumsort: update changelog
* Add tests for enum ordering fix
Tests added:
- EnumOrderingTest: Verifies multiple enums are output in alphabetical order
- EnumElementOrderingTest: Verifies enum elements are sorted by TSName
- TSNameEnumElementOrderingTest: Verifies TSName() interface enums are also sorted
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Prevent DLL hijacking by setting default DLL directories on initialization
* Updated the changelog
* Added DLLSearchPaths option to control DLL search paths on Windows
* Changed the order of the execution for uxtheme.go and consts.go
* Init uxtheme.go and consts.go once the dll path is set
---------
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
* Use computed style when adding 'wails-drop-target-active' class.
This is now consistent with the behavior of OnFileDrop which uses the computed style.
Fixes#4419
* Use computed style for elements when adding 'wails-drop-target-active' class.
This is now consistent with the behavior of OnFileDrop which uses the computed style.
Fixes#4419
* Update changelog
* Update draganddrop.js
Fix typo
* Update changelog.mdx
Moves changelog line to "fixes" section.
---------
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
* fix linux build error in onWayland caused by declaration after label
* update changelog
---------
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
* Add support for build tags to the wails project schema and update project-config documentation for guidance
* Support project tags in dev mode
* Satisfy coderabbit nitpick relating to error variable name
* Added changelog entry for `build:tags` project feature
---------
Co-authored-by: symball <contact@simonball.me>
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
* feat(options): add ContentProtection bool config to macos and windows options
* feat(darwin): implement ContentProtection for darwin
* feat(windows): implement ContentProtection for windows
* chore(website): add feature to changelog
* feat(examples): add an example showcasing the ContentPrivacy flag
* chore(examples): update readme
* fix(example): format and build
* fix(winc): rename to wda and add version check
* chore(reference): add docs for ContentProtection
* fix(darwin): future-proof setting the sharing type
* fix(example): wording consistency
* chore(examples): remove privatewindow example
---------
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
* feat: Make Vite server timeout configurable
- Add ViteServerTimeout field to wails.json configuration (default: 10 seconds)
- Add --viteservertimeout CLI flag for dev command
- Update error message to be more descriptive about timeout duration
- Fix issue #4372 where slow Vite servers with SvelteKit/Tailwind exceeded 10s timeout
Users can now configure the timeout via:
1. wails.json: "viteServerTimeout": 30
2. CLI flag: wails dev --viteservertimeout 30
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* docs: Add documentation for viteServerTimeout configuration
- Document viteServerTimeout field in wails.json project config
- Add --viteservertimeout CLI flag documentation
- Update save flag description to include new option
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Update changelog
---------
Co-authored-by: Claude <noreply@anthropic.com>
Set default LogLevel to 'Info' in dev command flags to prevent
unnecessary 'No listeners for event' trace messages from appearing
in development mode.
Fixes https://github.com/wailsapp/wails/issues/4160🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Claude <noreply@anthropic.com>
* [V2] Upgrade fsnotify to v1.9.0 to fix hot reload and quit issues on Windows
There may be a bug in fsnotify v1.8.0 that prevents hot reloading and Ctrl+C quitting from working on Windows. Upgrading to fsnotify v1.9.0 resolves the issue.
* Update changelog.mdx
---------
Co-authored-by: hkhere <hk@tinyclouds.cn>
* fix(logger): respect log level from environment variable in dev mode
* chore: add entry to changelog
---------
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>