Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
shared: Move typing_status.ts to web/src.
Shubham Padia5279923f2bd2
diff --git a/docs/subsystems/typing-indicators.md b/docs/subsystems/typing-indicators.mdindex f7eb00cf702..883ba840d3b 100644--- a/docs/subsystems/typing-indicators.md+++ b/docs/subsystems/typing-indicators.md@@ -52,7 +52,7 @@ repeated updates to the server so that downstream clients know theuser is still typing. Zulip messages tend to be longer thanmessages in other chat/text clients, so this detail is important.-We have a small state machine in `web/shared/src/typing_status.ts`+We have a small state machine in `web/src/typing_status.ts`that makes sure subsequent "start" requests get sent out. Thefrequency of these requests is determined by`server_typing_started_wait_period_milliseconds` in thediff --git a/tools/test-js-with-node b/tools/test-js-with-nodeindex 25c6d3bd1f1..ae352c060bf 100755--- a/tools/test-js-with-node+++ b/tools/test-js-with-node@@ -489,8 +489,6 @@ def read_coverage() -> Any:def enforce_proper_coverage(coverage_json: Any) -> bool:all_js_files = {- *glob.glob("web/shared/src/*.js"),- *glob.glob("web/shared/src/*.ts"),*glob.glob("web/src/*.js"),*glob.glob("web/src/*.ts"),*glob.glob("web/src/billing/*.js"),diff --git a/web/src/typing.ts b/web/src/typing.tsindex c0ecc22afb8..8e4378a4fe5 100644--- a/web/src/typing.ts+++ b/web/src/typing.ts@@ -1,9 +1,6 @@import $ from "jquery";import assert from "minimalistic-assert";-import * as typing_status from "../shared/src/typing_status.ts";-import type {EditingStatusWorker, Recipient} from "../shared/src/typing_status.ts";-import * as blueslip from "./blueslip.ts";import * as channel from "./channel.ts";import * as compose_pm_pill from "./compose_pm_pill.ts";@@ -13,6 +10,8 @@ import * as people from "./people.ts";import * as rows from "./rows.ts";import {realm} from "./state_data.ts";import * as stream_data from "./stream_data.ts";+import type {EditingStatusWorker, Recipient} from "./typing_status.ts";+import * as typing_status from "./typing_status.ts";import {user_settings} from "./user_settings.ts";let edit_box_worker: EditingStatusWorker;diff --git a/web/shared/src/typing_status.ts b/web/src/typing_status.tssimilarity index 100%rename from web/shared/src/typing_status.tsrename to web/src/typing_status.tsdiff --git a/web/tests/lib/index.cjs b/web/tests/lib/index.cjsindex 9477b076dc6..8cf9e821d74 100644--- a/web/tests/lib/index.cjs+++ b/web/tests/lib/index.cjs@@ -34,10 +34,7 @@ Object.defineProperty(global, "navigator", {require("@babel/register")({extensions: [".cjs", ".cts", ".js", ".mjs", ".mts", ".ts"],- only: [- new RegExp("^" + _.escapeRegExp(path.resolve(__dirname, "../../shared/src") + path.sep)),- new RegExp("^" + _.escapeRegExp(path.resolve(__dirname, "../../src") + path.sep)),- ],+ only: [new RegExp("^" + _.escapeRegExp(path.resolve(__dirname, "../../src") + path.sep))],plugins: [...(process.env.USING_INSTRUMENTED_CODE ? [["istanbul", {exclude: []}]] : []),["@babel/plugin-transform-modules-commonjs", {lazy: () => true}],diff --git a/web/tests/typing_status.test.cjs b/web/tests/typing_status.test.cjsindex cf7d71eb512..3daa636bbe3 100644--- a/web/tests/typing_status.test.cjs+++ b/web/tests/typing_status.test.cjs@@ -12,7 +12,7 @@ const stream_data = mock_esm("../src/stream_data");const {set_realm} = zrequire("state_data");const typing = zrequire("typing");-const typing_status = zrequire("../shared/src/typing_status");+const typing_status = zrequire("typing_status");const {initialize_user_settings} = zrequire("user_settings");initialize_user_settings({user_settings: {}});diff --git a/web/webpack.config.ts b/web/webpack.config.tsindex 0fd6f25333f..99de07ffe29 100644--- a/web/webpack.config.ts+++ b/web/webpack.config.ts@@ -124,10 +124,7 @@ const config = (// Transpile .js and .ts files with Babel{test: /\.[cm]?[jt]s$/,- include: [- path.resolve(import.meta.dirname, "shared/src"),- path.resolve(import.meta.dirname, "src"),- ],+ include: [path.resolve(import.meta.dirname, "src")],loader: "babel-loader",},// regular css files