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.
Use a shared function standard_meson_build to prep the
resources/meson.build folder for consistency. A future cleanup would be
to use meson-utils.inc.sh for all meson build scripts.
* Adds `VERSION_WITH_TAG` variable to standard.meson.build
* Consistently uses `file('VERSION.md')` to retrieve version number
Note that VERSION_WITH_TAG is not yet used but should be used for
version tagged files later.
Consolidates project loading code from kmc and kmc-copy, in preparation
for kmc-test epic. This leaves open a change we need to make to
CompilerCallbacks, to consolidate the fsAsync and net callbacks into
CompilerCallbacks as a first-class part of CompilerCallbacks. We will
then need to start to move all the fs and net callback interactions to
the async model across all kmc modules, at some point.
Move the sentry dependency out of developer-utils and into the console
apps kmc and server, in process of making sure that developer-utils has
no node dependencies.
Also copy the options.ts module into kmc and server, for the same
reason.
This first step duplicates two units, options.ts and KeymanSentry.ts. We
do need to refactor this again later to avoid this duplication (maybe
via yet another internal package?)
Renames common-messages.ts to developer-utils-messages.ts. This was
split from /common/web/types, but the messages module retained the old
name, which was confusing (two modules with same name).
Follows on from the similar changes to `Keyboard` fields in #13600. This
deprecates the `RTL` and `Name` fields. `RTL` was never used. `Name` was
written but never presented to end users, so effectively irrelevant.
`Name` also was present in `File.Description` (already deprecated) for
the corresponding model.js _and_ `Info.Name`, so doubly redundant.
Also updates the schema documentation to mark the deprecated fields.
Relates-to: #13600
This is a workaround for missing 'und' language tag.
`(new Intl.Locale('und')).language` returns `undefined` in V8, as of 31
March 2025. This means we cannot rely on `Intl.Locale` to parse the
bcp47 string for us. The implemented workaround is to replace `und` with
a known-good language subtag, and then swap it back out in later
processing.
Also adds unit test and new warning messages for invalid language tags
that were exposed during testing of this.
Fixes: #13610
Suggested by @Nnyny. Give more detail on the semantic version format for
keyboard version, as well as details on the limitations to semver
imposed by the Keyman toolchain.
Note: the round-trip test still passes because the XML data passes
basically unmodified through, even though we make no reference to the
fields in the code.
Fixes: #13576
The fields 'name', 'version', and 'rtl' were defined in the .kps file,
but were not actually used by the compiler, as kmc-package reads the
metadata from the keyboard file rather than relying on this data, which
often is out of date. This led to confusion for keyboard authors, so
this change removes that metadata from the package.
The one visible side-effect (apart from the data disappearing from
future .kps files) is that the package editor no longer shows this
metadata in the Keyboards view (but as it may be out-of-date, this is
probably a good thing).
Fixes: #13576Fixes: #13593
In compiler messages, for a long time we have inconsistently used
'command' instead of 'statement' when referring to kmn statements. The
kmn language documentation uses 'statement' fairly consistently.
If `nul` is used in the output part of a rule, then text or
text-emitting statements cannot also be included in the output of that
rule. This was not enforced in earlier versions of Keyman.
Adds a unit test for the enhanced validation.
Fixes: #13455
Relates-to: keymanapp/keyboards#3379
This is a major dependency version bump (4.5.0 to 5.0.9) which we would
normally avoid during beta. However, we need the fix
NaturalIntelligence/fast-xml-parser#725 for hex escapes in XML, which is
incorporated in 5.0.9.
I have assessed the other changes to fast-xml-parser and found no
breaking changes for us, but I tightened the types in xml-utils
declarations and found some minor inconsistencies which appear to have
no impact, and which I have corrected:
* wrong type in unused parameter to `tagValueProcessor`
* reference to unused property `options.emptyTag`
While doing this, I consolidated the common options for the parser in
order to verify consistency, but made no changes to the resolved
parsing/building options.
Added a test to ldml keyboard reading, to verify that numeric strings
are treated as strings, given the divergence in the `numberParseOptions`
option, and it shows that numeric strings are treated as strings.
Fixes: #13348
fast-xml-reader has a bug with numeric entities. See:
https://github.com/NaturalIntelligence/fast-xml-parser/issues/725
This commit adds a unit test to verify that non-BMP numeric entities
will be parsed correctly. It will fail until we update the
fast-xml-parser dependency.
Relates-to: #13348
kmc-ldml no longer meets the 90% coverage threshold with recent changes
in 19.0-alpha. With the fix from #13418, this now causes the build to
fail. Coverage should be increased with additional tests in kmc-ldml,
but this is a stopgap to allow builds to continue to pass.