Commit graph

565 commits

Author SHA1 Message Date
Eberhard Beilharz
1fe6a0370f
refactor(web): move common/web/eslintcommon/tools/eslint
Fixes: #12386
2024-09-10 19:16:52 +02:00
Eberhard Beilharz
4efe95a4b5
refactor(web): additional exports
Missed a few exports in the last commit.
2024-09-10 10:10:17 +02:00
Eberhard Beilharz
593510a204
refactor(web): explicitly list exports of lexical model types
Addresses code review comments.
2024-09-10 09:38:35 +02:00
Eberhard Beilharz
c3e587193e
refactor(web): move model/types to web/types
Part-of: #12133
2024-09-09 19:59:01 +02:00
Eberhard Beilharz
dc265debd8
docs(web): more adjustments based on review comments 2024-08-29 15:00:10 +07:00
Eberhard Beilharz
9fa3eb098a
Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2024-08-29 14:54:35 +07:00
Eberhard Beilharz
1020977530
docs(web): add documentation comments for touch layout interfaces 2024-08-29 13:21:08 +07:00
Eberhard Beilharz
46ecfd4466
refactor(web): move remaining parts of keyboard-processorkeyboard
move parts of `common/web/keyboard-processor/` →
`web/src/engine/keyboard/`.

Fixes: #12110
2024-08-12 19:40:15 +02:00
Marc Durdin
d55558fb31
Merge pull request #12101 from keymanapp/refactor/common/9665-move-xml2js-and-related-deps-to-developer
refactor(common): move xml2js and related deps to @keymanapp/developer-utils 🐉
2024-08-07 15:16:07 +10: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
ed143fb333
Merge branch 'master' into refactor/common/9665-move-ldml-keyboard-source-file-to-developer 2024-08-07 15:15:04 +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
88506cea6b
Merge branch 'master' into refactor/common/9665-move-kps-file-type-to-developer 2024-08-07 15:13:10 +10:00
Marc Durdin
7849b7734b
Merge pull request #11531 from keymanapp/refactor/common/9665-move-project-file-type-to-developer
refactor(common): move kpj-related files into developer-utils 🐉
2024-08-07 15:12:31 +10:00
Marc Durdin
edf47d7f43 refactor(common): move xml2js and related deps to @keymanapp/developer-utils
Fixes: #9665
2024-08-06 05:19:30 +07:00
Marc Durdin
42698eb96d
chore: Update common/web/types/build.sh 2024-08-05 09:45:27 +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
d3d3ac1eec refactor(common): move LDML keyboard .xml reader/writer and kmx-plus builder to @keymanapp/developer-utils
Relates-to: #9665
2024-08-02 10:23:11 +07:00
Eberhard Beilharz
2c2acbe863
refactor(web): refactor and harmonize constants
Note that this adds the keyCodes > 50000 to `USVirtualKeyCodes`.

