Commit graph

449 commits

Author SHA1 Message Date
Marc Durdin
f3fb3ac87b maint(common): move build-utils-ci.inc.sh to ci/ci-publish.inc.sh
Removes a number of unused functions from the file, renames remaining
functions to match our builder script prefix patterns, removes unused
imports from various build scripts (e.g. Android).

Fixes: #14453
2025-08-05 12:54:56 +10:00
Marc Durdin
acefdf281a maint(common): move typescript script functions into typescript.inc.sh
Fixes: #14448
Build-bot: build
Test-bot: skip
2025-08-03 07:01:57 +10:00
Marc Durdin
2726050601 maint(common): rename and move node-related script functions into node.inc.sh
Consolidates the node-related script functions into node.inc.sh, as part
of cleaning up the build scripts and making them easier to maintain into
the future.

Fixes: #14447
2025-08-02 13:34:29 +10:00
Marc Durdin
f394245636 maint(common): consolidate builder scripts
Clarifies the confusing builder.inc.sh / build-utils.sh distinction by
giving the scripts more appropriate names. Most build scripts should use
builder-full.inc.sh; some helper scripts can use builder-basic.inc.sh.
Documented in resources/build/README.md.

Renames:
* resources/build/builder.inc.sh to resources/build/builder-full.inc.sh
* resources/build/build-utils.sh to resources/build/builder-basic.inc.sh

Other changes:
* Moves Android-specific functions out of builder-basic.inc.sh and into
  android/build.sh.
* Renames functions in builder-basic.inc.sh

More functions may be moved from builder-basic.inc.sh into utils.inc.sh
or other scripts in the future.

Fixes: #14065
Build-bot: build all
Test-bot: skip
2025-08-02 08:11:24 +10:00
Marc Durdin
65158a0526 maint(common): rename shellHelperFunctions.sh to utils.inc.sh
Adds documentation for various functions, removes unused functions (a
couple of simple, very lightly used functions were unDRYed; these could
go back the other way across all shell scripts if necessary). TODO items
noted for follow-up refactoring.

Fixes: #14275
Relates-to: #14269
Build-bot: build all
Test-bot: skip
2025-08-02 06:58:40 +10:00
Marc Durdin
11a558e926 maint(developer): support buildLevel
Relates-to: 14125
Build-bot: build
Test-bot: skip
2025-06-14 15:22:15 +10:00
Marc Durdin
90187885c1 chore(developer): extend unit test timeout for getLastGitCommitDate 2025-06-10 10:22:29 +07:00
Joshua Horton
155c1a2b12 maint: update mocha
Some of the npm audit warnings left after #13897 require an updated `mocha` version to remedy.  As we only really use `mocha` to do unit-testing, it should be safe to update if all of our existing tests pass with the new version.

Test-bot: skip
2025-05-13 14:02:02 +07:00
Steven R. Loomis
c2b6a65f1b
Merge pull request #13375 from keymanapp/feat/developer/10622-xml-parse-line-numbers-epic-ldml
feat(developer): line numbers for XML parsing and kmc-ldml 🙀
2025-05-12 18:37:23 -05:00
Steven R. Loomis
8e2eb498e3 feat(developer): update for line numbers
- reduce whitespace churn

Fixes: #10622
2025-05-09 11:41:23 -05:00
Steven R. Loomis
ad0ea8678b feat(developer): update for line numbers
- added new DelegatingCompilerCallbacks class
- added ResolvingCompilerCallbacks which does event resolution
- added the XML file name metadata to *every object* after XML parse.

Fixes: #10622
2025-05-08 17:29:30 -05:00
Eberhard Beilharz
4d81589f48
maint(common): use unique names for Keyman version variables
Previously the builder scripts defined a readonly `VERSION` environment
variable for the Keyman version. That caused problems when another
(external) script tried to define a `VERSION` variable. We encountered
this problem when trying to move the TC build steps of a configuration
into a single script (#13399) when we tried to source `~/.nvm/nvm.sh`.

This change uses a Keyman specific prefix for the version variables and
renames `VERSION` → `KEYMAN_VERSION` etc. Unfortunately these variables
are used in a lot of places, so this turned out to be a bit of a yak
shave.

Test-bot: skip
2025-05-07 18:46:51 +02:00
Steven R. Loomis
937573869b Merge remote-tracking branch 'upstream/master' into feat/developer/10622-xml-parse-line-numbers-epic-ldml 2025-05-05 09:28:15 -05:00
Joshua Horton
d92ef04049 change(developer): clean up developer/src/kmc linter issues 2025-04-30 09:15:34 +07:00
Steven R. Loomis
e003612ea0 feat(developer): update for line numbers
- remove resolver complexity in callback subclasses
- call LDMLKeyboardXMLSourceFileReader.eventResolver.resolve() statically from ldml-compiler-messages

Fixes: #10622
2025-04-10 17:22:51 -05:00
Steven R. Loomis
64bcfc66e9 Merge remote-tracking branch 'upstream/master' into feat/developer/10622-xml-parse-line-numbers-epic-ldml 2025-04-10 17:02:05 -05:00
Marc Durdin
838aea52ed refactor(developer): consolidate project loader
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.
2025-04-03 11:37:54 +07:00
Marc Durdin
cf16c37869 refactor(developer): move sentry and developer options into console apps
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?)
2025-04-03 09:56:46 +07:00
Marc Durdin
70838ff1ac refactor(developer): rename to developer-utils-messages.ts
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).
2025-04-03 09:26:27 +07:00
Steven R. Loomis
8aa9219410 Merge remote-tracking branch 'upstream/master' into feat/developer/10622-xml-parse-line-numbers-epic-ldml 2025-03-27 16:02:45 -05:00
Marc Durdin
86102c405e
Merge pull request #13191 from keymanapp/dependabot/npm_and_yarn/esbuild-0.25.0
chore(deps-dev): bump esbuild from 0.18.20 to 0.25.0
2025-03-24 11:22:00 +07:00
Marc Durdin
1a0b830c0b
Merge branch 'master' into chore/b18s3-merge-beta-to-master 2025-03-14 08:54:50 +07:00
Marc Durdin
3ad7e78c25
Merge pull request #13457 from keymanapp/fix/developer/13446-improve-message-about-missing-file
fix(developer): add folder text to Error_FileDoesNotExist message
2025-03-12 08:55:02 +07:00
Marc Durdin
13d5ee8741 fix(developer): add folder text to Error_FileDoesNotExist message
Fixes: #13446
2025-03-10 05:19:09 +07:00
Marc Durdin
1b26d4ff96 docs(developer): fix typos in readme and add link 2025-03-04 13:59:41 +01:00
Steven R. Loomis
2dca879aae
Merge branch 'master' into feat/developer/10622-xml-parse-line-numbers-epic-ldml 2025-03-03 17:15:48 -08:00
Steven R. Loomis
d7cb7b63a3 feat(developer): add an EventResolver
- it's a hook to the hook to allow the LDML compiler to resolve error message line numbers
- TODO still not extra performant, but maybe the right separation of concerns

Fixes: #10622
2025-03-03 13:14:41 -06:00
Steven R. Loomis
3e73a3f081 feat(developer): add CompilerEvent.offset
- per review, keep this as a separate field.

Fixes: #10622
2025-03-03 12:36:42 -06:00
Marc Durdin
f61a104acf
Merge branch 'master' into chore/merge-beta-into-master-B18S2 2025-03-01 15:45:19 +07:00
Steven R. Loomis
d38025b4a1 feat(developer): API for resolving line numbers for messages
- Only read the xml file once

Fixes: #10622
2025-02-28 10:32:05 -06:00
Steven R. Loomis
c4ca359d18 feat(developer): API for resolving line numbers for messages
- add 'column' to CompilerEvent
- Add a LdmlCompilerMessages.col() function to set the column number
- add a LdmlCompilerMessages.resolveLineNumber() to map offsets to line number

Fixes: #10622
2025-02-28 09:27:25 -06:00
Marc Durdin
19be021a6e chore: improve message color and content for info messages 2025-02-13 10:25:19 +07:00
Marc Durdin
0e48e44d2d chore(developer): add INFO messages for kmc copy and kmc generate
Note: these messages are in `kmc`, not in `kmc-copy` or `kmc-generate`,
matching the structure for existing `INFO_BuildingProject` and related
messages.

Fixes: #13127
2025-02-12 13:14:42 +07:00
dependabot[bot]
4abc1b3d2b
chore(deps-dev): bump esbuild from 0.18.20 to 0.25.0
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.18.20 to 0.25.0.
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2023.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.18.20...v0.25.0)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-11 11:17:53 +00:00
Marc Durdin
342f216291 chore: increment to alpha 19.0 2025-02-11 14:14:15 +07:00
Marc Durdin
bd4633333b feat(developer): improve compiler messages and user interface
* Add unit test to verify the format of message detail strings
  (max line length of 80 chars)
* Add unit test to verify non-null, non-empty message strings
* Tidy up a number of messages (to pass unit tests)
* Add message details for all kmw compiler messages
* Add a clickable link for the TIKE message window for each message
  so that explanations and further message details are more accessible
  to authors (`kmc message` is already available for command-line users)
* Fixes a number of minor issues with the messages window in TIKE,
  mostly relating to when popup menu commands are enabled and how
  messages are selected.

Fixes: #13134
2025-02-07 08:46:46 +07:00
Marc Durdin
2df63dddae
Merge pull request #13075 from keymanapp/fix/developer/13072-make-kmc-log-options-consistent
fix(developer): make kmc log options consistent across all commands
2025-02-05 11:30:10 +07:00
Marc Durdin
9db0d086dc
Merge pull request #13113 from keymanapp/feat/developer/kmc-include-command-line-in-sentry-reports
feat(developer): include command line in kmc sentry reports
2025-02-04 11:43:12 +07:00
Marc Durdin
4a879acd9d chore(developer): minimize PII in sentry cmdline report 2025-02-04 10:12:23 +07:00
Marc Durdin
439c091c9e chore: update docs to reference node 20.0
Relates-to: keyman-keyboards/khmer_angkor#1
2025-02-04 07:58:52 +07:00
Marc Durdin
072c47b853 fix(developer): pass correct generator options from kmc
Also add some resilience to option usage in kmc-generate; more work may
need to be done here in future.

Fixes: #13110
2025-02-03 10:13:36 +07:00
Marc Durdin
05c17e3439 feat(developer): include command line in kmc sentry reports
In order to reproduce kmc errors, it's very helpful to know how it was
instantiated. This change includes the command line call for kmc. This
includes things such as a keyboard filename and may include file paths,
but does not include private personal information or secrets.
2025-02-03 09:53:45 +07:00
Marc Durdin
d2aa22ff75 fix(developer): make kmc log options consistent across all commands
Makes the `--log-format`, `--log-level`, and `--color`/`--no-color`
options available for all commands and DRYs out some of the options
processing for consistency. This has positive impact in particular on
the Generator classes which removes the need for several unit tests as
the interface can now be checked at compile time.

Fixes: #13072
Unblocks: #13073
2025-01-30 09:20:29 +07:00
Marc Durdin
192e932949 feat(developer): support relocation of external files in kmc-copy
Fixes: #13060
2025-01-28 12:24:04 +07:00
Marc Durdin
a689f65188 fix(developer): don't list .js keyboards for multi-keyboard packages in kmc-keyboard-info
Because the build process for multi-keyboard packages does not deploy
.js keyboards to s.keyman.com, it does not make sense to list them, even
if the package may contain .js keyboards for mobile platforms.

Fixes: #12853
2025-01-24 13:07:43 +07:00
Marc Durdin
d4513a1d51 chore(developer): add new severity types to message command 2025-01-22 11:14:33 +07:00
Marc Durdin
a08f1aca6e feat(developer): add 'verbose' and 'debug' log levels to kmc
Adds 'verbose' and 'debug' log levels and corresponding error severity
levels. This means the internal error severity values have changed to
match - 'info' is now 2 instead of 0.

Fixes: #12975
2025-01-22 08:58:13 +07:00
Marc Durdin
439ea0e4d1 chore(developer): remove '--rename' option from kmc-copy
An in-place rename is dangerous and destructive, so we won't support it.
2025-01-22 08:12:54 +07:00
Marc Durdin
edc8d00caf chore(developer): stub out icon support in kmc-generate
As icon generation turns out to be challenging due to limitations or
native dependencies in node.js libraries for image generation, icon
options are now stubbed out to avoid confusion.
2025-01-22 07:14:07 +07:00
Marc Durdin
6f6316e79b fix(developer): use 1.0.0 as default for ldml keyboards in kmc-generate
Fixes: #12961
2025-01-21 13:58:37 +07:00