Commit graph

109 commits

Author SHA1 Message Date
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
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
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
dependabot[bot]
4abc1b3d2b
chore(deps-dev): bump esbuild from 0.18.20 to 0.25.0
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.18.20 to 0.25.0.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2023.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.18.20...v0.25.0)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-11 11:17:53 +00: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
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
dc2b9b2ad9 refactor(developer): LexicalModelTypes tests 2024-11-27 10:13:09 +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
Marc Durdin
2a0e17cab7 fix(developer): handle missing files in kmc-model
If a file is not found, loadfile returns null, which kmc-model now
handles with a clear error message rather than a generic exception.
Checks added for missing .model.ts and missing wordlist.tsv files. Added
corresponding unit tests.

Fixes: #12553
Fixes: KEYMAN-DEVELOPER-294
2024-10-31 09:29:46 +07:00
Eberhard Beilharz
1fe6a0370f
refactor(web): move common/web/eslintcommon/tools/eslint
Fixes: #12386
2024-09-10 19:16:52 +02:00
Eberhard Beilharz
91bbc250a8
refactor(web): move model/templates to web/src/engine/predictive/text
Part-of: #12133
2024-09-10 17:10:12 +02:00
Eberhard Beilharz
c3e587193e
refactor(web): move model/types to web/types
Part-of: #12133
2024-09-09 19:59:01 +02:00
Marc Durdin
8457f9527a chore(developer): extend timeouts for lm compiler tests to 5 secs
Fixes: #12271
2024-08-23 17:53:48 +02:00
Marc Durdin
32b4711659
Merge branch 'master' into refactor/common/9665-move-compiler-interfaces-to-developer 2024-08-07 15:15:45 +10:00
Marc Durdin
e67aed1606 refactor(common): move compiler-interfaces to @keymanapp/developer-utils
This should be the last step in the refactoring.

Fixes: #9665
2024-08-02 13:49:59 +07:00
Marc Durdin
d8986be12f refactor(common): merge master into branch 2024-08-01 07:07:07 +07:00
Marc Durdin
d1e351a1ac
Revert "chore(developer): remove redundant references from tsconfig.json" 2024-08-01 08:57:27 +10:00
Marc Durdin
1cff1a5084 chore(developer): remove redundant references from tsconfig.json
With the full move to ES Modules, we no longer need to include
`references` in tsconfig.json, as we can rely on package.json and
build.sh dependency management. Note however that `tsc -b` may not work
to build dependencies -- they need to be built using `build.sh`, which
calculates which dependencies need building.

kmc-keyboard-info was missing a dependency link to kmc-package in
build.sh, correcting this at the same time.

Relates-to: #12027
2024-07-27 05:44:22 +07:00
Marc Durdin
1afa4beb01 fix(developer): remove paths from tsconfig.json
Fixes: #12027
2024-07-26 06:59:45 +07:00
Joshua A. Horton
ace4eb25c4 chore(common): Merge branch 'master' into change/common/update-esbuild 2024-06-13 12:47:55 +07:00
Joshua A. Horton
d07fa7e953 chore(common): eliminate ts-node ref from most subpackages 2024-06-10 10:07:58 +07:00
Joshua A. Horton
cb9ac807e0 change(developer): precompile create-override-script-regexp.ts 2024-06-10 09:43:56 +07:00
Joshua A. Horton
e527317d3a fix(common): remove subpackge entries for older TS version 2024-06-10 09:14:03 +07:00
Joshua A. Horton
cb0a60165c change(common): updates esbuild to 0.18.9 2024-06-05 12:09:53 +07:00
Marc Durdin
ee0fc0ce14 chore(developer): cleanup npm publish
Use a new flag `--npm-publish` in conjunction with `publish` action,
so that the default will always be to `npm pack` if the new flag is not
specified. This flag is also guarded in the actual npm publish code to
ensure that it can only run in the appropriate CI alpha/beta/stable
environment, and not in local or test.

This then also removes the separate `pack` action.

