Commit graph

222 commits

Author SHA1 Message Date
Marc Durdin
9db0d086dc
Merge pull request #13113 from keymanapp/feat/developer/kmc-include-command-line-in-sentry-reports
feat(developer): include command line in kmc sentry reports
2025-02-04 11:43:12 +07:00
Marc Durdin
05c17e3439 feat(developer): include command line in kmc sentry reports
In order to reproduce kmc errors, it's very helpful to know how it was
instantiated. This change includes the command line call for kmc. This
includes things such as a keyboard filename and may include file paths,
but does not include private personal information or secrets.
2025-02-03 09:53:45 +07:00
Steven R. Loomis
622900a5d8 chore(developer): LDML update issue
- test needed to be updated

Fixes: #11307
2025-01-30 23:42:10 -06:00
Steven R. Loomis
b54ea40770 chore(developer): update comments per review
- note that 45,46,47 are the same data and so aliased

Fixes: #11307
2025-01-30 23:13:36 -06:00
Steven R. Loomis
b35ba06a2b chore(developer): remove workaround for base=""
Fixes: #12749
2025-01-30 15:48:02 -06:00
Steven R. Loomis
b741a88ca0 chore(core,developer): treat CLDR v45, 46, 46.1, 47 as 46
Fixes: #11307
2025-01-30 15:42:30 -06:00
Steven R. Loomis
2c32fb7903 chore(resources, developer,core): CLDR 46 and workaround
Fixes: #11307
- import from CLDR 46, mostly unchanged

Fixes: #12749
- workaround LDML DTD bug CLDR-18138 where base= does not imply base=cldr
2025-01-30 15:41:34 -06:00
Marc Durdin
ae148984b8
Merge pull request #12976 from keymanapp/feat/developer/12975-verbose-and-debug-log-levels
feat(developer): add 'verbose' and 'debug' log levels to kmc
2025-01-23 14:42:59 +07:00
Marc Durdin
f9cb1927c9 chore(developer): cleanup tests with new verbose messages 2025-01-22 10:01:49 +07:00
Marc Durdin
a08f1aca6e feat(developer): add 'verbose' and 'debug' log levels to kmc
Adds 'verbose' and 'debug' log levels and corresponding error severity
levels. This means the internal error severity values have changed to
match - 'info' is now 2 instead of 0.

Fixes: #12975
2025-01-22 08:58:13 +07:00
Marc Durdin
17a6d3c091
Merge pull request #12958 from keymanapp/chore/developer/12957-validate-ids-in-kmc-generate
chore(developer): validate keyboard and model IDs in kmc-generate
2025-01-22 07:47:24 +07:00
Marc Durdin
3ad0dec493 chore(developer): validate keyboard and model IDs in kmc-generate
Fixes: #12957
2025-01-21 12:41:52 +07:00
Marc Durdin
60a88584e4
Merge branch 'master' into fix/developer/12123-support-displaymap-font-in-web-debugger 2025-01-20 15:14:45 +07:00
Marc Durdin
45a6291a3e refactor(developer): move ttfInfo to developer-utils
We will need ttfInfo in kmc-package, so move it to the shared module.
2025-01-20 09:19:47 +07:00
Marc Durdin
7cb6be6a97 fix(developer): support &displayMap font in web debugger
Adds a new design-time font property for when `&displayMap` is in use in
a keyboard, so that the web debugger can use that font as appropriate.

If the keyboard does not have a `&displayMap` store, then the DisplayMap
font property is disabled, and the web debugger will use the OSK Font
instead, as previously was the case.

Note that the font for `&displayMap` has to be installed on the keyboard
author's system in order for it to be served up.

Fixes: #12123
2025-01-17 11:03:20 +07:00
Marc Durdin
dad1df3194 fix(developer): ensure license parameter is required and add tests
Some additional items arose from this:

* Adds a command-line-tests unit test which does some basic sanity tests
  on `kmc`.
* Cleans up some of the error reporting infrastructure in `kmc` to
  ensure that thrown errors are handled better.
* Removes redundant subshell from `builder_run_action`.

