-
Notifications
You must be signed in to change notification settings - Fork 0
Async implementation #11
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
Conversation
The log lines already felt a bit long and with the majority of the logs coming from AutoIt already, having AutoIt JS in there was pretty redundent. Will likely remove this logger altogether at some point
cbSize was being calculated incorrectly before because I included the lpReserved property
…dows Because Win32 libs are loaded as sideffects of importing the Koffi wrappers, even though an AutoIt test won't be ran non-Windows devices, Vitest still needs to load the test file to see if it should or shouldn't. This results in the Win32 libraries attemptiong to be loaded which causes errors on CI
The declaration file was having comments stripped out by tsc so I re-enabled that and enabled comment stripping in Rollup to prevent comment duplication
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements async functionality for the autoit-js library by adding asynchronous versions of all functions while maintaining backward compatibility. The implementation adds Promise-based async functions alongside synchronous ones, with the sync versions being renamed with a Sync
suffix.
- Adds async capability to all 100+ autoit functions using Promise-based APIs
- Renames existing functions to
*Sync
variants for clarity - Updates test configuration to exclude Windows-specific tests on non-Windows platforms
Reviewed Changes
Copilot reviewed 145 out of 148 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
vitest.config.ts | Adds platform detection and test filtering for Windows-specific tests |
src/lib/autoit.ts | Implements async function invocation using promises and callback handling |
src/util/typed-promisify.ts | Utility for promisifying functions with type safety |
src/lib/gdi32.ts, src/lib/user32.ts, src/lib/kernel32.ts | Adds async versions of Windows API functions |
src/win-.ts, src/process-.ts, src/mouse-*.ts, etc. | Adds async versions of all AutoIt functions |
Comments suppressed due to low confidence (1)
🎉 This PR is included in version 2.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Currently a work in progress, need to update all 100+ functions so it'll take a while.
Closes #10.