Also removes legacy boilerplate from a number of build scripts.
2024-05-20 06:34:57 +07:00
Marc Durdin
c8a1c6aa39 chore(developer): use builder.inc.sh instead of build-utils.sh in build scripts
also, remove old Makefiles
2024-05-20 06:34:46 +07:00
Joshua A. Horton
398b9e0ae2 chore(common): drops package-specific 'chai', '@types/chai' versions
chore(web): missed leaving these out of the rebase
2024-05-07 14:35:09 +07:00
Marc Durdin
cd8121ef65 chore(common): builder scripts now use /resources/build/builder.inc.sh
Note: there is a bit of potential confusion about the difference between
/resources/builder.inc.sh (the full implementation for builder scripts),
and /resources/build/builder.inc.sh (the source script that builder
scripts should always use).

This allows us to make assumptions that will always be true for builder
scripts that may not be true for other scripts, such as setting base
folder.
2024-05-02 15:54:31 +07:00
Marc Durdin
0f390d47cc chore(common): maintenance on build scripts - cd
Fixes #11324.

* Always `cd "$THIS_SCRIPT_PATH"`
* Remove unnecessary `cd` from all build.sh
* Remove unnecessary `set -eu` from all build.sh (and `# set -x`)
* Replace old build-utils.sh incantation in a few build.sh scripts
2024-05-02 15:54:29 +07:00
Joshua Horton
9aac994ba3
chore(developer/compilers): comment typo fix 2024-03-27 12:45:06 +07:00
Joshua A. Horton
ff4ddd901d feat(developer/compilers): better unit test for suggestion accessibility 2024-03-27 09:17:34 +07:00
Joshua A. Horton
6fd975c2d2 chore(developer/compilers): minor cleanup 2024-03-26 12:09:21 +07:00
Joshua A. Horton
6df89af9d5 docs(developer/compilers): makes test fixture comment more precise 2024-03-26 06:48:31 +07:00
Joshua A. Horton
78a3704607 fix(developer/compilers): entry additions to internal Trie nodes 2024-03-26 06:04:22 +07:00
Joshua A. Horton
947bd77ebd feat(developer/compilers): adds unit test 2024-03-26 06:04:22 +07:00
Marc Durdin
1c98adffd6
Merge pull request #10921 from keymanapp/docs/developer/kmc-model-docs
docs(developer): kmc-model api documentation
2024-03-07 18:13:06 +07:00
Joshua A. Horton
ab39df716a chore(web): reverts minor formatting change 2024-03-05 12:25:17 +07:00
Joshua A. Horton
94433f74eb fix(developer): search-term quote replacement was not global 2024-03-05 12:23:29 +07:00
Marc Durdin
17a3d929ff docs(developer): kmc-model api documentation 2024-03-04 18:40:01 +07:00
Marc Durdin
4bb9b39ba2 refactor(developer): reorganize messages for adding details
Moved the ERROR_Message line above the Error_Message line for every
message in the compiler message files, as it makes the grouping clearer
once we start adding message details. For example, see the start of the
KmnCompilerMessages class.

Also wraps potentially-undefined parameters to the messages with a new
function `def`, shorthand for `CompilerMessageDef`, which converts the
parameter to '<param>' if it is undefined, which is helpful for
documentation.
2024-02-28 16:00:02 +07:00
Marc Durdin
c7afed7201 refactor(developer): split messages with callstacks into separate generator
Relates to #10207.

In order to include message detail in messages, it is helpful to split
out the exception messages which have a separate parameter, so that
parameter at the same position can be the message detail.

Introduces the CompilerMessageSpecWithException function which takes an
exceptionVar parameter to achieve this differentiation.
2024-02-28 11:34:49 +07:00
Marc Durdin
602b519057 docs(developer): npm package readme files 2024-02-26 14:00:51 +07:00
Marc Durdin
a8d0d8454c feat(developer): add api documentation to build
Relates to #10207.

Adds the `api` action to build.sh for each affected module. The `api`
action for each module will generate the api metadata files, and then
the markdown files are generated by /developer/build.sh api.

Note that developer-utils, kmc, and kmcmplib have no api documentation
at this time (and kmcmplib is not Typescript so would need separate
tooling anyway).
2024-02-26 11:45:36 +07:00