@@ -61,10 +61,10 @@ module.exports = {
|
||||
{ from: "res/css/views/settings/tabs/_SettingsTab.pcss", type: "css" },
|
||||
{ from: "res/css/structures/_RoomView.pcss", type: "css" },
|
||||
// Compound vars
|
||||
"node_modules/@vector-im/compound-design-tokens/assets/web/css/cpd-common-base.css",
|
||||
"node_modules/@vector-im/compound-design-tokens/assets/web/css/cpd-common-semantic.css",
|
||||
"node_modules/@vector-im/compound-design-tokens/assets/web/css/cpd-theme-light-base-mq.css",
|
||||
"node_modules/@vector-im/compound-design-tokens/assets/web/css/cpd-theme-light-semantic-mq.css",
|
||||
"../../node_modules/@vector-im/compound-design-tokens/assets/web/css/cpd-common-base.css",
|
||||
"../../node_modules/@vector-im/compound-design-tokens/assets/web/css/cpd-common-semantic.css",
|
||||
"../../node_modules/@vector-im/compound-design-tokens/assets/web/css/cpd-theme-light-base-mq.css",
|
||||
"../../node_modules/@vector-im/compound-design-tokens/assets/web/css/cpd-theme-light-semantic-mq.css",
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
@@ -28,9 +28,9 @@ const config: Config = {
|
||||
"\\.(gif|png|ttf|woff2)$": "<rootDir>/__mocks__/imageMock.js",
|
||||
"\\.svg$": "<rootDir>/__mocks__/svg.js",
|
||||
"\\$webapp/i18n/languages.json": "<rootDir>/__mocks__/languages.json",
|
||||
"^react$": "<rootDir>/node_modules/react",
|
||||
"^react-dom$": "<rootDir>/node_modules/react-dom",
|
||||
"^matrix-js-sdk$": "<rootDir>/node_modules/matrix-js-sdk/src",
|
||||
"^react$": "<rootDir>/../../node_modules/react",
|
||||
"^react-dom$": "<rootDir>/../../node_modules/react-dom",
|
||||
"^matrix-js-sdk$": "<rootDir>/../../node_modules/matrix-js-sdk/src",
|
||||
"^matrix-react-sdk$": "<rootDir>/src",
|
||||
"decoderWorker\\.min\\.js": "<rootDir>/__mocks__/empty.js",
|
||||
"decoderWorker\\.min\\.wasm": "<rootDir>/__mocks__/empty.js",
|
||||
@@ -39,8 +39,8 @@ const config: Config = {
|
||||
"workers/(.+)Factory": "<rootDir>/__mocks__/workerFactoryMock.js",
|
||||
"^!!raw-loader!.*": "jest-raw-loader",
|
||||
"recorderWorkletFactory": "<rootDir>/__mocks__/empty.js",
|
||||
"counterpart": "<rootDir>/node_modules/counterpart",
|
||||
"@vector-im/compound-web": "<rootDir>/node_modules/@vector-im/compound-web",
|
||||
"counterpart": "<rootDir>/../../node_modules/counterpart",
|
||||
"@vector-im/compound-web": "<rootDir>/../../node_modules/@vector-im/compound-web",
|
||||
},
|
||||
transformIgnorePatterns: [
|
||||
"/node_modules/(?!(mime|matrix-js-sdk|uuid|p-retry|is-network-error|react-merge-refs|is-ip|ip-regex|super-regex|function-timeout|time-span|convert-hrtime|clone-regexp|is-regexp|matrix-web-i18n|await-lock|@element-hq/web-shared-components|react-virtuoso|lodash)).+$",
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
],
|
||||
"scripts": {
|
||||
"i18n": "matrix-gen-i18n src res && pnpm i18n:sort && pnpm i18n:lint",
|
||||
"i18n:sort": "matrix-sort-i18n src/i18n/strings/en_EN.json && pnpm --dir packages/shared-components i18n:sort",
|
||||
"i18n:lint": "matrix-i18n-lint && prettier --log-level=silent --write src/i18n/strings/ --ignore-path /dev/null && pnpm --dir packages/shared-components i18n:lint",
|
||||
"i18n:sort": "matrix-sort-i18n src/i18n/strings/en_EN.json",
|
||||
"i18n:lint": "matrix-i18n-lint && prettier --log-level=silent --write src/i18n/strings/ --ignore-path /dev/null",
|
||||
"i18n:diff": "cp src/i18n/strings/en_EN.json src/i18n/strings/en_EN_orig.json && pnpm i18n && matrix-compare-i18n-files src/i18n/strings/en_EN_orig.json src/i18n/strings/en_EN.json",
|
||||
"rethemendex": "sh ./res/css/rethemendex.sh",
|
||||
"build": "nx build",
|
||||
|
||||
@@ -6,6 +6,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
import { readFile } from "node:fs/promises";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { type Page } from "@playwright/test";
|
||||
|
||||
import type { EventType, Preset } from "matrix-js-sdk/src/matrix";
|
||||
@@ -19,7 +20,7 @@ import { isDendrite } from "../../plugins/homeserver/dendrite";
|
||||
// The fake call app does *just* enough to convince Element Web that a call is ongoing
|
||||
// and functions like PiP work. It does not actually do anything though, to limit the
|
||||
// surface we test.
|
||||
const widgetApi = readFile(require.resolve("matrix-widget-api/dist/api.min.js"), "utf-8");
|
||||
const widgetApi = readFile(fileURLToPath(import.meta.resolve("matrix-widget-api/dist/api.min.js")), "utf-8");
|
||||
const fakeCallClient = readFile("playwright/sample-files/fake-element-call.html", "utf-8");
|
||||
|
||||
function assertCommonCallParameters(
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"include": [
|
||||
"**/*.ts",
|
||||
"../src/@types/matrix-js-sdk.d.ts",
|
||||
"../node_modules/matrix-js-sdk/src/@types/*.d.ts",
|
||||
"../node_modules/matrix-js-sdk/node_modules/@matrix-org/olm/index.d.ts"
|
||||
"../../../node_modules/matrix-js-sdk/src/@types/*.d.ts",
|
||||
"../../../node_modules/matrix-js-sdk/node_modules/@matrix-org/olm/index.d.ts"
|
||||
]
|
||||
}
|
||||
|
||||
+21
-10
@@ -1,41 +1,50 @@
|
||||
{
|
||||
"$schema": "./node_modules/nx/schemas/project-schema.json",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"projectType": "application",
|
||||
"implicitDependencies": ["@element-hq/web-shared-components"],
|
||||
"targets": {
|
||||
"prebuild:i18n": {
|
||||
"cache": true,
|
||||
"command": "node scripts/copy-res.ts",
|
||||
"inputs": ["{projectRoot}/src/i18n/strings/*.json"],
|
||||
"outputs": ["{projectRoot}/webapp/i18n/"]
|
||||
"inputs": [
|
||||
"{projectRoot}/src/i18n/strings/*.json",
|
||||
"{workspaceRoot}/packages/shared-components/src/i18n/strings/*.json"
|
||||
],
|
||||
"outputs": ["{projectRoot}/webapp/i18n/"],
|
||||
"options": { "cwd": "apps/web" }
|
||||
},
|
||||
"prebuild:module_system": {
|
||||
"cache": true,
|
||||
"command": "node module_system/scripts/install.ts",
|
||||
"inputs": ["{projectRoot}/build_config.yaml"],
|
||||
"outputs": ["{projectRoot}/src/modules.js", "{projectRoot}/package.json", "{workspaceRoot}/pnpm-lock.yaml"]
|
||||
"outputs": ["{projectRoot}/src/modules.js", "{projectRoot}/package.json", "{workspaceRoot}/pnpm-lock.yaml"],
|
||||
"options": { "cwd": "apps/web" }
|
||||
},
|
||||
"prebuild:rethemendex": {
|
||||
"cache": true,
|
||||
"executor": "nx:run-script",
|
||||
"options": {
|
||||
"script": "rethemendex"
|
||||
"script": "rethemendex",
|
||||
"cwd": "apps/web"
|
||||
},
|
||||
"inputs": ["{projectRoot}/res/css/**/*"],
|
||||
"outputs": ["{projectRoot}/res/css/_components.pcss"]
|
||||
},
|
||||
"build": {
|
||||
"command": "webpack-cli --disable-interpret --progress --mode production",
|
||||
"outputs": ["{projectRoot}/webapp"]
|
||||
"outputs": ["{projectRoot}/webapp"],
|
||||
"options": { "cwd": "apps/web" }
|
||||
},
|
||||
"start:i18n": {
|
||||
"command": "node scripts/copy-res.ts -w",
|
||||
"continuous": true
|
||||
"continuous": true,
|
||||
"options": { "cwd": "apps/web" }
|
||||
},
|
||||
"start": {
|
||||
"command": "webpack-dev-server --disable-interpret --output-path webapp --output-filename=bundles/_dev_/[name].js --output-chunk-filename=bundles/_dev_/[name].js --mode development",
|
||||
"dependsOn": ["prebuild:module_system", "prebuild:rethemendex", "start:i18n", "^start"],
|
||||
"continuous": true
|
||||
"continuous": true,
|
||||
"options": { "cwd": "apps/web" }
|
||||
},
|
||||
"lint:types": {
|
||||
"executor": "nx:run-commands",
|
||||
@@ -45,14 +54,16 @@
|
||||
"tsc --noEmit",
|
||||
"tsc --noEmit -p playwright"
|
||||
],
|
||||
"parallel": false
|
||||
"parallel": false,
|
||||
"cwd": "apps/web"
|
||||
},
|
||||
"dependsOn": ["^build"]
|
||||
},
|
||||
"test:unit": {
|
||||
"executor": "@nx/jest:jest",
|
||||
"options": {
|
||||
"jestConfig": "jest.config.ts"
|
||||
"jestConfig": "{projectRoot}/jest.config.ts",
|
||||
"cwd": "apps/web"
|
||||
},
|
||||
"dependsOn": ["^build"]
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import webpack from "webpack";
|
||||
import { type Translations } from "matrix-web-i18n";
|
||||
|
||||
const EW_I18N_BASE_PATH = "src/i18n/strings/";
|
||||
const SC_I18N_BASE_PATH = "packages/shared-components/src/i18n/strings/";
|
||||
const SC_I18N_BASE_PATH = "../../packages/shared-components/src/i18n/strings/";
|
||||
|
||||
const INCLUDE_LANGS = [...new Set([...fs.readdirSync(EW_I18N_BASE_PATH)])]
|
||||
.filter((fn) => fn.endsWith(".json"))
|
||||
|
||||
@@ -15,9 +15,9 @@ import enElementWeb from "../../src/i18n/strings/en_EN.json";
|
||||
import deElementWeb from "../../src/i18n/strings/de_DE.json";
|
||||
// Cheat and import relatively here as these aren't exported by the module (should they be?)
|
||||
// eslint-disable-next-line no-restricted-imports
|
||||
import enSharedComponents from "../../packages/shared-components/src/i18n/strings/en_EN.json";
|
||||
import enSharedComponents from "../../../../packages/shared-components/src/i18n/strings/en_EN.json";
|
||||
// eslint-disable-next-line no-restricted-imports
|
||||
import deSharedComponents from "../../packages/shared-components/src/i18n/strings/de_DE.json";
|
||||
import deSharedComponents from "../../../../packages/shared-components/src/i18n/strings/de_DE.json";
|
||||
import { ModuleApi } from "../../src/modules/Api";
|
||||
|
||||
const lv = {
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
"strict": true,
|
||||
"paths": {
|
||||
"jest-matrix-react": ["./test/test-utils/jest-matrix-react"],
|
||||
"rollup/parseAst": ["./node_modules/rollup/dist/parseAst"]
|
||||
"rollup/parseAst": ["../../node_modules/rollup/dist/parseAst"]
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
"./node_modules/matrix-js-sdk/src/@types/*.d.ts",
|
||||
"../../node_modules/matrix-js-sdk/src/@types/*.d.ts",
|
||||
"./src/**/*.ts",
|
||||
"./src/**/*.tsx",
|
||||
"./test/**/*.ts",
|
||||
|
||||
@@ -438,7 +438,7 @@ export default (env: string, argv: Record<string, any>): webpack.Configuration =
|
||||
type: "javascript/auto",
|
||||
use: [
|
||||
{
|
||||
loader: path.resolve("./recorder-worklet-loader.cjs"),
|
||||
loader: path.join(__dirname, "recorder-worklet-loader.cjs"),
|
||||
},
|
||||
{
|
||||
loader: "babel-loader",
|
||||
|
||||
Reference in New Issue
Block a user