Commit graph

434 commits

Author SHA1 Message Date
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
ce864ea923 chore: update standard script prolog to use builtin instead of dirname 2023-02-22 11:04:15 +07:00
Marc Durdin
463c7ff907 chore: remove greadlink from standard script prolog 2023-02-22 10:43:06 +07:00
Marc Durdin
4d53a277f3 chore: use builder_die, remove fail 2023-02-20 09:15:38 +07:00
Joshua A. Horton
878e0f0ea2 chore(common): updates typescript to 4.9.5 2023-02-09 08:40:52 +07:00
Marc Durdin
767927bf16 chore(common): use /usr/bin/env bash
Fixes up scripts (except under /linux) to use `#!/usr/bin/env bash`
instead of `#!/bin/bash` or `#!/bin/sh` so that we don't end up with
the ancient version of bash supplied with macOS.

This became urgent with this PR, because of bash-4.xisms in
build-utils.sh, for example on line 572:

```
if [[ -v _builder_params[$e] ]]; then
```
2022-07-25 14:59:37 +10:00
Marc Durdin
833dde0ae4 chore: remove unnecessary package-lock.json files 2022-05-16 14:47:58 +10:00
Marc Durdin
15f4aa8af2 chore(web): update npm version refs for publishing packages
Note that the version entry will be added to the local package.json
which will then be dirty. This version entry should not be committed.
2022-05-16 08:46:09 +10:00
Marc Durdin
0fbf53f8d7 chore(web): move version from package.json to keyman-version package
Starts to resolve the chaos of putting version numbers into every
package.json file.

Adds a new keyman-version package which mimics the
version information in build-utils.sh. This will eventually replace
resources/web-environment.

Fixes the build for the lexical model compiler tools to remove refs to
package.json version and use keyman-version instead.

More fixes coming in a follow-up.
2022-04-17 06:47:39 +10:00
Marc Durdin
0ac04d0530 chore(web): Merge branch 'beta' into chore/web/no-more-lerna 2022-04-12 21:17:15 +10:00
Marc Durdin
4d94786852 chore(web): replace lerna with npm workspaces and ts projects
Fixes #6320.

Part 1 of moving from lerna to a simpler, maintained monorepo solution,
using TypeScript Projects and NPM Workspaces.

There is more work to be done here. At this point, KeymanWeb builds and
runs without errors, but the built file is substantially different,
mostly in include order.

Using TypeScript Projects, we move away from the need to run build
scripts in various locations for almost all the Typescript modules.

TODO: Embedded versions and tests have not been verified.

TODO: developer/server is not yet verified.

TODO: developer/js (needs a rename!) is not yet verified.

TODO: Currently, the predictive-text folder needs refactoring to move
the construction of the worker wrapper out of the Predictive Text build
and into the final assembly of keymanweb.js (as it should be valid to
run it as a separate .js anyway).

TODO: Most of the `<reference>` paths need to be re-verified. Ideally
there should be no references outside the current module for any given
.ts.

TODO: The embedded vs browser vs node (headless) builds should be tidied
up for consistency so that it's obvious what depends on what. This is
currently messiest in the predictive-text folder, where the output names
diverge from the filenames and the various files are mixed in the same
folder (as evidenced by the exclusions listed in each tsconfig.json).