Fixes: #12846
2025-01-13 15:10:31 +07:00
Marc Durdin
7be5c62e3b
Merge pull request #12773 from keymanapp/chore/developer/12746-kmc-copy-full-gh-url-to-master
change(developer): use full github url in kmc copy parameters 🍒
2024-12-06 08:01:34 +01:00
Marc Durdin
72d0bac0ee
Merge pull request #12775 from keymanapp/chore/rename-test-callbacks
chore: rename TestCompilerCallbacks.ts
2024-12-05 23:51:40 +01:00
Marc Durdin
389ef7f001 chore: rename TestCompilerCallbacks.ts
There was confusion with two implementations of TestCompilerCallbacks.
Turns out one of them wasn't used.
2024-12-05 13:04:27 +07:00
Marc Durdin
170282bba7 chore: address review comments 2024-12-05 09:23:27 +07:00
Marc Durdin
33b4fa3e89 change(developer): use full github url in kmc copy parameters
Fixes: #12746
Cherry-pick-of: #12754
2024-12-05 09:23:08 +07:00
Steven R. Loomis
9a338abf91 chore(developer): update per code review
- support empty string as import base
2024-12-04 08:34:36 -06:00
Steven R. Loomis
f4f0355109 feat(developer): local imports directory fixes
- use path.join instead of path.resolve
- rename importsPath to cldrImportsPath
- remove k_015_importlocal from core, as it duplicated tests in common and developer

Fixes: #10649
2024-12-02 15:40:54 -06:00
Steven R. Loomis
48da8fd613
Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2024-12-02 11:55:13 -06:00
Steven R. Loomis
75d172a6cb
Merge branch 'feat/developer/7394-verify-normalization-epic-ldml' into feat/developer/10649-local-imports 2024-12-02 11:37:29 -06:00
Marc Durdin
cd8825d504
Merge pull request #12736 from keymanapp/refactor/developer/unify_test_action
refactor(developer): unify test action
2024-12-01 00:14:11 +01:00
Steven R. Loomis
01a47c3ea9 feat(developer): support local imports
- added a new reader callback option, localImportsPaths
- due to the CLDR issue #12749 use base=""
- add tests
- some bugfixes in import messages
- add an ImportStatus section to determine if something is a local import

Fixes: #10649
2024-11-29 13:48:21 -06:00
Eberhard Beilharz
66404f9503
chore(developer): rename test files
This change rename the test files for Developer according to the
discussion at the Keyman conference in November 2024.
2024-11-28 14:32:09 +01:00
Eberhard Beilharz
badb23a6ab
Merge pull request #12710 from keymanapp/refactor/developer/tc_tests
refactor(developer): output number of tests when running on TC
2024-11-28 19:40:52 +07:00
Marc Durdin
70a32f00d7 refactor(developer): unify test action 2024-11-28 15:16:25 +07:00
Eberhard Beilharz
21736d8817
refactor(developer): output number of tests when running on TC
This change adds the mocha-teamcity-reporter which outputs the running
tests in a special format that TeamCity can interpret. This allows TC
to show which tests run as well as the number of tests run.

Also refactor some of the build scripts to use functions.

Note that we had to explicitly add `--check-coverage=false` (which is the
default) to get successful builds when we run on TC.
2024-11-27 11:41:06 +01:00
Marc Durdin
e388361e84
Merge pull request #12713 from keymanapp/refactor/common/LdmlKeyboardTypes
refactor(common): move remaining LDML keyboard types into `LdmlKeyboardTypes`
2024-11-27 07:21:06 +01:00
Marc Durdin
b54b005830 refactor(common): move remaining LDML keyboard types into LdmlKeyboardTypes
Follows: #12712
2024-11-27 11:52:53 +07:00
Dr Mark C. Sinclair
f51bb9602b chore(developer): removed ERROR_XXXInVirtualKeySection from Compiler.cpp and kmn_compiler_errors.h 2024-11-26 03:46:58 +00:00
Marc Durdin
ce7593bd2f fix(developer): box package compiler info fields
If a .kps file had an `<Info>` element without a URL attribute, it
would not map correctly in all circumstances. This change ensures that
the kps-file-reader is responsible for normalizing the layout of these
elements on read.
2024-11-13 10:11:44 +07:00
Marc Durdin
5a93bdf6c2 chore(developer): make package subfile description fully optional
The package subfile description field is never really used in the
end-user apps. As it is meaningless metadata, we'll make it fully
optional, and start to remove all references in the designers and
compilers.

