Commit graph

116 commits

Author SHA1 Message Date
Joshua A. Horton
ec35fbb061 chore(web): @types/node update - version should match node version
Also updates @types/chai, given that chai was updated.  No ^5.x yet, though.
2024-05-07 14:38:40 +07:00
Joshua A. Horton
5574b9418f chore(web): chai dependency updates
Updates 'chai' assertion library to latest; old version used CommonJS imports
2024-05-07 14:35:08 +07:00
Marc Durdin
db514e0dc5 fix(common): update emoji stripping for Unicode 15.1
Fixes #11220.

Replaces the sed script for matching emoji in ios prepRelease with a
tiny node project that uses emoji-regex package, to reduce future
maintenance.

Also strips lingering emoji and :xxx: emoji shortcut strings from
HISTORY.md. Note that :xxx: are not stripped programatically at this
time.
2024-04-18 09:05:30 +07:00
Marc Durdin
661069c0c3 feat(developer): add api-extractor and api-documenter and config
Relates to #10207.

Adds @microsoft/api-extractor and @microsoft/api-documenter NPM
packages for validating and generating API documentation from Typescript
modules.

Adds basic configuration for each module that we will be publishing at
this time.

api-extractor's output will be emitted to /developer/docs/api/etc/, for
future release comparisons. A baseline output will be committed
separately.

The build outputs will be in /developer/build/docs and the intermediate
files will be in /developer/build/api.

Note that at this time, we will not enable the checks and validations.
That is a task for alpha rather than beta. The primary intent at this
time is to select a solid, well-supported toolchain for generating the
API documentation for kmc.
2024-02-26 11:37:32 +07:00
Marc Durdin
662ed0e50c fix(common): publish @keymanapp/developer-utils as npm module
Fixes #10111.
2023-12-01 14:05:51 +07:00
Marc Durdin
225877f57a feat(common): precompile json schemas to improve performance
Fixes #9640.

This ended up being somewhat more fragile than originally anticipated.
For the `ajv` cli call to get the right versions, we needed to install
ajv as a dev dependency in the top-level package.json as well as at the
common/web/types level.

Ajv does not do all that well with ESM yet, either, so we use esbuild to
transform the compiled validators before building in typescript.
2023-10-05 13:56:53 +07:00
Marc Durdin
7f76de4781 chore(developer): add developer-utils as workspace 2023-09-01 10:11:15 +07:00
Marc Durdin
232c918c31 feat(developer): support isRTL and license fields in .model_info
Adds support for calculating isRTL and license fields in .model_info
compiler.

Also:
* establishes @keymanapp/developer-utils shared module
* moves license validation into @keymanapp/developer-utils
* refactors kmc-model-info to a class and general cleanup
2023-08-29 16:37:37 +10:00
Marc Durdin
fa19eea873 chore(developer): improve kmc sentry reporting on fatal build errors
kmc already reported unhandled exceptions, but any handled fatal errors
were captured and only reported to the user. It is better to report
these to Sentry as these are still unexpected.

I have refactored all the fatal exception messages in various kmc
modules to use a common mechanism, keeping all the Sentry integration in
kmc, now passing exception data up in the `CompilerEvent.exceptionVar`
property.

* I took the opportunity to rename messages.ts to
  infrastructureMessages.ts

* @types/chai was missing which gave intellisense errors in vscode

* normal exit of kmc now provides an opportunity for error reports to
  Sentry to be finalized

* Added a unit test for fatal errors in kmc

* Added a manual test pathway with `SENTRY_CLIENT_TEST_BUILD_EXCEPTION`
  env var to trip the build fatal error mechanism and verify that it
  looks ok; the following shows test runs demonstrate how fatal build
  errors are reported:

