Commit graph

66 commits

Author SHA1 Message Date
Marc Durdin
3eb29c3427 fix(developer): add missing dependencies 2023-04-18 05:30:12 +07:00
Marc Durdin
8057b39066 chore(developer): add comma 2023-04-17 12:12:14 +07:00
Marc Durdin
75a4bac5c6 chore(developer): tweak build of extension list in kmc
Co-authored-by: Joshua Horton <jahorton@sil.org>
2023-04-17 12:07:35 +07:00
Marc Durdin
501cf03dc2 chore(common): update description for 'build.sh pack' 2023-04-12 14:18:31 +07:00
Marc Durdin
3265a714f2 chore(common): add missing deps and files for npm publish
The build/ folder for most packages was missing due to being listed in
.gitignore.

Also, @keymanapp/ldml-keyboard-constants package was not being published
despite being a dependency of @keymanapp/kmc-keyboard.

Instead of relying on npm's use of .gitignore / .npmignore (which has
seriously wonky behaviours), we list the files that should be included
in package.json.

NPM Wonky behaviours: it seems that .npmignore causes .gitignore in the
same folder to be ignored. But, higher level .gitignore files still
affect the files included in the package, which makes
specification-by-exclusion painful (negating exclusions, etc). We do not
recommend use of .npmignore anywhere for this reason.
2023-04-12 14:05:05 +07:00
Marc Durdin
10a59f789d fix(common): support npm pack and consolidate npm publishing
Fixes #8586.

All npm publish actions in the repository are now run as part of the
Developer release build, hosted at present by kmc, until we setup a
higher-level build script to do it.

Adds a 'pack' action which mirrors 'publish' for all npm packages.

Removes unnecessary dev dependencies of models-templates and
models-wordbreakers from kmc-model.

Web Release build CI step has been updated to check for presence of
.build-builder.
2023-04-12 11:55:31 +07:00
Marc Durdin
02638023bf fix(developer): improve 'does not exist' error message
Fixes #8508.
2023-04-11 20:17:18 +07:00
Marc Durdin
354291c390 fix(developer): kmc should not validate as well as compile keyboard
Fixes #8512.

Note: the compile phase is identical to the validation phase at this
point, so no need to run validate prior to compile.
2023-04-11 20:16:16 +07:00
Marc Durdin
e22ae91eae chore(developer): filename case 2023-04-11 20:15:31 +07:00
Marc Durdin
43cffa2ec3 chore(developer): filename case change 2023-04-11 20:13:44 +07:00
Marc Durdin
a151ac476d refactor(developer): DRY kmc module references 2023-04-11 14:07:55 +07:00
Marc Durdin
135060edfc fix(developer): add DRY_RUN variable to build.sh
Fixes #8574.

Also ensures that kmc is published after its dependencies.
2023-04-11 09:59:11 +07:00
Marc Durdin
2a871c8165 chore(developer): publish all required npm modules 2023-03-27 11:36:21 +07:00
Marc Durdin
978b93aa64 refactor(common): move keymanversion_build.in to /common/include 2023-03-24 14:42:12 +07:00
Marc Durdin
084c9d68f0 chore(core): use kmc to build .kmn files 2023-03-23 14:03:37 +07:00
Marc Durdin
825a41c315 feat(developer): add kmc-kmn to kmc 2023-03-23 12:12:25 +07:00
Marc Durdin
dd15de40df feat(developer): kmc-kmn tdd framework 2023-03-23 10:14:25 +07:00
Joshua A. Horton
e4b9aae8aa fix(developer/compilers): locks esbuild target detection for kmc bundling 2023-03-15 09:06:41 +07:00
Joshua Horton
10518dd62e
Merge pull request #8429 from keymanapp/chore/common/ldml-ts-and-node-updates
chore(common): TS updates to non-sync'd packages, feature-esmodule merge conflict prevention
2023-03-14 12:06:15 +07:00
Joshua A. Horton
2439ba4e97 fix(developer): updates kmc, web/types module resolution, adds missing type import/exports 2023-03-14 08:41:29 +07:00
Joshua A. Horton
0da7ac24be chore(common): updates TS, sets export map for keyman-version 2023-03-14 08:22:26 +07:00
Marc Durdin
92ed99c4d6 chore(common): build script performance improvements
Improves build script performance by:
* using built-ins wherever possible (e.g. string splitting)
* eliminating redundant code
* using absolute (to $KEYMAN_ROOT) rather than relative paths to avoid realpath
* removing unnecessary `npm run` calls

