Commit graph

3368 commits

Author SHA1 Message Date
Marc Durdin
4e5cbc3b96 chore: fix typo 2023-10-09 14:51:51 +07:00
Marc Durdin
906a0a2ed7 chore: fix typo 2023-10-09 14:41:01 +07:00
Marc Durdin
4ef18f5e29 chore(core): rename keyboardprocessor.h to keyman_core_api.h
Fixes #9721.

Also tweaks some documentation references to keyboardprocessor, but does
not touch those relating to debian/control.
2023-10-09 14:21:01 +07:00
Marc Durdin
7544b33216 fix(developer): reduce WARN_PackageShouldNotRepeatLanguages to HINT
Part of #9266.

Also cleans up filenames for hint_language_tag_is_not_minimal, and fixes
a bug in transformKpsToKmpObject where a null object could be passed on
to another function in case of failure.
2023-10-09 12:58:19 +07:00
Marc Durdin
6b4497b516
Merge pull request #9695 from keymanapp/fix/windows/9692-re-enable-signature-check
fix(windows): re-enable signature check 🔥
2023-10-09 16:09:54 +11:00
Marc Durdin
35814bc29f chore(developer): add --for-publishing to kmc
The new --for-publishing flag allows us to enforce additional
requirements for keyboards and lexical models that are to be published
to the keymanapp repositories. This flag will always be switched on in
the repository builds. This flag overrides the 'skipMetadata' option
which is a project-level option.

There is a bit of a delicate balance of requirements here:

1. We want to be able to automatically verify keyboards and package
   licenses if they are in the repository.
2. We do not want to force license checks on privately built keyboards
   and models.
3. We want to provide pathways for users to check locally before
   submitting to the repository.
4. If possible, we want to be able to build the .keyboard_info and
   .model_info files locally, but this should be up to the user for
   local builds.

For now, the only additional check that this flag provides is to verify
that the license is MIT, which was an unchecked requirement for the
repositories in the past.

Future checks can be added for file layout, additional required
metadata files.

Anticipate adding this as a tool to Keyman Developer IDE -- a
'pre-publish' check -- in the future.
2023-10-09 07:45:34 +07:00
Marc Durdin
52291b1ccb chore(developer): remove unused xml2js references 2023-10-09 06:34:32 +07:00
Marc Durdin
0f5e88192c chore(developer): Update kmc-package xml2js dependency
I missed adding this as a dependency for @keymanapp/kmc-package. because
node has a very lenient dependency search, it found xml2js from other
@keymanapp/common-types, so never caused errors locally.
2023-10-09 06:06:34 +07:00
Marc Durdin
f76efc38cc chore(common): stop using xml2js.processors.firstCharLowerCase
Fixes #9713.
2023-10-09 05:43:29 +07:00
Marc Durdin
36a3a27bac fix(developer): non-minimal BCP 47 tags in kps should be a hint
Fixes #9266.

For historical reasons there are many non-minimal BCP 47 tags in package
metadata in the repository (over 2500). Furthermore, earlier versions of
kmcomp did not fail the build on package compilation warnings. This
means it is better to reduce WARN_LanguageTagIsNotMinimal to
HINT_LanguageTagIsNotMinimal, so that we can otherwise respect the
'treat warnings as errors' flag on the keyboard projects.

We may be able to upgrade this to a warning again one day in the future.
2023-10-09 05:19:43 +07:00
Marc Durdin
cc5b8da69b refactor(developer): .keyboard_info examples should use keys as a string
Fixes #9708.

Matches the kmp.json format of keys string in the .keyboard_info schema
and compiler, in order to reduce the number of formats we are working
with. This same format may be used elsewhere in Keyman schemas in the
future for sets of keys, for example, I hope we can use it in regression
tests.
2023-10-08 19:01:14 +07:00
Marc Durdin
400444933c feat(developer): introduce WelcomeFile property to packages
Fixes #9478.