```
mcdurdin@THARK MINGW64 /c/Projects/keyman/app/developer/src/kmc (chore/developer/report-fatal-compiler-errors-to-sentry)
$ SENTRY_CLIENT_TEST_BUILD_EXCEPTION=1 node . --error-reporting build
fatal KM05001: Unexpected exception: Error: Test exception from SENTRY_CLIENT_TEST_BUILD_EXCEPTION

Call stack:
Error: Test exception from SENTRY_CLIENT_TEST_BUILD_EXCEPTION
    at build (file:///C:/Projects/keyman/app/developer/src/kmc/build/src/commands/build.js:78:19)
    at Command.<anonymous> (file:///C:/Projects/keyman/app/developer/src/kmc/build/src/commands/build.js:66:24)
    at Command.listener [as _actionHandler] (C:\Projects\keyman\app\node_modules\commander\lib\command.js:482:17)
    at C:\Projects\keyman\app\node_modules\commander\lib\command.js:1283:65
    at Command._chainOrCall (C:\Projects\keyman\app\node_modules\commander\lib\command.js:1177:12)
    at Command._parseCommand (C:\Projects\keyman\app\node_modules\commander\lib\command.js:1283:27)
    at C:\Projects\keyman\app\node_modules\commander\lib\command.js:1081:27
    at Command._chainOrCall (C:\Projects\keyman\app\node_modules\commander\lib\command.js:1177:12)
    at Command._dispatchSubcommand (C:\Projects\keyman\app\node_modules\commander\lib\command.js:1077:23)
    at Command._parseCommand (C:\Projects\keyman\app\node_modules\commander\lib\command.js:1248:19)

    This error has been automatically reported to the Keyman team.
      Identifier:  6f0fca1a26694c22b03f02b2463d39c5
      Application: Keyman Developer
      Reported at: https://sentry.io/organizations/keyman/projects/keyman-developer/events/6f0fca1a26694c22b03f02b2463d39c5/

mcdurdin@THARK MINGW64 /c/Projects/keyman/app/developer/src/kmc (chore/developer/report-fatal-compiler-errors-to-sentry)
$ SENTRY_CLIENT_TEST_BUILD_EXCEPTION=1 node . --no-error-reporting build
fatal KM05001: Unexpected exception: Error: Test exception from SENTRY_CLIENT_TEST_BUILD_EXCEPTION

Call stack:
Error: Test exception from SENTRY_CLIENT_TEST_BUILD_EXCEPTION
    at build (file:///C:/Projects/keyman/app/developer/src/kmc/build/src/commands/build.js:78:19)
    at Command.<anonymous> (file:///C:/Projects/keyman/app/developer/src/kmc/build/src/commands/build.js:66:24)
    at Command.listener [as _actionHandler] (C:\Projects\keyman\app\node_modules\commander\lib\command.js:482:17)
    at C:\Projects\keyman\app\node_modules\commander\lib\command.js:1283:65
    at Command._chainOrCall (C:\Projects\keyman\app\node_modules\commander\lib\command.js:1177:12)
    at Command._parseCommand (C:\Projects\keyman\app\node_modules\commander\lib\command.js:1283:27)
    at C:\Projects\keyman\app\node_modules\commander\lib\command.js:1081:27
    at Command._chainOrCall (C:\Projects\keyman\app\node_modules\commander\lib\command.js:1177:12)
    at Command._dispatchSubcommand (C:\Projects\keyman\app\node_modules\commander\lib\command.js:1077:23)
    at Command._parseCommand (C:\Projects\keyman\app\node_modules\commander\lib\command.js:1248:19)
```
2023-08-09 09:34:44 +07:00
Marc Durdin
c9e1e82a76
Merge branch 'feature-kmc-kmw' into feat/developer/introduce-kmc-keyboard-info 2023-07-26 19:24:34 +10:00
Marc Durdin
3cc0f37e1b feat(developer): introduce kmc-keyboard-info
Adds kmc-keyboard-info module and a basic unit test for it. Integration
into kmc is next step.
2023-07-24 10:41:12 +07:00
Marc Durdin
1810434b34 chore: Merge branch 'feature-kmc-kmw' into chore/merge-master-into-kmc-kmw-a17s17 2023-07-21 10:09:33 +07:00
Steven R. Loomis
50f0b3112a Merge remote-tracking branch 'upstream/master' into chore/common-8950-node18-engine 2023-07-04 15:51:37 -05:00
Marc Durdin
d914b6918d chore: Merge branch 'feature-kmc-kmw' into chore/merge-master-into-feature-kmc-kmw-a17s16-start 2023-06-26 14:33:20 +07:00
Marc Durdin
0bd2ca4821 refactor(developer): kmc-kmw becomes component of kmc-kmn
Moves kmc-kmw to being a sub-component of kmc-kmn, as it can never be
independently instantiated anyway. Reorganized tests accordingly.

Note that c8 is currently disabled for kmw-compiler, until we add unit
tests for it.
2023-06-20 11:52:23 +07:00
Steven R. Loomis
bdf7ed181e chore: add engine clause to package.json
- will warn if used in node !18
2023-06-13 11:09:43 -05:00
Marc Durdin
f6e52270ed chore(developer): Merge branch 'feature-kmc-kmw' into feat/developer/kmc-analyze 2023-06-08 14:59:28 +07:00
Joshua A. Horton
29c85c552c chore(web): minor esbuild version bump to get 'alias' option, adds tslib 2023-06-08 13:03:24 +07:00
Marc Durdin
d00396467a chore(developer): add kmc-kmw to npm workspace 2023-05-14 12:44:36 +07:00
Joshua A. Horton
d9425bb1ff chore: Merge branch 'master' into feature-esmodule-as17s12-end-update 2023-05-12 11:53:12 +07:00
Marc Durdin
4838ba1ffe chore: rename kmc-keyboard to kmc-ldml
Part of #8719.
2023-05-09 14:08:45 +07:00
Marc Durdin
78083c4c9a feat(developer): kmc analyze osk-char-use
Relates to keymanapp/keyboards#2172.

Adds an analysis module to kmc which initially analyses one or more
.kvks or .keyman-touch-layout files, extracting the de-duped and sorted
set of key cap strings from those files and printing them, in text,
markdown, or json format.
2023-05-09 10:06:41 +07:00
Marc Durdin
f772a6e79d chore(developer): add kmc-kmw to npm workspace 2023-05-05 10:26:34 +07:00
Joshua A. Horton
e42fa70aa8 chore(web): Merge branch 'feature-esmodule-web-engine' into chore/web/update-feature-esmodule-a17s12-start 2023-05-02 12:59:35 +07:00
Marc Durdin
ac39427f60 chore(developer): add eslint devDependency for kmc
Adds eslint, effectively disabled, to infrastructure for all of kmc.

