Commit graph

99 commits

Author SHA1 Message Date
Marc Durdin
19264fdbe2
Merge pull request #15030 from cvosoft/test/add-osk-character-use-format-tests
test(developer): add kmc-analyze tests for AnalyzeOskCharacterUse output formats
2025-10-30 06:04:30 +01:00
Marc Durdin
df212364a2 maint(resources): add repository record for all published packages
While not documented as such, it appears that the repository record is
required with trusted publishing of npm packages.

Test-bot: skip
Build-bot: skip
2025-10-29 14:35:31 +01:00
Christoph Völker
d49c23646a Merge remote-tracking branch 'upstream/master' into test/add-osk-character-use-format-tests 2025-10-29 14:17:10 +01:00
Christoph Völker
e2eb10312f test(kmc-analyze): add supplementary plane tests for stringToUnicodeSequence 2025-10-28 17:46:07 +01:00
Christoph Völker
3d10ac4b87 test(kmc-analyze): add tests for AnalyzeOskCharacterUse output formats 2025-10-28 16:50:04 +01:00
Marc Durdin
fe6e8e72a8
Merge pull request #15029 from keymanapp/maint/resources/14963-npm-publish-on-gha
maint(resources): move npm package publishing to GitHub Actions
2025-10-28 07:57:35 +01:00
Christoph Völker
ac6d305b79 format update 2025-10-27 19:10:40 +01:00
Christoph Völker
e06ac524fb test(kmc-analyze): add tests for AnalyzeOskCharacterUse output formats 2025-10-27 17:45:44 +01:00
Marc Durdin
ba411774f6 maint(resources): move NPM package publishing to GitHub Actions
Due to recent changes in NPM package publishing security requirements,
we have to move from TeamCity build to a GitHub Action to publish our
NPM packages, so we can take advantage of trusted publishing. This
change also consolidates and centralizes the npm publishing into
resources/build/ci/npm-publish.sh, which removes a lot of boilerplate
from each of the build.sh scripts, and ensures consistency.

Packages will be `npm pack`ed on PR and test builds, and published in
release builds.

Ref: https://docs.npmjs.com/trusted-publishers
Ref: https://github.blog/changelog/2025-09-29-strengthening-npm-security-important-changes-to-authentication-and-token-management/
Fixes: #14963
Test-bot: skip
Build-bot: release:developer
2025-10-27 16:31:55 +01:00
Christoph Völker
368766acdc test(kmc-analyze): fix import paths and order 2025-10-27 14:05:13 +01:00
Christoph Völker
469149e72d test(kmc-analyze): add message coverage tests for AnalyzeOskCharacterUse 2025-10-27 08:36:56 +01:00
Christoph Völker
07c13e81ac test(kmc-analyze): add message coverage tests for AnalyzeOskCharacterUse 2025-10-25 07:38:28 +02:00
Christoph Völker
cbaae084f7 test(kmc-analyze): add warnings coverage tests for AnalyzeOskCharacterUse 2025-10-24 13:31:15 +02:00
Christoph Völker
15ea1f321e test(developer): use unitTestEndPoints for loadPreviousMap and clean up test 2025-10-24 08:09:14 +02:00
Christoph Völker
d57274b26d test(developer): add unit test for Warn_PreviousMapFileCouldNotBeLoaded and raise coverage threshold to 75% 2025-10-23 21:03:52 +02:00
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
6b8c90c191 change(developer): clean up developer/src/kmc-analyze linter issues 2025-04-30 09:16:22 +07:00
Marc Durdin
4202f46550 fix(developer): support hint property in displaymap
Fixes: #12795
2024-12-09 12:20:53 +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
c683657969 feat(developer): analyze osk-char-use merge with existing mapping file
A gap in the kmc-analyze module displayMap support was that it was not
possible to extend an existing mapping file, but only to rewrite one.
This caused issues because the mappings could change between runs, if
keyboards changed, meaning fonts would not be backward compatible. This
change guarantees an existing mapping file will have exactly the same
character mappings, and only adds new mappings that are found.

Also adds unit tests and enables for kmc-analyze.

Fixes: #9767
2024-11-05 14:43:29 +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
c3e587193e
refactor(web): move model/types to web/types
Part-of: #12133
2024-09-09 19:59:01 +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
ec72245575
Merge pull request #11765 from keymanapp/refactor/common/9665-move-keyman-touch-layout-file-to-developer
refactor(common): move .keyman-touch-layout reader/writer to @keymanapp/developer-utils 🐉
2024-08-07 15:14:06 +10:00
Marc Durdin
e9d054ab2c
Merge branch 'master' into refactor/common/9665-move-kvk-file-to-developer 2024-08-07 15:13:41 +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
bd070683f4 refactor(developer): move additional references for TouchLayoutFile 2024-08-01 13:18:32 +07:00
Marc Durdin
53551f5662
Merge branch 'refactor/common/9665-move-kps-file-type-to-developer' into refactor/common/9665-move-kvk-file-to-developer 2024-08-01 10:35:33 +10: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
Marc Durdin
db904b5617 fix(developer): cleanup package.json and build.sh errant references
During analysis of root causes for #12027, discovered a few package
relationship issues in package.json and build.sh.

analyzer-messages.ts ///<reference> is a mitigation for now.

Relates-to: #12027
2024-07-26 06:57:32 +07:00
Marc Durdin
70a32b081b chore(developer): rename to analyzer-messages.ts
Fixes #10254.

A full clean and build resolved this, so seems likely the rename caused
some intermediate file to break?
2024-07-25 15:09:00 +07:00
Marc Durdin
39cd3bd5ad chore(developer): remove CompilerMessages stub and use KmnCompilerMessages 2024-07-21 15:50:10 +10:00
Marc Durdin
1c74d9d713 refactor(common): move kvks-file to @keymanapp/developer-utils
Relates to #9665
2024-06-13 08:58:55 +10: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
e527317d3a fix(common): remove subpackge entries for older TS version 2024-06-10 09:14:03 +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