From 70d06d7cd1b16d2859e8c5a278ecef4855199e73 Mon Sep 17 00:00:00 2001 From: "Joshua A. Horton" Date: Fri, 10 May 2024 15:00:26 +0700 Subject: [PATCH 1/5] chore(web): updates all KMW-related projects to TS 5.4.5 --- common/models/types/tsconfig.json | 1 - .../gestures/matchers/gestureMatcher.ts | 2 +- .../src/keyboards/activeLayout.ts | 3 +- .../src/keyboards/defaultLayouts.ts | 2 +- common/web/lm-message-types/tsconfig.json | 1 - package-lock.json | 403 +++++++++++++++++- package.json | 2 +- tsconfig.base.json | 2 +- web/src/app/browser/src/beepHandler.ts | 2 +- web/tsconfig.base.json | 2 +- 10 files changed, 401 insertions(+), 19 deletions(-) diff --git a/common/models/types/tsconfig.json b/common/models/types/tsconfig.json index 5d6a84afcbd..ddd1c5b196a 100644 --- a/common/models/types/tsconfig.json +++ b/common/models/types/tsconfig.json @@ -2,7 +2,6 @@ "extends": "../tsconfig.kmw-worker-base.json", "compilerOptions": { "declaration": true, - "module": "none", "outDir": "build/", }, "include": ["./*.ts"], diff --git a/common/web/gesture-recognizer/src/engine/headless/gestures/matchers/gestureMatcher.ts b/common/web/gesture-recognizer/src/engine/headless/gestures/matchers/gestureMatcher.ts index 622f04fe0cc..b33800dd978 100644 --- a/common/web/gesture-recognizer/src/engine/headless/gestures/matchers/gestureMatcher.ts +++ b/common/web/gesture-recognizer/src/engine/headless/gestures/matchers/gestureMatcher.ts @@ -81,7 +81,7 @@ export class GestureMatcher implements PredecessorMatch< // We condition on ComplexGestureSource since some unit tests mock the other type without // instantiating the actual type. - const predecessor = sourceObj instanceof GestureSource ? null : sourceObj; + const predecessor = sourceObj instanceof GestureSource ? null : sourceObj; const source = predecessor ? null : (sourceObj as GestureSource); this.predecessor = predecessor; diff --git a/common/web/keyboard-processor/src/keyboards/activeLayout.ts b/common/web/keyboard-processor/src/keyboards/activeLayout.ts index e9042996c96..954a24b8acd 100644 --- a/common/web/keyboard-processor/src/keyboards/activeLayout.ts +++ b/common/web/keyboard-processor/src/keyboards/activeLayout.ts @@ -9,6 +9,7 @@ import type Keyboard from "./keyboard.js"; import { TouchLayout } from "@keymanapp/common-types"; import TouchLayoutDefaultHint = TouchLayout.TouchLayoutDefaultHint; import TouchLayoutFlick = TouchLayout.TouchLayoutFlick; +import TouchLayoutKeySp = TouchLayout.TouchLayoutKeySp; import { type DeviceSpec } from "@keymanapp/web-utils"; // TS 3.9 changed behavior of getters to make them @@ -90,7 +91,7 @@ export class ActiveKeyBase { layer: string; displayLayer: string; nextlayer: string; - sp?: ButtonClass; + sp?: TouchLayoutKeySp; private _baseKeyEvent: KeyEvent; isMnemonic: boolean = false; diff --git a/common/web/keyboard-processor/src/keyboards/defaultLayouts.ts b/common/web/keyboard-processor/src/keyboards/defaultLayouts.ts index 2aa96db209f..4b504a9b171 100644 --- a/common/web/keyboard-processor/src/keyboards/defaultLayouts.ts +++ b/common/web/keyboard-processor/src/keyboards/defaultLayouts.ts @@ -22,7 +22,7 @@ import type Keyboard from "./keyboard.js"; export type KLS = {[layerName: string]: string[]}; // The following types provide type definitions for the full JSON format we use for visual keyboard definitions. -export type ButtonClass = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10; +export type ButtonClass = 0 | 1 | 2 | 3 | 4 | /*5 | 6 | 7 |*/ 8 | 9 | 10; export interface LayoutLayer extends LayoutLayerBase { // Post-processing elements. diff --git a/common/web/lm-message-types/tsconfig.json b/common/web/lm-message-types/tsconfig.json index f9d427f0bfc..cc5fb2f861d 100644 --- a/common/web/lm-message-types/tsconfig.json +++ b/common/web/lm-message-types/tsconfig.json @@ -2,7 +2,6 @@ "extends": "../../../tsconfig.base.json", "compilerOptions": { "declaration": true, - "module": "none", "outDir": "build/", "sourceMap": true, "lib": ["es6"], diff --git a/package-lock.json b/package-lock.json index d8543b63e29..f78eb09e3fd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -63,7 +63,7 @@ "sinon": "^17.0.1", "ts-node": "^10.9.1", "tslib": "^2.5.2", - "typescript": "^4.9.5" + "typescript": "^5.4.5" }, "engines": { "node": "^18.x" @@ -88,6 +88,19 @@ "typescript": "^4.9.5" } }, + "common/models/templates/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "common/models/types": { "name": "@keymanapp/models-types", "license": "MIT", @@ -95,6 +108,19 @@ "typescript": "^4.9.5" } }, + "common/models/types/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "common/models/wordbreakers": { "name": "@keymanapp/models-wordbreakers", "license": "MIT", @@ -109,6 +135,19 @@ "typescript": "^4.9.5" } }, + "common/models/wordbreakers/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "common/predictive-text": { "name": "@keymanapp/lexical-model-layer", "license": "MIT", @@ -129,6 +168,19 @@ "typescript": "^4.9.5" } }, + "common/predictive-text/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "common/test/resources": { "name": "@keymanapp/common-test-resources", "license": "MIT", @@ -137,6 +189,19 @@ "typescript": "^4.9.5" } }, + "common/test/resources/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "common/tools/hextobin": { "name": "@keymanapp/hextobin", "license": "MIT", @@ -175,6 +240,19 @@ "version": "2.0.0", "license": "MIT" }, + "common/tools/sourcemap-path-remapper/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "common/web/es6-shim": { "name": "@keymanapp/es6-shim", "extraneous": true, @@ -198,6 +276,19 @@ "typescript": "^4.9.5" } }, + "common/web/gesture-recognizer/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "common/web/input-processor": { "name": "@keymanapp/input-processor", "license": "MIT", @@ -218,6 +309,19 @@ "typescript": "^4.9.5" } }, + "common/web/input-processor/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "common/web/keyboard-processor": { "name": "@keymanapp/keyboard-processor", "license": "MIT", @@ -236,6 +340,19 @@ "typescript": "^4.9.5" } }, + "common/web/keyboard-processor/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "common/web/keyman-version": { "name": "@keymanapp/keyman-version", "license": "MIT", @@ -243,6 +360,19 @@ "typescript": "^4.9.5" } }, + "common/web/keyman-version/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "common/web/lm-message-types": { "name": "@keymanapp/lm-message-types", "license": "MIT", @@ -250,6 +380,19 @@ "typescript": "^4.9.5" } }, + "common/web/lm-message-types/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "common/web/lm-worker": { "name": "@keymanapp/lm-worker", "license": "MIT", @@ -274,6 +417,19 @@ "typescript": "^4.9.5" } }, + "common/web/lm-worker/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "common/web/recorder": { "name": "@keymanapp/recorder-core", "license": "MIT", @@ -287,6 +443,19 @@ "typescript": "^4.9.5" } }, + "common/web/recorder/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "common/web/sentry-manager": { "name": "@keymanapp/web-sentry-manager", "license": "MIT", @@ -298,6 +467,19 @@ "typescript": "^4.9.5" } }, + "common/web/sentry-manager/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "common/web/tslib": { "name": "@keymanapp/tslib", "dependencies": { @@ -309,6 +491,18 @@ "esbuild": "^0.15.16" } }, + "common/web/tslib/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "common/web/types": { "name": "@keymanapp/common-types", "license": "MIT", @@ -541,6 +735,19 @@ "node": ">=0.3.1" } }, + "common/web/types/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "common/web/utils": { "name": "@keymanapp/web-utils", "license": "MIT", @@ -553,6 +760,19 @@ "typescript": "^4.9.5" } }, + "common/web/utils/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "core/include/ldml": { "name": "@keymanapp/ldml-keyboard-constants", "license": "MIT" @@ -610,6 +830,19 @@ "typescript": ">=2.7" } }, + "developer/src/common/web/test-helpers/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "developer/src/common/web/utils": { "name": "@keymanapp/developer-utils", "license": "MIT", @@ -766,6 +999,19 @@ "node": ">=0.3.1" } }, + "developer/src/common/web/utils/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "developer/src/kmc": { "name": "@keymanapp/kmc", "license": "MIT", @@ -1031,6 +1277,19 @@ "node": ">=0.3.1" } }, + "developer/src/kmc-analyze/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "developer/src/kmc-keyboard": { "name": "@keymanapp/kmc-keyboard", "extraneous": true, @@ -1287,6 +1546,19 @@ "node": ">=0.3.1" } }, + "developer/src/kmc-keyboard-info/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "developer/src/kmc-kmn": { "name": "@keymanapp/kmc-kmn", "license": "MIT", @@ -1520,6 +1792,19 @@ "node": ">=0.3.1" } }, + "developer/src/kmc-kmn/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "developer/src/kmc-ldml": { "name": "@keymanapp/kmc-ldml", "license": "MIT", @@ -1759,6 +2044,19 @@ "node": ">=0.3.1" } }, + "developer/src/kmc-ldml/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "developer/src/kmc-model": { "name": "@keymanapp/kmc-model", "license": "MIT", @@ -1995,6 +2293,19 @@ "node": ">=0.3.1" } }, + "developer/src/kmc-model-info/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "developer/src/kmc-model/node_modules/@types/mocha": { "version": "5.2.7", "dev": true, @@ -2062,6 +2373,18 @@ "node": ">=4" } }, + "developer/src/kmc-model/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "developer/src/kmc-package": { "name": "@keymanapp/kmc-package", "license": "MIT", @@ -2279,6 +2602,19 @@ "node": ">=0.3.1" } }, + "developer/src/kmc-package/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "developer/src/kmc/node_modules/@types/mocha": { "version": "5.2.7", "dev": true, @@ -2484,6 +2820,19 @@ "node": ">=0.3.1" } }, + "developer/src/kmc/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "developer/src/server": { "name": "@keymanapp/developer-server", "license": "MIT", @@ -2558,6 +2907,19 @@ "node": ">=10.0.0" } }, + "developer/src/server/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "node_modules/@75lb/deep-merge": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@75lb/deep-merge/-/deep-merge-1.1.1.tgz", @@ -13923,15 +14285,16 @@ "license": "MIT" }, "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, "node_modules/typical": { @@ -13967,11 +14330,6 @@ "node": "*" } }, - "node_modules/uc.micro": { - "version": "1.0.6", - "dev": true, - "license": "MIT" - }, "node_modules/unbox-primitive": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", @@ -14689,6 +15047,18 @@ "node": ">=8" } }, + "resources/build/version/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "resources/build/version/node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", @@ -14760,6 +15130,19 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } + }, + "web/node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } } } } diff --git a/package.json b/package.json index 21c6964504b..30c61991dc8 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "sinon": "^17.0.1", "ts-node": "^10.9.1", "tslib": "^2.5.2", - "typescript": "^4.9.5" + "typescript": "^5.4.5" }, "scripts": {}, "workspaces": [ diff --git a/tsconfig.base.json b/tsconfig.base.json index 234f7c3aa18..2d2321747d0 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "module": "ES2022", + "module": "node16", "target": "es2022", "moduleResolution": "node16", "forceConsistentCasingInFileNames": true, diff --git a/web/src/app/browser/src/beepHandler.ts b/web/src/app/browser/src/beepHandler.ts index 5fae8742577..3659f8d7fdb 100644 --- a/web/src/app/browser/src/beepHandler.ts +++ b/web/src/app/browser/src/beepHandler.ts @@ -33,7 +33,7 @@ export class BeepHandler { * Description Flash body as substitute for audible beep; notify embedded device to vibrate */ beep(outputTarget: OutputTarget) { - if(!(outputTarget instanceof OutputTarget)) { + if(!(outputTarget instanceof OutputTarget)) { return; } diff --git a/web/tsconfig.base.json b/web/tsconfig.base.json index ccb568c867c..a57f4ccaa78 100644 --- a/web/tsconfig.base.json +++ b/web/tsconfig.base.json @@ -8,7 +8,7 @@ "allowSyntheticDefaultImports": true, "lib": ["es6"], - "module": "es6", + "module": "node16", "target": "es5", // TODO: These override ../tsconfig.base.json settings, and so should be removed if possible, From 01fa0675ef791ff0be2c1cc0fd5e6eab1f55b042 Mon Sep 17 00:00:00 2001 From: "Joshua A. Horton" Date: Fri, 10 May 2024 15:50:23 +0700 Subject: [PATCH 2/5] chore(web): centralizes on a single @types/node, as it caused a TS typing conflict --- common/tools/hextobin/package.json | 3 -- package-lock.json | 83 ++---------------------------- package.json | 2 +- 3 files changed, 5 insertions(+), 83 deletions(-) diff --git a/common/tools/hextobin/package.json b/common/tools/hextobin/package.json index 2ebb0e9f4e1..fb651481f7a 100644 --- a/common/tools/hextobin/package.json +++ b/common/tools/hextobin/package.json @@ -15,8 +15,5 @@ "main": "build/index.js", "bin": { "hextobin": "build/hextobin.js" - }, - "devDependencies": { - "@types/node": "^18.7.18" } } diff --git a/package-lock.json b/package-lock.json index f78eb09e3fd..559dc512b22 100644 --- a/package-lock.json +++ b/package-lock.json @@ -41,7 +41,7 @@ "@microsoft/api-documenter": "^7.23.31", "@microsoft/api-extractor": "^7.41.0", "@types/chai": "^4.3.14", - "@types/node": "^18.0.0", + "@types/node": "^20.4.1", "@typescript-eslint/eslint-plugin": "^5.59.1", "@web/dev-server-esbuild": "^1.0.2", "@web/dev-server-import-maps": "^0.2.0", @@ -210,9 +210,6 @@ }, "bin": { "hextobin": "build/hextobin.js" - }, - "devDependencies": { - "@types/node": "^18.7.18" } }, "common/tools/hextobin/node_modules/commander": { @@ -537,12 +534,6 @@ "dev": true, "license": "MIT" }, - "common/web/types/node_modules/@types/node": { - "version": "20.4.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.1.tgz", - "integrity": "sha512-JIzsAvJeA/5iY6Y/OxZbv1lUcc8dNSE77lb2gnBH+/PJ3lFR1Ccvgwl5JWnHAkNHcRsT0TbpVOsiMKZ1F/yyJg==", - "dev": true - }, "common/web/types/node_modules/ansi-styles": { "version": "3.2.1", "dev": true, @@ -789,12 +780,6 @@ "typescript": "^4.9.5" } }, - "developer/src/common/web/test-helpers/node_modules/@types/node": { - "version": "20.4.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.1.tgz", - "integrity": "sha512-JIzsAvJeA/5iY6Y/OxZbv1lUcc8dNSE77lb2gnBH+/PJ3lFR1Ccvgwl5JWnHAkNHcRsT0TbpVOsiMKZ1F/yyJg==", - "dev": true - }, "developer/src/common/web/test-helpers/node_modules/diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -857,12 +842,6 @@ "typescript": "^4.9.5" } }, - "developer/src/common/web/utils/node_modules/@types/node": { - "version": "20.5.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.7.tgz", - "integrity": "sha512-dP7f3LdZIysZnmvP3ANJYTSwg+wLLl8p7RqniVlV7j+oXSXAbt9h0WIBFmJy5inWZoX9wZN6eXx+YXd9Rh3RBA==", - "dev": true - }, "developer/src/common/web/utils/node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -1073,12 +1052,6 @@ "integrity": "sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==", "dev": true }, - "developer/src/kmc-analyze/node_modules/@types/node": { - "version": "20.4.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.1.tgz", - "integrity": "sha512-JIzsAvJeA/5iY6Y/OxZbv1lUcc8dNSE77lb2gnBH+/PJ3lFR1Ccvgwl5JWnHAkNHcRsT0TbpVOsiMKZ1F/yyJg==", - "dev": true - }, "developer/src/kmc-analyze/node_modules/ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -1342,12 +1315,6 @@ "integrity": "sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==", "dev": true }, - "developer/src/kmc-keyboard-info/node_modules/@types/node": { - "version": "20.4.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.4.tgz", - "integrity": "sha512-CukZhumInROvLq3+b5gLev+vgpsIqC2D0deQr/yS1WnxvmYLlJXZpaQrQiseMY+6xusl79E04UjWoqyr+t1/Ew==", - "dev": true - }, "developer/src/kmc-keyboard-info/node_modules/ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -1588,12 +1555,6 @@ "integrity": "sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==", "dev": true }, - "developer/src/kmc-kmn/node_modules/@types/node": { - "version": "20.4.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.1.tgz", - "integrity": "sha512-JIzsAvJeA/5iY6Y/OxZbv1lUcc8dNSE77lb2gnBH+/PJ3lFR1Ccvgwl5JWnHAkNHcRsT0TbpVOsiMKZ1F/yyJg==", - "dev": true - }, "developer/src/kmc-kmn/node_modules/ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -1834,12 +1795,6 @@ "integrity": "sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==", "dev": true }, - "developer/src/kmc-ldml/node_modules/@types/node": { - "version": "20.4.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.1.tgz", - "integrity": "sha512-JIzsAvJeA/5iY6Y/OxZbv1lUcc8dNSE77lb2gnBH+/PJ3lFR1Ccvgwl5JWnHAkNHcRsT0TbpVOsiMKZ1F/yyJg==", - "dev": true - }, "developer/src/kmc-ldml/node_modules/ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -2101,12 +2056,6 @@ "dev": true, "license": "MIT" }, - "developer/src/kmc-model-info/node_modules/@types/node": { - "version": "20.4.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.1.tgz", - "integrity": "sha512-JIzsAvJeA/5iY6Y/OxZbv1lUcc8dNSE77lb2gnBH+/PJ3lFR1Ccvgwl5JWnHAkNHcRsT0TbpVOsiMKZ1F/yyJg==", - "dev": true - }, "developer/src/kmc-model-info/node_modules/ansi-styles": { "version": "3.2.1", "dev": true, @@ -2311,12 +2260,6 @@ "dev": true, "license": "MIT" }, - "developer/src/kmc-model/node_modules/@types/node": { - "version": "20.4.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.1.tgz", - "integrity": "sha512-JIzsAvJeA/5iY6Y/OxZbv1lUcc8dNSE77lb2gnBH+/PJ3lFR1Ccvgwl5JWnHAkNHcRsT0TbpVOsiMKZ1F/yyJg==", - "dev": true - }, "developer/src/kmc-model/node_modules/ansi-styles": { "version": "3.2.1", "dev": true, @@ -2410,12 +2353,6 @@ "dev": true, "license": "MIT" }, - "developer/src/kmc-package/node_modules/@types/node": { - "version": "20.4.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.1.tgz", - "integrity": "sha512-JIzsAvJeA/5iY6Y/OxZbv1lUcc8dNSE77lb2gnBH+/PJ3lFR1Ccvgwl5JWnHAkNHcRsT0TbpVOsiMKZ1F/yyJg==", - "dev": true - }, "developer/src/kmc-package/node_modules/ansi-styles": { "version": "3.2.1", "dev": true, @@ -2620,12 +2557,6 @@ "dev": true, "license": "MIT" }, - "developer/src/kmc/node_modules/@types/node": { - "version": "20.4.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.1.tgz", - "integrity": "sha512-JIzsAvJeA/5iY6Y/OxZbv1lUcc8dNSE77lb2gnBH+/PJ3lFR1Ccvgwl5JWnHAkNHcRsT0TbpVOsiMKZ1F/yyJg==", - "dev": true - }, "developer/src/kmc/node_modules/ansi-styles": { "version": "3.2.1", "license": "MIT", @@ -2870,12 +2801,6 @@ "dev": true, "license": "MIT" }, - "developer/src/server/node_modules/@types/node": { - "version": "20.8.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.2.tgz", - "integrity": "sha512-Vvycsc9FQdwhxE3y3DzeIxuEJbWGDsnrxvMADzTDF/lcdR9/K+AQIeAghTQsHtotg/q0j3WEOYS/jQgSdWue3w==", - "dev": true - }, "developer/src/server/node_modules/busboy": { "version": "1.6.0", "dependencies": { @@ -5280,9 +5205,9 @@ } }, "node_modules/@types/node": { - "version": "18.19.31", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.31.tgz", - "integrity": "sha512-ArgCD39YpyyrtFKIqMDvjz79jto5fcI/SVUs2HwB+f0dAzq68yqOdyaSivLiLugSziTpNXLQrVb7RZFmdZzbhA==", + "version": "20.12.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.11.tgz", + "integrity": "sha512-vDg9PZ/zi+Nqp6boSOT7plNuthRugEKixDv5sFTIpkE89MmNtEArAShI4mxuX2+UrLEe9pxC1vm2cjm9YlWbJw==", "dependencies": { "undici-types": "~5.26.4" } diff --git a/package.json b/package.json index 30c61991dc8..4e63cfe74b9 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "@microsoft/api-documenter": "^7.23.31", "@microsoft/api-extractor": "^7.41.0", "@types/chai": "^4.3.14", - "@types/node": "^18.0.0", + "@types/node": "^20.4.1", "@typescript-eslint/eslint-plugin": "^5.59.1", "@web/dev-server-esbuild": "^1.0.2", "@web/dev-server-import-maps": "^0.2.0", From 78d9544c261f4a6e4895cc3ddcca6de24170ba56 Mon Sep 17 00:00:00 2001 From: "Joshua A. Horton" Date: Mon, 13 May 2024 08:36:58 +0700 Subject: [PATCH 3/5] fix(web): Web's sentry-manager tsconfig.json did not properly inherit from main configs --- common/web/sentry-manager/src/tsconfig.json | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/common/web/sentry-manager/src/tsconfig.json b/common/web/sentry-manager/src/tsconfig.json index 1b438c93c4b..fcee2c3e6cc 100644 --- a/common/web/sentry-manager/src/tsconfig.json +++ b/common/web/sentry-manager/src/tsconfig.json @@ -1,26 +1,11 @@ { - "extends": "../../../../tsconfig.base.json", + "extends": "../../tsconfig.kmw-main-base.json", "compilerOptions": { - - // TODO: These override /tsconfig.base.json settings, and so should be removed if possible, - // but existing code in web/ breaks some of these settinsg - "noImplicitThis": false, - "noImplicitReturns": false, - "noImplicitAny": false, - "strictFunctionTypes": false, - "noUnusedLocals": false, - - "allowJs": true, - "allowSyntheticDefaultImports": true, "baseUrl": "./", - "inlineSources": true, "lib": ["es6", "dom"], - "module": "es6", "outDir": "../build/obj", "rootDir": "./", - "sourceMap": true, - "target": "es5", "tsBuildInfoFile": "../build/obj/tsconfig.tsbuildinfo", }, From d70463a3aed390dbe8c8e9fbdedffe9d3dd416a0 Mon Sep 17 00:00:00 2001 From: "Joshua A. Horton" Date: Mon, 13 May 2024 08:40:07 +0700 Subject: [PATCH 4/5] chore(web): cleans up one tsconfig setting --- common/web/sentry-manager/src/tsconfig.json | 1 - 1 file changed, 1 deletion(-) diff --git a/common/web/sentry-manager/src/tsconfig.json b/common/web/sentry-manager/src/tsconfig.json index fcee2c3e6cc..9bcc311d102 100644 --- a/common/web/sentry-manager/src/tsconfig.json +++ b/common/web/sentry-manager/src/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../tsconfig.kmw-main-base.json", "compilerOptions": { - "allowJs": true, "baseUrl": "./", "lib": ["es6", "dom"], "outDir": "../build/obj", From e7b0dd1dadd24066a0e48d6508145807e4511025 Mon Sep 17 00:00:00 2001 From: "Joshua A. Horton" Date: Mon, 27 May 2024 09:21:06 +0700 Subject: [PATCH 5/5] chore(web): cleans out redundant tsconfig setting --- web/tsconfig.base.json | 1 - 1 file changed, 1 deletion(-) diff --git a/web/tsconfig.base.json b/web/tsconfig.base.json index a57f4ccaa78..a5f802b45f2 100644 --- a/web/tsconfig.base.json +++ b/web/tsconfig.base.json @@ -8,7 +8,6 @@ "allowSyntheticDefaultImports": true, "lib": ["es6"], - "module": "node16", "target": "es5", // TODO: These override ../tsconfig.base.json settings, and so should be removed if possible,