Commit graph

57 commits

Author SHA1 Message Date
Marc Durdin
3c90c732e1 chore(android): remove unused map-polyfill.js and es6-shim.min.js polyfills
These files were copied in but never referenced in 19.0 source.

Fixes: #16583
Test-bot: skip
2026-09-23 11:25:13 +02:00
Joshua Horton
4632f9809e Merge branch 'epic/autocorrect' into auto/A19S30-merge-master-into-autocorrect 2026-06-09 14:50:36 -05:00
Keyman Server
cf8f0e27a1
Merge branch 'epic/autocorrect' into auto/A19S23-merge-master-into-autocorrect 2026-02-27 08:24:59 +01:00
Joshua Horton
b7975973af maint(web): ensure Web build scripts handle paths with spaces properly
The command shortcuts that were used by Web
scripts to create bundles via `esbuild` were not
properly handling the $KEYMAN_ROOT path when it
contained a space.  These changes will rectify
this behavior and permit builds for such cases.

Build-bot: skip build:web
Test-bot: skip
2026-02-18 09:14:30 +07:00
Eberhard Beilharz
050d18aa94
refactor(web): Rename (Default)Worker to WebWorker and NodeWorker
Addresses code review comment: `Worker` is a generic and semi-reserved
name that we should not be stepping on.

This renames it to `WebWorker` instead of the suggested `LMWorker` or
`PredictiveTextWorker`. `WebWorker` is a name that was already used
in a few places and seems to better match: there is a corresponding
class for running with node. Naming it `WebWorker` makes it clearer
that this is the corresponding class when running in the browser.

The corresponding class for running under node was renamed to `NodeWorker`.

Test-bot: skip
2026-01-12 10:52:05 +01:00
Eberhard Beilharz
3833f19c44
refactor(web): remove some aliases
This is a follow-up of review comments in #15401.
- rename `DefaultWorker` → `Worker`
- rename `BUTTON_CLASSES` → `buttonClassNames`
Both exports now also match the filename.

Follow-up-of: #15401
Test-bot: skip
2026-01-09 10:55:01 +01:00
Eberhard Beilharz
1a8c909274
Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2026-01-09 09:36:00 +01:00
Eberhard Beilharz
f9f804c190
feat(web): remove 'export default' to eliminate more aliases
Fixes: #15292
Test-bot: skip
2026-01-07 15:36:33 +01:00
Marc Durdin
8eb7e6b0d4 maint(web): cleanup web/**/build.sh for consistency and build performance
* Simplify the build dependency / child tree
* Split building and testing tooling so we don't rebuild components
* Fixup expected outputs to avoid repeated builds of components
* Remove unused dependency references
* Move test.sh targets into build.sh, so that testing doesn't lose
  dependency tracking and cause unnecessary rebuilds. (Note that I have
  not yet deleted test.sh.)
* Make predictive-text a direct child of engine, so that we don't build
  it twice (or even more times)

Test-bot: skip
2025-11-07 10:08:38 +01:00
Marc Durdin
86a903dcf5 refactor(web): move sentry-manager and es-bundling to common
sentry-manager is used by Keyman Engine for Android and Keyman Engine
for iOS, but not directly by KeymanWeb, nor does it have any
dependencies on /web. So it does not make sense to keep it under /web.

es-bundling is used by sentry-manager and potentially other /common/web
tools in the future, so moving it under /common/tools makes it more
consistent in the future.

This is part of simplifying the web source tree; these changes do not
make significant build performance differences at this time.

Test-bot: skip
2025-11-06 15:28:04 +01:00
Marc Durdin
41c9cef797 refactor(web): change @keymanapp/web-utils to keyman/common/web-utils
Removes the need for package.json references for @keymanapp/web-utils,
and relies on bundler to include keyman/common/web-utils when building.
2025-11-06 07:24:36 +01:00
Keyman Server
0753cc548c
Merge branch 'epic/autocorrect' into chore/A19S13-merge-master-into-autocorrect 2025-10-10 05:04:36 +02:00
Eberhard Beilharz
229bdf8270
maint(resources): nest unit tests under parent block
This adds a modified `mocha-teamcity-reporter` that allows to nest the
unit tests under the parent block.

Fixes: #14839
Test-bot: skip
2025-10-06 16:09:47 +02:00
Eberhard Beilharz
34c43b1e15
refactor(web): cleanup in test scripts
Also use common function for running web types tests.

