Commit graph

3247 commits

Author SHA1 Message Date
Marc Durdin
39cd3bd5ad chore(developer): remove CompilerMessages stub and use KmnCompilerMessages 2024-07-21 15:50:10 +10:00
Marc Durdin
c5799502dd fix(developer): kmc-keyboard-info: use default version 1.0 if version information missing
Also add unit test.

Fixes: #11856
2024-07-21 15:41:22 +10:00
Marc Durdin
1f0d51eec5 feat(developer): add searching for message identifiers to kmc message
Fixes: #10875
2024-07-21 14:50:33 +10:00
Marc Durdin
9f4fc70c35 refactor(developer): rename verifyMinimumKeymanVersion
Fixes: #11966
2024-07-21 13:38:32 +10:00
Marc Durdin
8a0005599c feat(developer): automatically upgrade version when gestures are found in the touch layout
When gestures are found in the touch layout file, the compiler will now
automatically upgrade the version to 17.0, if no `store(&VERSION)` rule
is found. Also adds corresponding unit tests.

Fixes: #11961
2024-07-21 13:33:09 +10:00
Marc Durdin
e3134a1c0f feat(developer): handle automatic versioning of special key caps on normal keys
Special key caps on normal keys in touch layout files are supported with
Keyman 14.0 and later versions. Handle automatic determination of the
version number if `store(&VERSION)` is not present. Add corresponding
unit tests.

Fixes: #11960
2024-07-21 13:22:33 +10:00
Marc Durdin
56aafe5b42 chore(developer): add note on removed error id 2024-07-21 11:01:31 +10:00
Marc Durdin
72afc6d52a test(developer): Add tests for automatic versioning of notany() with context()
Adds a unit test to verify that automatic versioning of notany() in
conjunction with context() is correctly managed. Removes compiler error
that could never be generated (replace with safety-check exception).

Fixes: #11959
2024-07-16 05:20:37 +10:00
Marc Durdin
719d050d86 feat(developer): handle automatic versioning of chiral modifiers
Adds support for determining minimum version 10.0 when chiral modifiers
or state modifiers are found in virtual keys, e.g. `[LCTRL K_A]`,
`[CAPS K_A]`, and corresponding unit tests.

Fixes: #11958
2024-07-16 04:44:44 +10:00
Marc Durdin
3497e97b00 feat(developer): automatic version detection for U_xxxx_yyyy ids
Currently, automatic Keyman minimum version determination works for all
features in Keyman keyboards _except_ `U_xxxx_yyyy` touch key
identifiers.

This change adds the automatic keyboard versioning functionality to the
keymanweb compiler as well, following the pattern that's in kmcmplib.

This makes the `store(&version)` line completely optional, and it may
be possible to deprecate it in future versions of Keyman Developer.
2024-07-13 07:28:18 +10:00
Dr Mark C. Sinclair
963aecc5f3 chore(developer): Merge branch 'master' into fix/developer/handle-second-parameter-of-index-correctly-in-kmcmplib-compiler
# Keyman Conventional Commit suggestions:
#
# - Link to a Sentry issue with git trailer:
#     Fixes: _MODULE_-_ID_
# - Give credit to co-authors:
#     Co-authored-by: _Name_ <_email_>
# - Use imperative, present tense ('attach' not 'attaches', 'attached' etc)
# - Don't include a period at the end of the title
# - Always include a blank line before trailers
# - More: https://github.com/keymanapp/keyman/wiki/Pull-Request-and-Commit-workflow-notes
2024-07-01 09:33:09 +01:00
Marc Durdin
14abb312d1
Merge pull request #11806 from keymanapp/fix/developer/11643-prevent-non-bmp-chars-in-key-part-of-rule
fix(developer): prevent non-BMP characters in key part of rule
2024-07-01 11:37:59 +10:00
Dr Mark C. Sinclair
0e029519c9 chore(developer): Merge branch 'master' into fix/developer/handle-second-parameter-of-index-correctly-in-kmcmplib-compiler
# Keyman Conventional Commit suggestions:
#
# - Link to a Sentry issue with git trailer:
#     Fixes: _MODULE_-_ID_
# - Give credit to co-authors:
#     Co-authored-by: _Name_ <_email_>
# - Use imperative, present tense ('attach' not 'attaches', 'attached' etc)
# - Don't include a period at the end of the title
# - Always include a blank line before trailers
# - More: https://github.com/keymanapp/keyman/wiki/Pull-Request-and-Commit-workflow-notes
2024-06-24 09:21:28 +01:00
Steven R. Loomis
f390de30da
Merge pull request #11843 from keymanapp/fix/developer/10553-reduce-bogus-unclear-errors
fix(developer): layr: fix modifier err message on layer w/o id 🙀
2024-06-21 08:25:08 -05:00
Steven R. Loomis
4dc02c4952 fix(developer): layr: fix modifier err message on layer w/o id
- the error message was broken when there wasn't a layer id (which is allowed)
- add a test case

