Commit graph

133 commits

Author SHA1 Message Date
Marc Durdin
65c8c89be5 chore(web): adapts keyman-version bundling in Developer products
As KEYMAN-VERSION changed from being a type to a class, this broke the
bundling and referencing strategies in Developer/Server and
Developer/kmlmc. This updates the bundling process and fixes the
references in both projects.

Note that keyman-version no longer depends on gosh. Given we are
currently manually calling the build for this in all projects (or should
be!), it's better that we keep the build of this explicit for now.

If we want to restore the postinstall/postci steps in the future, the
gosh dependency would need to be manually removed from package.json in
order for the bundling builds to work for Developer/Server and
Developer/kmlmc.
2022-05-28 10:57:24 +10:00
Marc Durdin
bd8e07bea2 chore(developer): fixup paths for tests 2022-05-14 15:35:06 +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
be51f97371 chore(developer): fixup kmlmc imports 2022-04-16 06:08:58 +10:00
Marc Durdin
a639eaa946 feat(developer): promote 'info' messages to 'hint'
There was confusion in the compiler between INFO and HINT type messages.
The problem is that INFO messages will be suppressed by -s/-ss in
kmcomp, but we actually still want HINT messages to be emitted. So I
have gone ahead and renamed CERR_INFO to CERR_HINT and updated all the
places.

This was necessary in order for the kmcomp e2e test 194 to pass.
2022-03-30 17:04:48 +11:00
Marc Durdin
b50ad35d72 feat(developer): hint on unreachable code
Fixes #355.
Fixes #1710.

This is structured as a feature so it is tested as such, but was part of
the set of fixes scheduled for 15.0 beta. Any rule in a group that
Keyman Developer assesses as 'unreachable' will receive a hint message.

The current rule match is fairly simplistic -- it only does an exact
comparison -- so duplication which is indirect, through `any(store)`
references in the context would still result in unreachable rules that
are not picked up.
2022-03-29 12:49:34 +11:00
Marc Durdin
0cae56d465 feat(developer): support commas in frequency in wordlists
Fixes #3174.

Google Sheets can export TSV files with formatted numbers, including
having commas as thousands separators. Let's ignore those commas.
2022-03-02 08:40:40 +11:00
Darcy Wong
8af51e63f7 fix(developer): Update buildKmpFile to return Promise 2021-10-16 16:29:09 +07:00
Darcy Wong
eda1706710 fix(developer): Migrate jszip call
Using the guide
https://stuk.github.io/jszip/documentation/api_jszip/generate_async.html#type-option
2021-09-30 11:49:14 +07:00
Marc Durdin
2c383cabe4 fix(developer): downgrade additional let and arrow functions 2021-03-18 17:51:59 +11:00
Marc Durdin
52884c76e4 fix(developer): use var not let in definitions
Fixes #4716.

We still support Chrome 37 on Android 5.0, which does not permit
use of the `let` keyword in normal conditions.
2021-03-18 17:00:12 +11:00
Marc Durdin
2f2f998da6 fix(developer): schema conformance for model package compiler
Fixes #3199.

Ensures that the model package compiler passes schema validation for
kmp.json. Three problems were corrected:

1. `followKeyboardVersion` is a source-only property; it should not be
   in deployable kmp.json.
2. `copyLocation` should have been a number not a string (in XML
   everything is a string... but JSON has more control here)
3. `fileType` is a source-only property; it also should not be in
   deployable kmp.json.

I have checked that the resulting files validate against the package
kmp.json schema version 1.1.0 defined at
https://github.com/keymanapp/api.keyman.com/blob/master/schemas/package/1.1.0/package.json.

