Skip to content

Commit

Permalink
Merge branch 'develop_tchap' into 485-when-i-try-to-join-a-room-witho…
Browse files Browse the repository at this point in the history
…ut-rights-to-it-error-message-is-in-english
  • Loading branch information
aulamber committed Apr 3, 2023
2 parents 492aa11 + cfdbf3b commit acbd849
Show file tree
Hide file tree
Showing 24 changed files with 120 additions and 63 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#Build the application
#tchap modification : use "./scripts/install-yarn-linked-repositories.sh" instead of "./scripts/layered.sh"
name: Build
on:
pull_request: {}
Expand All @@ -23,7 +22,7 @@ jobs:
node-version: 16

- name: Install Dependencies
run: "./scripts/install-yarn-linked-repositories.sh"
run: "yarn install"

- name: Build
run: "yarn build"
13 changes: 9 additions & 4 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Create tag and release for tchap-web
name: Build archives and create release for tchap-web on tag "tchap-"

on:
push:
Expand All @@ -11,6 +11,7 @@ jobs:
permissions:
contents: write
steps:
#Build artifacts for dev, preprod and prod
- uses: actions/checkout@v3
- name: Get Node Version
id: node_version
Expand All @@ -19,24 +20,28 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ steps.node_version.outputs.node_version }}
- name: Install Dependencies
run: "yarn install"
- name: Get Tchap Web Version
id: version
run: echo ::set-output name=version::$(node -e 'console.log(require("./package.json").version)')
- name: Build the archive ${{ steps.version.outputs.version }} for dev
run: scripts/package-github.sh
run: scripts/tchap/package-tchap.sh
env:
CONFIG: dev
- name: Build the archive ${{ steps.version.outputs.version }} for preprod
run: scripts/package-github.sh
run: scripts/tchap/package-tchap.sh
env:
CONFIG: preprod
- name: Build the archive ${{ steps.version.outputs.version }} for prod
run: scripts/package-github.sh
run: scripts/tchap/package-tchap.sh
env:
CONFIG: prod
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d')"

#create release
- name: Create tchap-web release
uses: ncipollo/release-action@v1
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cypress.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Run the tests
# Todo : reuse a build from another action, instead of rebuilding for nothing.
# tchap modification : use "./scripts/install-yarn-linked-repositories.sh" instead of "./scripts/layered.sh"
# tchap modification : use "./scripts/tchap/install-yarn-linked-repositories.sh" instead of "./scripts/layered.sh"
name: Cypress End to End Tests
on:
pull_request: {}
Expand Down Expand Up @@ -28,7 +28,7 @@ jobs:
node-version: 16

- name: Install Dependencies
run: "./scripts/install-yarn-linked-repositories.sh"
run: "./scripts/tchap/install-yarn-linked-repositories.sh"

- name: Run Cypress tests
uses: cypress-io/[email protected]
Expand Down
22 changes: 2 additions & 20 deletions .github/workflows/static_analysis.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#Run a static analysis
#tchap modification : use "./scripts/install-yarn-linked-repositories.sh" instead of "./scripts/layered.sh"
name: Static Analysis
on:
pull_request: {}
Expand Down Expand Up @@ -27,7 +26,7 @@ jobs:
# node-version: 16
#
# - name: Install Dependencies
# run: "./scripts/install-yarn-linked-repositories.sh"
# run: "./scripts/tchap/install-yarn-linked-repositories.sh"
#
# - name: Typecheck
# run: "yarn run lint:types"
Expand Down Expand Up @@ -68,24 +67,7 @@ jobs:

# Needs branch matching as it inherits .stylelintrc.js from matrix-react-sdk
- name: Install Dependencies
run: "./scripts/install-yarn-linked-repositories.sh"
run: "yarn install --pure-lockfile"

- name: Run Linter
run: "yarn run lint:style"
# tchap : analyse:unused-exports does not work well with tchap customisations, it raises exception for "default export" not used
#analyse_dead_code:
# name: "Analyse Dead Code"
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2

# - uses: actions/setup-node@v3
# with:
# cache: 'yarn'
# node-version: 16

# - name: Install Deps
# run: "scripts/install-yarn-linked-repositories.sh"

# - name: Dead Code Analysis
# run: "yarn run analyse:unused-exports"
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Run the tests
#tchap modification : use "./scripts/install-yarn-linked-repositories.sh" instead of "./scripts/layered.sh"
#tchap modification : use "./scripts/tchap/install-yarn-linked-repositories.sh" instead of "./scripts/layered.sh"
name: Tests
on:
pull_request: {}
Expand All @@ -26,7 +26,7 @@ jobs:
node-version: 16

- name: Install Dependencies
run: "./scripts/install-yarn-linked-repositories.sh"
run: "./scripts/tchap/install-yarn-linked-repositories.sh"