TODO: `npm install` should be removed from most build scripts and
instead `npm ci` (#6196) should be run only once from the top-level
folder for any given build. I've had eliminated side-effects from the
`install` action for npm, which makes it easier to reason about state.

TODO: verify_npm_setup and related functions can probably be eliminated.

TODO: most of the build scripts should be largely eliminated for web.

TODO: several ts projects use inconsistent output folders.

TODO: it may be possible to generate a .d.ts for models/types so that
we can use a consistent reference for those as well.

TODO: build.sh, tsconfig.json should always be in the module's top-level
folder, not in a subfolder such as src (e.g. see input-processor/src,
keyboard-processor/src, web/source).

TODO: resources/web-environment should be in common/web.

TODO: other js node_modules imports should be wrapped like es6-shim.

TODO: fix up the publish code for npm modules

TODO: eliminate version numbers from package.json if possible?

Whew, that's most of the stuff I noticed!
2022-04-12 21:02:33 +10:00
Keyman Build Agent
114f58ee7f auto: increment beta version to 15.0.233 2022-04-11 14:02:20 -04:00
Marc Durdin
2340eb14a9
Merge pull request #6512 from keymanapp/feat/web/prediction-casing-follows-layer-redux
feat(web): prediction casing follows current layer redux
2022-04-11 06:09:03 +10:00
Keyman Build Agent
cdb4680698 auto: increment beta version to 15.0.232 2022-04-09 14:02:21 -04:00
Keyman Build Agent
01c089cf35 auto: increment beta version to 15.0.231 2022-04-08 14:02:37 -04:00
Marc Durdin
49eb062c65 feat(web): prediction casing follows current layer
Fixes #6455.

This involved adding an extra hint to the data passed into the lexical
model layer, being the CasingForm that the current layer wants to use.

Given there are several entry points to the lexical model layer, this
meant a few places where we needed to check the current layer.

I refactored the very long function `InputProcessor.processKeyEvent` to
extract out the `buildAlternates` function. There should be no
functional changes to the `buildAlternates` code. But it makes
`processKeyEvent` significantly easier to read.
2022-04-08 16:14:01 +10:00
Marc Durdin
e616900cad
Revert "feat(web): prediction casing follows current layer" 2022-04-08 14:50:32 +10:00
Keyman Build Agent
ef9a9459d2 auto: increment beta version to 15.0.230 2022-04-07 14:02:52 -04:00
Keyman Build Agent
54884ec2ad auto: increment beta version to 15.0.229 2022-04-05 14:02:12 -04:00
Marc Durdin
7df1ab1930
Merge pull request #6459 from keymanapp/feat/web/prediction-casing-follows-layer
feat(web): prediction casing follows current layer
2022-04-05 06:45:42 +10:00
Keyman Build Agent
6e8a458c3b auto: increment beta version to 15.0.228 2022-04-04 14:03:57 -04:00
Keyman Build Agent
852754ea40 auto: increment beta version to 15.0.227 2022-04-01 14:02:08 -04:00
Marc Durdin
b7ce99480f feat(web): prediction casing follows current layer
Fixes #6455.

This involved adding an extra hint to the data passed into the lexical
model layer, being the CasingForm that the current layer wants to use.

Given there are several entry points to the lexical model layer, this
meant a few places where we needed to check the current layer.

I refactored the very long function `InputProcessor.processKeyEvent` to
extract out the `buildAlternates` function. There should be no
functional changes to the `buildAlternates` code. But it makes
`processKeyEvent` significantly easier to read.
2022-04-01 16:20:50 +11:00
Keyman Build Agent
439d00d87b auto: increment beta version to 15.0.226 2022-03-31 22:57:58 -04:00
Keyman Build Agent
4e1f0432cd auto: increment beta version to 15.0.225 2022-03-28 21:31:48 -04:00
Keyman Build Agent
a3d2e8a1a8 auto: increment beta version to 15.0.224 2022-03-27 14:44:10 -04:00
Keyman Build Agent
7b2cc72245 auto: increment beta version to 15.0.223 2022-03-25 14:02:20 -04:00
Keyman Build Agent
3aa0819c5b auto: increment beta version to 15.0.222 2022-03-24 14:02:12 -04:00
Keyman Build Agent
12a7e13c5f auto: increment beta version to 15.0.221 2022-03-23 14:07:31 -04:00
Keyman Build Agent
c2462f7c4c auto: increment beta version to 15.0.220 2022-03-22 14:02:35 -04:00
Keyman Build Agent
b3c8372cb9 auto: increment beta version to 15.0.219 2022-03-21 14:01:46 -04:00
Keyman Build Agent
f13c07acbf auto: increment beta version to 15.0.218 2022-03-19 14:02:39 -04:00
Keyman Build Agent
5d6bc10de9 auto: increment beta version to 15.0.217 2022-03-18 14:02:34 -04:00
Keyman Build Agent
cdc94f73b2 auto: increment beta version to 15.0.216 2022-03-17 14:03:41 -04:00
Keyman Build Agent
a595b63422 auto: increment beta version to 15.0.215 2022-03-16 14:30:41 -04:00
Keyman Build Agent
ed5dd2f2bd auto: increment beta version to 15.0.214 2022-03-15 14:31:13 -04:00
Keyman Build Agent
7fe1997754 auto: increment beta version to 15.0.213 2022-03-11 13:02:26 -05:00
Keyman Build Agent
a64ead9287 auto: increment beta version to 15.0.212 2022-03-10 13:49:17 -05:00
Keyman Build Agent
64abc2914b auto: increment beta version to 15.0.211 2022-03-09 19:26:21 -05:00
Keyman Build Agent
6852aaadb4 auto: increment beta version to 15.0.210 2022-03-08 16:43:31 -05:00
Keyman Build Agent
db0753fa26 auto: increment beta version to 15.0.207 2022-03-02 01:45:00 -05:00
Keyman Build Agent
7dbf3ee7e2 auto: increment master version to 15.0.205 2022-03-01 13:02:38 -05:00
Keyman Build Agent
7faf71d1a8 auto: increment master version to 15.0.204 2022-02-26 13:02:45 -05:00
Keyman Build Agent
40df30749c auto: increment master version to 15.0.203 2022-02-24 13:02:56 -05:00
Keyman Build Agent
de8a1fe220 auto: increment master version to 15.0.202 2022-02-21 13:02:21 -05:00
Marc Durdin
757b6a3e09
Merge pull request #6259 from keymanapp/fix/developer/6209-npm-publish-alpha-to-stable
fix(developer): npm publish with correct tier
2022-02-21 06:25:02 +07:00
Keyman Build Agent
149fba62b6 auto: increment master version to 15.0.201 2022-02-20 13:02:45 -05:00
Keyman Build Agent
10e7e4a4c4 auto: increment master version to 15.0.200 2022-02-18 13:13:14 -05:00
Keyman Build Agent
93c19d9adb auto: increment master version to 15.0.199 2022-02-13 13:02:58 -05:00