Relative paths would cause `kmc copy` to fail to find sources files for
the project, because component paths would be constructed incorrectly.
The cleanest fix is to ensure that we always full resolve local file
paths before attempting to copy the project.
Fixes: #15659
Cherry-pick-of: #15700
Without `await`, a 'success' message is always returned, because the
Promise that is returned is not nullish. While the log message was
misleading, the outcome was already correct, because the parent function
`copyProject()` did correctly await the call to `doCopy()`.
Fixes: #15699
Test-bot: skip
Cherry-pick-of: #15701
Use RichEdit's `ITextDocument` interface to retrieve the selection
anchor/caret information, and avoid the side-effects that can arise with
the hacky `EM_GETSEL` / `EM_SETSEL` pattern we used previously.
Changing the selection with `EM_SETSEL` in order to find the anchor
point causes notification messages to be generated that can arrive at an
unexpected time in some text selection scenarios, which ended up with us
having a saved selection in the debugger pointing to the wrong text
range.
The name `Anchor` was a misnomer, because it was actually returning the
caret position, not the anchor for the selection, which is the far side
of the selection from the anchor!
Fixes: #11706
Fixes: KEYMAN-DEVELOPER-18A
The new project UI process detects if the target project folder already
exists in a given path, and asks if the author wants to overwrite it.
However, this has been inconsistently implemented -- in the clone
keyboard case, the process would fail with a message "error KM0B004:
Output path <PATH> already exists, not overwriting". In other cases, no
files would be removed, but existing files would be overwritten where
there was a collision, resulting in a messy project folder.
I have opted to prevent this situation in a consistent manner, requiring
the author to remove the folder themselves in Windows Explorer, even
though this is higher friction, because it pushes them into verifying
that they actually want to delete the contents of the folder.
I also took the opportunity to DRY out this verification process in the
six different New Project dialogs.
Fixes: #15063
Turned on strictNullChecks to verify the file and found a few other
problems in this file. However, there are many null check errors
reported across the kmc-package source which should be addressed in a
future patch. (This is a broader problem for the entire Typescript
source of Keyman.)
Fixes: #15627
Test-bot: skip
Build-bot: skip build:developer
Cherry-pick-of: #15653
While the debugger memo internally uses CRLF, in all references, CRLF
should be converted to CR for consistent text manipulation operations.
This follows a similar fix in the kmn debugger in #13334.
Also addresses review comments from @ermshiperete.
Fixes: #15601
Relates-to: #13334
Cherry-pick-of: #15616
The existing ngrok package is no longer maintained, so this commit
switches to @ngrok/ngrok. However, this means a number of deployment
changes, as the new module uses a node binary module rather than a
standalone executable, and the path to the module is assumed to be on
the Node search path.
The new module also requires VC++ redistributable, so installation of
that has been added to the Server Options dialog.
Use of ngrok with Keyman Developer Server should be in theory possible
with non-Windows platforms with this change, if the user installs the
appropriate @ngrok binary package (e.g. @ngrok/ngrok-darwin-universal)
globally before starting the server.
Fixes: #15625
Build-bot: skip release:developer
Cherry-pick-of: #15626
Test-bot: skip
Increment needed a guard in order to not abort the script. I have tested
locally (stubbing out hdiutil and replacing with false!) -- so I am more
confident this time.
Test-bot: skip
Build-bot: skip
Follows: #15176
When normalizing, we need to stop processing on an NFC boundary, not an
NFD boundary, to support normalizations such as in Bengali, where
appending `U+09D7` to a context of `U+0995 U+09C7` should result in
`U+0995 U+09CC`.
The specification is unclear on this; see https://unicode-org.atlassian.net/browse/CLDR-19218
This also updates the ldml keyboard unit test suite to support running
in full NFC mode (used in all Engine implementations) as well retaining
the NFD mode (now only used by the debugger).
Side note: the Bengali normalization failure case was picked up by the
improvements to the unit test suite, proving once again that good tests
are so valuable.
Fixes: #15491Fixes: #15505
Follows: #15488
Cherry-pick-of: #15506
Relates-to: CLDR-19218