Note that eslintNoNodeImports.js will be used in the next commit, for
verifying #8644.
2023-04-25 13:44:56 +07:00
Marc Durdin
5e1fbfa0b7 refactor(developer): move shared test helpers into common
Sadly, a lot of plumbing required to share code. But it should work now;
these test helpers are used only in dev so should not require
publication.
2023-04-19 11:43:27 +07:00
Joshua A. Horton
7eef5699b9 chore(web): Merge branch 'master' into chore/web/master-to-esmodule-merge-a17s10 2023-04-12 09:56:48 +07:00
Marc Durdin
dd15de40df feat(developer): kmc-kmn tdd framework 2023-03-23 10:14:25 +07:00
Joshua A. Horton
f5e64a10a5 chore: Merge branch 'chore/common/ldml-ts-and-node-updates' into chore/feature-esmodule-master-update 2023-03-14 09:23:39 +07:00
Steven R. Loomis
bccc1e5720 Merge remote-tracking branch 'upstream/master' into chore/merge-master-20230217-epic-ldml 2023-02-17 18:52:33 -06:00
Joshua A. Horton
8fb5b42818 chore(common/web): Merge branch 'feature-esmodule-web-engine' into change/common/web/early-import-path-cleanup 2023-02-16 15:52:25 +07:00
Joshua A. Horton
6af1e4890e chore(web): Merge branch 'feature-esmodule-web-engine' into chore/web/feature-esmodule-update 2023-02-16 15:18:50 +07:00
Joshua A. Horton
a3752dd9ff chore(common): full-repo ts-node update 2023-02-09 12:39:15 +07:00
Joshua A. Horton
878e0f0ea2 chore(common): updates typescript to 4.9.5 2023-02-09 08:40:52 +07:00
Steven R. Loomis
ae45295dc6 Merge remote-tracking branch 'upstream/master' into chore/merge-master-a17s5-REDO-epic-ldml 2023-02-03 16:53:35 -06:00
Joshua A. Horton
66502553da feat(common): simple package for common test resources 2023-02-03 15:13:18 +07:00
Joshua A. Horton
1d29b9adf3 chore(web): Merge branch 'feature-esmodule-web-engine' into change/web/util-modularization 2023-02-02 10:16:19 +07:00
Joshua A. Horton
4bc1345f68 change(common/web): rely on tsc for declaration bundling 2023-01-31 10:31:25 +07:00
Steven R. Loomis
a0b184a022 feat(common): ldml: use cldr version from constants 🙀
- update several config files

supports #7964
2023-01-27 12:45:00 -06:00
Joshua A. Horton
7d24a9e1cb feat(common/web): bundled d.ts for bundled-module outputs 2023-01-20 13:02:01 +07:00
Joshua A. Horton
68c6826344 fix(common/web): esbuild should be a dev-dependency 2023-01-20 13:02:00 +07:00
Joshua A. Horton
588ccd49f5 change(web): util package modularization, bundling 2023-01-20 13:01:58 +07:00
Joshua A. Horton
4cd7cd3363 feat(common): TS-based srcmap remapper tool 2022-12-12 08:52:56 +07:00
Marc Durdin
26e32a0124 refactor(developer): split file type management into package
Splits file format reading, writing, and in-memory structures of .kmx,
.kvk, .kvks, .xml (ldml keyboard) into separate common module. Lots of
little fixups, sorry...

This will make it much easier for us to reuse these readers and writers
in future code.
2022-09-27 12:33:10 +10:00
Marc Durdin
cae408edc5 chore: merge feature-ldml into branch 2022-09-21 14:56:45 +10:00
Marc Durdin
003f23d7b4 feat(developer): fixup and prepare build scripts and docs for kmc 2022-09-19 06:36:06 +10:00
dependabot[bot]
93ec6106e1
chore(deps): bump nanoid and mocha
Bumps [nanoid](https://github.com/ai/nanoid) and [mocha](https://github.com/mochajs/mocha). These dependencies needed to be updated together.

Removes `nanoid`

Updates `mocha` from 8.4.0 to 10.0.0
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v8.4.0...v10.0.0)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: indirect
- dependency-name: mocha
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-16 21:06:23 +00:00
Marc Durdin
561899a2a0 refactor(developer): rename kmldmlc to kmc
Fixes #7237.

Full clean, configure and build will be required for Core, Developer
after this change.

kmc is much less unwieldy a name than kmldmlc, and becomes our platform
for future compiler integration. Start of implementation for #5283 also.
2022-09-09 09:13:39 +10:00
Marc Durdin
670229937a chore: move hextobin to common 2022-08-29 15:07:43 +10:00
Marc Durdin
6aeb20e77c
Revert "Revert "feat(core): turn @keymanapp/ldml-keyboard-constants into a module 🙀"" 2022-08-24 14:32:22 +10:00