Commit graph

137 commits

Author SHA1 Message Date
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
dependabot[bot]
1525cd3058
build(deps): bump multer from 2.0.1 to 2.0.2
Bumps [multer](https://github.com/expressjs/multer) from 2.0.1 to 2.0.2.
- [Release notes](https://github.com/expressjs/multer/releases)
- [Changelog](https://github.com/expressjs/multer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/expressjs/multer/compare/v2.0.1...v2.0.2)

---
updated-dependencies:
- dependency-name: multer
  dependency-version: 2.0.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-18 02:03:46 +00:00
dependabot[bot]
8f7462c22c
chore(deps): bump brace-expansion
Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 2.0.1 to 2.0.2.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/v2.0.1...v2.0.2)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 2.0.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-11 20:56:26 +00:00
dependabot[bot]
70859f2d34
chore(deps): bump multer from 2.0.0 to 2.0.1
Bumps [multer](https://github.com/expressjs/multer) from 2.0.0 to 2.0.1.
- [Release notes](https://github.com/expressjs/multer/releases)
- [Changelog](https://github.com/expressjs/multer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/expressjs/multer/compare/v2.0.0...v2.0.1)

---
updated-dependencies:
- dependency-name: multer
  dependency-version: 2.0.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-05 05:08:54 +00:00
Marc Durdin
2d7484c84a maint(developer): update multer to v2.0.0
Looks like dependabot did not cleanly upgrade multer (#13982). Possibly
a bug with workspaces? Removed from package.json, npm install, re-added,
npm install to fix the issue.

See-also: #13982
2025-05-21 10:58:29 +02:00
dependabot[bot]
87a9935c28
chore(deps): bump multer from 1.4.5-lts.1 to 2.0.0
Bumps [multer](https://github.com/expressjs/multer) from 1.4.5-lts.1 to 2.0.0.
- [Release notes](https://github.com/expressjs/multer/releases)
- [Changelog](https://github.com/expressjs/multer/blob/v2.0.0/CHANGELOG.md)
- [Commits](https://github.com/expressjs/multer/compare/v1.4.5-lts.1...v2.0.0)

---
updated-dependencies:
- dependency-name: multer
  dependency-version: 2.0.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-20 01:45:05 +00:00
Joshua Horton
7b1310a7d5
Merge pull request #13899 from keymanapp/maint/update-mocha
maint: update mocha
2025-05-19 08:42:53 +07:00
Marc Durdin
7a393f7e27
Merge pull request #13847 from keymanapp/fix/developer/13846-remove-ngrok-mac-binary
fix(developer): remove ngrok binary at build time
2025-05-15 23:09:31 +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
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
Marc Durdin
2a48f54b70 fix(developer): remove ngrok binary at build time
While ngrok.exe was already removed, ngrok (mac? linux?) was still
present in node_modules.

Fixes: #13846
2025-05-07 10:55:29 +08: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
d2b457b2e4 fix(developer): load Keyman Developer options in Server before use
Fixes: #13420
2025-03-10 06:28:39 +07:00
Marc Durdin
357d196181 chore(developer): use JQ variable in script 2025-01-20 14:11:42 +07:00
Marc Durdin
f407d9823d fix(developer): include developer-utils deps in server build
Fixes: #12950
2025-01-20 13:06:01 +07: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
dependabot[bot]
595fe46d0b
chore(deps): bump cross-spawn
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-22 12:48:10 +00:00
dependabot[bot]
094aa985b2
chore(deps): bump express from 4.19.2 to 4.20.0
Bumps [express](https://github.com/expressjs/express) from 4.19.2 to 4.20.0.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.19.2...4.20.0)

---
updated-dependencies:
- dependency-name: express
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-11 07:18:39 +00:00
dependabot[bot]
6fad148466
chore(deps): bump semver from 7.5.4 to 7.6.0
Bumps [semver](https://github.com/npm/node-semver) from 7.5.4 to 7.6.0.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.5.4...v7.6.0)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-14 11:22:58 +00:00
Marc Durdin
c1d3fea8ea chore(developer): add eventemitter3 copy to Server build 2024-08-12 20:17:51 +08:00
Marc Durdin
062ae33579 refactor(developer): add eventemitter3 and ldml-keyboard-constants deps to Server
Fixes: #12077
2024-08-12 17:23:48 +07:00
Marc Durdin
a887015583 refactor(developer): add extra deps for Server
The way that Server is built for local distribution does not currently
handle transitive dependencies for @keymanapp dependencies well. So,
this adds four dependencies from @keymanapp/developer-utils to Server so
that they will be available in the packaged deployment.

A future improvement could be to package developer-utils using npm
packaging tools, but these struggled with bundling monorepo dependencies
in the past also.
2024-08-12 11:13:22 +07:00
Marc Durdin
f4659e6233 chore(developer): add @keymanapp/common-types to Server publish action 2024-08-12 09:57:17 +07:00
Marc Durdin
49a41c1ab1 chore(developer): build addins before server 2024-08-12 06:08:55 +07:00
Marc Durdin
7260ca23c2 chore(developer): copy only specific addon files during server build 2024-08-12 06:08:54 +07:00
Marc Durdin
f9b386e157 chore(developer): only copy specific files for server addons 2024-08-12 06:08:53 +07:00
Marc Durdin
17774531c5 chore(developer): upgrade node-gyp to support Python 3.12+ 2024-08-12 06:08:52 +07:00
Marc Durdin
d93f10ae3a refactor(developer): use npm or local source for server addons instead of github references
Brings trayicon source into the repository, as the source repo appears
to be dead. Updates console source to latest version on npm.

Fixes: #12077
2024-08-12 06:08:51 +07:00
Marc Durdin
d1e351a1ac
Revert "chore(developer): remove redundant references from tsconfig.json" 2024-08-01 08:57:27 +10:00
Marc Durdin
1cff1a5084 chore(developer): remove redundant references from tsconfig.json
With the full move to ES Modules, we no longer need to include
`references` in tsconfig.json, as we can rely on package.json and
build.sh dependency management. Note however that `tsc -b` may not work
to build dependencies -- they need to be built using `build.sh`, which
calculates which dependencies need building.

kmc-keyboard-info was missing a dependency link to kmc-package in
build.sh, correcting this at the same time.

Relates-to: #12027
2024-07-27 05:44:22 +07:00
Marc Durdin
1afa4beb01 fix(developer): remove paths from tsconfig.json
Fixes: #12027
2024-07-26 06:59:45 +07:00
dependabot[bot]
aca6e1dfcc
chore(deps): bump ws from 8.16.0 to 8.17.1
Bumps [ws](https://github.com/websockets/ws) from 8.16.0 to 8.17.1.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.16.0...8.17.1)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-18 22:02:42 +00:00
Joshua A. Horton
2340048a27 fix(developer): run compiled version of dev-server's unit test 2024-06-10 14:39:08 +07:00
Joshua A. Horton
d07fa7e953 chore(common): eliminate ts-node ref from most subpackages 2024-06-10 10:07:58 +07:00
Joshua A. Horton
e527317d3a fix(common): remove subpackge entries for older TS version 2024-06-10 09:14:03 +07:00
Marc Durdin
e9175de00f fix(developer): test existence of ngrok.exe before atttempting to start
Fixes the scenario where the `%AppData%\Keyman\Keyman Developer\Server\bin`
folder exists, but ngrok.exe is not in the folder, which caused Keyman
Developer Server to crash.

Fixes: #11542
Fixes: KEYMAN-DEVELOPER-1JE
2024-05-27 08:21:13 +07:00
Marc Durdin
fa57d5c674 chore(developer): final work on build.sh for developer
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.
2024-05-20 06:34:53 +07:00
Marc Durdin
41df6d1cd7 chore(developer): refactor remaining build scripts
This finishes the changes for all build infrastructure for Keyman
Developer to use build.sh.
2024-05-20 06:34:50 +07:00
Marc Durdin
2499ebf4bb chore(developer): move windows common Makefiles to build scripts
Relates to #11317.
2024-05-20 06:34:38 +07:00
Marc Durdin
86c62ff36c chore(developer): transition remaining projects to build.sh
Relates to #11317.

All projects now have a build.sh. Still need to work on inst/, remove
old Makefiles, and update CI.
2024-05-20 06:33:51 +07:00
Joshua Horton
887a47930f
Merge pull request #11318 from keymanapp/chore/web/chai-update
chore(web): updates chai, @types/chai dependencies 🏃
2024-05-15 14:10:27 +07:00
Darcy Wong
cbf1fd5cb1 chore(common): Merge beta to master for sprint A18S1 part 2 2024-05-10 06:27:02 +07:00
Joshua A. Horton
398b9e0ae2 chore(common): drops package-specific 'chai', '@types/chai' versions
chore(web): missed leaving these out of the rebase
2024-05-07 14:35:09 +07:00
Marc Durdin
8474372baa fix(developer): define lastSelLength variable
Fixes #11361.
2024-05-06 10:25:04 +07:00
Marc Durdin
cd8121ef65 chore(common): builder scripts now use /resources/build/builder.inc.sh
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.
2024-05-02 15:54:31 +07:00
Marc Durdin
0f390d47cc chore(common): maintenance on build scripts - cd
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
2024-05-02 15:54:29 +07:00
Marc Durdin
e8d3600e60 chore: Merge branch 'master' into chore/merge-beta-into-master-B17S6 2024-04-23 16:41:44 +07:00
Marc Durdin
5658a177a2
Merge pull request #11276 from keymanapp/fix/developer/11274-use-strict-for-downlevel-browsers
fix(developer): "use strict" for downlevel browsers in Server
2024-04-23 18:55:33 +10:00