BEFORE                         | AFTER
-------------------------------|----------------------
time ./core/build.sh --help    |
real    0m2.116s               | real    0m0.874s
user    0m0.578s               | user    0m0.198s
sys     0m0.984s               | sys     0m0.289s
-------------------------------|----------------------
time ./web/build.sh --help     |
real    0m3.523s               | real    0m0.757s
user    0m1.166s               | user    0m0.320s
sys     0m2.273s               | sys     0m0.455s
-------------------------------|----------------------
time ./web/build.sh -d         |
real    1m34.750s              | real    0m59.974s
user    0m9.721s               | user    0m6.284s
sys     0m19.652s              | sys     0m13.202s

@keymanapp-test-bot skip
2023-03-13 07:18:09 +07:00
Marc Durdin
0b7b22999e
Merge pull request #8326 from keymanapp/feat/developer/2761-kmc-build-project-2.0
feat(developer): Add support for building a folder to kmc 🙀
2023-02-27 19:56:42 +11:00
Marc Durdin
05d5c6f1f6
Merge pull request #8320 from keymanapp/feat/developer/5283-kmc-kpj-support
feat(developer): kmc .kpj support 🙀
2023-02-27 19:56:33 +11:00
Marc Durdin
89f26e1f9b
Merge pull request #8311 from keymanapp/feat/developer/5283-kmc-model-ts-support
feat(developer): kmc compile .model.ts file 🙀
2023-02-27 19:56:13 +11:00
Marc Durdin
d541c3b990
Merge pull request #8310 from keymanapp/feat/developer/5283-kmc-kps-support
feat(developer): kmc compile .kps files 🙀
2023-02-27 19:56:04 +11:00
Marc Durdin
a9b707d4f1
Merge pull request #8302 from keymanapp/feat/developer/5283-kmc-kmn-wrapper
feat(developer): support build of .kmn from kmc 🙀
2023-02-27 19:55:56 +11:00
Marc Durdin
8f02108579
Update developer/src/kmc/src/commands/buildTestData.ts
Co-authored-by: Steven R. Loomis <srl295@gmail.com>
2023-02-27 17:53:25 +11:00
Marc Durdin
be4f036a3c feat(developer): Add support for building a folder to kmc
Relates to #2761.

kmc now supports passing in a folder and building all Keyman source
files found in the folder, even if a .kpj is not present in the folder.

If a .kpj file exists, `KeymanDeveloperProject/Options/Version` will be
checked to determine behaviour. If this field is missing or "1.0", then
the classical behaviour persists.

If the Version field is "2.0", the `Files` key is ignored, and .kmn,
.xml, .model.ts, and .kps files under `sourcePath` are enumerated and
added to the in-memory project for build.

If a .kpj is not present in the folder, a virtual project is constructed
in memory with the following defaults:

* `version`: `2.0`
* `buildPath`: `$PROJECTPATH/build`
* `sourcePath`: `$PROJECTPATH/source`
* `compilerWarningsAsErrors`: `false`
* `warnDeprecatedCode`: `true`
* `checkFilenameConventions`: `true`

It is still considered an error to include both a keyboard and a model
in the same file, but a version 2.0 project will not include the field
determining its type in `Options/ProjectType`; this will instead be
checked during build.

The call to `kmc` can reference a folder or a .kpj file. The .kpj file
must have the same basename as the folder name (e.g.
`khmer_angkor/khmer_angkor.kpj`).

WARNING: this does not add support for 2.0 projects to Keyman Developer;
it is likely that opening a version 2.0 project in Developer will
currently corrupt it.