Test-bot: skip
2025-09-30 17:40:15 +02:00
Joshua Horton
770a87860a Merge branch 'feat/web/punctuation-whitespace-reversion' into feat/web/auto-accept-on-punctuation 2025-09-03 12:21:33 -05:00
Joshua Horton
eafd32a222 Merge branch 'epic/autocorrect' into feat/web/punctuation-whitespace-reversion 2025-09-03 12:20:57 -05:00
Joshua Horton
a28fde81b7
Merge pull request #14442 from keymanapp/change/web/cache-context-transitions
change(web): cache context transition objects, not just context state 🚂
2025-09-03 22:38:47 +07:00
Joshua Horton
dd36b9639e docs(web): markdown doc update: worker comm protocols 2025-08-15 12:07:17 -05:00
Joshua Horton
2c1c46e0dd feat(web): add Web engine support for auto-reverting whitespace appended to Suggestions on punctuation input
Relates-to: #7163
Relates-to: #12013

This does not outright _fix_ them because we still need to add the ability
to set language-specific punctuation mark sets within the model, and the
model needs to use those to return an appropriate configuration.  (This
commit sets defaults that are English-centric and do not generalize to
all languages.)
2025-08-15 11:54:10 -05:00
Joshua Horton
dc9276979e change(web): cache context transition objects, not just context state 2025-08-14 14:22:25 -05:00
Marc Durdin
f3fb3ac87b maint(common): move build-utils-ci.inc.sh to ci/ci-publish.inc.sh
Removes a number of unused functions from the file, renames remaining
functions to match our builder script prefix patterns, removes unused
imports from various build scripts (e.g. Android).

Fixes: #14453
2025-08-05 12:54:56 +10:00
Marc Durdin
2726050601 maint(common): rename and move node-related script functions into node.inc.sh
Consolidates the node-related script functions into node.inc.sh, as part
of cleaning up the build scripts and making them easier to maintain into
the future.

Fixes: #14447
2025-08-02 13:34:29 +10:00
Marc Durdin
f394245636 maint(common): consolidate builder scripts
Clarifies the confusing builder.inc.sh / build-utils.sh distinction by
giving the scripts more appropriate names. Most build scripts should use
builder-full.inc.sh; some helper scripts can use builder-basic.inc.sh.
Documented in resources/build/README.md.

Renames:
* resources/build/builder.inc.sh to resources/build/builder-full.inc.sh
* resources/build/build-utils.sh to resources/build/builder-basic.inc.sh

Other changes:
* Moves Android-specific functions out of builder-basic.inc.sh and into
  android/build.sh.
* Renames functions in builder-basic.inc.sh

More functions may be moved from builder-basic.inc.sh into utils.inc.sh
or other scripts in the future.

Fixes: #14065
Build-bot: build all
Test-bot: skip
2025-08-02 08:11:24 +10:00
Marc Durdin
65158a0526 maint(common): rename shellHelperFunctions.sh to utils.inc.sh
Adds documentation for various functions, removes unused functions (a
couple of simple, very lightly used functions were unDRYed; these could
go back the other way across all shell scripts if necessary). TODO items
noted for follow-up refactoring.

Fixes: #14275
Relates-to: #14269
Build-bot: build all
Test-bot: skip
2025-08-02 06:58:40 +10:00
Joshua Horton
155c1a2b12 maint: update mocha
Some of the npm audit warnings left after #13897 require an updated `mocha` version to remedy.  As we only really use `mocha` to do unit-testing, it should be safe to update if all of our existing tests pass with the new version.

Test-bot: skip
2025-05-13 14:02:02 +07:00
Joshua Horton
14dd36de4d fix(web): inspectable test-script mode should not be auto-enabled in local-env tests
This is a followup to the recent #13827, which automatically adds --debug to local-environment builds.  For web/ test scripts involving browser-based scripts, that same flag had been used to enable an _inspectable_ test mode that doesn't auto-return, which doesn't match the semantics of --debug for build configurations.

To rectify this, those scripts now have their --debug option renamed to --inspect, allowing them to be optionally turned on, but not automatically enabled.

