Skip to content

Commit

Permalink
Merge pull request #12784 from keymanapp/chore/merge-master-into-web-…
Browse files Browse the repository at this point in the history
…core

chore: merge master into web-core 🎼
  • Loading branch information
mcdurdin authored Dec 5, 2024
2 parents 50dc553 + 9b091aa commit f82a1d7
Show file tree
Hide file tree
Showing 430 changed files with 8,630 additions and 1,870 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deb-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
strategy:
fail-fast: true
matrix:
dist: [focal, jammy, noble]
dist: [focal, jammy, noble, oracular]

steps:
- name: Checkout
Expand All @@ -142,7 +142,7 @@ jobs:
strategy:
fail-fast: true
matrix:
dist: [oracular]
dist: [plucky]

steps:
- name: Checkout
Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Contributing to Keyman

(Keyman team members, see also the [onboarding](https://docs.google.com/document/d/1i6fBi9K38-LitcJZiRfAvRu1-7H0iQ_op5kxDMdhSec/edit?usp=sharing) doc)

⭐ Thank you for your contribution! ⭐

The following is a set of guidelines for contributing to Keyman, Keyman
Expand Down
113 changes: 113 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,97 @@
# Keyman Version History

## 18.0.152 alpha 2024-12-04

* refactor(mac): pass kmx data blob to keyman core instead of file path (#12760)
* fix(developer): honour provided script when checking for matching scripts (#12768)
* chore(common): rename test files (#12709)
* fix(common): rename test file (#12770)

## 18.0.151 alpha 2024-12-03

* feat(android): Enhance how ENTER key is handled for FV and KMSample2 (#12745)
* feat(developer): report on mismatching lang tag scripts when building keyboard-info (#12753)

## 18.0.150 alpha 2024-12-02

* fix(core,developer): use `NDEBUG` flag to disable assertions in release build (#12715)

## 18.0.149 alpha 2024-12-01

* refactor(developer): unify test action (#12736)

## 18.0.148 alpha 2024-11-29

* test(common/web/types): unit tests for unicodeset-parser-api (#12714)
* chore(developer): rename test files (#12707)
* feat(core,linux,developer,windows): implement loading KMX from blob (#12721)
* chore(common): add offline support for emscripten (#12740)

## 18.0.147 alpha 2024-11-28

* docs(android): Add android/docs/internal/README (#12717)
* test(common/web/types): unit tests for string-list (#12702)
* docs(common): linux and macOS emscripten setup (#12701)
* refactor(developer): output number of tests when running on TC (#12710)
* refactor(common): output number of tests when running on TC (#12719)
* chore(web): rename file missed in #12704 (#12720)
* fix(core): permanently disable logging (#12724)
* fix(linux): disable assertions in release builds of ibus-keyman (#12725)
* chore(common): improve offline builds (#12739)

## 18.0.146 alpha 2024-11-27

* test(developer): kmcmplib compiler unit tests 5 (#12612)
* refactor(common): move all lexical model types into `LexicalModelTypes` container (#12712)
* refactor(common): move remaining LDML keyboard types into `LdmlKeyboardTypes` (#12713)
* chore(web): rename test files and folders (#12704)
* chore(core): rename test files (#12705)
* chore(linux): rename test files (#12706)

## 18.0.145 alpha 2024-11-26

* docs(windows): update emscripten bash setup (#12700)
* chore(common): Add link to onboarding doc to `CONTRIBUTING.md` (#12697)

## 18.0.144 alpha 2024-11-25

* chore(deps): bump cross-spawn from 7.0.3 to 7.0.6 in /developer/src/server/src/win32/trayicon/addon-src (#12687)
* chore(developer): make package subfile description fully optional (#12665)
* fix(developer): box package compiler info fields (#12666)
* fix(developer): correct whitespace handling in virtual keys and remove partially implemented virtual key series in kmcmplib compiler (#12604)

## 18.0.143 alpha 2024-11-22

* chore(deps): bump cross-spawn from 7.0.3 to 7.0.6 (#12685)

## 18.0.142 alpha 2024-11-20

* chore(common): Update CODEOWNERS (#12680)

## 18.0.141 alpha 2024-11-15

* chore(linux): add support for Ubuntu 25.04 Plucky Puffin (#12675)

## 18.0.140 alpha 2024-11-13

* chore(common): Add 17.0.330 - 17.0.332 to version history (#12663)
* fix(developer): reconnect `--full-test` in kmcmplib build and enable for CI (#12631)
* docs(developer): kmc-generate (#12647)

## 18.0.139 alpha 2024-11-12

* fix(windows): help links updated (#12646)

## 18.0.138 alpha 2024-11-08

* fix(common): check for invalid markers (#12613)
* chore: update minimum versions (#12632)
* fix(windows): correct path to output file in publish step for fv keyboards (#12637)
* chore(core): move API docs from help.keyman.com (#12642)
* feat(developer): kmc generate (#11014)
* feat(developer): kmc-copy (#12555)
* feat(developer): add GitHub and Cloud support to kmc-copy (#12586)

## 18.0.137 alpha 2024-11-07

* fix(windows): correct engine help source path for upload (#12625)
Expand Down Expand Up @@ -948,6 +1040,27 @@
* chore(common): move to 18.0 alpha (#10713)
* chore: move to 18.0 alpha

## 17.0.332 stable 2024-11-06

* fix(developer): create Server config directory before options save (#12609)
* fix(developer): handle merge commits when checking git log date (#12628)
* fix(linux): set environment variable for rendering of downloads dialog (#12617)

## 17.0.331 stable 2024-10-30

* fix(android): Hide suggestion banner on password fields (#12466)
* fix(common): declare dep on @keymanapp/ldml-keyboard-constants (#12475)
* fix(oem/fv): Update keyboard versions and names for fv_all.kmp (#12504)
* chore(ios): renew certificate (#12513)
* fix(developer): prevent invalid string ids (#12524)
* fix(developer): ignore excess whitespace in `<row keys>` attribute (#12523)

## 17.0.330 stable 2024-09-16

* refactor(android): Move Sentry and APK to publish task (#12392)
* fix(developer): rewrite ldml visual keyboard compiler (#12406)
* fix(developer): check vars string usage before definition (#12407)

## 17.0.329 stable 2024-09-09

* chore(android,ios): Add ojibwa ifinal/rdot keyboards to FirstVoices (#12020)
Expand Down
2 changes: 1 addition & 1 deletion VERSION.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.0.138
18.0.153
13 changes: 10 additions & 3 deletions android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ analytics for Debug are associated with an App Bundle ID
### Compiling From Command Line

1. Launch a command prompt and cd to the directory **keyman/android**
2. Run the top level build script `./build.sh configure build --debug` which will:
2. Run the top level build script `./build.sh configure build:engine build:app --debug` which will:
* Compile KMEA (and its KMW dependency)
* Download default keyboard and dictionary resources as needed
* Compile KMAPro
Expand Down Expand Up @@ -79,7 +79,7 @@ analytics for Debug are associated with an App Bundle ID
Replace `SERIAL` with the device serial number listed in step 2.

### Compiling the app's offline help
Keyman for Android help is maintained in the Markdown files in android/docs/.
Keyman for Android help is maintained in the Markdown files in android/docs/help.
The script `/resources/build/build-help.inc.sh` uses the `pandoc` tool to convert the Markdown files into html.

```bash
Expand Down Expand Up @@ -121,7 +121,7 @@ Building these projects follow the same steps as KMAPro:

## How to Build Keyman Engine for Android
1. Open a terminal or Git Bash prompt and go to the Android project folder (e.g. `cd ~/keyman/android/`)
2. Run `./build.sh --debug`
2. Run `./build.sh build:engine --debug`

Keyman Engine for Android library (**keyman-engine.aar**) is now ready to be imported in any project.

Expand Down Expand Up @@ -167,3 +167,10 @@ dependencies {
````
5. include `import com.keyman.engine.*;` to use Keyman Engine in a class.

### Keyman Engine for Android help content
Keyman Engine for Android help is maintained in the Markdown files in android/docs/engine/.

## Design Documentation

Internal design documents about features pertaining to Keyman for Android and Keyman Engine for Android are maintained in the Markdown files in android/docs/internal/.
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ public void onStartInput(EditorInfo attribute, boolean restarting) {
super.onStartInput(attribute, restarting);
KMManager.onStartInput(attribute, restarting);
KMManager.resetContext(KeyboardType.KEYBOARD_TYPE_SYSTEM);

// Determine special handling for ENTER key
int inputType = attribute.inputType;
KMManager.setEnterMode(attribute.imeOptions, inputType);

// User switched to a new input field so we should extract the text from input field
// and pass it to Keyman Engine together with selection range
InputConnection ic = getCurrentInputConnection();
Expand Down
5 changes: 5 additions & 0 deletions android/docs/internal/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Keyman for Android and Keyman Engine for Android

## Internal Documents

This folder is for storing design documents of new features pertaining to Keyman for Android and Keyman Engine for Android
28 changes: 14 additions & 14 deletions common/include/test_assert.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
#include <string>
#include "test_color.h"

#ifdef _assert_failed
#undef _assert_failed
#ifdef _test_assert_failed
#undef _test_assert_failed
#endif
#define _assert_failed(result, exprText) { \
#define _test_assert_failed(result, exprText) { \
std::wcerr << console_color::fg(console_color::BRIGHT_RED) \
<< "Test failed with " << (result) \
<< " at " << __FILE__ << ":" << __LINE__ << ":" \
Expand All @@ -31,23 +31,23 @@
#define try_status(expr) { \
auto __s = (expr); \
if (__s != KM_CORE_STATUS_OK) { \
_assert_failed(__s, u ## #expr); \
_test_assert_failed(__s, u ## #expr); \
} \
}

#ifdef assert
#undef assert
#ifdef test_assert
#undef test_assert
#endif
#define assert(expr) { \
#define test_assert(expr) { \
if (!(expr)) { \
_assert_failed(0, u ## #expr); \
_test_assert_failed(0, u ## #expr); \
} \
}

#ifdef assert_equal
#undef assert_equal
#ifdef test_assert_equal
#undef test_assert_equal
#endif
#define assert_equal(actual, expected) { \
#define test_assert_equal(actual, expected) { \
if ((actual) != (expected)) { \
std::wcerr << console_color::fg(console_color::BRIGHT_RED) \
<< "Test failed at " << __FILE__ << ":" << __LINE__ << ":" \
Expand All @@ -59,10 +59,10 @@
} \
}

#ifdef assert_string_equal
#undef assert_string_equal
#ifdef test_assert_string_equal
#undef test_assert_string_equal
#endif
#define assert_string_equal(actual, expected) { \
#define test_assert_string_equal(actual, expected) { \
if (u16cmp((actual), (expected)) != 0) { \
std::wcerr << console_color::fg(console_color::BRIGHT_RED) \
<< "Test failed at " << __FILE__ << ":" << __LINE__ << ":" \
Expand Down
8 changes: 6 additions & 2 deletions common/include/test_color.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@

#include <ostream>

#ifdef _MSC_VER
#include <io.h>
#else
#include <unistd.h>
#endif

namespace console_color {

enum ansi_code {
Expand Down Expand Up @@ -65,12 +71,10 @@ __define_ansi_code__(reversed, "7");
#undef __define_ansi_code__

#ifdef _MSC_VER
#include <io.h>
inline bool isaterminal() {
return _isatty(_fileno(stdout));
}
#else
#include <unistd.h>
inline bool isaterminal() {
return isatty(STDOUT_FILENO);
}
Expand Down
4 changes: 2 additions & 2 deletions common/web/types/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
module.exports = {
parserOptions: {
project: ["./tsconfig.json", "./test/tsconfig.json"],
project: ["./tsconfig.json", "./tests/tsconfig.json"],
},
ignorePatterns: [
".*/*",
"build/*",
"coverage/*",
"node_modules/*",
"test/fixtures/*",
"tests/fixtures/*",
"tools/*",
"src/schemas/*"
],
Expand Down
3 changes: 2 additions & 1 deletion common/web/types/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
src/schemas/
obj/
obj/
coverage/
13 changes: 10 additions & 3 deletions common/web/types/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,20 +80,27 @@ function do_configure() {
}

function do_test() {
local MOCHA_FLAGS=

if [[ "${TEAMCITY_GIT_PATH:-}" != "" ]]; then
# we're running in TeamCity
MOCHA_FLAGS="-reporter mocha-teamcity-reporter"
fi

eslint .
tsc --build test
tsc --build tests

readonly C8_THRESHOLD=60

# Excludes are defined in .c8rc.json
c8 -skip-full --reporter=lcov --reporter=text --lines $C8_THRESHOLD --statements $C8_THRESHOLD --branches $C8_THRESHOLD --functions $C8_THRESHOLD mocha "${builder_extra_params[@]}"
c8 -skip-full --reporter=lcov --reporter=text --lines $C8_THRESHOLD --statements $C8_THRESHOLD --branches $C8_THRESHOLD --functions $C8_THRESHOLD mocha ${MOCHA_FLAGS} "${builder_extra_params[@]}"
builder_echo warning "Coverage thresholds are currently $C8_THRESHOLD%, which is lower than ideal."
builder_echo warning "Please increase threshold in build.sh as test coverage improves."
}

#-------------------------------------------------------------------------------------------------------------------

builder_run_action clean rm -rf ./build/ ./tsconfig.tsbuildinfo
builder_run_action clean rm -rf ./build/ ./tsconfig.tsbuildinfo ./src/schemas/ ./node_modules/ ./obj/
builder_run_action configure do_configure
builder_run_action build tsc --build
builder_run_action test do_test
Expand Down
6 changes: 3 additions & 3 deletions common/web/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"build": "tsc -b",
"build:schema": "ajv compile",
"lint": "eslint .",
"test": "npm run lint && cd test && tsc -b && cd .. && c8 --skip-full --reporter=lcov --reporter=text mocha"
"test": "npm run lint && cd tests && tsc -b && cd .. && c8 --skip-full --reporter=lcov --reporter=text mocha"
},
"author": "Marc Durdin <[email protected]> (https://github.com/mcdurdin)",
"license": "MIT",
Expand All @@ -48,7 +48,7 @@
"typescript": "^5.4.5"
},
"mocha": {
"spec": "build/test/**/test-*.js",
"spec": "build/tests/**/*.tests.js",
"require": [
"source-map-support/register"
]
Expand Down Expand Up @@ -76,7 +76,7 @@
"src/keyman-touch-layout/keyman-touch-layout-file-writer.ts",
"src/osk/osk.ts",
"src/schemas/*",
"test/"
"tests/"
]
},
"sideEffects": false
Expand Down
Loading

0 comments on commit f82a1d7

Please sign in to comment.