WARNING: it is not anticipated that kmcomp.exe will be updated to
support version 2.0 projects -- rather kmcomp.exe will be removed before
release of v17, and replaced with kmc.
2023-02-27 13:11:22 +07:00
Marc Durdin
b04489a47b feat(developer): kmc .kpj support
Adds support for building .kpj projects. Required minor tweak to kmcomp
to allow it to build both .kmx and .js from .kmn command line.
Currently, calls kmcomp.exe to build .kmn files, until we support a
cross-platform kmc-kmn C++ project.
2023-02-27 06:14:06 +07:00
Marc Durdin
12a6e404af feat(developer): kmc compile .model.ts file
Adds basic support for compiling .model.ts files using kmc-model to kmc.
2023-02-24 16:18:46 +07:00
Marc Durdin
f6a3364c56 chore(developer): no top-level await 2023-02-24 16:18:27 +07:00
Marc Durdin
adfe3fac63 feat(developer): kmc compile .kps files
Adds basic support for compiling .kps files using kmc-package to kmc.
2023-02-24 14:29:48 +07:00
Marc Durdin
113918daef chore(developer): use BuildCommandOptions type 2023-02-24 13:57:36 +07:00
Marc Durdin
1be3ab37cc feat(developer): support build of .kmn from kmc
Uses existing kmcomp.exe to build .kmn files. Requires kmc to be in a
subfolder of the Keyman Developer binary folder.
2023-02-24 13:57:35 +07:00
Marc Durdin
91c6cb9f49 chore(developer): use --out-file for build-test-data 2023-02-24 13:54:29 +07:00
Marc Durdin
083be28ac4 chore(developer): fixup mkdir 2023-02-24 13:54:28 +07:00
Marc Durdin
a30fdffd95 feat(developer): kmc build command 2023-02-24 13:54:27 +07:00
Marc Durdin
c7c52af3e2 chore(developer): update to commander 10.0.0 2023-02-24 13:54:25 +07:00
Marc Durdin
a2ceb98948 chore: rewrite extra standard build script prolog 2023-02-23 08:09:41 +07:00
Marc Durdin
88df443ba1 feat(developer): touch layout compiler [unfinished] 2023-02-20 10:18:01 +07:00
Steven R. Loomis
dd76a1fc36 feat(developer): add -T option to kmc 🙀
- -T converts testdata.xml into testdata.json

#7535
2023-02-15 17:58:52 -06:00
Steven R. Loomis
5c357fad81 feat(common): ldml: unit tests for import error messages from the compiler 🙀
- also, change loadFile in callbacks to return null when file isn't found.

For: #7534
(cherry picked from commit 33274dd2c8)
2023-02-03 18:39:51 -06:00
Steven R. Loomis
5a4b44f2d7 chore(common): move CompilerEvent, CompilerCallbacks into types 🙀
- make CompilerCallbacks an interface
- concrete implementations for Node (CLI) and for Testing
- change loadFile to take a string|URL 🙀

supports #7964
2023-01-27 12:37:54 -06:00
Steven R. Loomis
e63745baff chore(coverage): ldml setup for visual code coverage 🙀
- generate coverage/lcov.info files in several places that were already using c8
- change kmc-package's 'npm test' to include coverage, leave 'coverage' as alias
- gitignore the lcov files

Fixes #8060
2023-01-20 11:22:44 -06:00
Steven R. Loomis
bc14f18460 Merge remote-tracking branch 'origin/master' into chore/core/mergemaster4-epic-ldml 2022-12-15 17:55:13 -06:00
Steven R. Loomis
66a5cdb1f9 chore(developer): ldml: update tools and data for keyboard-preview 🙀
- update tooling in common and kmc
- update spec
- update test files
2022-10-18 11:32:41 -05:00
Marc Durdin
2cf6bf3f60 chore(common): update build.sh dependencies for epic-ldml 2022-10-14 10:45:00 +11:00
Marc Durdin
e28da7b1dd fix(developer): kmc was overwriting kmx with kvk 2022-09-30 07:54:39 +10:00
Marc Durdin
0f961bd674 feat(developer): visual keyboard compiler in kmc
Adds support for building .kvk files to kmc. At present, .kvk will
always be generated, even if the .xml does not have a hardware layer.
2022-09-27 15:16:07 +10:00