Commit graph

4034 commits

Author SHA1 Message Date
Joshua Horton
7b1310a7d5
Merge pull request #13899 from keymanapp/maint/update-mocha
maint: update mocha
2025-05-19 08:42:53 +07:00
Marc Durdin
7a393f7e27
Merge pull request #13847 from keymanapp/fix/developer/13846-remove-ngrok-mac-binary
fix(developer): remove ngrok binary at build time
2025-05-15 23:09:31 +07:00
Steven R. Loomis
158661aee1
Merge pull request #13916 from keymanapp/feat/developer/10622-line-number-meta
feat(developer):  add line number for MetaCompiler 🙀
2025-05-15 09:20:31 -05:00
Steven R. Loomis
419b43c496 feat(developer): bug fix per review
Fixes: #10622
2025-05-15 08:40:24 -05:00
Steven R. Loomis
be1668aa55
Merge branch 'feat/developer/10622-add-more-line-number-issues' into feat/developer/10622-line-number-meta 2025-05-14 16:53:03 -05:00
Steven R. Loomis
497405c4df feat(developer): fixup for api test
Fixes: #10622
2025-05-14 16:52:12 -05:00
Steven R. Loomis
30099fc75d feat(developer): add line number for meta
- made the 'x' parameter optional for some cases

Fixes: #10622
2025-05-14 16:47:54 -05:00
Steven R. Loomis
155b5558bf feat(developer): add line number for keys
- all remaining tests for KeysCompiler
- who's next?

Fixes: #10622
2025-05-14 16:25:59 -05:00
Steven R. Loomis
bdb8823eff feat(developer): add line number for keys
- restructure form loading a little bit, so that we remember the form object
- add a commented-out test that validates that offsets are actually produced

Fixes: #10622
2025-05-14 15:56:19 -05:00
Steven R. Loomis
21c87e2cdc feat(developer): add line number for Warn_CustomForm
- improve test machinery so that it ignores offsets (line number) most of the time unless retainOffsetInMessages is set
- add Warn_CustomForm() using a new model, changing 'o' to be an LKKeys
- update test with the new warning

Fixes: #10622
2025-05-14 14:33:57 -05:00
Steven R. Loomis
7f2d2b945e feat(developer): tests for offsets (line numbers in messages)
- add unit test that complains if no tests have offset(line) numbers, and whine if any don't. Also round trip tests the column number working as expected.
- rename helper withColumn() to withOffset()

Fixes: #10622
2025-05-14 08:50:32 -05: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
Steven R. Loomis
c2b6a65f1b
Merge pull request #13375 from keymanapp/feat/developer/10622-xml-parse-line-numbers-epic-ldml
feat(developer): line numbers for XML parsing and kmc-ldml 🙀
2025-05-12 18:37:23 -05:00
Steven R. Loomis
42d9c68e2b feat(developer): fix Error() function
- swap x, o because the 'api' call getMessageDetail() is going to call with {}

Fixes: #10622
2025-05-09 16:43:59 -05:00
Steven R. Loomis
b23275d7e1 feat(developer): fix imports in ldml-keyboard-xml-reader.ts
Fixes: #10622
2025-05-09 13:32:15 -05:00
Steven R. Loomis
8ec8fb1890 feat(developer): update for line numbers
- annotate why we're calling SymbolUtils.removeSymbols()

Fixes: #10622
2025-05-09 13:09:53 -05:00
Steven R. Loomis
6194392310 feat(developer): update for line numbers
- reduce whitespace churn
- other review comments

Fixes: #10622

Co-authored-by: Marc Durdin <marc@durdin.net>
2025-05-09 13:07:51 -05:00
Steven R. Loomis
8e2eb498e3 feat(developer): update for line numbers
- reduce whitespace churn

Fixes: #10622
2025-05-09 11:41:23 -05:00
Steven R. Loomis
307288dc3b chore(developer): deps: fast-xml-parser@5.2.2
My line number changes were merged into the main branch

Fixes: #10622
2025-05-08 17:43:19 -05:00
Steven R. Loomis
ad0ea8678b feat(developer): update for line numbers
- added new DelegatingCompilerCallbacks class
- added ResolvingCompilerCallbacks which does event resolution
- added the XML file name metadata to *every object* after XML parse.