This adds a property WelcomeFile to .kps and kmp.json, which allows us
to move away from the hardcoded welcome.htm filename in the future, and
makes transform from Markdown (#9477) a simpler operation, and just
generally starts the cleanup of the messiness of hard-coded filenames.

The package compiler will fallback to injecting welcome.htm into this
property if (a) welcome.htm is present, and (b) the property does not
already have a value. This doesn't buy us much because we still need to
support welcome.htm for existing legacy packages, but does mean that
our .kmp package metadata will be more consistent for packages compiled
with 17.0+ compilers.
2023-10-08 07:22:57 +07:00
Steven R. Loomis
505a45e933
Merge branch 'master' into feat/core/9121-more-vars-epic-ldml 2023-10-07 11:36:07 -05:00
Steven R. Loomis
f3fd5aa879
Merge pull request #9687 from keymanapp/feat/core/9119-more-markers-epic-ldml 2023-10-06 18:27:30 -05:00
Steven R. Loomis
b7c7a1c7b3 feat(developer): fix vars and markers 🙀
- workaround for debugger/test issue

For: #9121
For: #9119
2023-10-06 18:11:37 -05:00
Marc Durdin
928bd2a7cd chore(common): fixup tsconfig for common/web/utils 2023-10-06 14:48:28 +07:00
Marc Durdin
6c944cff65 chore: Merge branch 'epic/package-metadata' into chore/merge-master-into-package-metadata 2023-10-06 11:52:13 +07:00
Marc Durdin
c970b1e246 chore(developer): fix paths for addon signing 2023-10-06 11:38:55 +07:00
Marc Durdin
7c2d3624cd chore(developer): sign addons in server 2023-10-06 10:37:25 +07:00
Marc Durdin
a1d7095c58
Merge pull request #9681 from keymanapp/chore/common/9262-cleanup-final-non-esm
chore(common): cleanup final Typescript non-ESM metadata
2023-10-06 13:37:54 +11:00
Marc Durdin
42c869ac54
Merge pull request #9676 from keymanapp/chore/common/9675-hextobin-to-esm
chore(common): convert hextobin to ES Modules
2023-10-06 13:37:25 +11:00
Marc Durdin
0b4a252b0a
Merge pull request #9673 from keymanapp/chore/developer/9672-server-to-esm
chore(developer): convert Server to ES Modules
2023-10-06 13:37:20 +11:00
Marc Durdin
eeb755f76a fix(windows): re-enable signature check
Fixes #9692.

Signature checking was skipped because we missed a ".virtual" to force
nmake to build the test and test_i3633 targets. This opened up a small
cascade of related formatting issues on Makefiles, and the fact that the
test_i3633 (has there ever been a more poorly named project?) Makefile
did not even work.

Refactored significantly, added same tests to Developer Makefile, and
also now verifying the .msi and installer executable.

We can improve this further but I'd like to get this in to avoid further
critical issues with code signing given the current broken signing
configuration.
2023-10-06 09:14:35 +07:00
Marc Durdin
68740f2aa2
Merge branch 'epic/package-metadata' into feat/common/9640-precompile-schemas 2023-10-06 12:27:31 +11:00
Steven R. Loomis
4c0cab2796 feat(common,developer): DRY out strings 🙀
- refactor string preprocessing pipeline into an options bag
2023-10-05 17:40:30 -05:00
Marc Durdin
a314ba46a6 fix(developer): server node addin paths 2023-10-05 14:42:33 +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
Steven R. Loomis
e04b41e89e feat(developer): fix vars and markers 🙀
- finish all of the developer LDML-TODOs around markers and variables

For: #9121
For: #9119
2023-10-04 19:21:04 -05:00
Steven R. Loomis
41145243a3 feat(developer): test: more vars and markers 🙀
- add and re-enable some tests

For: #9121
For: #9119
2023-10-04 18:54:16 -05:00
Steven R. Loomis
2472a941cf feat(core): match any marker 🙀
- add a regex form that matches any marker

For: #9119
2023-10-04 18:34:20 -05:00
Marc Durdin
26e4c82026
Merge branch 'chore/common/9679-keyman-version-esm-only' into chore/common/9262-cleanup-final-non-esm 2023-10-04 21:36:59 +11:00
Marc Durdin
383678a002 chore(developer): cleanup hextobin call 2023-10-04 17:34:43 +07:00
Marc Durdin
693aee5c99
Merge branch 'epic/package-metadata' into chore/merge-master-into-package-metadata 2023-10-04 19:34:16 +11:00
Marc Durdin
f832b9ff3d chore(developer): remove temp non-esm module in kmc-model 2023-10-04 15:25:01 +07:00
Marc Durdin
33b6b5abc2 chore: update tsconfig 2023-10-04 15:16:34 +07:00
Marc Durdin
3e51389e17
Merge branch 'chore/common/9679-keyman-version-esm-only' into chore/common/9262-cleanup-final-non-esm 2023-10-04 19:07:37 +11:00
Marc Durdin
75a0977cdb chore(developer): fix server tests 2023-10-04 14:17:59 +07:00
Marc Durdin
d4e4992714 chore(common): cleanup final Typescript non-ESM metadata
Fixes #9262.
2023-10-04 12:55:51 +07:00
Marc Durdin
e7ac526c69 chore(developer): fixup Makefile for server 2023-10-04 11:50:03 +07:00
Marc Durdin
8e23b11dfc chore(developer): convert Server to ES Modules
Fixes #9672.

Also rewrote build.sh as a builder script in order to simplify some of
the build changes.

Makes /web a dependency of Keyman Developer Server, which is a
significant improvement, but we need to consider if we want to use web's
debug build as we did in the past.
2023-10-04 09:38:48 +07:00
Marc Durdin
248297fe5f
Merge branch 'master' into feat/developer/9324-warn-if-kps-includes-non-touch-js 2023-10-04 03:46:40 +02:00
Marc Durdin
5bb24c2910
Merge pull request #9662 from keymanapp/chore/developer/8661-add-c8-to-kmc
chore(developer): switch on code coverage reporting for kmc
2023-10-04 03:45:33 +02:00
Marc Durdin
4367bac8f7
Merge pull request #9658 from keymanapp/feat/developer/9325-hint-if-package-includes-keyboard-source-files
feat(developer): issue hint if package includes keyboard source files
2023-10-04 03:45:26 +02:00
Marc Durdin
abd363dc8b
Merge pull request #9653 from keymanapp/chore/developer/9597-reduce-warnings-to-hint-in-kmc-model
chore(developer): reduce duplicate words warning to hint
2023-10-04 03:45:18 +02:00
Marc Durdin
4562c8b6d7
Merge pull request #9652 from keymanapp/feat/developer/9610-info-when-warnings-fail-build
feat(developer): show an INFO message when warnings have failed a build
2023-10-04 03:45:08 +02:00
Marc Durdin
e0c2778199
Merge pull request #9644 from keymanapp/chore/merge-master-into-package-metadata
chore: merge master into package-metadata 🎺
2023-10-04 03:43:45 +02:00
Marc Durdin
99663ce9f0
Merge pull request #9621 from keymanapp/chore/developer/9620-validate-keyboard_info-and-fix-keys
chore(developer): validate emitted .keyboard_info and fix keys 🎺
2023-10-04 03:42:22 +02:00
Marc Durdin
1fa540c77f
Merge pull request #9612 from keymanapp/chore/developer/9611-normalize-case-on-input-filenames
chore(developer): normalize case on input filenames in kmc 🎺
2023-10-04 03:42:10 +02:00
Steven R. Loomis
01c171ce82
Merge pull request #9615 from keymanapp/feat/developer/9403-scancodes-epic-ldml
feat(developer): ldml scan codes support 🙀
2023-10-03 08:55:19 -05:00
Marc Durdin
c5ee900736
Merge pull request #9661 from keymanapp/chore/developer/9317-test-for-check-filename-conventions-off
chore(developer): add test for `checkFilenameConventions == false` or unset
2023-10-03 15:39:43 +02:00