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.
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.
Now builds from a clean repo:
developer/src/build.sh configure build test publish
* Splits kmbrowserhost into kmdbrowserhost for Developer; this means
that Developer Browser Host now inherits the Developer settings rather
than the Keyman for Windows settings, and simplifies distribution and
management. The only difference between the two is in the startup code
so this seems like a good split.
* Cleanup of various build scripts and dependencies.
Note: there is a bit of potential confusion about the difference between
/resources/builder.inc.sh (the full implementation for builder scripts),
and /resources/build/builder.inc.sh (the source script that builder
scripts should always use).
This allows us to make assumptions that will always be true for builder
scripts that may not be true for other scripts, such as setting base
folder.
Fixes#11324.
* Always `cd "$THIS_SCRIPT_PATH"`
* Remove unnecessary `cd` from all build.sh
* Remove unnecessary `set -eu` from all build.sh (and `# set -x`)
* Replace old build-utils.sh incantation in a few build.sh scripts
Fixes#11092.
Addresses buffer boundary tests for four cases, so a fatal error is not
returned to the user:
* character range too long (U+1234 .. U+2468)
* extended string too long ('abcde...xxxxx')
* outs too long (store(foo) .... outs(bar))
* virtual key expansion too long ([K_A] .. [K_Z] ...)
See #11136 for additional work arising.
Establishes keyman-urls.ts as a single place for any links to external
websites.
I searched all .ts files in Keyman Developer source and replaced
references to websites with function calls here. Note that the names of
individual functions within this class can be easily changed as needed,
as the hard part was the consolidation.
Fixes#10872. Modifies #10845.
developer-utils is also used by server. Because osk.ts depends on
common-types, this introduced a transitive dependency for
developer-utils. Packaging server for deployment as part of Keyman
Developer is fragile and we need to hand-code our internal dependencies,
as npm bundling struggles with in-repo dependencies. So we need to avoid
introducing extra dependencies into developer-utils at this time.
It turns out that osk.ts is used by kmc-kmn and kmc-analyze. kmc-analyze
already has a dependency on kmc-kmn, so it makes sense to put it there.
Realtes to #10207.
Adds a new `kmc message` command which prints detailed information about
any or all compiler messages, in JSON, text, or markdown formats.
Markdown format is emitted to file in a structured way to be deployed to
the help site automatically (coming in a subsequent commit).
Relates to #10207.
In order to include message detail in messages, it is helpful to split
out the exception messages which have a separate parameter, so that
parameter at the same position can be the message detail.
Introduces the CompilerMessageSpecWithException function which takes an
exceptionVar parameter to achieve this differentiation.
This module is used only by Keyman Developer compiler. It was originally
in common-types because we didn't have a shared module for Developer.
Moving it to @keymanapp/developer-utils in order to improve its
documentation.
Relates to #10207.
Adds the `api` action to build.sh for each affected module. The `api`
action for each module will generate the api metadata files, and then
the markdown files are generated by /developer/build.sh api.
Note that developer-utils, kmc, and kmcmplib have no api documentation
at this time (and kmcmplib is not Typescript so would need separate
tooling anyway).
Fixes#10678.
Some messages have been reduced to ERROR instead of FATAL, as they are
not internal compiler errors.
Where fatal messages are raised, the message will now be reported
through correctly to Sentry.
Fixes#10488:
1. Use a consistent `exitProcess()` function so that we always wait for Sentry to do its thing.
2. Make `KeymanSentry.isEnabled()` non-async because it is synchronous.
3. Remove duplicate initialization of `KeymanSentry` in kmc.ts.
- when a required section is missing, only throw an internal error IF we haven't already flagged a problem. for example, if 'vars' fails to compile because of a problem, and we already have an error on file, then don't throw an internal error that 'bksp' depends on uninitialized 'vars'.
- mimic this flow in the test helpers.
- add a test case for this in the test helpers, in test-tran
- add a strictError flag to say that no additional errs are allowed.
Fixes: #10291
Fixes#10150.
This feature adds a command line parameter to kmc to control the
severity of INFO, HINT and WARN level messages. The severity of any of
these messages can be reduced all the way to INFO, or even disabled, or
increased to ERROR. The compiler and the reporter will honour the new
code and fail builds when failure-level codes are encountered.
Inputs are validated against all the available compiler messages in all
modules. This also provides a good pathway for automated future
documentation generation of compiler messages.
In order to process the input parameters cleanly, have refactored some
of kmc's build command logic.
This commit increases code coverage for kmc to roughly 50%.