Fixes#8998.
kmc-kmn messages were broken down into sub-namespaces, but the range
overlapped the reserved namespace mask range. Fixed the message values,
added a new test to the verifyCompilerMessagesObject function to verify
that messages don't creep outside their namespace, and defined new
masks (in CompilerErrorSeverity enum... hmm) to help.
I opted to remove the leading `0` in the messages for kmc-kmn as I had
to correct a number of them anyway, but not the messages in remaining
units at this time (it's not an error, but just slightly misleading as
we only have 12 bits, not 16 to play with).
It is safe to reassign these messages as they were only assigned in 17.0
alpha.
Fixes#8955.
Adds a mapping table for CP1252 to USV so that we can compile very old
"ANSI"-encoded Keyman keyboard files with kmcmplib, to match kmcmpdll
support.
These two modules had duplicated messages from kmcmplib. Rewrites the
kmc-kmw messages module to inherit from kmc-kmn and define message
strings where necessary.
While this refactor is not ideal, because it diverges slightly from the
patterns of other message modules, and has a little bit of spaghetti
import cross-modules, I think it is still a step in the right direction
for consolidated message reporting.
Now that we have the file type detection in place, we can replace
existing references to the file extensions, where possible, with the
constant declarations. While we could rely on TypeScript's typing to use
string-based values, this helps us to avoid using file extensions
directly in string transforms, regex, etc, and use the `KeymanFileTypes`
alias instead.
Note that only references in common/web, and kmc-* projects have been
touched. References in other Developer projects have not been touched,
as some of those are not yet ESM, so that needs to be addressed first.
This module is used for identification of Keyman source and binary file
formats by file extension. It is not yet appropriate to use for
constants; this will come in a future commit.
Part 1 of the `CompilerOptions` reorg. kmc now uses `CompilerOptions`
throughout, and `CompilerBaseOptions` maps to the set of options
available to all activities.
Tidies up silent vs quiet vs verbose by adding logLevel as an option.
* Notes that we need to consolidate all the various CompilerOptions
interfaces before they get too much further out of hand.
* Cleans up a couple of other minor TODO items.
In order to match existing behaviour with the legacy KeymanWeb compiler,
we should use quoted numbers for row ids. This behaviour can probably be
changed over to the new model in the future, but for now this prevents
unit tests from causing us grief.
Enables eslint checks for eslintNoNodeImports for kmc-kmn. Also enables
linting for kmc-model-info, but does not enable eslintNoNodeImports on
it at this time.
Relates to #8959.