fix(core): fix keydown/up handling for LDML keyboards
For LDML keyboards this change fixes the `emit_keystroke` flag so that it always has the same value for the KeyDown and the KeyUp event. This fixes some problems with stuck keys. Previously we would set `emit_keystroke=TRUE` on KeyDown but `emit_keystroke=FALSE` on KeyUp for frame keys. This caused Linux to never see the KeyUp event, resulting in a stuck key.
Also add unit tests that verifies that the actions that we get after calling `km_core_process_event` are what we expect.
Follows: #15656Fixes: #15569Fixes: #15550
The boilerplate code for custom lexical models has never really been
tested. For use in a browser/worker context, we need to define
`exports`. The added unit test verifies that the model will build.
Test-bot: skip
maint(web): re-add engine .js tests
PR #15093 merged multiple engine modules into one. However, in doing so we lost the .js tests and ran only the .ts ones. This change re-adds the .js tests and fixes them where the code diverged since then.
Other changes:
- rename `queryEngine.ts` to `cloudQueryEngine.ts` to match the class name
- remove unused `keyboard-storage/cloud/index.ts`
- expose `CLOUD_TIMEOUT_ERR` and `CLOUD_STUB_REGISTRATION_ERR` as `unitTestEndpoints`
- add `test/resources` to exports in `web/package.json`. This was necessary because the compiled .ts test files are under `web/build` whereas the .js test files are under `web/src` and so the relative paths in imports no longer work. Also fix the imports in test files.
- remove `node-keyboard-loader.ts` which was just a wrapper around `NodeKeyboardLoader`.
- some cleanup and removal of default exports and aliases.
- moved `specialized-backspace.tests.js` to `specialized-backspace.tests.ts` and fixed resulting issues/warnings.
- apply fix from #15477 if KEYMAN_ROOT is not set
- inline some consts so that we don't have to export them for unit testing
- create `getKeymanRoot` and `getWebTestResourcesPath` helper functions to DRY out the code
- run `languageProcessortests.js` without coverage to prevent a failure creating the coverage report
I'm not happy to put the compiled files for `test/auto/resources` under `web/src/test/auto/resources/build`, but that's the only way I got it to work. If I put the compiled files in `web/build/test/resources` it couldn't find the types for `promise-status-async`.
Follows: #15093
- inline consts so that we don't have to export them for unit testing
- create `getKeymanRoot` and `getWebTestResourcesPath` helper functions
to DRY out the code
- run `languageProcessortests.js` without coverage to prevent a failure
creating the coverage report.
This change is in response to inconsistent build behavior where we
observed better outcomes after manually cleaning the Carthage cache.
The cache folder had clearly also become very large over time so this
has the side benefit of clearing up space on the build agents. It is
unclear how much time this will cost in the build, but we don't suppose
it will make them dramatically slower.
Note: the same change has been applied in TC for stable-18.0 builds.
Test-bot: skip