Commit graph

46 commits

Author SHA1 Message Date
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
acefdf281a maint(common): move typescript script functions into typescript.inc.sh
Fixes: #14448
Build-bot: build
Test-bot: skip
2025-08-03 07:01:57 +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
2011d117d6 chore(developer): finalize activation of prefer-const within developer TS modules 2025-04-30 09:41:07 +07:00
Marc Durdin
86d457837f chore(developer): remove unreferenced fields from kmc-generate test fixtures
Relates-to: #13576
2025-03-28 14:59:07 +07:00
Marc Durdin
9dabcc0306 fix(developer): remove redundant keyboard fields from .kps
The fields 'name', 'version', and 'rtl' were defined in the .kps file,
but were not actually used by the compiler, as kmc-package reads the
metadata from the keyboard file rather than relying on this data, which
often is out of date. This led to confusion for keyboard authors, so
this change removes that metadata from the package.

The one visible side-effect (apart from the data disappearing from
future .kps files) is that the package editor no longer shows this
metadata in the Keyboards view (but as it may be out-of-date, this is
probably a good thing).

Fixes: #13576
Fixes: #13593
2025-03-28 14:07:23 +07:00
Marc Durdin
0e48e44d2d chore(developer): add INFO messages for kmc copy and kmc generate
Note: these messages are in `kmc`, not in `kmc-copy` or `kmc-generate`,
matching the structure for existing `INFO_BuildingProject` and related
messages.

Fixes: #13127
2025-02-12 13:14:42 +07:00
Marc Durdin
bd4633333b feat(developer): improve compiler messages and user interface
* Add unit test to verify the format of message detail strings
  (max line length of 80 chars)
* Add unit test to verify non-null, non-empty message strings
* Tidy up a number of messages (to pass unit tests)
* Add message details for all kmw compiler messages
* Add a clickable link for the TIKE message window for each message
  so that explanations and further message details are more accessible
  to authors (`kmc message` is already available for command-line users)
* Fixes a number of minor issues with the messages window in TIKE,
  mostly relating to when popup menu commands are enabled and how
  messages are selected.

Fixes: #13134
2025-02-07 08:46:46 +07:00
Marc Durdin
adf4b80bc0 chore(developer): make kmc-generate more resilient with nullish options 2025-02-03 10:30:13 +07:00
Marc Durdin
d2aa22ff75 fix(developer): make kmc log options consistent across all commands
Makes the `--log-format`, `--log-level`, and `--color`/`--no-color`
options available for all commands and DRYs out some of the options
processing for consistency. This has positive impact in particular on
the Generator classes which removes the need for several unit tests as
the interface can now be checked at compile time.

Fixes: #13072
Unblocks: #13073
2025-01-30 09:20:29 +07:00
Marc Durdin
68ef6108eb chore(developer): add langtags dep for kmc-generate 2025-01-27 13:25:32 +07:00
Marc Durdin
b49334d9cf chore(developer): use langtags.json for kmc-generate language names
Also fills out the remaining functionality in @keymanapp/langtags.

Fixes: #13045
2025-01-27 11:47:25 +07:00
Marc Durdin
c6aa912655 chore(developer): validate output folder name in kmc-copy
Fixes: #12978
2025-01-22 10:58:01 +07:00
Marc Durdin
6372fe8f5e
Merge branch 'chore/developer/12965-kmc-generate-test-basic-transform' into chore/developer/disable-icon-in-kmc-generate 2025-01-22 07:45:56 +07:00
Marc Durdin
89813e11ad chore(developer): use path separator for non-Windows platforms in kmc-generate tests 2025-01-22 07:45:41 +07:00
Marc Durdin
edc8d00caf chore(developer): stub out icon support in kmc-generate
As icon generation turns out to be challenging due to limitations or
native dependencies in node.js libraries for image generation, icon
options are now stubbed out to avoid confusion.
2025-01-22 07:14:07 +07:00
Marc Durdin
e86ddc89a2 chore(developer): add test for basic transform to kmc-generate
Fixes: #12965
2025-01-21 15:58:19 +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
bda60eb39f chore(developer): validate targets parameter in kmc-generate
Fixes: #12954
2025-01-21 10:55:18 +07:00
Marc Durdin
889482ca53 test(developer): update fixture 2024-12-09 06:27:45 +07:00
Marc Durdin
09d14dae14 fix(developer): remove platforms from kmc-generate LM readme
Lexical models are not specific to a platform, so the readme should not
list supported platforms.

Fixes: #12592
2024-12-09 06:01:35 +07: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
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
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
7d17913e18 feat(developer): seed kmc-copy 2024-10-22 10:28:00 +07:00
Marc Durdin
4c0588ea39 refactor(developer): define output path in kmc-generate artifacts 2024-10-22 10:25:30 +07:00
Marc Durdin
09979861ea chore(developer): fix kmc-generate test fixtures 2024-09-26 17:18:35 -07:00
Marc Durdin
58868474b1 chore(developer): cleanup targets and generated files in kmc-generate 2024-09-26 17:12:49 -07:00
Marc Durdin
025b9ed01f chore(developer): update eslint config path 2024-09-26 14:20:47 -07:00
Marc Durdin
ec6c26c7f7 feat(developer): add .gitignore to kmc generate templates 2024-09-17 17:05:37 +07:00
Marc Durdin
178325c019 chore(developer): use new npm publish for kmc-generate 2024-09-10 15:30:54 +07:00
Marc Durdin
edc5c93d69 chore(developer): add api-extractor for kmc-generate 2024-09-10 13:51:55 +07:00
Marc Durdin
021d4341e7 chore(developer): generate no longer needs to generate .model_info 2024-09-10 11:55:16 +07:00
Marc Durdin
95d169f879 chore(developer): add developer-utils dep for kmc-generate 2024-09-09 09:17:32 +07:00
Marc Durdin
09e97cebc9 chore(developer): fixup imports 2024-09-09 08:57:39 +07:00
Marc Durdin
d2f99f69cb chore(developer): refactor imports after merge 2024-09-09 06:30:26 +07:00
Marc Durdin
113b4f7ac8 feat(developer): comments for kmc-generate 2024-09-03 06:20:34 +07:00
Marc Durdin
1ab1ca5d78 chore(developer): fixup tests and scripts for kmc-generate 2024-09-03 06:20:34 +07:00
Marc Durdin
db904119f3 feat(developer): unit tests for kmc-generate
Note: these are more e2e than unit tests. It may be difficult to convert
them into solid unit tests due to the way that kmc-generate works based
on templates.
2024-09-03 06:20:33 +07:00
Marc Durdin
8274d30788 feat(developer): kmc generate cleanup
Cleanup various todo items for kmc generate. Outstanding TODO item is
icon generation for .kmn.
2024-09-03 06:20:28 +07:00
Marc Durdin
2994fe2aea feat(developer): kmc-generate docs and tests started 2024-09-03 06:17:33 +07:00
Marc Durdin
939134a9a3 feat(developer): kmc-generate module
Plenty of todo items left but this is a mostly-functional module for the
kmc generate command for automatically creating keyboard and model
projects.
2024-09-03 06:15:33 +07:00