- name: Run tests with coverage
run: "yarn coverage --ci"
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ electron/pub
/matrix-react-sdk
/matrix-js-sdk
/matrix-analytics-events
# yarn links dependencies generated with /scripts/install-yarn-linked-repositories.sh
# yarn links dependencies generated with /scripts/tchap/install-yarn-linked-repositories.sh
/yarn-linked-dependencies

# ignore folder for patch merging conflicts
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ src/vector/modernizr.js

#remove tchap files from prettier
patches/patches.json
yarn-linked-dependencies/
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
Changes in [1.11.28](https://github.com/vector-im/element-web/releases/tag/v1.11.28) (2023-03-31)
=================================================================================================

## 🐛 Bug Fixes
* (No changes, version bumped to sync with element-desktop.)

Changes in [1.11.27](https://github.com/vector-im/element-web/releases/tag/v1.11.27) (2023-03-31)
=================================================================================================

## 🐛 Bug Fixes
* Fix detection of encryption for all users in a room ([\#10487](https://github.com/matrix-org/matrix-react-sdk/pull/10487)). Fixes #24995.

Changes in [1.11.26](https://github.com/vector-im/element-web/releases/tag/v1.11.26) (2023-03-28)
=================================================================================================

## 🔒 Security
* Fixes for [CVE-2023-28427](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=CVE-2023-28427) / GHSA-mwq8-fjpf-c2gr
* Fixes for [CVE-2023-28103](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=CVE-2023-28103) / GHSA-6g43-88cp-w5gv

Changes in [1.11.25](https://github.com/vector-im/element-web/releases/tag/v1.11.25) (2023-03-15)
=================================================================================================

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ yarn start
Alternatively, you can skip the above commands and only run the command below. The only difference is that both 'matrix-react-sdk and 'matrix-js-sdk' will be cloned inside the root project folder.

```bash
./scripts/install-yarn-linked-repositories.sh
./scripts/tchap/install-yarn-linked-repositories.sh
yarn install
yarn start
```
Expand Down
19 changes: 13 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"name": "element-web",
<<<<<<< HEAD
"productName": "Tchap",
"version": "4.2.1-1.11.25",
=======
"version": "1.11.28",
>>>>>>> v1.11.28
"description": "A feature-rich client for Matrix.org",
"author": "DINUM",
"repository": {
Expand All @@ -27,6 +31,9 @@
"contribute.json"
],
"style": "bundle.css",
"scripts_comments": {
"build:jitsi": "tchap don't need that, deactivate?"
},
"scripts": {
"i18n": "matrix-gen-i18n",
"prunei18n": "matrix-prune-i18n",
Expand All @@ -43,8 +50,8 @@
"build:module_system": "tsc --project ./tsconfig.module_system.json && node ./lib/module_system/scripts/install.js",
"build:github": "yarn build:genfiles && yarn build:bundle",
"dist": "scripts/package.sh",
"scalingo-postbuild": "scripts/package-scalingo-prod.sh",
"start": "export VERSION=$(scripts/get-version-from-package-json.sh) && yarn build:module_system && concurrently --kill-others-on-fail --prefix \"{time} [{name}]\" -n res,element-js \"yarn start:res\" \"yarn start:js\"",
"scalingo-postbuild": "scripts/tchap/package-tchap.sh",
"start": "export VERSION=$(scripts/tchap/get-version-from-package-json.sh) && yarn build:module_system && concurrently --kill-others-on-fail --prefix \"{time} [{name}]\" -n res,element-js \"yarn start:res\" \"yarn start:js\"",
"start:https": "concurrently --kill-others-on-fail --prefix \"{time} [{name}]\" -n res,element-js \"yarn start:res\" \"yarn start:js --https\"",
"start:res": "yarn build:jitsi && node scripts/copy-res.js -w",
"start:js": "webpack-dev-server --output-filename=bundles/_dev_/[name].js --output-chunk-filename=bundles/_dev_/[name].js -w --mode development --disable-host-check --hot",
Expand All @@ -64,19 +71,19 @@
"test:cypress:open": "cypress open",
"coverage": "yarn test --coverage",
"analyse:unused-exports": "node ./scripts/analyse_unused_exports.js",
"postinstall": "./scripts/apply_patches.sh",
"postinstall": "./scripts/tchap/apply_patches.sh",
"patch-package": "patch-package",
"patches-reapply": "rm -rf node_modules/matrix-react-sdk; rm -rf node_modules/matrix-js-sdk; yarn install --force",
"patch-make": "node scripts/makePatch.ts"
"patch-make": "node scripts/tchap/makePatch.ts"
},
"dependencies": {
"@matrix-org/olm": "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.12.tgz",
"@matrix-org/react-sdk-module-api": "^0.0.4",
"gfm.css": "^1.1.2",
"jsrsasign": "^10.5.25",
"katex": "^0.16.0",
"matrix-js-sdk": "23.5.0",
"matrix-react-sdk": "3.68.0",
"matrix-js-sdk": "24.0.0",
"matrix-react-sdk": "3.69.1",
"matrix-widget-api": "^1.1.1",
"prop-types": "^15.7.2",
"react": "17.0.2",
Expand Down
4 changes: 2 additions & 2 deletions res/themes/tchap-common/css/_tchap_custom.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ div.mx_SettingsTab.mx_SecurityUserSettingsTab > div:nth-child(4) > div:nth-child
}

/* change link color and decoration in login error when email is not autorized */
.mx_Login_error.mx_Login_error_link{
.mx_Login_error.mx_Login_error_link {
color: $alert important!;
text-decoration: underline important!;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Script to apply the patches in patches directory, using patch-package.
set -e

node scripts/checkPatchFile.js
node scripts/tchap/checkPatchFile.js

for d in patches/*/ ; do
echo "Patching $d..."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const getPatchDirs = () => {
.map((dir) => dir.name);
};

const patchFile = require("../patches/patches.json");
const patchFile = require("../../patches/patches.json");
const patchDirs = getPatchDirs();
checkForDuplicateFiles(patchFile);
checkForMissingPatchDirs(patchFile, patchDirs);
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ mkdir -p yarn-linked-dependencies
cd yarn-linked-dependencies

# Set up the js-sdk first
../scripts/fetchdep.with.version.sh matrix-org matrix-js-sdk $MATRIX_JS_SDK_VERSION
../scripts/tchap/fetchdep.with.version.sh matrix-org matrix-js-sdk $MATRIX_JS_SDK_VERSION
pushd matrix-js-sdk
yarn unlink # :TCHAP: for local build, undo previous links if present.
yarn link
Expand All @@ -50,7 +50,7 @@ popd
#popd

# Now set up the react-sdk
../scripts/fetchdep.with.version.sh matrix-org matrix-react-sdk $MATRIX_REACT_SDK_VERSION
../scripts/tchap/fetchdep.with.version.sh matrix-org matrix-react-sdk $MATRIX_REACT_SDK_VERSION
pushd matrix-react-sdk
yarn unlink # :TCHAP: for local build, undo previous links if present.
yarn link
Expand Down
2 changes: 1 addition & 1 deletion scripts/makePatch.ts → scripts/tchap/makePatch.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const patchFile = require("../patches/patches.json");
const patchFile = require("../../patches/patches.json");

if (process.argv.length !== 3) {
console.log("\nMissing patch name.");
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#!/bin/bash

#DEPRECRATED, see package-tchap.sh

# Tchap: File copied from scripts/package.json.

set -e

today=$(date +%Y%m%d)

version=$(./scripts/get-version-from-package-json.sh)
version=$(./scripts/tchap/get-version-from-package-json.sh)
export VERSION=$version
echo "VERSION is set to $VERSION"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
#!/bin/bash

#DEPRECRATED, see package-tchap.sh

# Tchap: File copied from scripts/package.json.
# use package-github instead

set -e

today=$(date +%Y%m%d)

version=$(./scripts/get-version-from-package-json.sh)
version=$(./scripts/tchap/get-version-from-package-json.sh)
export VERSION=$version
echo "VERSION is set to $VERSION"

Expand All @@ -33,8 +36,8 @@ fi

# Copy the files in /dist, ready to be served.
cp -r tchap-$version/* dist/
# Also make a tar file. Useful for releases.
tar chvzf tchap-$version-$CONFIG-$today.tar.gz dist
# Also make a tar file. Useful for releases. EDIT: not needed
#tar chvzf tchap-$version-$CONFIG-$today.tar.gz dist
rm -r tchap-$version

echo
Expand Down
43 changes: 43 additions & 0 deletions scripts/tchap/package-tchap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash

# Tchap: File copied from scripts/package.js
# This file is meant to be used in scalingo and github actions

set -e

today=$(date +%Y%m%d)

version=$(./scripts/tchap/get-version-from-package-json.sh)
export VERSION=$version
echo "VERSION is set to $VERSION"

if [[ -n "$CONFIG" ]]; then
echo "CONFIG=$CONFIG"
cp "config.$CONFIG.json" config.json
echo "Using config.$CONFIG.json"
else
echo "No config specified, using config.json."
fi

yarn clean
yarn build

mkdir -p dist
cp -r webapp tchap-$version

# if $version looks like semver with leading v, strip it before writing to file
if [[ ${version} =~ ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+(-.+)?$ ]]; then
echo ${version:1} > tchap-$version/version
else
echo ${version} > tchap-$version/version
fi

# Copy the files in /dist, ready to be served.
cp -r tchap-$version/* dist/

# Also make a tar file. Useful for releases.
#tar chvzf tchap-$version-$CONFIG-$today.tar.gz dist
rm -r tchap-$version

echo
echo "Packaged tchap-$version-$CONFIG"
File renamed without changes.
6 changes: 1 addition & 5 deletions src/util/TchapUrls.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@


export default class TchapUrls {

//url to request the opening of a new domain on Tchap
public static requestDomainUrl = "https://www.demarches-simplifiees.fr/commencer/utiliser-tchap";

}
}
Loading

0 comments on commit acbd849

Please sign in to comment.