None of these fixes should impact the use of these packages in target
apps. `followKeyboardVersion` and `fileType` are used only in the source
at package development time, and `copyLocation` is unused (and should be
eliminated from Keyman altogether in the future).
2021-03-01 10:57:49 +11:00
jahorton
7b3a9b3a2b fix(developer): fixes error when "constructor" is in wordlist 2021-02-22 16:24:53 +07:00
jahorton
761494996b chore(common/models/types): CasingEnum -> CasingForm 2020-11-11 08:55:26 +07:00
Joshua Horton
cbf5d4f7da
Update developer/js/source/lexical-model-compiler/lexical-model.ts
Co-authored-by: Eddie Antonio Santos <Eddie.Santos@nrc-cnrc.gc.ca>
2020-11-10 10:53:03 +07:00
jahorton
60113a3147 change(developer/compilers): ModelPseudoclosure -> ModelDefinitions 2020-11-10 10:51:06 +07:00
jahorton
67e08be599 docs(developer/compilers): removes finished TODOs 2020-11-05 10:20:37 +07:00
jahorton
5ff0a8cab3 feat(developer/compilers): more test cases, extra rigor 2020-11-05 09:56:12 +07:00
jahorton
5c9c2bd8e6 feat(developer/compilers): initial applyCasing compilation, new code reorg 2020-11-04 15:08:20 +07:00
jahorton
22d5804d47 refactor(developer/compilers): splits potentially-common defaults to own file 2020-11-04 15:08:19 +07:00
jahorton
873f835e83 feat(developer/compilers): closure-based logic for applyCasing during compilation 2020-11-04 15:08:08 +07:00
jahorton
b800eaa96d feat(developer/compilers): starts lexical model compiler aspects 2020-11-04 15:07:57 +07:00
Eddie Antonio Santos
64ad54350b
docs(developer/compilers): hopefully more clear documentation for break-words-at-spaces option 2020-08-26 14:49:24 -06:00
Eddie Antonio Santos
d98548e529
style(developer/compilers): add missing semi-colon 2020-08-26 10:43:15 -06:00
Eddie Antonio Santos
3ff7a84d05
docs(developer/compilers): fix some wording and make more explicit 2020-08-26 09:53:37 -06:00
Eddie Antonio Santos
59870ef2f7
change(developer/compilers): regexp detects whether SEA character exists anywhere 2020-08-26 09:42:33 -06:00
Eddie Antonio Santos
9b62d2e818
docs(developer/compilers): intended purpose of override script 2020-08-26 08:38:34 -06:00
Eddie Antonio Santos
78a3bb0862
feat(developer/compilers): compile script overrides 2020-08-24 16:01:42 -06:00
Eddie Antonio Santos
a961896206
refactor(developer/compilers): extract method: compileJoinDecorator 2020-08-24 15:49:58 -06:00
Eddie Antonio Santos
6fbb51780e
refactor(developer/compilers): forego push() and pop() in favour of replacing in place 2020-08-24 15:24:12 -06:00
Eddie Antonio Santos
4cf2b487a4
refactor(developer/compilers): simplify conditional 2020-08-24 15:19:41 -06:00
Eddie Antonio Santos
8ce05a93ed
feat(developer/compilers): join at letters and marks 2020-08-24 15:11:35 -06:00
Eddie Antonio Santos
ba65d63be5
feat(developer/compilers): [in progress] figure out API for script overrides 2020-08-24 14:02:12 -06:00
Eddie Antonio Santos
7a9ce07cf3
test(developer/compilers): basic usage of script overrides decorator 2020-08-24 13:46:12 -06:00
Eddie Antonio Santos
84a4047ee4
feat(developer/compilers): stop logging after a maximum has been reached 2020-07-22 16:08:01 -06:00
Eddie Antonio Santos
174daede86
change(developer/compilers): log to stdout 2020-07-22 15:35:53 -06:00
Eddie Antonio Santos
fb514ee384
refactor(developer/compilers): change warning names to have CWARN_ prefixes 2020-07-22 15:20:27 -06:00
Eddie Antonio Santos
ffda8e7e67
refactor(developer/compilers): extract enum: LogLevel 2020-07-22 11:35:20 -06:00
Eddie Antonio Santos
1244ed720f
refactor(developer/compilers): extract interface: LogMessage 2020-07-22 09:26:43 -06:00
Eddie Antonio Santos
2429d81c8c
feat(developer/compilers): allow log message redirection 2020-07-22 09:18:34 -06:00
Eddie Antonio Santos
fe10f4e7c6
docs(developer/compilers): add docs for error classes 2020-07-22 09:12:21 -06:00
Eddie Antonio Santos
9ce4dd119f
refactor(developer/compilers): move method deterineLogLevelTitle() 2020-07-22 09:04:41 -06:00
Eddie Antonio Santos
2c209d1b01
change(developer/compilers): assign filename/lineno directly 2020-07-22 09:01:49 -06:00
Eddie Antonio Santos
009ef29ba8
refactor(developer/compilers): extract class hierarchy: LogMessage 2020-07-22 08:59:30 -06:00
Eddie Antonio Santos
54146314ca
feat(developer/compilers): warn if duplicate word found in same file 2020-07-22 08:46:12 -06:00
Eddie Antonio Santos
4c3619b564
feat(developer/compilers): warn when using mixed normalization forms 2020-07-21 09:09:24 -06:00
Eddie Antonio Santos
ee6e79173b
feat(developer/compilers): add CERR to lm compiler 2020-07-21 09:04:45 -06:00
Eddie Antonio Santos
977d5b6b8e
change(developer/compilers): adjust generator yield types 2020-07-20 15:44:25 -06:00
Eddie Antonio Santos
2ad296960d
refactor(developer/compilers): extract generator: enumerateLines() 2020-07-20 15:34:03 -06:00
Eddie Antonio Santos
0f71e0f7db
change(developer/compilers): remove parseWordList() 2020-07-20 15:25:25 -06:00