Fixes: #10553
2024-06-20 17:19:44 -05:00
Steven R. Loomis
017e1f7e97
Merge branch 'master' into feat/developer/11054-warn-no-display 2024-06-20 16:03:26 -05:00
Steven R. Loomis
570766ca7c feat(developer): linter on blank keycaps
add a linter and hints to detect these cases:
- 'switch' key with no output and no matching display
- any other key whose only output is markers (so cannot otherwise display) and no matching display

Fixes: #11054
2024-06-20 16:02:43 -05:00
Dr Mark C. Sinclair
e2260feef7 chore(developer): Merge branch 'master' into fix/developer/handle-second-parameter-of-index-correctly-in-kmcmplib-compiler
# Keyman Conventional Commit suggestions:
#
# - Link to a Sentry issue with git trailer:
#     Fixes: _MODULE_-_ID_
# - Give credit to co-authors:
#     Co-authored-by: _Name_ <_email_>
# - Use imperative, present tense ('attach' not 'attaches', 'attached' etc)
# - Don't include a period at the end of the title
# - Always include a blank line before trailers
# - More: https://github.com/keymanapp/keyman/wiki/Pull-Request-and-Commit-workflow-notes
2024-06-19 15:20:15 +01:00
Dr Mark C. Sinclair
31598afbb7 fix(developer): add doc comments to isIntegerWstring(), plus whitespace tests 2024-06-19 15:15:11 +01:00
Dr Mark C. Sinclair
c7ecafa2c0 fix(developer): add additional white space test cases 2024-06-19 14:46:32 +01:00
Dr Mark C. Sinclair
975b2edb98 fix(developer): add ref to issue #11833 in relevant test case 2024-06-19 14:19:59 +01:00
Dr Mark C. Sinclair
facd5fb034 fix(developer): reverse the fix in u16tok where u16chr is used with *q==0 2024-06-19 13:52:24 +01:00
Dr Mark C. Sinclair
fbe735cb95 fix(developer): add check for offset < 1, plus tests 2024-06-19 12:14:20 +01:00
Dr Mark C. Sinclair
618e7a2d53 fix(developer): remove unnecessary include 2024-06-19 12:08:01 +01:00
Dr Mark C. Sinclair
7903258260 fix(developer): extend isIntegerWstring to handle full range of ints 2024-06-19 11:59:11 +01:00
Dr Mark C. Sinclair
f97000641e fix(developer): rename isuiw() to isIntegerWstring() 2024-06-19 11:32:44 +01:00
Dr Mark C. Sinclair
ee10283060 chore(developer): correct memory leak in isuiw() 2024-06-19 10:43:03 +01:00
Marc Durdin
d15cda2d18
Merge pull request #11822 from keymanapp/dependabot/npm_and_yarn/ws-8.17.1
chore(deps): bump ws from 8.16.0 to 8.17.1
2024-06-19 10:35:29 +10:00
dependabot[bot]
aca6e1dfcc
chore(deps): bump ws from 8.16.0 to 8.17.1
Bumps [ws](https://github.com/websockets/ws) from 8.16.0 to 8.17.1.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.16.0...8.17.1)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-18 22:02:42 +00:00
Marc Durdin
5ecc3aa3e3 chore(developer): clarify project upgrade messages about file locations 2024-06-19 06:23:34 +10:00
Steven R. Loomis
174a2ae80b feat(developer): linter API
- add a Linter class that gets passed the compiled KMXPlus file, and the source file
2024-06-18 11:17:43 -05:00
Dr Mark C. Sinclair
b41aa51663 fix(developer): remove duplicate delete 2024-06-18 16:47:54 +01:00
Steven R. Loomis
8deae5137c test(developer): shuffle tests
- split out test-strs from test-compiler-e2e
- split out test-linter from test-compiler-e2e
2024-06-18 10:15:28 -05:00
Steven R. Loomis
c614de0cd1
feat(developer): Update developer/src/kmc-ldml/src/compiler/messages.ts
Co-authored-by: Marc Durdin <marc@durdin.net>
2024-06-18 09:59:40 -05:00
Dr Mark C. Sinclair
3df33c86fc chore(developer): add delete to clean up file_store 2024-06-18 14:10:25 +01:00
Dr Mark C. Sinclair
90a6fb6185 fix(developer): add isuiw() to check second index parameter, and adjust test 2024-06-18 11:55:34 +01:00
Dr Mark C. Sinclair
2a25c81751 fix(developer): add supporting tests for isuiw() 2024-06-18 11:50:14 +01:00
Dr Mark C. Sinclair
3b5f7f6e1b fix(developer): add isuiw() to test if a u16str contains an unsigned int 2024-06-18 11:25:05 +01:00
Dr Mark C. Sinclair
9eb465ab6f fix(developer): restore unnecessary line deletion 2024-06-18 10:59:02 +01:00
Dr Mark C. Sinclair
ad55c344b3 fix(developer): changes to prevent overrun when second parameter missing, plus update test 2024-06-18 10:54:33 +01:00
Dr Mark C. Sinclair
9a827af779 chore(developer): Merge branch 'master' into fix/developer/handle-second-parameter-of-index-correctly-in-kmcmplib-compiler
# Keyman Conventional Commit suggestions:
#
# - Link to a Sentry issue with git trailer:
#     Fixes: _MODULE_-_ID_
# - Give credit to co-authors:
#     Co-authored-by: _Name_ <_email_>
# - Use imperative, present tense ('attach' not 'attaches', 'attached' etc)
# - Don't include a period at the end of the title
# - Always include a blank line before trailers
# - More: https://github.com/keymanapp/keyman/wiki/Pull-Request-and-Commit-workflow-notes
2024-06-18 10:46:05 +01:00
Dr Mark C. Sinclair
ede3c28f10 fix(developer): add index tests (in GetXStringImpl_type_i test) 2024-06-18 10:39:33 +01:00
Marc Durdin
4bc943c106
Merge pull request #11771 from Meng-Heng/contexthelp-final/keyboard-editor
docs(developer): extra context help for keyboard-editor (does not exist in Keyman Developer 17.0)
2024-06-18 17:12:15 +10:00
Steven R. Loomis
612064f1b2 feat(developer): warn on empty keycaps
- add a hint and test for cases where no display matches a marker-only key

Fixes: #11054
2024-06-17 17:49:59 -05:00
Marc Durdin
83f9169e04
Merge branch 'master' into fix/developer/11643-prevent-non-bmp-chars-in-key-part-of-rule 2024-06-18 07:44:08 +10:00
Marc Durdin
ba59ae89f4
Merge branch 'master' into fix/developer/11793-use-HISTORY-MD-for-last-commit-date 2024-06-18 07:44:03 +10:00
Marc Durdin
d23208ac9e chore(developer): add msec in comment 2024-06-18 07:36:35 +10:00
Marc Durdin
a9f6f7baeb test(developer): add unit test for CERR_NonBMPCharactersNotSupportedInKeySection
Fixes: #11643
2024-06-18 07:18:05 +10:00
Marc Durdin
e081e0c72e fix(developer): check HISTORY.md to get last modified date for keyboard_info and model_info
This updates the calculation of the lastModifiedDate property of the
.keyboard_info and .model_info file. It now looks for the most recent
commit to HISTORY.md, and then falls back to the project folder for
.keyboard_info and .model_info.

getLastGitCommitDate now also returns UTC date (it was giving TZ=0
which is affected by daylight saving), and works for a file rather than
just for a folder, and a corresponding unit test has been added.

The date strings returned will now always include '.000' msec suffix. I
have manually verified that the import into the api.keyman.com database
copes with this, and that this change still conforms to the expected
schema for .keyboard_info and .model_info files.

Last, but important, it turned out that the unit tests for kmc were not
running. This has been resolved in kmc/build.sh.

Fixes: #11793
2024-06-18 07:03:08 +10:00
Marc Durdin
72aa772e20 test(developer): add fixture for getLastGitCommitDate unit test 2024-06-18 06:44:20 +10:00