Commit 58b7e214 authored by HesamSHP's avatar HesamSHP
Browse files

Temporary commit

parent d7a7139b
......@@ -124,7 +124,7 @@
"dotenv": "^16.0.2",
"eslint": "8.45.0",
"eslint-config-google": "^0.14.0",
"eslint-config-prettier": "^8.5.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-deprecate": "^0.7.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-matrix-org": "^1.0.0",
......
......@@ -25,6 +25,7 @@ const INCLUDE_LANGS = [
{ value: "eu", label: "Euskara" },
{ value: "fi", label: "Suomi" },
{ value: "fr", label: "Français" },
{ value: "fa", label: "فارسی" },
{ value: "gl", label: "Galego" },
{ value: "he", label: "עברית" },
{ value: "hi", label: "हिन्दी" },
......
......@@ -27,7 +27,7 @@ if (!ogImageUrl) ogImageUrl = "https://app.element.io/themes/element/img/logos/o
if (!process.env.VERSION) {
console.warn("Unset VERSION variable - this may affect build output");
process.env.VERSION = "1.0.10";
process.env.VERSION = "!!UNSET!!";
}
const cssThemes = {
......@@ -216,6 +216,10 @@ module.exports = (env, argv) => {
// Same goes for js/react-sdk - we don't need two copies.
"matrix-js-sdk": path.resolve(__dirname, "node_modules/matrix-js-sdk"),
"matrix-react-sdk": path.resolve(__dirname, "node_modules/matrix-react-sdk"),
"@matrix-org/react-sdk-module-api": path.resolve(
__dirname,
"node_modules/@matrix-org/react-sdk-module-api",
),
// and matrix-events-sdk & matrix-widget-api
"matrix-events-sdk": path.resolve(__dirname, "node_modules/matrix-events-sdk"),
"matrix-widget-api": path.resolve(__dirname, "node_modules/matrix-widget-api"),
......@@ -275,7 +279,7 @@ module.exports = (env, argv) => {
// either webpack or our babel setup.
// When we do get to upgrade our current setup, this should
// probably be removed.
if (f.includes("@vector-im/compound-web")) return true;
if (f.includes(path.join("@vector-im", "compound-web"))) return true;
// but we can't run all of our dependencies through babel (many of them still
// use module.exports which breaks if babel injects an 'include' for its
......@@ -725,14 +729,20 @@ module.exports = (env, argv) => {
* @return {string} The returned paths will look like `img/warning.1234567.svg`.
*/
function getAssetOutputPath(url, resourcePath) {
const isKaTeX = resourcePath.includes("KaTeX");
// `res` is the parent dir for our own assets in various layers
// `dist` is the parent dir for KaTeX assets
const prefix = /^.*[/\\](dist|res)[/\\]/;
if (!resourcePath.match(prefix)) {
/**
* Only needed for https://github.com/vector-im/element-web/pull/15939
* If keeping this, we are not able to load external assets such as SVG
* images coming from @vector-im/compound-web.
*/
if (isKaTeX && !resourcePath.match(prefix)) {
throw new Error(`Unexpected asset path: ${resourcePath}`);
}
let outputDir = path.dirname(resourcePath).replace(prefix, "");
if (resourcePath.includes("KaTeX")) {
if (isKaTeX) {
// Add a clearly named directory segment, rather than leaving the KaTeX
// assets loose in each asset type directory.
outputDir = path.join(outputDir, "KaTeX");
......@@ -749,4 +759,4 @@ function getAssetOutputPath(url, resourcePath) {
*/
function toPublicPath(path) {
return path.replace(/\\/g, "/");
}
}
\ No newline at end of file
......@@ -12964,6 +12964,11 @@ v8-to-istanbul@^9.0.1:
"@types/istanbul-lib-coverage" "^2.0.1"
convert-source-map "^1.6.0"
 
val-loader@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/val-loader/-/val-loader-5.0.1.tgz#ce29d3bbe68381f42bef0d693d0f18202fe5efe8"
integrity sha512-r4h7b9AuvGQU1vyC4rAMoJNMG8fJUE6CYAqlM265tOdnZrZC6axVawBg2GlQ9+6osPCJjw4/vyADiSBAFlhzlg==
validate-npm-package-license@^3.0.1:
version "3.0.4"
resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a"
......
......@@ -1489,7 +1489,6 @@
"@matrix-org/olm@https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.14.tgz":
version "3.2.14"
uid acd96c00a881d0f462e1f97a56c73742c8dbc984
resolved "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.14.tgz#acd96c00a881d0f462e1f97a56c73742c8dbc984"
"@microsoft/tsdoc-config@0.16.2":
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment