Commit graph

37 commits

Author SHA1 Message Date
Marc Durdin
df212364a2 maint(resources): add repository record for all published packages
While not documented as such, it appears that the repository record is
required with trusted publishing of npm packages.

Test-bot: skip
Build-bot: skip
2025-10-29 14:35:31 +01:00
Marc Durdin
ba411774f6 maint(resources): move NPM package publishing to GitHub Actions
Due to recent changes in NPM package publishing security requirements,
we have to move from TeamCity build to a GitHub Action to publish our
NPM packages, so we can take advantage of trusted publishing. This
change also consolidates and centralizes the npm publishing into
resources/build/ci/npm-publish.sh, which removes a lot of boilerplate
from each of the build.sh scripts, and ensures consistency.

Packages will be `npm pack`ed on PR and test builds, and published in
release builds.

Ref: https://docs.npmjs.com/trusted-publishers
Ref: https://github.blog/changelog/2025-09-29-strengthening-npm-security-important-changes-to-authentication-and-token-management/
Fixes: #14963
Test-bot: skip
Build-bot: release:developer
2025-10-27 16:31:55 +01:00
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
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
Joshua Horton
2011d117d6 chore(developer): finalize activation of prefer-const within developer TS modules 2025-04-30 09:41:07 +07: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
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
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
7147851b54 chore(developer): remove unused VERBOSE_CopyingFolder message from kmc-copy 2025-01-31 08:56:56 +07:00
Marc Durdin
2a728b49f8 chore(developer): add verbose logs for project copier 2025-01-30 13:57:13 +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
b51f1213d9 feat(developer): support copying disorganized projects in kmc-copy
Fixes: #12983
2025-01-22 13:20:13 +07:00
Marc Durdin
ba8e5dc152 chore(developer): report on filename collisions in kmc-copy
Fixes: #12981
2025-01-22 12:32:33 +07:00
Marc Durdin
c6aa912655 chore(developer): validate output folder name in kmc-copy
Fixes: #12978
2025-01-22 10:58:01 +07:00
Marc Durdin
f9cb1927c9 chore(developer): cleanup tests with new verbose messages 2025-01-22 10:01:49 +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
170282bba7 chore: address review comments 2024-12-05 09:23:27 +07:00
Marc Durdin
33b4fa3e89 change(developer): use full github url in kmc copy parameters
Fixes: #12746
Cherry-pick-of: #12754
2024-12-05 09:23:08 +07:00
Marc Durdin
cd8825d504
Merge pull request #12736 from keymanapp/refactor/developer/unify_test_action
refactor(developer): unify test action
2024-12-01 00:14:11 +01:00
Eberhard Beilharz
66404f9503
chore(developer): rename test files
This change rename the test files for Developer according to the
discussion at the Keyman conference in November 2024.
2024-11-28 14:32:09 +01:00
Marc Durdin
70a32f00d7 refactor(developer): unify test action 2024-11-28 15:16:25 +07:00
Eberhard Beilharz
21736d8817
refactor(developer): output number of tests when running on TC
This change adds the mocha-teamcity-reporter which outputs the running
tests in a special format that TeamCity can interpret. This allows TC
to show which tests run as well as the number of tests run.

Also refactor some of the build scripts to use functions.

Note that we had to explicitly add `--check-coverage=false` (which is the
default) to get successful builds when we run on TC.
2024-11-27 11:41:06 +01:00
Marc Durdin
4b2641fc29 chore(developer): cleanup fixtures for kmc-copy with optional attrs 2024-11-20 07:58:14 +07:00
Marc Durdin
5a93bdf6c2 chore(developer): make package subfile description fully optional
The package subfile description field is never really used in the
end-user apps. As it is meaningless metadata, we'll make it fully
optional, and start to remove all references in the designers and
compilers.

TODO: For packages targeting Keyman 18.0+, we should consider removing
the description field altogether from the subfiles.
2024-11-13 10:03:26 +07:00
Marc Durdin
10a933aba4 chore(developer): kmc-copy: warn or info on missing files on GitHub, rather than error 2024-10-31 12:00:13 +07:00
Marc Durdin
d68a64252e feat(developer): add GitHub and Cloud support to kmc-copy
This requires a significant refactor to the compiler interfaces to allow
for asynchronous filesystem and network access. For now, only kmc-copy
uses the asynchronous interfaces, but over time we may try and
consolidate them where other compiler modules find them useful. This
adds a big set of unit test fixtures to avoid network instability in
tests (the fixtures can be regenerated by setting environment variable
`TEST_SAVE_FIXTURES`).
2024-10-28 10:33:42 +07:00
Marc Durdin
f6549befd7 chore(developer): ignore new line form when testing kmc-copy 2024-10-22 15:49:57 +07:00
Marc Durdin
6df121a05a feat(developer): kmc-copy cleanup and documentation
* Hides details on --rename and online sources for projects
  until implemented
2024-10-22 10:28:04 +07:00
Marc Durdin
089478d140 feat(developer): kmc-copy functionality and unit tests 2024-10-22 10:28:03 +07:00
Marc Durdin
4b228a6161 feat(developer): add unit test fixtures for kmc-copy 2024-10-22 10:28:02 +07:00
Marc Durdin
7d17913e18 feat(developer): seed kmc-copy 2024-10-22 10:28:00 +07:00