Fixes: #10622
2025-05-08 17:29:30 -05:00
Eberhard Beilharz
4d81589f48
maint(common): use unique names for Keyman version variables
Previously the builder scripts defined a readonly `VERSION` environment
variable for the Keyman version. That caused problems when another
(external) script tried to define a `VERSION` variable. We encountered
this problem when trying to move the TC build steps of a configuration
into a single script (#13399) when we tried to source `~/.nvm/nvm.sh`.

This change uses a Keyman specific prefix for the version variables and
renames `VERSION` → `KEYMAN_VERSION` etc. Unfortunately these variables
are used in a lot of places, so this turned out to be a bit of a yak
shave.

Test-bot: skip
2025-05-07 18:46:51 +02:00
Marc Durdin
2a48f54b70 fix(developer): remove ngrok binary at build time
While ngrok.exe was already removed, ngrok (mac? linux?) was still
present in node_modules.

Fixes: #13846
2025-05-07 10:55:29 +08:00
Steven R. Loomis
937573869b Merge remote-tracking branch 'upstream/master' into feat/developer/10622-xml-parse-line-numbers-epic-ldml 2025-05-05 09:28:15 -05:00
Steven R. Loomis
a401d7eec3 feat(developer): update for line numbers
- make line finder cache lazy loading
- rename LDMLResolver to LineFinderResolver

Fixes: #10622
2025-05-05 09:17:36 -05:00
Marc Durdin
43cf66a9d4
Merge pull request #13796 from keymanapp/maint/meson-versioning-improvements
maint(common): cleanup meson versioning
2025-05-02 13:39:47 +07:00
Joshua Horton
2011d117d6 chore(developer): finalize activation of prefer-const within developer TS modules 2025-04-30 09:41:07 +07:00
Joshua Horton
871ebee552 change(developer): clean up developer/src/kmc-package linter issues 2025-04-30 09:37:32 +07:00
Joshua Horton
828128fc84 change(developer): clean up developer/src/kmc-model-info linter issues 2025-04-30 09:36:43 +07:00
Joshua Horton
87fff31212 change(developer): clean up developer/src/kmc-model linter issues
The model-defaults.ts file is excluded because that code actually lands in models and could have unwanted side-effects on the oldest Android devices we support.
2025-04-30 09:35:55 +07:00
Joshua Horton
63ad1a8fff change(developer): clean up developer/src/kmc-ldml linter issues 2025-04-30 09:20:12 +07:00
Joshua Horton
da7bfc0982 change(developer): clean up developer/src/kmc-kmn linter issues 2025-04-30 09:18:45 +07:00
Marc Durdin
9d2db4faf3 maint(common): consolidate standard.meson.build configuration
Use a shared function standard_meson_build to prep the
resources/meson.build folder for consistency. A future cleanup would be
to use meson-utils.inc.sh for all meson build scripts.
2025-04-30 09:16:43 +07:00
Joshua Horton
6b8c90c191 change(developer): clean up developer/src/kmc-analyze linter issues 2025-04-30 09:16:22 +07:00
Joshua Horton
d92ef04049 change(developer): clean up developer/src/kmc linter issues 2025-04-30 09:15:34 +07:00
Marc Durdin
f8917d2454 maint(common): cleanup meson versioning
* Adds `VERSION_WITH_TAG` variable to standard.meson.build
* Consistently uses `file('VERSION.md')` to retrieve version number

Note that VERSION_WITH_TAG is not yet used but should be used for
version tagged files later.
2025-04-30 08:23:05 +07:00
Steven R. Loomis
0edbbec981 Merge remote-tracking branch 'upstream/master' into feat/developer/10622-xml-parse-line-numbers-epic-ldml 2025-04-26 14:41:54 -05: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
Steven R. Loomis
e003612ea0 feat(developer): update for line numbers
- remove resolver complexity in callback subclasses
- call LDMLKeyboardXMLSourceFileReader.eventResolver.resolve() statically from ldml-compiler-messages

Fixes: #10622
2025-04-10 17:22:51 -05:00
Steven R. Loomis
64bcfc66e9 Merge remote-tracking branch 'upstream/master' into feat/developer/10622-xml-parse-line-numbers-epic-ldml 2025-04-10 17:02:05 -05:00
Steven R. Loomis
53fd228d08 feat(developer): update for line numbers
- fix windows path specific issue in test

Fixes: #10622
2025-04-03 17:24:57 -05:00
Steven R. Loomis
11f77ed876 feat(developer): update for line numbers
- fix ts issue on reader

Fixes: #10622
2025-04-03 16:47:04 -05:00
Steven R. Loomis
8d438283c6 feat(developer): update for line numbers
- split out LineFinder to separate class

Fixes: #10622
2025-04-03 16:40:53 -05:00
Steven R. Loomis
1f2b8463f5 chore(developer): deps: update to fast-xml-parser@5.1.0 (Metadata branch)
Fixes: #10622
2025-04-03 12:15:20 -05:00
Marc Durdin
21486882eb
Apply suggestions from code review 2025-04-03 16:44:36 +02:00
Marc Durdin
838aea52ed refactor(developer): consolidate project loader
Consolidates project loading code from kmc and kmc-copy, in preparation
for kmc-test epic. This leaves open a change we need to make to
CompilerCallbacks, to consolidate the fsAsync and net callbacks into
CompilerCallbacks as a first-class part of CompilerCallbacks. We will
then need to start to move all the fs and net callback interactions to
the async model across all kmc modules, at some point.
2025-04-03 11:37:54 +07:00
Marc Durdin
cf16c37869 refactor(developer): move sentry and developer options into console apps
Move the sentry dependency out of developer-utils and into the console
apps kmc and server, in process of making sure that developer-utils has
no node dependencies.

Also copy the options.ts module into kmc and server, for the same
reason.

This first step duplicates two units, options.ts and KeymanSentry.ts. We
do need to refactor this again later to avoid this duplication (maybe
via yet another internal package?)
2025-04-03 09:56:46 +07:00
Marc Durdin
70838ff1ac refactor(developer): rename to developer-utils-messages.ts
Renames common-messages.ts to developer-utils-messages.ts. This was
split from /common/web/types, but the messages module retained the old
name, which was confusing (two modules with same name).
2025-04-03 09:26:27 +07:00
Marc Durdin
ac6eb0b767 chore: use explicit node: prefix for node imports
This makes it easier for us to enumerate modules that have node
dependencies. There may be others I have not yet picked up.
2025-04-03 08:01:08 +07:00
Marc Durdin
da5b05a195
Merge pull request #13640 from keymanapp/fix/developer/13600-follow-remove-redundant-lm-fields-from-kps
fix(developer): remove redundant Name and RTL fields from .kps `LexicalModel`
2025-04-03 05:40:32 +07:00
Marc Durdin
a4f33caf65
Merge pull request #13600 from keymanapp/fix/developer/13576-13593-remove-redundant-keyboard-fields-from-kps
fix(developer): remove redundant keyboard fields from .kps
2025-04-03 05:40:18 +07:00