Skip to content

Commit

Permalink
refactor(web): move lm-message-typespredictive-text/types
Browse files Browse the repository at this point in the history
Moves `common/web/lm-message-types/` →
`web/src/engine/predictive-text/types/`

Also fix a problem when running lm-worker tests on Linux where the file
system is case-sensitive.

Fixes: #12147
  • Loading branch information
ermshiperete committed Aug 12, 2024
1 parent 35481fe commit 8fbec5f
Show file tree
Hide file tree
Showing 15 changed files with 588 additions and 25 deletions.
1 change: 0 additions & 1 deletion common/web/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"

#
# TODO: future modules may include
# :lm-message-types \
# :sentry-manager \
#

Expand Down
12 changes: 0 additions & 12 deletions common/web/lm-message-types/tsconfig.json

This file was deleted.

2 changes: 1 addition & 1 deletion common/web/lm-worker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function do_test() {

if builder_has_option --ci; then
MOCHA_FLAGS="$MOCHA_FLAGS --reporter mocha-teamcity-reporter"
WTR_CONFIG=.ci
WTR_CONFIG=.CI
fi

if builder_has_option --debug; then
Expand Down
2 changes: 1 addition & 1 deletion common/web/lm-worker/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"references": [
// types
{ "path": "../../models/types" },
{ "path": "../lm-message-types" },
{ "path": "../../../web/src/engine/predictive-text/types" },
// modules
{ "path": "../keyman-version" },
{ "path": "../utils" },
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@keymanapp/models-templates": ["./common/models/templates"],
"@keymanapp/models-wordbreakers": ["./common/models/wordbreakers"],
"@keymanapp/web-utils": ["./common/web/utils"],
"@keymanapp/lm-message-types": ["./common/web/lm-message-types"],
"@keymanapp/lm-message-types": ["./web/src/engine/predictive-text/types"],
"@keymanapp/keyman-version": ["./common/web/keyman-version"],
"@keymanapp/ldml-keyboard-constants": [ "./core/include/ldml" ],
}
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
{ "path": "./common/web/gesture-recognizer/tsconfig.json" },
{ "path": "./common/web/gesture-recognizer/src/tools/unit-test-resources/tsconfig.json" },
{ "path": "./common/web/keyman-version" },
{ "path": "./common/web/lm-message-types/" },
{ "path": "./common/web/lm-worker/" },
{ "path": "./common/web/recorder/tsconfig.json" },
{ "path": "./common/web/sentry-manager/src/tsconfig.json" },
Expand Down Expand Up @@ -42,6 +41,7 @@
{ "path": "./resources/build/version/" },

{ "path": "./web/src/tsconfig.all.json" },
{ "path": "./web/src/engine/predictive-text/types/" },
{ "path": "./web/src/engine/predictive-text/worker-main/tsconfig.all.json" },
// { "path": "./web/tools/recorder/tsconfig.json" },
// { "path": "./web/tools/sourcemap-root/tsconfig.json" },
Expand Down
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions web/src/engine/predictive-text/types/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "../../../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "./",
"outDir": "build/",
"tsBuildInfoFile": "build/tsconfig.tsbuildinfo",
"rootDir": "./src"
},
"include": ["./*.ts"],
"exclude": ["test.ts"]
}
4 changes: 2 additions & 2 deletions web/src/engine/predictive-text/worker-main/src/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
{ "path": "../../../../../../common/web/utils" },
{ "path": "../../../../../../common/models/types"},
{ "path": "../../../../../../common/models/wordbreakers"},
{ "path": "../../../../../../common/web/lm-message-types"},
{ "path": "../../../../../../common/models/templates"}
{ "path": "../../../../../../common/models/templates"},
{ "path": "../../types"}
],
"include" : [ "./*.ts" ],
"exclude" : [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{ "path": "../../../../../common/web/utils" },
{ "path": "../../../../../common/models/types"},
{ "path": "../../../../../common/models/wordbreakers"},
{ "path": "../../../../../common/web/lm-message-types"},
{ "path": "../types"},
{ "path": "../../../../../common/models/templates"},
{ "path": "src/node" },
{ "path": "src/web" }
Expand Down
Loading

0 comments on commit 8fbec5f

Please sign in to comment.