Fixes: #8146
2024-08-01 20:36:43 +02:00
Marc Durdin
08803111e5
Merge branch 'refactor/common/9665-move-kvk-file-to-developer' into refactor/common/9665-move-keyman-touch-layout-file-to-developer 2024-08-01 10:35:48 +10: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
ad9ba1f188
Merge branch 'refactor/common/9665-move-project-file-type-to-developer' into refactor/common/9665-move-kps-file-type-to-developer 2024-08-01 10:34:05 +10:00
Marc Durdin
d8986be12f refactor(common): merge master into branch 2024-08-01 07:07:07 +07:00
Eberhard Beilharz
1389d40965
Merge branch 'master' into change/web/11878_remove-es5 2024-07-31 15:28:38 +02:00
Eberhard Beilharz
e42a895977
fix(web): export consts 2024-07-30 09:47:02 +02:00
Eberhard Beilharz
fd8ffb5efc
chore(web): don't deep import and remove sub-export of util
Addresses code review comments and reverts eb9205f46e and
partially reverts 5552fdd5ad.
2024-07-29 17:43:34 +02:00
Eberhard Beilharz
02170dd062
chore(web): update common/web/types/src/main.ts
Co-authored-by: Joshua Horton <joshua_horton@sil.org>
2024-07-25 12:28:11 +02:00
Eberhard Beilharz
5552fdd5ad
chore(web): expose util.ts as separate sub-export
The exports of the `util.ts` can now be imported as
`@keymanapp/common-types/utils`. Those methods are used by developer.
We still export the `Uni_IsSurrogate*` methods in `main.js` because they
are needed by the keyboard-processor, but exporting everything would
increase the size of the resulting `keymanweb.js`. Doing it this way
keeps the size the same.
2024-07-24 17:33:48 +02: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
Joshua A. Horton
877cd9767d
fix(common): add workaround for divergence of EventEmitter3 from node's version
Node's version has special behavior for events named 'error' - if no handler, it auto-throws.  EventEmitter3 does not include this.
2024-07-04 20:49:31 +02:00
Eberhard Beilharz
afe25eda24
change(web): remove support for es5
Fixes: #11878
2024-07-04 20:49:30 +02: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
09ee827270 refactor(common): move .keyman-touch-layout reader/writer to @keymanapp/developer-utils
Relates to #9665
2024-06-13 10:24:14 +10:00
Marc Durdin
a1d94dc528 chore(common): reduce threshold for c8 to 70% 2024-06-13 10:23:47 +10:00
Marc Durdin
f6105d87d8 refactor(common): fixup tests for kvks-file 2024-06-13 09:31:52 +10:00
Marc Durdin
cdbcbe723a chore(common): reduce c8 threshold for common-types by 1% after moving kvk-file 2024-06-13 09:00:36 +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
Marc Durdin
de9ab217e9 refactor(common): move kps-file.ts to @keymanapp/developer-utils
Part of #9665.
2024-06-13 08:57:49 +10:00
Marc Durdin
b2c4979cf4 chore(common): reduce c8 threshold for common-types
As we move some better-tested areas out of common-types, it looks like
our overall coverage goes down.
2024-06-12 16:31:54 +07:00
Marc Durdin
74e2a8ccea refactor(common): move kpj test fixtures and cleanup post-move
Moves the kpj test fixtures into developer-utils, moves from let to
const in code where required by eslint, and reduces the coverage
threshold in order to get tests to pass for developer-utils.
2024-06-12 16:31:53 +07:00
Marc Durdin
9cf09a5140 refactor(common): move kpj-related files into developer-utils
Relates to #9665.
2024-06-12 16:31:52 +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
e527317d3a fix(common): remove subpackge entries for older TS version 2024-06-10 09:14:03 +07:00
Marc Durdin
32e92846a3
Merge pull request #11690 from keymanapp/chore/common/move-cldr-import-copy-to-build-step
chore(common): move CLDR import copy into build step for common/web/types
2024-06-06 10:08:39 +07:00
Marc Durdin
93ba57dcd8 chore(common): move CLDR import copy into build step for common/web/types
The CLDR imports are copied into the build/ folder, so it makes more
sense for them to be done during the build phase, particularly as it is
a very quick operation. (Before this, removing the build/ folder did not
trigger a build.sh configure, so subsequent tests and usage will fail
with confusing LDML import errors. An alternative solution would have
been to declare the configure output to be one of these files.)
2024-06-05 10:53:44 +07:00
Marc Durdin
9c204ea071 fix(common): import EventEmitter only instead of all events in parser.js
When importing all of events with:

    import * as events from 'events';

tsc for kmc-ldml (but not for common/web/types) would error with:

    ../../../common/web/types/build/src/deps/xml2js/parser.d.ts:17:25 - error TS2306: File '.../node_modules/@types/node/events.d.ts' is not a module.

    17 import * as events from "node/events.js";

I am not clear why. Changing to the following side-stepped this:

    import { EventEmitter } from 'events';
2024-06-05 10:07:37 +07:00
Marc Durdin
e6d59fc173 chore: move xml2js into the repo to eliminate npm git dependency
Small rewrites to the xml2js code as ES6 modules. Based on
https://github.com/keymanapp/dependency-node-xml2js

Fixes: #8616
2024-06-03 16:07:29 +07:00
Marc Durdin
b874de25e8 chore: replace git dep on restructure with 3.0.1 in npm
3.0.1 includes our fix. However, 3.0.2 does not yet appear to have been
published, which has a patch for our fix?

Fixes: #8616
2024-06-03 14:58:39 +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