TODO: For packages targeting Keyman 18.0+, we should consider removing
the description field altogether from the subfiles.
2024-11-13 10:03:26 +07:00
Marc Durdin
d68a64252e feat(developer): add GitHub and Cloud support to kmc-copy
This requires a significant refactor to the compiler interfaces to allow
for asynchronous filesystem and network access. For now, only kmc-copy
uses the asynchronous interfaces, but over time we may try and
consolidate them where other compiler modules find them useful. This
adds a big set of unit test fixtures to avoid network instability in
tests (the fixtures can be regenerated by setting environment variable
`TEST_SAVE_FIXTURES`).
2024-10-28 10:33:42 +07:00
Marc Durdin
40db1c2051 feat(common): add isDirectory, helper functions for kmc-copy 2024-10-22 10:28:03 +07:00
Marc Durdin
1e084e99f0 refactor(developer): add kps-file-reader and kps-file-writer
Relates to kmc-copy project.

Moves the .kps file reader out of kmc-package and adds corresponding
kps file writer unit in developer-utils. Also moves related test and
error message definition.
2024-10-22 10:28:01 +07:00
Marc Durdin
521a9b24c8 feat(developer): add .kpj file writer 2024-10-22 10:28:00 +07:00
Marc Durdin
7d17913e18 feat(developer): seed kmc-copy 2024-10-22 10:28:00 +07:00
Marc Durdin
89e58fbe00
Merge branch 'master' into feat/developer/kmc-generate 2024-10-12 11:48:31 +02:00
Marc Durdin
7dc787b96b fix(developer): use TextDecoder to convert Uint8Array to string
`toString()` only works when the Uint8Array is actually a Node Buffer.
2024-10-11 14:11:45 +07:00
Marc Durdin
0d9688451d
Merge branch 'master' into feat/developer/kmc-generate 2024-10-11 03:26:54 +02:00
Marc Durdin
473fea9be0
Merge pull request #12464 from keymanapp/fix/developer/12454-use-richedit-for-debugger-memo
fix(developer): use richedit in debug memo to support Egyptian cartouches
2024-10-09 09:49:21 +02:00
Marc Durdin
e208d56419 fix(developer): use RichEdit 4.1 for debugger memos
Adds support for using RichEdit 4.1, and sets the richedit control into
the correct mode for rendering arbitrary Unicode correctly. Removes
some unnecessary per-character refresh for improved performance.

Fixes: #12454
2024-10-08 14:21:22 +07:00
Steven R. Loomis
9a4c7e5820 feat(developer): fast-xml-parser: typo fix in xml-utils.ts
Fixes: #12208
2024-10-07 13:05:50 -05:00
Steven R. Loomis
03a24a1506 feat(developer): fast-xml-parser: fix for ldml empty attributes
- because of the form to="" in ldml, we need to distinguish attributes and sub-elements in the ldml xml parsing
- use an attributePrefix, and fixup the object tree afterwards

Fixes: #12208
2024-10-03 12:41:08 -05:00
Steven R. Loomis
3e168aafb2 chore(developer,common): deps: xml2js / fast-xml-parser
- remove vendored xml2js
- add fast-xml-parser@4.5.0
- Rewire the KeymanXMLReader / KeymanXMLWriter to use fast-xml-parser

Four small changes to the test data on the generated .kvks:
- allow &quot; for XML generation (" is legal)
- use the same XML prologue as the actual .kvks files.
- treat <key></key> as <key/> since we can't distinguish
  (removed a "_": "" entry)
- remove whitespace because we now can ("_": "\n  \n \n") on non-leaf nodes.
  This is ignored by the kvks code, but was difficult to maintain roundtrip.

Fixes: #12208
2024-10-03 08:34:24 -05:00
Steven R. Loomis
158c4a7637 feat(developer): update the unified xml parser per review
- declarative syntax for options
- workaround an issue where xml2js is mutating our options objects
- improve tests

Fixes: #12208
2024-09-30 13:25:38 -05:00