Test-bot: skip
2025-05-13 12:38:47 +07:00
Joshua Horton
d606563a8c
Merge pull request #13820 from keymanapp/maint/web/simplify-worker-main-test-script
maint(web): simplify worker-main test.sh
2025-05-06 08:16:47 +07:00
Joshua Horton
1438704ee0
Merge pull request #13819 from keymanapp/maint/web/use-builder_is_ci_build
chore(web): replace --ci flag with builder_is_ci_build
2025-05-06 08:16:37 +07:00
Joshua Horton
e382bf45ce
Merge pull request #13785 from keymanapp/change/web/drop-usvstring-alias
change(web): replace USVString with string in predictive-text engine
2025-05-06 08:16:28 +07:00
Joshua Horton
b6fbf165dd maint(web): simplify worker-main test.sh 2025-05-02 09:52:43 +07:00
Joshua Horton
cb5e3035a7 chore(web): replace --ci flag with builder_is_ci_build
Fixes: #12640
2025-05-02 09:39:39 +07:00
Joshua Horton
dfe3de4ce1
chore: fix indentation in worker-main/build.sh
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-05-02 08:13:30 +07:00
Joshua Horton
14657c3894 maint(web): run LMLayer tests during standard Web module tests
Related-to: #12872

Test-bot: skip
2025-04-30 15:06:11 +07:00
Joshua Horton
e601d59b59 change(web): replace USVString with string in predictive-text engine
Fixes: #12046

It was only ever an alias (for `string`!) for its intended use, with actual `USVString` typing being unavailable in the browser.
2025-04-29 10:47:20 +07:00
Marc Durdin
4f829f5c8f chore: Merge remote-tracking branch 'origin/master' into chore/merge-beta-to-master-b18s5 2025-04-21 07:13:35 +07:00
Eberhard Beilharz
c1683b4be2
chore(web): improve error logging
Previously logging an error resulted in two Sentry issues to be created.
This change now combines the log message and the error into one call to
`console.error`, thus resulting in only one Sentry issue being created.
2025-04-03 16:35:09 +02:00
Marc Durdin
cafa503124 chore: use explicit node: prefix on more module imports 2025-04-03 08:10:50 +07:00
Joshua Horton
baf2150542 fix(web): properly support workerless use of Web engine
Fixes: #13262
Fixes: KEYMANWEB-COM-1VH
2025-02-20 12:06:28 +07:00
Joshua Horton
b2598e76ba chore(web): fix coverage-reporting artifact
Fixes: #13195
2025-02-12 15:56:54 +07:00
Joshua Horton
4fdd16a64b change(web): CI vs local testing control flow for predictive-text 2025-01-09 14:54:27 +07:00
Eberhard Beilharz
08b4b6c2eb
Merge pull request #12704 from keymanapp/chore/web/rename-tests
chore(web): rename test files and folders
2024-11-27 16:07:56 +07:00
Marc Durdin
b10634eb97 refactor(common): move all lexical model types into LexicalModelTypes container
Many of the types had very generic names (e.g. `Configuration`), and as
the types are now exported from `@keymanapp/common-types`, this was
unhelpful.

For units with many references, I used TypeScript's import-equals to
reduce the change impact. For units with only a few references, I added
the `LexicalModelTypes.` prefix to the references in source.

(Best reference I could find for import-equals: b722fa4e49)

Fixes: #12516
2024-11-27 09:46:09 +07:00
Eberhard Beilharz
432ab7055f
chore(web): rename test files and folders
This change renames the test files for Web according to the discussion at
the Keyman conference in November 2024. It also renames some folders from
`test` to `tests`.
2024-11-26 17:10:19 +01:00
Eberhard Beilharz
d4a049f614
refactor(web): move to web/src/tools/es-bundling
Addresses code review comments.
2024-09-11 09:44:58 +02:00
Eberhard Beilharz
c7a7ea2c51
Merge branch 'refactor/web/12025_web-utils' into refactor/web/12385_es-bundling 2024-09-11 09:28:19 +02:00
Eberhard Beilharz
d7f7ce9209
Merge branch 'refactor/web/12133_modelsWorkdbreakers' into refactor/web/12025_web-utils 2024-09-11 09:27:35 +02:00
Eberhard Beilharz
7e30dbf392
Merge remote-tracking branch 'origin/master' into refactor/web/12133_modelsWorkdbreakers 2024-09-11 09:21:59 +02:00
Eberhard Beilharz
cc21dda3cc
Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2024-09-11 09:17:01 +02:00
Eberhard Beilharz
6553bd6233
refactor(web): move common/web/es-bundling → common/tools/es-bundling
Fixes: #12385
2024-09-10 18:57:42 +02:00
Eberhard Beilharz
a6d2d02e61
refactor(web): move common/web/utils to web/src/engine/common/web-utils/
Fixes:#12025
2024-09-10 18:12:46 +02:00