From 7e0d92cbe0b46acf1d043218bd5ca3a64d7a9d14 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 19 Feb 2024 12:25:24 +0000 Subject: [PATCH 01/34] Add getAuthIssuer method for MSC2965 (#4071) Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- spec/unit/matrix-client.spec.ts | 18 ++++++++++++++++++ src/client.ts | 14 ++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/spec/unit/matrix-client.spec.ts b/spec/unit/matrix-client.spec.ts index f9fab0864ba..ac43580913a 100644 --- a/spec/unit/matrix-client.spec.ts +++ b/spec/unit/matrix-client.spec.ts @@ -3012,4 +3012,22 @@ describe("MatrixClient", function () { expect(result).toEqual({}); }); }); + + describe("getAuthIssuer", () => { + it("should use unstable prefix", async () => { + httpLookups = [ + { + method: "GET", + path: `/auth_issuer`, + data: { + issuer: "https://issuer/", + }, + prefix: "/_matrix/client/unstable/org.matrix.msc2965", + }, + ]; + + await expect(client.getAuthIssuer()).resolves.toEqual({ issuer: "https://issuer/" }); + expect(httpLookups.length).toEqual(0); + }); + }); }); diff --git a/src/client.ts b/src/client.ts index b08598913cb..15fc1a99429 100644 --- a/src/client.ts +++ b/src/client.ts @@ -9974,6 +9974,20 @@ export class MatrixClient extends TypedEventEmitter { + return this.http.request(Method.Get, "/auth_issuer", undefined, undefined, { + prefix: ClientPrefix.Unstable + "/org.matrix.msc2965", + }); + } } /** From f96dac1e5bcd8bcda98271378924ef16a61b7347 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 19 Feb 2024 12:32:26 +0000 Subject: [PATCH 02/34] Saner releases clean up (#4072) * Remove allchange dependency Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Remove stale release scripts Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update pull request template to remove allchange behaviours Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update label check automation Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * mheap Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Re-add node-fetch which was previously transitive via allchange Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Use node-fetch@^2 Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- .github/PULL_REQUEST_TEMPLATE.md | 6 - .github/workflows/pull_request.yaml | 12 +- package.json | 2 +- post-release.sh | 15 -- release.sh | 346 ---------------------------- yarn.lock | 298 +----------------------- 6 files changed, 17 insertions(+), 662 deletions(-) delete mode 100755 post-release.sh delete mode 100755 release.sh diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index bbaaa050791..a291d1b9ffc 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -5,9 +5,3 @@ - [ ] Tests written for new code (and old code if feasible) - [ ] Linter and other CI checks pass - [ ] Sign-off given on the changes (see [CONTRIBUTING.md](https://github.com/matrix-org/matrix-js-sdk/blob/develop/CONTRIBUTING.md)) - - diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 743526a8df9..5ce27aa8a9f 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -14,11 +14,17 @@ jobs: name: Preview Changelog runs-on: ubuntu-latest steps: - - uses: matrix-org/allchange@main + - uses: mheap/github-action-required-labels@80a96a4863886addcbc9f681b5b295ba7f5424e1 # v5 if: github.event_name != 'merge_group' with: - ghToken: ${{ secrets.GITHUB_TOKEN }} - requireLabel: true + labels: | + X-Breaking-Change + T-Deprecation + T-Enhancement + T-Defect + Dependencies + mode: minimum + count: 1 prevent-blocked: name: Prevent Blocked diff --git a/package.json b/package.json index a4deb7e21d0..281809b17c5 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,6 @@ "@types/uuid": "9", "@typescript-eslint/eslint-plugin": "^6.0.0", "@typescript-eslint/parser": "^6.0.0", - "allchange": "^1.3.0", "babel-jest": "^29.0.0", "debug": "^4.3.4", "domexception": "^4.0.0", @@ -117,6 +116,7 @@ "jest-mock": "^29.0.0", "lint-staged": "^15.0.2", "matrix-mock-request": "^2.5.0", + "node-fetch": "^2.7.0", "prettier": "3.2.4", "rimraf": "^5.0.0", "ts-node": "^10.9.1", diff --git a/post-release.sh b/post-release.sh deleted file mode 100755 index b639770db57..00000000000 --- a/post-release.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -# -# Script to perform a post-release steps of matrix-js-sdk. -# -# Requires: -# jq; install from your distribution's package manager (https://stedolan.github.io/jq/) - -set -e - -jq --version > /dev/null || (echo "jq is required: please install it"; kill $$) - -if [ "$(git branch -lr | grep origin/develop -c)" -ge 1 ]; then - "$(dirname "$0")/scripts/release/post-merge-master.sh" - git push origin develop -fi diff --git a/release.sh b/release.sh deleted file mode 100755 index 83916a381f0..00000000000 --- a/release.sh +++ /dev/null @@ -1,346 +0,0 @@ -#!/bin/bash -# -# Script to perform a release of matrix-js-sdk and downstream projects. -# -# Requires: -# jq; install from your distribution's package manager (https://stedolan.github.io/jq/) -# hub; install via brew (macOS) or source/pre-compiled binaries (debian) (https://github.com/github/hub) - Tested on v2.2.9 -# yarn; install via brew (macOS) or similar (https://yarnpkg.com/docs/install/) -# -# Note: this script is also used to release matrix-react-sdk, element-web, and element-desktop. - -set -e - -jq --version > /dev/null || (echo "jq is required: please install it"; kill $$) -if [[ $(command -v hub) ]] && [[ $(hub --version) =~ hub[[:space:]]version[[:space:]]([0-9]*).([0-9]*) ]]; then - HUB_VERSION_MAJOR=${BASH_REMATCH[1]} - HUB_VERSION_MINOR=${BASH_REMATCH[2]} - if [[ $HUB_VERSION_MAJOR -lt 2 ]] || [[ $HUB_VERSION_MAJOR -eq 2 && $HUB_VERSION_MINOR -lt 5 ]]; then - echo "hub version 2.5 is required, you have $HUB_VERSION_MAJOR.$HUB_VERSION_MINOR installed" - exit - fi -else - echo "hub is required: please install it" - exit -fi -yarn --version > /dev/null || (echo "yarn is required: please install it"; kill $$) - -USAGE="$0 [-x] [-c changelog_file] vX.Y.Z" - -help() { - cat <&2 - exit 1 -fi - -function check_dependency { - local depver=$(cat package.json | jq -r .dependencies[\"$1\"]) - if [ "$depver" == "null" ]; then return 0; fi - - echo "Checking version of $1..." - local latestver=$(yarn info -s "$1" dist-tags.next) - if [ "$depver" != "$latestver" ] - then - echo "The latest version of $1 is $latestver but package.json depends on $depver." - echo -n "Type 'u' to auto-upgrade, 'c' to continue anyway, or 'a' to abort:" - read resp - if [ "$resp" != "u" ] && [ "$resp" != "c" ] - then - echo "Aborting." - exit 1 - fi - if [ "$resp" == "u" ] - then - echo "Upgrading $1 to $latestver..." - yarn add -E "$1@$latestver" - git add -u - git commit -m "Upgrade $1 to $latestver" - fi - fi -} - -function reset_dependency { - local depver=$(cat package.json | jq -r .dependencies[\"$1\"]) - if [ "$depver" == "null" ]; then return 0; fi - - echo "Resetting $1 to develop branch..." - yarn add "github:matrix-org/$1#develop" - git add -u - git commit -m "Reset $1 back to develop branch" -} - -has_subprojects=0 -if [ -f release_config.yaml ]; then - subprojects=$(cat release_config.yaml | python -c "import yaml; import sys; print(' '.join(list(yaml.load(sys.stdin)['subprojects'].keys())))" 2> /dev/null) - if [ "$?" -eq 0 ]; then - has_subprojects=1 - echo "Checking subprojects for upgrades" - for proj in $subprojects; do - check_dependency "$proj" - done - fi -fi - -ret=0 -cat package.json | jq '.dependencies[]' | grep -q '#develop' || ret=$? -if [ "$ret" -eq 0 ]; then - echo "package.json contains develop dependencies. Refusing to release." - exit -fi - -# We use Git branch / commit dependencies for some packages, and Yarn seems -# to have a hard time getting that right. See also -# https://github.com/yarnpkg/yarn/issues/4734. As a workaround, we clean the -# global cache here to ensure we get the right thing. -yarn cache clean -# Ensure all dependencies are updated -yarn install --ignore-scripts --frozen-lockfile - -# ignore leading v on release -release="${1#v}" -tag="v${release}" - -prerelease=0 -# We check if this build is a prerelease by looking to -# see if the version has a hyphen in it. Crude, -# but semver doesn't support postreleases so anything -# with a hyphen is a prerelease. -echo $release | grep -q '-' && prerelease=1 - -if [ $prerelease -eq 1 ]; then - echo Making a PRE-RELEASE -else - read -p "Making a FINAL RELEASE, press enter to continue " REPLY -fi - -rel_branch=$(git symbolic-ref --short HEAD) - -if [ -z "$skip_changelog" ]; then - echo "Generating changelog" - yarn run allchange "$release" - read -p "Edit $changelog_file manually, or press enter to continue " REPLY - - if [ -n "$(git ls-files --modified $changelog_file)" ]; then - echo "Committing updated changelog" - git commit "$changelog_file" -m "Prepare changelog for $tag" - fi -fi -latest_changes=$(mktemp) -cat "${changelog_file}" | "$(dirname "$0")/scripts/changelog_head.py" > "${latest_changes}" - -set -x - -# Bump package.json and build the dist -echo "yarn version" -# yarn version will automatically commit its modification -# and make a release tag. We don't want it to create the tag -# because it can only sign with the default key, but we can -# only turn off both of these behaviours, so we have to -# manually commit the result. -yarn version --no-git-tag-version --new-version "$release" - -"$(dirname "$0")/scripts/release/pre-release.sh" - -# commit yarn.lock if it exists, is versioned, and is modified -if [[ -f yarn.lock && $(git status --porcelain yarn.lock | grep '^ M') ]]; -then - pkglock='yarn.lock' -else - pkglock='' -fi -git commit package.json $pkglock -m "$tag" - - -# figure out if we should be signing this release -signing_id= -if [ -f release_config.yaml ]; then - result=$(cat release_config.yaml | python -c "import yaml; import sys; print(yaml.load(sys.stdin)['signing_id'])" 2> /dev/null || true) - if [ "$?" -eq 0 ]; then - signing_id=$result - fi -fi - - -# If there is a 'dist' script in the package.json, -# run it in a separate checkout of the project, then -# upload any files in the 'dist' directory as release -# assets. -# We make a completely separate checkout to be sure -# we're using released versions of the dependencies -# (rather than whatever we're pulling in from yarn link) -assets='' -dodist=0 -jq -e .scripts.dist package.json 2> /dev/null || dodist=$? -if [ $dodist -eq 0 ]; then - projdir=$(pwd) - builddir=$(mktemp -d 2>/dev/null || mktemp -d -t 'mytmpdir') - echo "Building distribution copy in $builddir" - pushd "$builddir" - git clone "$projdir" . - git checkout "$rel_branch" - yarn install --frozen-lockfile - # We haven't tagged yet, so tell the dist script what version - # it's building - DIST_VERSION="$tag" yarn dist - - popd - - for i in "$builddir"/dist/*; do - assets="$assets -a $i" - if [ -n "$signing_id" ] - then - gpg -u "$signing_id" --armor --output "$i".asc --detach-sig "$i" - assets="$assets -a $i.asc" - fi - done -fi - -if [ -n "$signing_id" ]; then - # make a signed tag - # gnupg seems to fail to get the right tty device unless we set it here - GIT_COMMITTER_EMAIL="$signing_id" GPG_TTY=$(tty) git tag -u "$signing_id" -F "${latest_changes}" "$tag" -else - git tag -a -F "${latest_changes}" "$tag" -fi - -# push the tag and the release branch -git push origin "$rel_branch" "$tag" - -if [ -n "$signing_id" ]; then - # make a signature for the source tarball. - # - # github will make us a tarball from the tag - we want to create a - # signature for it, which means that first of all we need to check that - # it's correct. - # - # we can't deterministically build exactly the same tarball, due to - # differences in gzip implementation - but we *can* build the same tar - so - # the easiest way to check the validity of the tarball from git is to unzip - # it and compare it with our own idea of what the tar should look like. - - # This uses git archive which seems to be what github uses. Specifically, - # the header fields are set in the same way: same file mode, uid & gid - # both zero and mtime set to the timestamp of the commit that the tag - # references. Also note that this puts the commit into the tar headers - # and can be extracted with gunzip -c foo.tar.gz | git get-tar-commit-id - - # the name of the sig file we want to create - source_sigfile="${tag}-src.tar.gz.asc" - - tarfile="$tag.tar.gz" - gh_project_url=$(git remote get-url origin | - sed -e 's#^git@github\.com:#https://github.com/#' \ - -e 's#^git\+ssh://git@github\.com/#https://github.com/#' \ - -e 's/\.git$//') - project_name="${gh_project_url##*/}" - curl -L "${gh_project_url}/archive/${tarfile}" -o "${tarfile}" - - # unzip it and compare it with the tar we would generate - if ! cmp --silent <(gunzip -c $tarfile) \ - <(git archive --format tar --prefix="${project_name}-${release}/" "$tag"); then - - # we don't bail out here, because really it's more likely that our comparison - # screwed up and it's super annoying to abort the script at this point. - cat >&2 < "${release_text}" -echo >> "${release_text}" -cat "${latest_changes}" >> "${release_text}" -hub release create $hubflags $assets -F "${release_text}" "$tag" - -if [ $dodist -eq 0 ]; then - rm -rf "$builddir" -fi -rm "${release_text}" -rm "${latest_changes}" - -# if it is a pre-release, leave it on the release branch for now. -if [ $prerelease -eq 1 ]; then - git checkout "$rel_branch" - exit 0 -fi - -# merge release branch to master -echo "updating master branch" -git checkout master -git pull -git merge "$rel_branch" --no-edit - -# push master to github -git push origin master - -# finally, merge master back onto develop (if it exists) -if [ "$(git branch -lr | grep origin/develop -c)" -ge 1 ]; then - git checkout develop - git pull - git merge master --no-edit - git push origin develop -fi - -[ -x ./post-release.sh ] && ./post-release.sh - -if [ $has_subprojects -eq 1 ] && [ $prerelease -eq 0 ]; then - echo "Resetting subprojects to develop" - for proj in $subprojects; do - reset_dependency "$proj" - done - git push origin develop -fi diff --git a/yarn.lock b/yarn.lock index 458d8a12f06..3779f232b6a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -19,31 +19,6 @@ resolved "https://registry.yarnpkg.com/@action-validator/core/-/core-0.5.4.tgz#160a6d9ac8919a1eed0a0b0a7780b82ef03686fe" integrity sha512-uODXaU5sJw9CilmjVG9IUpc1ENivixQI7+DtebWgG80PMQBfZ/4b5PKXJ5ESJVlvafrHcuIjN0qou99zN2bDtw== -"@actions/core@^1.4.0": - version "1.10.1" - resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.10.1.tgz#61108e7ac40acae95ee36da074fa5850ca4ced8a" - integrity sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g== - dependencies: - "@actions/http-client" "^2.0.1" - uuid "^8.3.2" - -"@actions/github@^5.0.0": - version "5.1.1" - resolved "https://registry.yarnpkg.com/@actions/github/-/github-5.1.1.tgz#40b9b9e1323a5efcf4ff7dadd33d8ea51651bbcb" - integrity sha512-Nk59rMDoJaV+mHCOJPXuvB1zIbomlKS0dmSIqPGxd0enAXBnOfn4VWF+CGtRCwXZG9Epa54tZA7VIRlJDS8A6g== - dependencies: - "@actions/http-client" "^2.0.1" - "@octokit/core" "^3.6.0" - "@octokit/plugin-paginate-rest" "^2.17.0" - "@octokit/plugin-rest-endpoint-methods" "^5.13.0" - -"@actions/http-client@^2.0.1": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@actions/http-client/-/http-client-2.1.1.tgz#a8e97699c315bed0ecaeaaeb640948470d4586a0" - integrity sha512-qhrkRMB40bbbLo7gF+0vu+X+UawOvQQqNAA/5Unx774RS8poaOhThDOG6BGmxvAnxhQnDp2BG/ZUm65xZILTpw== - dependencies: - tunnel "^0.0.6" - "@ampproject/remapping@^2.2.0": version "2.2.1" resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.1.tgz#99e8e11851128b8702cd57c33684f1d0f260b630" @@ -1741,107 +1716,6 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@octokit/auth-token@^2.4.4": - version "2.5.0" - resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.5.0.tgz#27c37ea26c205f28443402477ffd261311f21e36" - integrity sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g== - dependencies: - "@octokit/types" "^6.0.3" - -"@octokit/core@^3.5.1", "@octokit/core@^3.6.0": - version "3.6.0" - resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.6.0.tgz#3376cb9f3008d9b3d110370d90e0a1fcd5fe6085" - integrity sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q== - dependencies: - "@octokit/auth-token" "^2.4.4" - "@octokit/graphql" "^4.5.8" - "@octokit/request" "^5.6.3" - "@octokit/request-error" "^2.0.5" - "@octokit/types" "^6.0.3" - before-after-hook "^2.2.0" - universal-user-agent "^6.0.0" - -"@octokit/endpoint@^6.0.1": - version "6.0.12" - resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.12.tgz#3b4d47a4b0e79b1027fb8d75d4221928b2d05658" - integrity sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA== - dependencies: - "@octokit/types" "^6.0.3" - is-plain-object "^5.0.0" - universal-user-agent "^6.0.0" - -"@octokit/graphql@^4.5.8": - version "4.8.0" - resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.8.0.tgz#664d9b11c0e12112cbf78e10f49a05959aa22cc3" - integrity sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg== - dependencies: - "@octokit/request" "^5.6.0" - "@octokit/types" "^6.0.3" - universal-user-agent "^6.0.0" - -"@octokit/openapi-types@^12.11.0": - version "12.11.0" - resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-12.11.0.tgz#da5638d64f2b919bca89ce6602d059f1b52d3ef0" - integrity sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ== - -"@octokit/plugin-paginate-rest@^2.16.8", "@octokit/plugin-paginate-rest@^2.17.0": - version "2.21.3" - resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz#7f12532797775640dbb8224da577da7dc210c87e" - integrity sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw== - dependencies: - "@octokit/types" "^6.40.0" - -"@octokit/plugin-request-log@^1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz#5e50ed7083a613816b1e4a28aeec5fb7f1462e85" - integrity sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA== - -"@octokit/plugin-rest-endpoint-methods@^5.12.0", "@octokit/plugin-rest-endpoint-methods@^5.13.0": - version "5.16.2" - resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz#7ee8bf586df97dd6868cf68f641354e908c25342" - integrity sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw== - dependencies: - "@octokit/types" "^6.39.0" - deprecation "^2.3.1" - -"@octokit/request-error@^2.0.5", "@octokit/request-error@^2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.1.0.tgz#9e150357831bfc788d13a4fd4b1913d60c74d677" - integrity sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg== - dependencies: - "@octokit/types" "^6.0.3" - deprecation "^2.0.0" - once "^1.4.0" - -"@octokit/request@^5.6.0", "@octokit/request@^5.6.3": - version "5.6.3" - resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.6.3.tgz#19a022515a5bba965ac06c9d1334514eb50c48b0" - integrity sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A== - dependencies: - "@octokit/endpoint" "^6.0.1" - "@octokit/request-error" "^2.1.0" - "@octokit/types" "^6.16.1" - is-plain-object "^5.0.0" - node-fetch "^2.6.7" - universal-user-agent "^6.0.0" - -"@octokit/rest@^18.6.7": - version "18.12.0" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.12.0.tgz#f06bc4952fc87130308d810ca9d00e79f6988881" - integrity sha512-gDPiOHlyGavxr72y0guQEhLsemgVjwRePayJ+FcKc2SJqKUbxbkvf5kAZEWA/MKvsfYlQAMVzNJE3ezQcxMJ2Q== - dependencies: - "@octokit/core" "^3.5.1" - "@octokit/plugin-paginate-rest" "^2.16.8" - "@octokit/plugin-request-log" "^1.0.4" - "@octokit/plugin-rest-endpoint-methods" "^5.12.0" - -"@octokit/types@^6.0.3", "@octokit/types@^6.16.1", "@octokit/types@^6.39.0", "@octokit/types@^6.40.0": - version "6.41.0" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.41.0.tgz#e58ef78d78596d2fb7df9c6259802464b5f84a04" - integrity sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg== - dependencies: - "@octokit/openapi-types" "^12.11.0" - "@pkgjs/parseargs@^0.11.0": version "0.11.0" resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" @@ -2284,20 +2158,6 @@ ajv@^6.12.4, ajv@~6.12.6: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -allchange@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/allchange/-/allchange-1.3.0.tgz#0d38e76e069eacd0279fb9a171770426d8e57d37" - integrity sha512-orTQYJQzY98ZNvh9VFpBpxLry9obXvDOYuQZXDnTL/YJL3sphgr93norJrR8Qz8mNlJ3yEm1YS+aEEbC3/3Wjg== - dependencies: - "@actions/core" "^1.4.0" - "@actions/github" "^5.0.0" - "@octokit/rest" "^18.6.7" - cli-color "^2.0.0" - js-yaml "^4.1.0" - loglevel "^1.7.1" - semver "^7.3.5" - yargs "^17.5.1" - another-json@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/another-json/-/another-json-0.2.0.tgz#b5f4019c973b6dd5c6506a2d93469cb6d32aeedc" @@ -2570,11 +2430,6 @@ base-x@^4.0.0: resolved "https://registry.yarnpkg.com/base-x/-/base-x-4.0.0.tgz#d0e3b7753450c73f8ad2389b5c018a4af7b2224a" integrity sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw== -before-after-hook@^2.2.0: - version "2.2.3" - resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.3.tgz#c51e809c81a4e354084422b9b26bad88249c517c" - integrity sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ== - binary-extensions@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" @@ -2744,17 +2599,6 @@ clean-regexp@^1.0.0: dependencies: escape-string-regexp "^1.0.5" -cli-color@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/cli-color/-/cli-color-2.0.3.tgz#73769ba969080629670f3f2ef69a4bf4e7cc1879" - integrity sha512-OkoZnxyC4ERN3zLzZaY9Emb7f/MhBOIpePv0Ycok0fJYT+Ouo00UBEIwsVsr0yoow++n5YWlSUgST9GKhNHiRQ== - dependencies: - d "^1.0.1" - es5-ext "^0.10.61" - es6-iterator "^2.0.3" - memoizee "^0.4.15" - timers-ext "^0.1.7" - cli-cursor@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-4.0.0.tgz#3cecfe3734bf4fe02a8361cbdc0f6fe28c6a57ea" @@ -2943,14 +2787,6 @@ cssstyle@^2.3.0: dependencies: cssom "~0.3.6" -d@1, d@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" - integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== - dependencies: - es5-ext "^0.10.50" - type "^1.0.1" - data-urls@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-3.0.2.tgz#9cf24a477ae22bcef5cd5f6f0bfbc1d2d3be9143" @@ -3017,11 +2853,6 @@ delayed-stream@~1.0.0: resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== -deprecation@^2.0.0, deprecation@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" - integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ== - detect-newline@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" @@ -3195,42 +3026,6 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46: - version "0.10.62" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5" - integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA== - dependencies: - es6-iterator "^2.0.3" - es6-symbol "^3.1.3" - next-tick "^1.1.0" - -es6-iterator@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" - integrity sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g== - dependencies: - d "1" - es5-ext "^0.10.35" - es6-symbol "^3.1.1" - -es6-symbol@^3.1.1, es6-symbol@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" - integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== - dependencies: - d "^1.0.1" - ext "^1.1.2" - -es6-weak-map@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.3.tgz#b6da1f16cc2cc0d9be43e6bdbfc5e7dfcdf31d53" - integrity sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA== - dependencies: - d "1" - es5-ext "^0.10.46" - es6-iterator "^2.0.3" - es6-symbol "^3.1.1" - escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -3499,14 +3294,6 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== -event-emitter@^0.3.5: - version "0.3.5" - resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" - integrity sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA== - dependencies: - d "1" - es5-ext "~0.10.14" - eventemitter3@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" @@ -3574,13 +3361,6 @@ expect@^29.0.0, expect@^29.7.0: jest-message-util "^29.7.0" jest-util "^29.7.0" -ext@^1.1.2: - version "1.7.0" - resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f" - integrity sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw== - dependencies: - type "^2.7.2" - fake-indexeddb@^5.0.2: version "5.0.2" resolved "https://registry.yarnpkg.com/fake-indexeddb/-/fake-indexeddb-5.0.2.tgz#8e0b6c75c6dc6639cbb50c1aa948772147d7c93e" @@ -4224,21 +4004,11 @@ is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" -is-plain-object@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" - integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== - is-potential-custom-element-name@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== -is-promise@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.2.2.tgz#39ab959ccbf9a774cf079f7b40c7a26f763135f1" - integrity sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ== - is-regex@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" @@ -5064,13 +4834,6 @@ lru-cache@^6.0.0: resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.0.1.tgz#0a3be479df549cca0e5d693ac402ff19537a6b7a" integrity sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g== -lru-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/lru-queue/-/lru-queue-0.1.0.tgz#2738bd9f0d3cf4f84490c5736c48699ac632cda3" - integrity sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ== - dependencies: - es5-ext "~0.10.2" - lunr@^2.3.9: version "2.3.9" resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1" @@ -5128,20 +4891,6 @@ matrix-widget-api@^1.6.0: "@types/events" "^3.0.0" events "^3.2.0" -memoizee@^0.4.15: - version "0.4.15" - resolved "https://registry.yarnpkg.com/memoizee/-/memoizee-0.4.15.tgz#e6f3d2da863f318d02225391829a6c5956555b72" - integrity sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ== - dependencies: - d "^1.0.1" - es5-ext "^0.10.53" - es6-weak-map "^2.0.3" - event-emitter "^0.3.5" - is-promise "^2.2.2" - lru-queue "^0.1.0" - next-tick "^1.1.0" - timers-ext "^0.1.7" - merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" @@ -5231,15 +4980,10 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== -next-tick@1, next-tick@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" - integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== - -node-fetch@^2.6.7: - version "2.6.12" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.12.tgz#02eb8e22074018e3d5a83016649d04df0e348fba" - integrity sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g== +node-fetch@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== dependencies: whatwg-url "^5.0.0" @@ -5343,7 +5087,7 @@ oidc-client-ts@^2.2.4: crypto-js "^4.2.0" jwt-decode "^3.1.2" -once@^1.3.0, once@^1.4.0: +once@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== @@ -5860,7 +5604,7 @@ semver@^6.3.0, semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.3.5, semver@^7.3.7, semver@^7.5.3, semver@^7.5.4: +semver@^7.3.7, semver@^7.5.3, semver@^7.5.4: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== @@ -6195,14 +5939,6 @@ text-table@^0.2.0: resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== -timers-ext@^0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/timers-ext/-/timers-ext-0.1.7.tgz#6f57ad8578e07a3fb9f91d9387d65647555e25c6" - integrity sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ== - dependencies: - es5-ext "~0.10.46" - next-tick "1" - tmpl@1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" @@ -6295,11 +6031,6 @@ tsutils@^3.21.0: dependencies: tslib "^1.8.1" -tunnel@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c" - integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg== - type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" @@ -6337,16 +6068,6 @@ type-fest@^3.0.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-3.13.1.tgz#bb744c1f0678bea7543a2d1ec24e83e68e8c8706" integrity sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g== -type@^1.0.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" - integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== - -type@^2.7.2: - version "2.7.2" - resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0" - integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== - typed-array-buffer@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz#18de3e7ed7974b0a729d3feecb94338d1472cd60" @@ -6478,11 +6199,6 @@ unicode-property-aliases-ecmascript@^2.0.0: resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz#43d41e3be698bd493ef911077c9b131f827e8ccd" integrity sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w== -universal-user-agent@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" - integrity sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w== - universalify@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" @@ -6516,7 +6232,7 @@ url-parse@^1.5.3: querystringify "^2.1.1" requires-port "^1.0.0" -uuid@8.3.2, uuid@^8.3.2: +uuid@8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== From ca914c97e0316a33ec2853e02d7268c3638f91db Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 19 Feb 2024 13:03:53 +0000 Subject: [PATCH 03/34] Allow specifying OIDC url state parameter for passing data to callback (#4068) * Allow specifying more OIDC client metadata for dynamic registration Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Allow specifying url_state for dynamic oidc client registration Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Export NonEmptyArray type Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Allow specifying more OIDC client metadata for dynamic registration Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Export NonEmptyArray type Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix test Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/oidc/authorize.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/oidc/authorize.ts b/src/oidc/authorize.ts index 557a5c7e42e..9e0546ad649 100644 --- a/src/oidc/authorize.ts +++ b/src/oidc/authorize.ts @@ -129,6 +129,7 @@ export const generateAuthorizationUrl = async ( * @param nonce - state * @param prompt - indicates to the OP which flow the user should see - eg login or registration * See https://openid.net/specs/openid-connect-prompt-create-1_0.html#name-prompt-parameter + * @param urlState - value to append to the opaque state identifier to uniquely identify the callback * @returns a Promise with the url as a string */ export const generateOidcAuthorizationUrl = async ({ @@ -139,6 +140,7 @@ export const generateOidcAuthorizationUrl = async ({ identityServerUrl, nonce, prompt, + urlState, }: { clientId: string; metadata: ValidatedIssuerMetadata; @@ -147,8 +149,9 @@ export const generateOidcAuthorizationUrl = async ({ redirectUri: string; nonce: string; prompt?: string; + urlState?: string; }): Promise => { - const scope = await generateScope(); + const scope = generateScope(); const oidcClient = new OidcClient({ ...metadata, client_id: clientId, @@ -164,6 +167,7 @@ export const generateOidcAuthorizationUrl = async ({ state: userState, nonce, prompt, + url_state: urlState, }); return request.url; From 42dc498359a161b0d26f88f2fb2c11dac0538c70 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 19 Feb 2024 13:49:48 +0000 Subject: [PATCH 04/34] Update pull_request.yaml --- .github/workflows/pull_request.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 5ce27aa8a9f..0bc1502483c 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -22,6 +22,7 @@ jobs: T-Deprecation T-Enhancement T-Defect + T-Task Dependencies mode: minimum count: 1 From b4744392563b4400a445b5cae576fffb55c70c4f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 19 Feb 2024 17:20:56 +0000 Subject: [PATCH 05/34] Update dependency oidc-client-ts to v3 (#4052) * Update dependency oidc-client-ts to v3 * Update jwt-decode so that oidc-client-ts doesn't run its own and thus we can mock Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Merge Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * delint Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Sort package.json Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Ensure oidc-client-ts 3.0.1 to drop crypto-js Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com> --- package.json | 5 +- spec/unit/oidc/authorize.spec.ts | 19 ++++++- spec/unit/oidc/validate.spec.ts | 2 +- src/oidc/authorize.ts | 2 +- src/oidc/validate.ts | 2 +- yarn.lock | 88 ++++++++++++++++++++++++++------ 6 files changed, 96 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index 281809b17c5..b7412535467 100644 --- a/package.json +++ b/package.json @@ -56,11 +56,11 @@ "another-json": "^0.2.0", "bs58": "^5.0.0", "content-type": "^1.0.4", - "jwt-decode": "^3.1.2", + "jwt-decode": "^4.0.0", "loglevel": "^1.7.1", "matrix-events-sdk": "0.0.1", "matrix-widget-api": "^1.6.0", - "oidc-client-ts": "^2.2.4", + "oidc-client-ts": "^3.0.1", "p-retry": "4", "sdp-transform": "^2.14.1", "unhomoglyph": "^1.0.6", @@ -83,6 +83,7 @@ "@babel/register": "^7.12.10", "@casualbot/jest-sonar-reporter": "2.2.7", "@matrix-org/olm": "3.2.15", + "@peculiar/webcrypto": "^1.4.5", "@types/bs58": "^4.0.1", "@types/content-type": "^1.1.5", "@types/debug": "^4.1.7", diff --git a/spec/unit/oidc/authorize.spec.ts b/spec/unit/oidc/authorize.spec.ts index 732d407ebc3..f6264f5d120 100644 --- a/spec/unit/oidc/authorize.spec.ts +++ b/spec/unit/oidc/authorize.spec.ts @@ -20,7 +20,10 @@ limitations under the License. import fetchMock from "fetch-mock-jest"; import { mocked } from "jest-mock"; -import jwtDecode from "jwt-decode"; +import { jwtDecode } from "jwt-decode"; +import { Crypto } from "@peculiar/webcrypto"; +import { getRandomValues } from "node:crypto"; +import { TextEncoder } from "node:util"; import { Method } from "../../../src"; import * as crypto from "../../../src/crypto/crypto"; @@ -36,6 +39,8 @@ import { makeDelegatedAuthConfig, mockOpenIdConfiguration } from "../../test-uti jest.mock("jwt-decode"); +const webCrypto = new Crypto(); + // save for resetting mocks const realSubtleCrypto = crypto.subtleCrypto; @@ -54,6 +59,15 @@ describe("oidc authorization", () => { jest.setSystemTime(now); fetchMock.get(delegatedAuthConfig.issuer + ".well-known/openid-configuration", mockOpenIdConfiguration()); + + Object.defineProperty(window, "crypto", { + value: { + getRandomValues, + randomUUID: jest.fn().mockReturnValue("not-random-uuid"), + subtle: webCrypto.subtle, + }, + }); + global.TextEncoder = TextEncoder; }); afterEach(() => { @@ -165,7 +179,8 @@ describe("oidc authorization", () => { token_type: "Bearer", access_token: "test_access_token", refresh_token: "test_refresh_token", - id_token: "valid.id.token", + id_token: + "eyJhbGciOiJSUzI1NiIsImtpZCI6Imh4ZEhXb0Y5bW4ifQ.eyJleHAiOjE3MDgzNTY3NjcsInN1YiI6IjAxSFBQMkZTQllERTlQOUVNTThERDdXWkhSIiwiYXVkIjoiMDFIUTBXSDUyV0paV1JSU1k5V0VFUTVUMlEiLCJub25jZSI6ImhScEI2cGtFMDYiLCJhdXRoX3RpbWUiOjE3MDc5OTAzMTIsImlhdCI6MTcwODM1MzE2NywiYXRfaGFzaCI6Il9HSEU4cDhocHFnMW1ac041YUlycVEiLCJpc3MiOiJodHRwczovL2F1dGgtb2lkYy5sYWIuZWxlbWVudC5kZXYvIiwiY19oYXNoIjoib2hJRmNuaUZWd3pGSzVJdXlsX1RlQSJ9.SGUG78dCC3sTWgQBDTicKwamKiPpb6REiz79CM2ml_kVJCoS7gT0TlztC4h25FKi3c9aB3XCVn9J8UzvJgvG8Rt_oS--FIuhK6oRm7NdcN0bCkbG7iZEWGxx-kQnifcCFHyZ6T1CxR8X00Uvc6_lRfBZVlTyuuQaJ_PHiiKMlV93FbxvQUIq6FTkQP2Z56p4JIXIzjOONzA91skTqQGycl5f9Vhp6cqXFzl6ARK30M7A-8UI5qCxClUJ7kD9KgN5YZ7uivLp1x01WBnik2DXH0eSwXcTX2WLkYtMXgMxylJhIiO586apIC5nr7sfip-Y_4PgBlSjRRgrmOGC-VUFCA", expires_in: 300, }; diff --git a/spec/unit/oidc/validate.spec.ts b/spec/unit/oidc/validate.spec.ts index 91b6985f02c..e1f85fa0808 100644 --- a/spec/unit/oidc/validate.spec.ts +++ b/spec/unit/oidc/validate.spec.ts @@ -15,7 +15,7 @@ limitations under the License. */ import { mocked } from "jest-mock"; -import jwtDecode from "jwt-decode"; +import { jwtDecode } from "jwt-decode"; import { M_AUTHENTICATION } from "../../../src"; import { logger } from "../../../src/logger"; diff --git a/src/oidc/authorize.ts b/src/oidc/authorize.ts index 9e0546ad649..c0b844436fa 100644 --- a/src/oidc/authorize.ts +++ b/src/oidc/authorize.ts @@ -239,7 +239,7 @@ export const completeAuthorizationCodeGrant = async ( // hydrate the sign in state and create a client // the stored sign in state includes oidc configuration we set at the start of the oidc login flow - const signInState = SigninState.fromStorageString(stateString); + const signInState = await SigninState.fromStorageString(stateString); const client = new OidcClient({ ...signInState, stateStore }); // validate the code and state, and attempt to swap the code for tokens diff --git a/src/oidc/validate.ts b/src/oidc/validate.ts index ef3e7c26e28..a0d062e472d 100644 --- a/src/oidc/validate.ts +++ b/src/oidc/validate.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import jwtDecode from "jwt-decode"; +import { jwtDecode } from "jwt-decode"; import { OidcMetadata, SigninResponse } from "oidc-client-ts"; import { IDelegatedAuthConfig } from "../client"; diff --git a/yarn.lock b/yarn.lock index 3779f232b6a..cde8d96a7c4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1716,6 +1716,33 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@peculiar/asn1-schema@^2.3.8": + version "2.3.8" + resolved "https://registry.yarnpkg.com/@peculiar/asn1-schema/-/asn1-schema-2.3.8.tgz#04b38832a814e25731232dd5be883460a156da3b" + integrity sha512-ULB1XqHKx1WBU/tTFIA+uARuRoBVZ4pNdOA878RDrRbBfBGcSzi5HBkdScC6ZbHn8z7L8gmKCgPC1LHRrP46tA== + dependencies: + asn1js "^3.0.5" + pvtsutils "^1.3.5" + tslib "^2.6.2" + +"@peculiar/json-schema@^1.1.12": + version "1.1.12" + resolved "https://registry.yarnpkg.com/@peculiar/json-schema/-/json-schema-1.1.12.tgz#fe61e85259e3b5ba5ad566cb62ca75b3d3cd5339" + integrity sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w== + dependencies: + tslib "^2.0.0" + +"@peculiar/webcrypto@^1.4.5": + version "1.4.5" + resolved "https://registry.yarnpkg.com/@peculiar/webcrypto/-/webcrypto-1.4.5.tgz#424bed6b0d133b772f5cbffd143d0468a90f40a0" + integrity sha512-oDk93QCDGdxFRM8382Zdminzs44dg3M2+E5Np+JWkpqLDyJC9DviMh8F8mEJkYuUcUOGA5jHO5AJJ10MFWdbZw== + dependencies: + "@peculiar/asn1-schema" "^2.3.8" + "@peculiar/json-schema" "^1.1.12" + pvtsutils "^1.3.5" + tslib "^2.6.2" + webcrypto-core "^1.7.8" + "@pkgjs/parseargs@^0.11.0": version "0.11.0" resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" @@ -2314,6 +2341,15 @@ arraybuffer.prototype.slice@^1.0.2: is-array-buffer "^3.0.2" is-shared-array-buffer "^1.0.2" +asn1js@^3.0.1, asn1js@^3.0.5: + version "3.0.5" + resolved "https://registry.yarnpkg.com/asn1js/-/asn1js-3.0.5.tgz#5ea36820443dbefb51cc7f88a2ebb5b462114f38" + integrity sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ== + dependencies: + pvtsutils "^1.3.2" + pvutils "^1.1.3" + tslib "^2.4.0" + async@^3.2.4: version "3.2.4" resolved "https://registry.yarnpkg.com/async/-/async-3.2.4.tgz#2d22e00f8cddeb5fde5dd33522b56d1cf569a81c" @@ -2765,11 +2801,6 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -crypto-js@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-4.2.0.tgz#4d931639ecdfd12ff80e8186dba6af2c2e856631" - integrity sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q== - cssom@^0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.5.0.tgz#d254fa92cd8b6fbd83811b9fbaed34663cc17c36" @@ -4691,10 +4722,10 @@ jsonfile@^6.0.1: optionalDependencies: graceful-fs "^4.1.6" -jwt-decode@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/jwt-decode/-/jwt-decode-3.1.2.tgz#3fb319f3675a2df0c2895c8f5e9fa4b67b04ed59" - integrity sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A== +jwt-decode@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jwt-decode/-/jwt-decode-4.0.0.tgz#2270352425fd413785b2faf11f6e755c5151bd4b" + integrity sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA== kind-of@^6.0.2: version "6.0.3" @@ -5079,13 +5110,12 @@ object.values@^1.1.7: define-properties "^1.2.0" es-abstract "^1.22.1" -oidc-client-ts@^2.2.4: - version "2.4.0" - resolved "https://registry.yarnpkg.com/oidc-client-ts/-/oidc-client-ts-2.4.0.tgz#764c8a33de542026e2798de9849ce8049047d7e5" - integrity sha512-WijhkTrlXK2VvgGoakWJiBdfIsVGz6CFzgjNNqZU1hPKV2kyeEaJgLs7RwuiSp2WhLfWBQuLvr2SxVlZnk3N1w== +oidc-client-ts@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/oidc-client-ts/-/oidc-client-ts-3.0.1.tgz#be264fb87c89f74f73863646431c32cd06f5ceb7" + integrity sha512-xX8unZNtmtw3sOz4FPSqDhkLFnxCDsdo2qhFEH2opgWnF/iXMFoYdBQzkwCxAZVgt3FT3DnuBY3k80EZHT0RYg== dependencies: - crypto-js "^4.2.0" - jwt-decode "^3.1.2" + jwt-decode "^4.0.0" once@^1.3.0: version "1.4.0" @@ -5336,6 +5366,18 @@ pure-rand@^6.0.0: resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.0.3.tgz#3c9e6b53c09e52ac3cedffc85ab7c1c7094b38cb" integrity sha512-KddyFewCsO0j3+np81IQ+SweXLDnDQTs5s67BOnrYmYe/yNmUhttQyGsYzy8yUnoljGAQ9sl38YB4vH8ur7Y+w== +pvtsutils@^1.3.2, pvtsutils@^1.3.5: + version "1.3.5" + resolved "https://registry.yarnpkg.com/pvtsutils/-/pvtsutils-1.3.5.tgz#b8705b437b7b134cd7fd858f025a23456f1ce910" + integrity sha512-ARvb14YB9Nm2Xi6nBq1ZX6dAM0FsJnuk+31aUp4TrcZEdKUlSqOqsxJHUPJDNE3qiIp+iUPEIeR6Je/tgV7zsA== + dependencies: + tslib "^2.6.1" + +pvutils@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/pvutils/-/pvutils-1.1.3.tgz#f35fc1d27e7cd3dfbd39c0826d173e806a03f5a3" + integrity sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ== + querystring@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.1.tgz#40d77615bb09d16902a85c3e38aa8b5ed761c2dd" @@ -6024,6 +6066,11 @@ tslib@^1.8.1: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== +tslib@^2.0.0, tslib@^2.4.0, tslib@^2.6.1, tslib@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" + integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== + tsutils@^3.21.0: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" @@ -6288,6 +6335,17 @@ walker@^1.0.8: dependencies: makeerror "1.0.12" +webcrypto-core@^1.7.8: + version "1.7.8" + resolved "https://registry.yarnpkg.com/webcrypto-core/-/webcrypto-core-1.7.8.tgz#056918036e846c72cfebbb04052e283f57f1114a" + integrity sha512-eBR98r9nQXTqXt/yDRtInszPMjTaSAMJAFDg2AHsgrnczawT1asx9YNBX6k5p+MekbPF4+s/UJJrr88zsTqkSg== + dependencies: + "@peculiar/asn1-schema" "^2.3.8" + "@peculiar/json-schema" "^1.1.12" + asn1js "^3.0.1" + pvtsutils "^1.3.5" + tslib "^2.6.2" + webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" From c27c35768813261a7f4019068dfd585d09647ba4 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 21 Feb 2024 14:56:11 +0000 Subject: [PATCH 06/34] Validate `account_management_uri` and `account_management_actions_supported` from OIDC Issuer well-known (#4074) Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- spec/unit/oidc/validate.spec.ts | 8 ++++++++ src/oidc/validate.ts | 24 ++++++++++++++++++++---- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/spec/unit/oidc/validate.spec.ts b/spec/unit/oidc/validate.spec.ts index e1f85fa0808..a3fde6ee46a 100644 --- a/spec/unit/oidc/validate.spec.ts +++ b/spec/unit/oidc/validate.spec.ts @@ -125,6 +125,8 @@ describe("validateOIDCIssuerWellKnown", () => { response_types_supported: ["code"], grant_types_supported: ["authorization_code"], code_challenge_methods_supported: ["S256"], + account_management_uri: "https://authorize.org/account", + account_management_actions_supported: ["org.matrix.cross_signing_reset"], }; beforeEach(() => { // stub to avoid console litter @@ -157,6 +159,8 @@ describe("validateOIDCIssuerWellKnown", () => { authorizationEndpoint: validWk.authorization_endpoint, tokenEndpoint: validWk.token_endpoint, registrationEndpoint: validWk.registration_endpoint, + accountManagementActionsSupported: ["org.matrix.cross_signing_reset"], + accountManagementEndpoint: "https://authorize.org/account", }); }); @@ -167,6 +171,8 @@ describe("validateOIDCIssuerWellKnown", () => { authorizationEndpoint: validWk.authorization_endpoint, tokenEndpoint: validWk.token_endpoint, registrationEndpoint: undefined, + accountManagementActionsSupported: ["org.matrix.cross_signing_reset"], + accountManagementEndpoint: "https://authorize.org/account", }); }); @@ -186,6 +192,8 @@ describe("validateOIDCIssuerWellKnown", () => { ["code_challenge_methods_supported", undefined], ["code_challenge_methods_supported", "not an array"], ["code_challenge_methods_supported", ["doesnt include S256"]], + ["account_management_uri", { not: "a string" }], + ["account_management_actions_supported", { not: "an array" }], ])("should throw OP support error when %s is %s", (key, value) => { const wk = { ...validWk, diff --git a/src/oidc/validate.ts b/src/oidc/validate.ts index a0d062e472d..c806ca80777 100644 --- a/src/oidc/validate.ts +++ b/src/oidc/validate.ts @@ -31,6 +31,8 @@ export type ValidatedIssuerConfig = { authorizationEndpoint: string; tokenEndpoint: string; registrationEndpoint?: string; + accountManagementEndpoint?: string; + accountManagementActionsSupported?: string[]; }; /** @@ -74,6 +76,16 @@ const optionalStringProperty = (wellKnown: Record, key: string) } return true; }; +const optionalStringArrayProperty = (wellKnown: Record, key: string): boolean => { + if ( + !!wellKnown[key] && + (!Array.isArray(wellKnown[key]) || !(wellKnown[key]).every((v) => typeof v === "string")) + ) { + logger.error(`Invalid property: ${key}`); + return false; + } + return true; +}; const requiredArrayValue = (wellKnown: Record, key: string, value: any): boolean => { const array = wellKnown[key]; if (!array || !Array.isArray(array) || !array.includes(value)) { @@ -102,6 +114,8 @@ export const validateOIDCIssuerWellKnown = (wellKnown: unknown): ValidatedIssuer requiredStringProperty(wellKnown, "token_endpoint"), requiredStringProperty(wellKnown, "revocation_endpoint"), optionalStringProperty(wellKnown, "registration_endpoint"), + optionalStringProperty(wellKnown, "account_management_uri"), + optionalStringArrayProperty(wellKnown, "account_management_actions_supported"), requiredArrayValue(wellKnown, "response_types_supported", "code"), requiredArrayValue(wellKnown, "grant_types_supported", "authorization_code"), requiredArrayValue(wellKnown, "code_challenge_methods_supported", "S256"), @@ -109,10 +123,12 @@ export const validateOIDCIssuerWellKnown = (wellKnown: unknown): ValidatedIssuer if (!isInvalid) { return { - authorizationEndpoint: wellKnown["authorization_endpoint"], - tokenEndpoint: wellKnown["token_endpoint"], - registrationEndpoint: wellKnown["registration_endpoint"], - } as ValidatedIssuerConfig; + authorizationEndpoint: wellKnown["authorization_endpoint"], + tokenEndpoint: wellKnown["token_endpoint"], + registrationEndpoint: wellKnown["registration_endpoint"], + accountManagementEndpoint: wellKnown["account_management_uri"], + accountManagementActionsSupported: wellKnown["account_management_actions_supported"], + }; } logger.error("Issuer configuration not valid"); From 95842c2b912391e77dd346b38c4afb893643104e Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Wed, 21 Feb 2024 17:56:16 +0000 Subject: [PATCH 07/34] v31.4.0-rc.0 --- package.json | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index b7412535467..48752f7be90 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matrix-js-sdk", - "version": "31.3.0", + "version": "31.4.0-rc.0", "description": "Matrix Client-Server SDK for Javascript", "engines": { "node": ">=18.0.0" @@ -30,8 +30,8 @@ "keywords": [ "matrix-org" ], - "main": "./src/index.ts", - "browser": "./src/browser-index.ts", + "main": "./lib/index.js", + "browser": "./lib/browser-index.js", "matrix_src_main": "./src/index.ts", "matrix_src_browser": "./src/browser-index.ts", "matrix_lib_main": "./lib/index.js", @@ -133,5 +133,6 @@ "outputDirectory": "coverage", "outputName": "jest-sonar-report.xml", "relativePaths": true - } + }, + "typings": "./lib/index.d.ts" } From 91bde6afa127df7aff3aa516eb724c118293ed32 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 21 Feb 2024 18:45:39 +0000 Subject: [PATCH 08/34] Update dependency typedoc-plugin-coverage to v3 (#4077) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index b7412535467..5c71ad39ca5 100644 --- a/package.json +++ b/package.json @@ -122,7 +122,7 @@ "rimraf": "^5.0.0", "ts-node": "^10.9.1", "typedoc": "^0.24.0", - "typedoc-plugin-coverage": "^2.1.0", + "typedoc-plugin-coverage": "^3.0.0", "typedoc-plugin-mdn-links": "^3.0.3", "typedoc-plugin-missing-exports": "^2.0.0", "typedoc-plugin-versions": "^0.2.3", diff --git a/yarn.lock b/yarn.lock index cde8d96a7c4..9f7b73c9fea 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6154,10 +6154,10 @@ typed-array-length@^1.0.4: for-each "^0.3.3" is-typed-array "^1.1.9" -typedoc-plugin-coverage@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/typedoc-plugin-coverage/-/typedoc-plugin-coverage-2.2.0.tgz#760bb7bab606eed165e1e559df86003fa958ff3f" - integrity sha512-/hq9nwSNBz2p7+VYfljT/zFSmaxN8tlfcIp6CCAaQN6VIxXCciYFIqR+pcckRhjmfHIeSJ5uy2OpCt5F683npA== +typedoc-plugin-coverage@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/typedoc-plugin-coverage/-/typedoc-plugin-coverage-3.1.0.tgz#2848956f76e02f927f4c84e85d7ea00dd0e941c9" + integrity sha512-fxeJRrxQR3yM/aFZU7mOuatgRCztiMCbeNiCRVZKY6VNgOcVMC1HS+ZfZnlbLLteUOdeWleSQ6yntuipz5zi6A== typedoc-plugin-mdn-links@^3.0.3: version "3.1.5" From 4826868a8f97797ff602e68db2bc66d28bce8e99 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 21 Feb 2024 19:01:16 +0000 Subject: [PATCH 09/34] Update stale comment (#4080) And remove line that set it for it to just get overwritten --- src/models/thread.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/models/thread.ts b/src/models/thread.ts index 32fd0621c28..56250afde92 100644 --- a/src/models/thread.ts +++ b/src/models/thread.ts @@ -198,8 +198,8 @@ export class Thread extends ReadReceipt { - this.rootEvent = this.room.findEventById(this.id); - // If the rootEvent does not exist in the local stores, then fetch it from the server. + // Always fetch the root event, even if we already have it, so we can get the latest + // state (via unsigned). try { const eventData = await this.client.fetchRoomEvent(this.roomId, this.id); const mapper = this.client.getEventMapper(); From 7f251627252b54f73fb24d5b1a92f34226a39274 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 21 Feb 2024 21:31:43 +0000 Subject: [PATCH 10/34] Update pull_request.yaml --- .github/workflows/pull_request.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 0bc1502483c..edc0b7b25b4 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -46,6 +46,7 @@ jobs: if: github.event.action == 'opened' steps: - name: Check membership + if: github.event.pull_request.user.login != 'renovate[bot]' uses: tspascoal/get-user-teams-membership@ba78054988f58bea69b7c6136d563236f8ed2fc0 # v3 id: teams with: @@ -55,7 +56,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} - name: Add label - if: ${{ steps.teams.outputs.isTeamMember == 'false' }} + if: steps.teams.outputs.isTeamMember == 'false' uses: actions/github-script@v7 with: script: | From 12308b4c07d959f07859407d19dc11f1dd4ef1a8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 22 Feb 2024 09:02:45 +0000 Subject: [PATCH 11/34] Update dependency @types/node to v18.19.17 (#4075) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9f7b73c9fea..5e69bdccbbc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1933,9 +1933,9 @@ undici-types "~5.26.4" "@types/node@18": - version "18.19.14" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.14.tgz#1880ff1b3ac913f3877f711588e5ed227da01886" - integrity sha512-EnQ4Us2rmOS64nHDWr0XqAD8DsO6f3XR6lf9UIIrZQpUzPVdN/oPuEzfDWNHSyXLvoGgjuEm/sPwFGSSs35Wtg== + version "18.19.17" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.17.tgz#a581a9fb4b2cfdbc61f008804f4436b2d5c40354" + integrity sha512-SzyGKgwPzuWp2SHhlpXKzCX0pIOfcI4V2eF37nNBJOhwlegQ83omtVQ1XxZpDE06V/d6AQvfQdPfnw0tRC//Ng== dependencies: undici-types "~5.26.4" From 1cb30bfe9be26e48eee034ff24a9b410626dd5dc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 22 Feb 2024 09:04:17 +0000 Subject: [PATCH 12/34] Update typescript-eslint monorepo to v7 (#4078) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 4 +-- yarn.lock | 100 +++++++++++++++++++++++++-------------------------- 2 files changed, 52 insertions(+), 52 deletions(-) diff --git a/package.json b/package.json index 5c71ad39ca5..cd10971ebf3 100644 --- a/package.json +++ b/package.json @@ -92,8 +92,8 @@ "@types/node": "18", "@types/sdp-transform": "^2.4.5", "@types/uuid": "9", - "@typescript-eslint/eslint-plugin": "^6.0.0", - "@typescript-eslint/parser": "^6.0.0", + "@typescript-eslint/eslint-plugin": "^7.0.0", + "@typescript-eslint/parser": "^7.0.0", "babel-jest": "^29.0.0", "debug": "^4.3.4", "domexception": "^4.0.0", diff --git a/yarn.lock b/yarn.lock index 5e69bdccbbc..e94425aefd2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1991,16 +1991,16 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@^6.0.0": - version "6.20.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.20.0.tgz#9cf31546d2d5e884602626d89b0e0d2168ac25ed" - integrity sha512-fTwGQUnjhoYHeSF6m5pWNkzmDDdsKELYrOBxhjMrofPqCkoC2k3B2wvGHFxa1CTIqkEn88nlW1HVMztjo2K8Hg== +"@typescript-eslint/eslint-plugin@^7.0.0": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.0.2.tgz#c13a34057be425167cc4a765158c46fdf2fd981d" + integrity sha512-/XtVZJtbaphtdrWjr+CJclaCVGPtOdBpFEnvtNf/jRV0IiEemRrL0qABex/nEt8isYcnFacm3nPHYQwL+Wb7qg== dependencies: "@eslint-community/regexpp" "^4.5.1" - "@typescript-eslint/scope-manager" "6.20.0" - "@typescript-eslint/type-utils" "6.20.0" - "@typescript-eslint/utils" "6.20.0" - "@typescript-eslint/visitor-keys" "6.20.0" + "@typescript-eslint/scope-manager" "7.0.2" + "@typescript-eslint/type-utils" "7.0.2" + "@typescript-eslint/utils" "7.0.2" + "@typescript-eslint/visitor-keys" "7.0.2" debug "^4.3.4" graphemer "^1.4.0" ignore "^5.2.4" @@ -2008,15 +2008,15 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/parser@^6.0.0": - version "6.20.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.20.0.tgz#17e314177304bdf498527e3c4b112e41287b7416" - integrity sha512-bYerPDF/H5v6V76MdMYhjwmwgMA+jlPVqjSDq2cRqMi8bP5sR3Z+RLOiOMad3nsnmDVmn2gAFCyNgh/dIrfP/w== +"@typescript-eslint/parser@^7.0.0": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.0.2.tgz#95c31233d343db1ca1df8df7811b5b87ca7b1a68" + integrity sha512-GdwfDglCxSmU+QTS9vhz2Sop46ebNCXpPPvsByK7hu0rFGRHL+AusKQJ7SoN+LbLh6APFpQwHKmDSwN35Z700Q== dependencies: - "@typescript-eslint/scope-manager" "6.20.0" - "@typescript-eslint/types" "6.20.0" - "@typescript-eslint/typescript-estree" "6.20.0" - "@typescript-eslint/visitor-keys" "6.20.0" + "@typescript-eslint/scope-manager" "7.0.2" + "@typescript-eslint/types" "7.0.2" + "@typescript-eslint/typescript-estree" "7.0.2" + "@typescript-eslint/visitor-keys" "7.0.2" debug "^4.3.4" "@typescript-eslint/scope-manager@5.62.0": @@ -2027,21 +2027,21 @@ "@typescript-eslint/types" "5.62.0" "@typescript-eslint/visitor-keys" "5.62.0" -"@typescript-eslint/scope-manager@6.20.0": - version "6.20.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.20.0.tgz#8a926e60f6c47feb5bab878246dc2ae465730151" - integrity sha512-p4rvHQRDTI1tGGMDFQm+GtxP1ZHyAh64WANVoyEcNMpaTFn3ox/3CcgtIlELnRfKzSs/DwYlDccJEtr3O6qBvA== +"@typescript-eslint/scope-manager@7.0.2": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.0.2.tgz#6ec4cc03752758ddd1fdaae6fbd0ed9a2ca4fe63" + integrity sha512-l6sa2jF3h+qgN2qUMjVR3uCNGjWw4ahGfzIYsCtFrQJCjhbrDPdiihYT8FnnqFwsWX+20hK592yX9I2rxKTP4g== dependencies: - "@typescript-eslint/types" "6.20.0" - "@typescript-eslint/visitor-keys" "6.20.0" + "@typescript-eslint/types" "7.0.2" + "@typescript-eslint/visitor-keys" "7.0.2" -"@typescript-eslint/type-utils@6.20.0": - version "6.20.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.20.0.tgz#d395475cd0f3610dd80c7d8716fa0db767da3831" - integrity sha512-qnSobiJQb1F5JjN0YDRPHruQTrX7ICsmltXhkV536mp4idGAYrIyr47zF/JmkJtEcAVnIz4gUYJ7gOZa6SmN4g== +"@typescript-eslint/type-utils@7.0.2": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.0.2.tgz#a7fc0adff0c202562721357e7478207d380a757b" + integrity sha512-IKKDcFsKAYlk8Rs4wiFfEwJTQlHcdn8CLwLaxwd6zb8HNiMcQIFX9sWax2k4Cjj7l7mGS5N1zl7RCHOVwHq2VQ== dependencies: - "@typescript-eslint/typescript-estree" "6.20.0" - "@typescript-eslint/utils" "6.20.0" + "@typescript-eslint/typescript-estree" "7.0.2" + "@typescript-eslint/utils" "7.0.2" debug "^4.3.4" ts-api-utils "^1.0.1" @@ -2050,10 +2050,10 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== -"@typescript-eslint/types@6.20.0": - version "6.20.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.20.0.tgz#5ccd74c29011ae7714ae6973e4ec0c634708b448" - integrity sha512-MM9mfZMAhiN4cOEcUOEx+0HmuaW3WBfukBZPCfwSqFnQy0grXYtngKCqpQN339X3RrwtzspWJrpbrupKYUSBXQ== +"@typescript-eslint/types@7.0.2": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.0.2.tgz#b6edd108648028194eb213887d8d43ab5750351c" + integrity sha512-ZzcCQHj4JaXFjdOql6adYV4B/oFOFjPOC9XYwCaZFRvqN8Llfvv4gSxrkQkd2u4Ci62i2c6W6gkDwQJDaRc4nA== "@typescript-eslint/typescript-estree@5.62.0": version "5.62.0" @@ -2068,13 +2068,13 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/typescript-estree@6.20.0": - version "6.20.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.20.0.tgz#5b2d0975949e6bdd8d45ee1471461ef5fadc5542" - integrity sha512-RnRya9q5m6YYSpBN7IzKu9FmLcYtErkDkc8/dKv81I9QiLLtVBHrjz+Ev/crAqgMNW2FCsoZF4g2QUylMnJz+g== +"@typescript-eslint/typescript-estree@7.0.2": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.0.2.tgz#3c6dc8a3b9799f4ef7eca0d224ded01974e4cb39" + integrity sha512-3AMc8khTcELFWcKcPc0xiLviEvvfzATpdPj/DXuOGIdQIIFybf4DMT1vKRbuAEOFMwhWt7NFLXRkbjsvKZQyvw== dependencies: - "@typescript-eslint/types" "6.20.0" - "@typescript-eslint/visitor-keys" "6.20.0" + "@typescript-eslint/types" "7.0.2" + "@typescript-eslint/visitor-keys" "7.0.2" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" @@ -2082,17 +2082,17 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/utils@6.20.0": - version "6.20.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.20.0.tgz#0e52afcfaa51af5656490ba4b7437cc3aa28633d" - integrity sha512-/EKuw+kRu2vAqCoDwDCBtDRU6CTKbUmwwI7SH7AashZ+W+7o8eiyy6V2cdOqN49KsTcASWsC5QeghYuRDTyOOg== +"@typescript-eslint/utils@7.0.2": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.0.2.tgz#8756123054cd934c8ba7db6a6cffbc654b10b5c4" + integrity sha512-PZPIONBIB/X684bhT1XlrkjNZJIEevwkKDsdwfiu1WeqBxYEEdIgVDgm8/bbKHVu+6YOpeRqcfImTdImx/4Bsw== dependencies: "@eslint-community/eslint-utils" "^4.4.0" "@types/json-schema" "^7.0.12" "@types/semver" "^7.5.0" - "@typescript-eslint/scope-manager" "6.20.0" - "@typescript-eslint/types" "6.20.0" - "@typescript-eslint/typescript-estree" "6.20.0" + "@typescript-eslint/scope-manager" "7.0.2" + "@typescript-eslint/types" "7.0.2" + "@typescript-eslint/typescript-estree" "7.0.2" semver "^7.5.4" "@typescript-eslint/utils@^5.10.0": @@ -2117,12 +2117,12 @@ "@typescript-eslint/types" "5.62.0" eslint-visitor-keys "^3.3.0" -"@typescript-eslint/visitor-keys@6.20.0": - version "6.20.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.20.0.tgz#f7ada27f2803de89df0edd9fd7be22c05ce6a498" - integrity sha512-E8Cp98kRe4gKHjJD4NExXKz/zOJ1A2hhZc+IMVD6i7w4yjIvh6VyuRI0gRtxAsXtoC35uGMaQ9rjI2zJaXDEAw== +"@typescript-eslint/visitor-keys@7.0.2": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.0.2.tgz#2899b716053ad7094962beb895d11396fc12afc7" + integrity sha512-8Y+YiBmqPighbm5xA2k4wKTxRzx9EkBu7Rlw+WHqMvRJ3RPz/BMBO9b2ru0LUNmXg120PHUXD5+SWFy2R8DqlQ== dependencies: - "@typescript-eslint/types" "6.20.0" + "@typescript-eslint/types" "7.0.2" eslint-visitor-keys "^3.4.1" "@ungap/structured-clone@^1.2.0": From 4da96277270d97d504dc719c6d75f5c0f01883b2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 22 Feb 2024 09:35:20 +0000 Subject: [PATCH 13/34] Update all non-major dependencies (#4076) * Update all non-major dependencies * Prettier Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com> --- .github/workflows/downstream-artifacts.yml | 2 +- package.json | 2 +- tsconfig.json | 6 +- yarn.lock | 100 ++++++++++++--------- 4 files changed, 61 insertions(+), 49 deletions(-) diff --git a/.github/workflows/downstream-artifacts.yml b/.github/workflows/downstream-artifacts.yml index fc6f2d9bd4e..09107645f23 100644 --- a/.github/workflows/downstream-artifacts.yml +++ b/.github/workflows/downstream-artifacts.yml @@ -16,7 +16,7 @@ concurrency: jobs: build-element-web: name: Build element-web - uses: matrix-org/matrix-react-sdk/.github/workflows/element-web.yaml@v3.91.0 + uses: matrix-org/matrix-react-sdk/.github/workflows/element-web.yaml@v3.92.0 with: matrix-js-sdk-sha: ${{ github.sha }} react-sdk-repository: matrix-org/matrix-react-sdk diff --git a/package.json b/package.json index cd10971ebf3..cc2e8b493a3 100644 --- a/package.json +++ b/package.json @@ -118,7 +118,7 @@ "lint-staged": "^15.0.2", "matrix-mock-request": "^2.5.0", "node-fetch": "^2.7.0", - "prettier": "3.2.4", + "prettier": "3.2.5", "rimraf": "^5.0.0", "ts-node": "^10.9.1", "typedoc": "^0.24.0", diff --git a/tsconfig.json b/tsconfig.json index f55a2c991a5..13fed86c47b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,12 +8,12 @@ "noUnusedLocals": true, "noEmit": true, "declaration": true, - "strict": true, + "strict": true }, "include": ["./src/**/*.ts", "./spec/**/*.ts"], "typedocOptions": { "entryPoints": ["src/matrix.ts"], "excludeExternals": true, - "out": "_docs", - }, + "out": "_docs" + } } diff --git a/yarn.lock b/yarn.lock index e94425aefd2..06e6962aed2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1299,10 +1299,10 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" -"@es-joy/jsdoccomment@~0.41.0": - version "0.41.0" - resolved "https://registry.yarnpkg.com/@es-joy/jsdoccomment/-/jsdoccomment-0.41.0.tgz#4a2f7db42209c0425c71a1476ef1bdb6dcd836f6" - integrity sha512-aKUhyn1QI5Ksbqcr3fFJj16p99QdjUxXAEuFst1Z47DRyoiMwivIH9MV/ARcJOCXVjPfjITciej8ZD2O/6qUmw== +"@es-joy/jsdoccomment@~0.42.0": + version "0.42.0" + resolved "https://registry.yarnpkg.com/@es-joy/jsdoccomment/-/jsdoccomment-0.42.0.tgz#59e878708336aaee88c2b34c894f73dbf77ae2b0" + integrity sha512-R1w57YlVA6+YE01wch3GPYn6bCsrOV3YW/5oGGE2tmX6JcL9Nr+b5IikrjMPF+v9CV3ay+obImEdsDhovhJrzw== dependencies: comment-parser "1.4.1" esquery "^1.5.0" @@ -1954,7 +1954,12 @@ resolved "https://registry.yarnpkg.com/@types/sdp-transform/-/sdp-transform-2.4.9.tgz#26ef39f487a6909b0512f580b80920a366b27f52" integrity sha512-bVr+/OoZZy7wrHlNcEAAa6PAgKA4BoXPYVN2EijMC5WnGgQ4ZEuixmKnVs2roiAvr7RhIFVH17QD27cojgIZCg== -"@types/semver@^7.3.12", "@types/semver@^7.5.0": +"@types/semver@^7.3.12": + version "7.5.7" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.7.tgz#326f5fdda70d13580777bcaa1bc6fa772a5aef0e" + integrity sha512-/wdoPq1QqkSj9/QOeKkFquEuPzQbHTWAMPH/PaUMB+JuR31lXhlWXRZ52IpfDYVlDOUBvX09uBrPwxGT1hjNBg== + +"@types/semver@^7.5.0": version "7.5.6" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.6.tgz#c65b2bfce1bec346582c07724e3f8c1017a20339" integrity sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A== @@ -3151,25 +3156,25 @@ eslint-plugin-import@^2.26.0: tsconfig-paths "^3.15.0" eslint-plugin-jest@^27.1.6: - version "27.6.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-27.6.3.tgz#8acb8b1e45597fe1f4d4cf25163d90119efc12be" - integrity sha512-+YsJFVH6R+tOiO3gCJon5oqn4KWc+mDq2leudk8mrp8RFubLOo9CVyi3cib4L7XMpxExmkmBZQTPDYVBzgpgOA== + version "27.9.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-27.9.0.tgz#7c98a33605e1d8b8442ace092b60e9919730000b" + integrity sha512-QIT7FH7fNmd9n4se7FFKHbsLKGQiw885Ds6Y/sxKgCZ6natwCsXdgPOADnYVxN2QrRweF0FZWbJ6S7Rsn7llug== dependencies: "@typescript-eslint/utils" "^5.10.0" eslint-plugin-jsdoc@^48.0.0: - version "48.0.4" - resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.0.4.tgz#ca54da8937b2f6fd242a16dbb1b9ff5050baf223" - integrity sha512-A0cH+5svWPXzGZszBjXA1t0aAqVGS+/x3i02KFmb73rU0iMLnadEcVWcD/dGBZHIfAMKr3YpWh58f6wn4N909w== + version "48.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.1.0.tgz#565363770b433485bfc70dc862b50b7f780529ec" + integrity sha512-g9S8ukmTd1DVcV/xeBYPPXOZ6rc8WJ4yi0+MVxJ1jBOrz5kmxV9gJJQ64ltCqIWFnBChLIhLVx3tbTSarqVyFA== dependencies: - "@es-joy/jsdoccomment" "~0.41.0" + "@es-joy/jsdoccomment" "~0.42.0" are-docs-informative "^0.0.2" comment-parser "1.4.1" debug "^4.3.4" escape-string-regexp "^4.0.0" esquery "^1.5.0" is-builtin-module "^3.2.1" - semver "^7.5.4" + semver "^7.6.0" spdx-expression-parse "^4.0.0" eslint-plugin-matrix-org@^1.0.0: @@ -3435,9 +3440,9 @@ fast-levenshtein@^2.0.6: integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== fastq@^1.6.0: - version "1.17.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.17.0.tgz#ca5e1a90b5e68f97fc8b61330d5819b82f5fab03" - integrity sha512-zGygtijUMT7jnk3h26kUms3BkSDp4IfIKjmnqI2tvx6nuBfiF1UqOxbnLfzdv+apBy+53oaImsKtMw/xYbW+1w== + version "1.17.1" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.17.1.tgz#2a523f07a4e7b1e81a42b91b8bf2254107753b47" + integrity sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w== dependencies: reusify "^1.0.4" @@ -4761,25 +4766,25 @@ lines-and-columns@^1.1.6: integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== lint-staged@^15.0.2: - version "15.2.0" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-15.2.0.tgz#3111534ca58096a3c8f70b044b6e7fe21b36f859" - integrity sha512-TFZzUEV00f+2YLaVPWBWGAMq7So6yQx+GG8YRMDeOEIf95Zn5RyiLMsEiX4KTNl9vq/w+NqRJkLA1kPIo15ufQ== + version "15.2.2" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-15.2.2.tgz#ad7cbb5b3ab70e043fa05bff82a09ed286bc4c5f" + integrity sha512-TiTt93OPh1OZOsb5B7k96A/ATl2AjIZo+vnzFZ6oHK5FuTk63ByDtxGQpHm+kFETjEWqgkF95M8FRXKR/LEBcw== dependencies: chalk "5.3.0" commander "11.1.0" debug "4.3.4" execa "8.0.1" lilconfig "3.0.0" - listr2 "8.0.0" + listr2 "8.0.1" micromatch "4.0.5" pidtree "0.6.0" string-argv "0.3.2" yaml "2.3.4" -listr2@8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/listr2/-/listr2-8.0.0.tgz#aa7c230995f8ce378585f7c96c0c6d1cefa4700d" - integrity sha512-u8cusxAcyqAiQ2RhYvV7kRKNLgUvtObIbhOX2NCXqvp1UU32xIg5CT22ykS2TPKJXZWJwtK3IKLiqAGlGNE+Zg== +listr2@8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-8.0.1.tgz#4d3f50ae6cec3c62bdf0e94f5c2c9edebd4b9c34" + integrity sha512-ovJXBXkKGfq+CwmKTjluEqFi3p4h8xvkxGQQAQan22YCgef4KZ1mKGjzfGh6PL6AW5Csw0QiQPNuQyH+6Xk3hA== dependencies: cli-truncate "^4.0.0" colorette "^2.0.20" @@ -5051,9 +5056,9 @@ npm-run-path@^4.0.1: path-key "^3.0.0" npm-run-path@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-5.1.0.tgz#bc62f7f3f6952d9894bd08944ba011a6ee7b7e00" - integrity sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q== + version "5.2.0" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-5.2.0.tgz#224cdd22c755560253dd71b83a1ef2f758b2e955" + integrity sha512-W4/tgAXFqFA0iL7fk0+uQ3g7wkL8xJmx3XdK0VGb4cHW//eZTtKGvFBBoRKVTpY7n6ze4NL9ly7rgXcHufqXKg== dependencies: path-key "^4.0.0" @@ -5319,10 +5324,10 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -prettier@3.2.4: - version "3.2.4" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.4.tgz#4723cadeac2ce7c9227de758e5ff9b14e075f283" - integrity sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ== +prettier@3.2.5: + version "3.2.5" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.5.tgz#e52bc3090586e824964a8813b09aba6233b28368" + integrity sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A== pretty-format@^28.1.3: version "28.1.3" @@ -5570,9 +5575,9 @@ reusify@^1.0.4: integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== rfdc@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b" - integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== + version "1.3.1" + resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.1.tgz#2b6d4df52dffe8bb346992a10ea9451f24373a8f" + integrity sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg== rimraf@^3.0.2: version "3.0.2" @@ -5646,7 +5651,14 @@ semver@^6.3.0, semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.3.7, semver@^7.5.3, semver@^7.5.4: +semver@^7.3.7, semver@^7.6.0: + version "7.6.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d" + integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== + dependencies: + lru-cache "^6.0.0" + +semver@^7.5.3, semver@^7.5.4: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== @@ -5781,9 +5793,9 @@ spdx-correct@^3.0.0: spdx-license-ids "^3.0.0" spdx-exceptions@^2.1.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.4.0.tgz#c07a4ede25b16e4f78e6707bbd84b15a45c19c1b" - integrity sha512-hcjppoJ68fhxA/cjbN4T8N6uCUejN8yFw69ttpqtBeCbF3u13n7mb31NB9jKwGTTWWnt9IbRA/mf1FprYS8wfw== + version "2.5.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz#5d607d27fc806f66d7b64a766650fa890f04ed66" + integrity sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w== spdx-expression-parse@^3.0.0: version "3.0.1" @@ -5802,9 +5814,9 @@ spdx-expression-parse@^4.0.0: spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: - version "3.0.16" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.16.tgz#a14f64e0954f6e25cc6587bd4f392522db0d998f" - integrity sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw== + version "3.0.17" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.17.tgz#887da8aa73218e51a1d917502d79863161a93f9c" + integrity sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg== sprintf-js@~1.0.2: version "1.0.3" @@ -5850,9 +5862,9 @@ string-width@^5.0.1, string-width@^5.1.2: strip-ansi "^7.0.1" string-width@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-7.0.0.tgz#14aa1b7aaa126d5b64fa79d3c894da8a9650ba06" - integrity sha512-GPQHj7row82Hjo9hKZieKcHIhaAIKOJvFSIZXuCU9OASVZrMNUaZuz++SPVrBjnLsnk4k+z9f2EIypgxf2vNFw== + version "7.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-7.1.0.tgz#d994252935224729ea3719c49f7206dc9c46550a" + integrity sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw== dependencies: emoji-regex "^10.3.0" get-east-asian-width "^1.0.0" From 624914a565d04f3d80067aa4d32b59cfdf725689 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 22 Feb 2024 09:46:30 +0000 Subject: [PATCH 14/34] Update dependency husky to v9 (#4051) * Update dependency husky to v9 * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com> --- .husky/pre-commit | 1 - package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index a16d8b1d555..083cf3f3ca5 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,3 @@ #!/usr/bin/env sh -. "$(dirname "$0")/_/husky.sh" npx lint-staged diff --git a/package.json b/package.json index cc2e8b493a3..f23742d1aae 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "fake-indexeddb": "^5.0.2", "fetch-mock": "9.11.0", "fetch-mock-jest": "^1.5.1", - "husky": "^8.0.3", + "husky": "^9.0.0", "jest": "^29.0.0", "jest-environment-jsdom": "^29.0.0", "jest-localstorage-mock": "^2.4.6", diff --git a/yarn.lock b/yarn.lock index 06e6962aed2..3f1e94f3919 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3843,10 +3843,10 @@ human-signals@^5.0.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-5.0.0.tgz#42665a284f9ae0dade3ba41ebc37eb4b852f3a28" integrity sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ== -husky@^8.0.3: - version "8.0.3" - resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.3.tgz#4936d7212e46d1dea28fef29bb3a108872cd9184" - integrity sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg== +husky@^9.0.0: + version "9.0.10" + resolved "https://registry.yarnpkg.com/husky/-/husky-9.0.10.tgz#ddca8908deb5f244e9286865ebc80b54387672c2" + integrity sha512-TQGNknoiy6bURzIO77pPRu+XHi6zI7T93rX+QnJsoYFf3xdjKOur+IlfqzJGMHIK/wXrLg+GsvMs8Op7vI2jVA== iconv-lite@0.6.3: version "0.6.3" From 5b74b446d41bb90716a3c6023c3e6ec54e9bd405 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 22 Feb 2024 10:48:50 +0000 Subject: [PATCH 15/34] Prune broken docs symlinks Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6375857800c..451ea064248 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -63,6 +63,7 @@ jobs: yarn tpv purge --yes --out _docs --stale --major 10 yarn gendoc symlinks -rc _docs + find _docs -xtype l -delete - name: 🔨 Set up git run: | From 8123e9a3f1142a7619758c0a238172b007e3a06a Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Thu, 22 Feb 2024 11:55:27 +0000 Subject: [PATCH 16/34] Bump matrix-react-sdk-crypto-wasm to v4.6.0 (#4082) To reduce memory usage during export - see https://github.com/matrix-org/matrix-rust-sdk-crypto-wasm/pull/105 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index f23742d1aae..cf4a534a474 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ ], "dependencies": { "@babel/runtime": "^7.12.5", - "@matrix-org/matrix-sdk-crypto-wasm": "^4.5.0", + "@matrix-org/matrix-sdk-crypto-wasm": "^4.6.0", "another-json": "^0.2.0", "bs58": "^5.0.0", "content-type": "^1.0.4", diff --git a/yarn.lock b/yarn.lock index 3f1e94f3919..2f42074d144 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1658,10 +1658,10 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" -"@matrix-org/matrix-sdk-crypto-wasm@^4.5.0": - version "4.5.0" - resolved "https://registry.yarnpkg.com/@matrix-org/matrix-sdk-crypto-wasm/-/matrix-sdk-crypto-wasm-4.5.0.tgz#f55ae28f2cd1bce14fa98069840dd31b2172732a" - integrity sha512-QINqNfBRrkVv9vB+hR+OW4RO6cwf8nt4GEbREiS09L5eUK6xa5REpeXyh7ty1QusYk/DBiNadNcM5ROEPk9dcQ== +"@matrix-org/matrix-sdk-crypto-wasm@^4.6.0": + version "4.6.0" + resolved "https://registry.yarnpkg.com/@matrix-org/matrix-sdk-crypto-wasm/-/matrix-sdk-crypto-wasm-4.6.0.tgz#35224214c7638abbe2bc91fb4fa4fb022a1a2bf0" + integrity sha512-v9PFWzSTWMlZKbyk3PPsZjUtOEQ7FIz5USD3lFRUWiS4pv0FOKR125VOUnR5Z/kAty57JXCHDAexCln3zE2Fww== "@matrix-org/olm@3.2.15": version "3.2.15" From c1e0192baf4cd32e81764bcf6ce231ffbfe3048c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 22 Feb 2024 17:06:12 +0000 Subject: [PATCH 17/34] Update dependency eslint-plugin-unicorn to v51 (#4083) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index cf4a534a474..0abde566445 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "eslint-plugin-jsdoc": "^48.0.0", "eslint-plugin-matrix-org": "^1.0.0", "eslint-plugin-tsdoc": "^0.2.17", - "eslint-plugin-unicorn": "^50.0.0", + "eslint-plugin-unicorn": "^51.0.0", "fake-indexeddb": "^5.0.2", "fetch-mock": "9.11.0", "fetch-mock-jest": "^1.5.1", diff --git a/yarn.lock b/yarn.lock index 2f42074d144..0a1ebf29b63 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3190,10 +3190,10 @@ eslint-plugin-tsdoc@^0.2.17: "@microsoft/tsdoc" "0.14.2" "@microsoft/tsdoc-config" "0.16.2" -eslint-plugin-unicorn@^50.0.0: - version "50.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-50.0.1.tgz#e539cdb02dfd893c603536264c4ed9505b70e3bf" - integrity sha512-KxenCZxqSYW0GWHH18okDlOQcpezcitm5aOSz6EnobyJ6BIByiPDviQRjJIUAjG/tMN11958MxaQ+qCoU6lfDA== +eslint-plugin-unicorn@^51.0.0: + version "51.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-51.0.1.tgz#3641c5e110324c3739d6cb98fc1b99ada39f477b" + integrity sha512-MuR/+9VuB0fydoI0nIn2RDA5WISRn4AsJyNSaNKLVwie9/ONvQhxOBbkfSICBPnzKrB77Fh6CZZXjgTt/4Latw== dependencies: "@babel/helper-validator-identifier" "^7.22.20" "@eslint-community/eslint-utils" "^4.4.0" From be3913e8a5b73bd43c6f531d329caa8a81f4d0e0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 22 Feb 2024 17:30:14 +0000 Subject: [PATCH 18/34] Update typedoc (#3958) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/yarn.lock b/yarn.lock index 0a1ebf29b63..0b23d065923 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6172,14 +6172,14 @@ typedoc-plugin-coverage@^3.0.0: integrity sha512-fxeJRrxQR3yM/aFZU7mOuatgRCztiMCbeNiCRVZKY6VNgOcVMC1HS+ZfZnlbLLteUOdeWleSQ6yntuipz5zi6A== typedoc-plugin-mdn-links@^3.0.3: - version "3.1.5" - resolved "https://registry.yarnpkg.com/typedoc-plugin-mdn-links/-/typedoc-plugin-mdn-links-3.1.5.tgz#874e66ba5bdfb842b5c2377a6722c5f0777ceba2" - integrity sha512-ZwV7fO3+S7KqbmMycBMYdeCyJ2eYVnoIc1CB64kc9NNwuZZuxocLFAqU3ZT+gihp22xNezrXciFas3ctsKLPgg== + version "3.1.16" + resolved "https://registry.yarnpkg.com/typedoc-plugin-mdn-links/-/typedoc-plugin-mdn-links-3.1.16.tgz#936408cff409b8f9b2b55d9f6589850c488a9858" + integrity sha512-Jdnw3tI3KOOMMahUNiCwKXJcH+Ov9y3syRQ8HP1ce8nT2O9Bsg9aqqa0LWye+CdCiSpWJ/USzOK3MFNxRYzL4A== typedoc-plugin-missing-exports@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/typedoc-plugin-missing-exports/-/typedoc-plugin-missing-exports-2.1.0.tgz#f283a407eb7b3a43dafc598f44bbfc2d36dc1704" - integrity sha512-+1DhqZCEu7Vu5APnrqpPwl31D+hXpt1fV0Le9ycCRL1eLVdatdl6KVt4SEVwPxnEpKwgOn2dNX6I9+0F1aO2aA== + version "2.2.0" + resolved "https://registry.yarnpkg.com/typedoc-plugin-missing-exports/-/typedoc-plugin-missing-exports-2.2.0.tgz#e39a04bab5b0d7f7b28507d64c07a4c40b788648" + integrity sha512-2+XR1IcyQ5UwXZVJe9NE6HrLmNufT9i5OwoIuuj79VxuA3eYq+Y6itS9rnNV1D7UeQnUSH8kISYD73gHE5zw+w== typedoc-plugin-versions-cli@^0.1.12: version "0.1.12" From a26fc46ed4eef7264826f10ef15150ce894adabb Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 23 Feb 2024 16:43:11 +0000 Subject: [PATCH 19/34] Update MSC2965 OIDC Discovery implementation (#4064) --- spec/test-utils/oidc.ts | 6 +- spec/unit/autodiscovery.spec.ts | 99 +------------------- spec/unit/oidc/authorize.spec.ts | 9 +- spec/unit/oidc/register.spec.ts | 17 ++-- spec/unit/oidc/tokenRefresher.spec.ts | 32 +++---- spec/unit/oidc/validate.spec.ts | 95 +------------------ src/autodiscovery.ts | 126 +------------------------- src/client.ts | 11 --- src/oidc/authorize.ts | 3 +- src/oidc/discovery.ts | 37 ++++---- src/oidc/index.ts | 12 +++ src/oidc/register.ts | 7 +- src/oidc/tokenRefresher.ts | 13 ++- src/oidc/validate.ts | 32 +------ 14 files changed, 78 insertions(+), 421 deletions(-) diff --git a/spec/test-utils/oidc.ts b/spec/test-utils/oidc.ts index 0bd97442daf..7b2adc226d7 100644 --- a/spec/test-utils/oidc.ts +++ b/spec/test-utils/oidc.ts @@ -14,8 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { OidcClientConfig } from "../../src"; -import { ValidatedIssuerMetadata } from "../../src/oidc/validate"; +import { OidcClientConfig, ValidatedIssuerMetadata } from "../../src"; /** * Makes a valid OidcClientConfig with minimum valid values @@ -26,8 +25,7 @@ export const makeDelegatedAuthConfig = (issuer = "https://auth.org/"): OidcClien const metadata = mockOpenIdConfiguration(issuer); return { - issuer, - account: issuer + "account", + accountManagementEndpoint: issuer + "account", registrationEndpoint: metadata.registration_endpoint, authorizationEndpoint: metadata.authorization_endpoint, tokenEndpoint: metadata.token_endpoint, diff --git a/spec/unit/autodiscovery.spec.ts b/spec/unit/autodiscovery.spec.ts index b4025218e66..ceed8be1f57 100644 --- a/spec/unit/autodiscovery.spec.ts +++ b/spec/unit/autodiscovery.spec.ts @@ -15,13 +15,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -import fetchMock from "fetch-mock-jest"; import MockHttpBackend from "matrix-mock-request"; -import { AutoDiscoveryAction, M_AUTHENTICATION } from "../../src"; +import { AutoDiscoveryAction } from "../../src"; import { AutoDiscovery } from "../../src/autodiscovery"; -import { OidcError } from "../../src/oidc/error"; -import { makeDelegatedAuthConfig } from "../test-utils/oidc"; // keep to reset the fetch function after using MockHttpBackend // @ts-ignore private property @@ -409,10 +406,6 @@ describe("AutoDiscovery", function () { error: null, base_url: null, }, - "m.authentication": { - state: "IGNORE", - error: OidcError.NotSupported, - }, }; expect(conf).toEqual(expected); @@ -450,10 +443,6 @@ describe("AutoDiscovery", function () { error: null, base_url: null, }, - "m.authentication": { - state: "IGNORE", - error: OidcError.NotSupported, - }, }; expect(conf).toEqual(expected); @@ -476,9 +465,6 @@ describe("AutoDiscovery", function () { // Note: we also expect this test to trim the trailing slash base_url: "https://chat.example.org/", }, - "m.authentication": { - invalid: true, - }, }); return Promise.all([ httpBackend.flushAllExpected(), @@ -494,10 +480,6 @@ describe("AutoDiscovery", function () { error: null, base_url: null, }, - "m.authentication": { - state: "FAIL_ERROR", - error: OidcError.Misconfigured, - }, }; expect(conf).toEqual(expected); @@ -728,10 +710,6 @@ describe("AutoDiscovery", function () { error: null, base_url: "https://identity.example.org", }, - "m.authentication": { - state: "IGNORE", - error: OidcError.NotSupported, - }, }; expect(conf).toEqual(expected); @@ -784,10 +762,6 @@ describe("AutoDiscovery", function () { "org.example.custom.property": { cupcakes: "yes", }, - "m.authentication": { - state: "IGNORE", - error: OidcError.NotSupported, - }, }; expect(conf).toEqual(expected); @@ -897,75 +871,4 @@ describe("AutoDiscovery", function () { }), ]); }); - - describe("m.authentication", () => { - const homeserverName = "example.org"; - const homeserverUrl = "https://chat.example.org/"; - const issuer = "https://auth.org/"; - - beforeAll(() => { - // make these tests independent from fetch mocking above - AutoDiscovery.setFetchFn(realAutoDiscoveryFetch); - }); - - beforeEach(() => { - fetchMock.resetBehavior(); - fetchMock.get(`${homeserverUrl}_matrix/client/versions`, { versions: ["v1.5"] }); - - fetchMock.get("https://example.org/.well-known/matrix/client", { - "m.homeserver": { - // Note: we also expect this test to trim the trailing slash - base_url: "https://chat.example.org/", - }, - "m.authentication": { - issuer, - }, - }); - }); - - it("should return valid authentication configuration", async () => { - const config = makeDelegatedAuthConfig(issuer); - - fetchMock.get(`${config.metadata.issuer}.well-known/openid-configuration`, config.metadata); - fetchMock.get(`${config.metadata.issuer}jwks`, { - status: 200, - headers: { - "Content-Type": "application/json", - }, - keys: [], - }); - - const result = await AutoDiscovery.findClientConfig(homeserverName); - - expect(result[M_AUTHENTICATION.stable!]).toEqual({ - state: AutoDiscovery.SUCCESS, - ...config, - signingKeys: [], - account: undefined, - error: null, - }); - }); - - it("should set state to error for invalid authentication configuration", async () => { - const config = makeDelegatedAuthConfig(issuer); - // authorization_code is required - config.metadata.grant_types_supported = ["openid"]; - - fetchMock.get(`${config.metadata.issuer}.well-known/openid-configuration`, config.metadata); - fetchMock.get(`${config.metadata.issuer}jwks`, { - status: 200, - headers: { - "Content-Type": "application/json", - }, - keys: [], - }); - - const result = await AutoDiscovery.findClientConfig(homeserverName); - - expect(result[M_AUTHENTICATION.stable!]).toEqual({ - state: AutoDiscovery.FAIL_ERROR, - error: OidcError.OpSupport, - }); - }); - }); }); diff --git a/spec/unit/oidc/authorize.spec.ts b/spec/unit/oidc/authorize.spec.ts index f6264f5d120..e9cf7589a37 100644 --- a/spec/unit/oidc/authorize.spec.ts +++ b/spec/unit/oidc/authorize.spec.ts @@ -46,8 +46,8 @@ const realSubtleCrypto = crypto.subtleCrypto; describe("oidc authorization", () => { const delegatedAuthConfig = makeDelegatedAuthConfig(); - const authorizationEndpoint = delegatedAuthConfig.metadata.authorization_endpoint; - const tokenEndpoint = delegatedAuthConfig.metadata.token_endpoint; + const authorizationEndpoint = delegatedAuthConfig.authorizationEndpoint; + const tokenEndpoint = delegatedAuthConfig.tokenEndpoint; const clientId = "xyz789"; const baseUrl = "https://test.com"; @@ -58,7 +58,10 @@ describe("oidc authorization", () => { jest.spyOn(logger, "warn"); jest.setSystemTime(now); - fetchMock.get(delegatedAuthConfig.issuer + ".well-known/openid-configuration", mockOpenIdConfiguration()); + fetchMock.get( + delegatedAuthConfig.metadata.issuer + ".well-known/openid-configuration", + mockOpenIdConfiguration(), + ); Object.defineProperty(window, "crypto", { value: { diff --git a/spec/unit/oidc/register.spec.ts b/spec/unit/oidc/register.spec.ts index f0e25784137..372f7d677c4 100644 --- a/spec/unit/oidc/register.spec.ts +++ b/spec/unit/oidc/register.spec.ts @@ -18,10 +18,10 @@ import fetchMockJest from "fetch-mock-jest"; import { OidcError } from "../../../src/oidc/error"; import { OidcRegistrationClientMetadata, registerOidcClient } from "../../../src/oidc/register"; +import { makeDelegatedAuthConfig } from "../../test-utils/oidc"; describe("registerOidcClient()", () => { const issuer = "https://auth.com/"; - const registrationEndpoint = "https://auth.com/register"; const clientName = "Element"; const baseUrl = "https://just.testing"; const metadata: OidcRegistrationClientMetadata = { @@ -35,25 +35,20 @@ describe("registerOidcClient()", () => { }; const dynamicClientId = "xyz789"; - const delegatedAuthConfig = { - issuer, - registrationEndpoint, - authorizationEndpoint: issuer + "auth", - tokenEndpoint: issuer + "token", - }; + const delegatedAuthConfig = makeDelegatedAuthConfig(issuer); beforeEach(() => { fetchMockJest.mockClear(); fetchMockJest.resetBehavior(); }); it("should make correct request to register client", async () => { - fetchMockJest.post(registrationEndpoint, { + fetchMockJest.post(delegatedAuthConfig.registrationEndpoint!, { status: 200, body: JSON.stringify({ client_id: dynamicClientId }), }); expect(await registerOidcClient(delegatedAuthConfig, metadata)).toEqual(dynamicClientId); expect(fetchMockJest).toHaveBeenCalledWith( - registrationEndpoint, + delegatedAuthConfig.registrationEndpoint!, expect.objectContaining({ headers: { "Accept": "application/json", @@ -77,7 +72,7 @@ describe("registerOidcClient()", () => { }); it("should throw when registration request fails", async () => { - fetchMockJest.post(registrationEndpoint, { + fetchMockJest.post(delegatedAuthConfig.registrationEndpoint!, { status: 500, }); await expect(() => registerOidcClient(delegatedAuthConfig, metadata)).rejects.toThrow( @@ -86,7 +81,7 @@ describe("registerOidcClient()", () => { }); it("should throw when registration response is invalid", async () => { - fetchMockJest.post(registrationEndpoint, { + fetchMockJest.post(delegatedAuthConfig.registrationEndpoint!, { status: 200, // no clientId in response body: "{}", diff --git a/spec/unit/oidc/tokenRefresher.spec.ts b/spec/unit/oidc/tokenRefresher.spec.ts index 803a63d9aac..e291142b868 100644 --- a/spec/unit/oidc/tokenRefresher.spec.ts +++ b/spec/unit/oidc/tokenRefresher.spec.ts @@ -64,7 +64,7 @@ describe("OidcTokenRefresher", () => { keys: [], }); - fetchMock.post(config.metadata.token_endpoint, { + fetchMock.post(config.tokenEndpoint, { status: 200, headers: { "Content-Type": "application/json", @@ -88,7 +88,7 @@ describe("OidcTokenRefresher", () => { }, { overwriteRoutes: true }, ); - const refresher = new OidcTokenRefresher(authConfig, clientId, redirectUri, deviceId, idTokenClaims); + const refresher = new OidcTokenRefresher(authConfig.issuer, clientId, redirectUri, deviceId, idTokenClaims); await expect(refresher.oidcClientReady).rejects.toThrow(); expect(logger.error).toHaveBeenCalledWith( "Failed to initialise OIDC client.", @@ -98,7 +98,7 @@ describe("OidcTokenRefresher", () => { }); it("initialises oidc client", async () => { - const refresher = new OidcTokenRefresher(authConfig, clientId, redirectUri, deviceId, idTokenClaims); + const refresher = new OidcTokenRefresher(authConfig.issuer, clientId, redirectUri, deviceId, idTokenClaims); await refresher.oidcClientReady; // @ts-ignore peek at private property to see we initialised the client correctly @@ -114,19 +114,19 @@ describe("OidcTokenRefresher", () => { describe("doRefreshAccessToken()", () => { it("should throw when oidcClient has not been initialised", async () => { - const refresher = new OidcTokenRefresher(authConfig, clientId, redirectUri, deviceId, idTokenClaims); + const refresher = new OidcTokenRefresher(authConfig.issuer, clientId, redirectUri, deviceId, idTokenClaims); await expect(refresher.doRefreshAccessToken("token")).rejects.toThrow( "Cannot get new token before OIDC client is initialised.", ); }); it("should refresh the tokens", async () => { - const refresher = new OidcTokenRefresher(authConfig, clientId, redirectUri, deviceId, idTokenClaims); + const refresher = new OidcTokenRefresher(authConfig.issuer, clientId, redirectUri, deviceId, idTokenClaims); await refresher.oidcClientReady; const result = await refresher.doRefreshAccessToken("refresh-token"); - expect(fetchMock).toHaveFetched(config.metadata.token_endpoint, { + expect(fetchMock).toHaveFetched(config.tokenEndpoint, { method: "POST", }); @@ -137,7 +137,7 @@ describe("OidcTokenRefresher", () => { }); it("should persist the new tokens", async () => { - const refresher = new OidcTokenRefresher(authConfig, clientId, redirectUri, deviceId, idTokenClaims); + const refresher = new OidcTokenRefresher(authConfig.issuer, clientId, redirectUri, deviceId, idTokenClaims); await refresher.oidcClientReady; // spy on our stub jest.spyOn(refresher, "persistTokens"); @@ -153,7 +153,7 @@ describe("OidcTokenRefresher", () => { it("should only have one inflight refresh request at once", async () => { fetchMock .postOnce( - config.metadata.token_endpoint, + config.tokenEndpoint, { status: 200, headers: { @@ -164,7 +164,7 @@ describe("OidcTokenRefresher", () => { { overwriteRoutes: true }, ) .postOnce( - config.metadata.token_endpoint, + config.tokenEndpoint, { status: 200, headers: { @@ -175,7 +175,7 @@ describe("OidcTokenRefresher", () => { { overwriteRoutes: false }, ); - const refresher = new OidcTokenRefresher(authConfig, clientId, redirectUri, deviceId, idTokenClaims); + const refresher = new OidcTokenRefresher(authConfig.issuer, clientId, redirectUri, deviceId, idTokenClaims); await refresher.oidcClientReady; // reset call counts fetchMock.resetHistory(); @@ -188,7 +188,7 @@ describe("OidcTokenRefresher", () => { const result2 = await first; // only one call to token endpoint - expect(fetchMock).toHaveFetchedTimes(1, config.metadata.token_endpoint); + expect(fetchMock).toHaveFetchedTimes(1, config.tokenEndpoint); expect(result1).toEqual({ accessToken: "first-new-access-token", refreshToken: "first-new-refresh-token", @@ -208,7 +208,7 @@ describe("OidcTokenRefresher", () => { it("should log and rethrow when token refresh fails", async () => { fetchMock.post( - config.metadata.token_endpoint, + config.tokenEndpoint, { status: 503, headers: { @@ -218,7 +218,7 @@ describe("OidcTokenRefresher", () => { { overwriteRoutes: true }, ); - const refresher = new OidcTokenRefresher(authConfig, clientId, redirectUri, deviceId, idTokenClaims); + const refresher = new OidcTokenRefresher(authConfig.issuer, clientId, redirectUri, deviceId, idTokenClaims); await refresher.oidcClientReady; await expect(refresher.doRefreshAccessToken("refresh-token")).rejects.toThrow(); @@ -228,7 +228,7 @@ describe("OidcTokenRefresher", () => { // make sure inflight request is cleared after a failure fetchMock .postOnce( - config.metadata.token_endpoint, + config.tokenEndpoint, { status: 503, headers: { @@ -238,7 +238,7 @@ describe("OidcTokenRefresher", () => { { overwriteRoutes: true }, ) .postOnce( - config.metadata.token_endpoint, + config.tokenEndpoint, { status: 200, headers: { @@ -249,7 +249,7 @@ describe("OidcTokenRefresher", () => { { overwriteRoutes: false }, ); - const refresher = new OidcTokenRefresher(authConfig, clientId, redirectUri, deviceId, idTokenClaims); + const refresher = new OidcTokenRefresher(authConfig.issuer, clientId, redirectUri, deviceId, idTokenClaims); await refresher.oidcClientReady; // reset call counts fetchMock.resetHistory(); diff --git a/spec/unit/oidc/validate.spec.ts b/spec/unit/oidc/validate.spec.ts index a3fde6ee46a..c9207e28fa4 100644 --- a/spec/unit/oidc/validate.spec.ts +++ b/spec/unit/oidc/validate.spec.ts @@ -17,105 +17,12 @@ limitations under the License. import { mocked } from "jest-mock"; import { jwtDecode } from "jwt-decode"; -import { M_AUTHENTICATION } from "../../../src"; import { logger } from "../../../src/logger"; -import { - validateIdToken, - validateOIDCIssuerWellKnown, - validateWellKnownAuthentication, -} from "../../../src/oidc/validate"; +import { validateIdToken, validateOIDCIssuerWellKnown } from "../../../src/oidc/validate"; import { OidcError } from "../../../src/oidc/error"; jest.mock("jwt-decode"); -describe("validateWellKnownAuthentication()", () => { - const baseWk = { - "m.homeserver": { - base_url: "https://hs.org", - }, - }; - it("should throw not supported error when wellKnown has no m.authentication section", () => { - expect(() => validateWellKnownAuthentication(undefined)).toThrow(OidcError.NotSupported); - }); - - it("should throw misconfigured error when authentication issuer is not a string", () => { - const wk = { - ...baseWk, - [M_AUTHENTICATION.stable!]: { - issuer: { url: "test.com" }, - }, - }; - expect(() => validateWellKnownAuthentication(wk[M_AUTHENTICATION.stable!] as any)).toThrow( - OidcError.Misconfigured, - ); - }); - - it("should throw misconfigured error when authentication account is not a string", () => { - const wk = { - ...baseWk, - [M_AUTHENTICATION.stable!]: { - issuer: "test.com", - account: { url: "test" }, - }, - }; - expect(() => validateWellKnownAuthentication(wk[M_AUTHENTICATION.stable!] as any)).toThrow( - OidcError.Misconfigured, - ); - }); - - it("should throw misconfigured error when authentication account is false", () => { - const wk = { - ...baseWk, - [M_AUTHENTICATION.stable!]: { - issuer: "test.com", - account: false, - }, - }; - expect(() => validateWellKnownAuthentication(wk[M_AUTHENTICATION.stable!] as any)).toThrow( - OidcError.Misconfigured, - ); - }); - - it("should return valid config when wk uses stable m.authentication", () => { - const wk = { - ...baseWk, - [M_AUTHENTICATION.stable!]: { - issuer: "test.com", - account: "account.com", - }, - }; - expect(validateWellKnownAuthentication(wk[M_AUTHENTICATION.stable!])).toEqual({ - issuer: "test.com", - account: "account.com", - }); - }); - - it("should return valid config when m.authentication account is missing", () => { - const wk = { - ...baseWk, - [M_AUTHENTICATION.stable!]: { - issuer: "test.com", - }, - }; - expect(validateWellKnownAuthentication(wk[M_AUTHENTICATION.stable!])).toEqual({ - issuer: "test.com", - }); - }); - - it("should remove unexpected properties", () => { - const wk = { - ...baseWk, - [M_AUTHENTICATION.stable!]: { - issuer: "test.com", - somethingElse: "test", - }, - }; - expect(validateWellKnownAuthentication(wk[M_AUTHENTICATION.stable!])).toEqual({ - issuer: "test.com", - }); - }); -}); - describe("validateOIDCIssuerWellKnown", () => { const validWk: any = { authorization_endpoint: "https://test.org/authorize", diff --git a/src/autodiscovery.ts b/src/autodiscovery.ts index 9bf6cdafa81..29dac54bdb7 100644 --- a/src/autodiscovery.ts +++ b/src/autodiscovery.ts @@ -15,19 +15,9 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { SigningKey } from "oidc-client-ts"; - -import { IClientWellKnown, IWellKnownConfig, IDelegatedAuthConfig, IServerVersions, M_AUTHENTICATION } from "./client"; +import { IClientWellKnown, IWellKnownConfig, IServerVersions } from "./client"; import { logger } from "./logger"; import { MatrixError, Method, timeoutSignal } from "./http-api"; -import { discoverAndValidateAuthenticationConfig } from "./oidc/discovery"; -import { - ValidatedIssuerConfig, - ValidatedIssuerMetadata, - validateOIDCIssuerWellKnown, - validateWellKnownAuthentication, -} from "./oidc/validate"; -import { OidcError } from "./oidc/error"; import { SUPPORTED_MATRIX_VERSIONS } from "./version-support"; // Dev note: Auto discovery is part of the spec. @@ -65,26 +55,9 @@ interface AutoDiscoveryState { } interface WellKnownConfig extends Omit, AutoDiscoveryState {} -/** - * @deprecated in favour of OidcClientConfig - */ -interface DelegatedAuthConfig extends IDelegatedAuthConfig, ValidatedIssuerConfig, AutoDiscoveryState {} - -/** - * @experimental - */ -export interface OidcClientConfig extends IDelegatedAuthConfig, ValidatedIssuerConfig { - metadata: ValidatedIssuerMetadata; - signingKeys?: SigningKey[]; -} - export interface ClientConfig extends Omit { "m.homeserver": WellKnownConfig; "m.identity_server": WellKnownConfig; - /** - * @experimental - */ - "m.authentication"?: (OidcClientConfig & AutoDiscoveryState) | AutoDiscoveryState; } /** @@ -318,107 +291,10 @@ export class AutoDiscovery { } }); - const authConfig = await this.discoverAndValidateAuthenticationConfig(wellknown); - clientConfig[M_AUTHENTICATION.stable!] = authConfig; - // Step 8: Give the config to the caller (finally) return Promise.resolve(clientConfig); } - /** - * Validate delegated auth configuration - * @deprecated use discoverAndValidateAuthenticationConfig - * - m.authentication config is present and valid - * - delegated auth issuer openid-configuration is reachable - * - delegated auth issuer openid-configuration is configured correctly for us - * When successful, DelegatedAuthConfig will be returned with endpoints used for delegated auth - * Any errors are caught, and AutoDiscoveryState returned with error - * @param wellKnown - configuration object as returned - * by the .well-known auto-discovery endpoint - * @returns Config or failure result - */ - public static async validateDiscoveryAuthenticationConfig( - wellKnown: IClientWellKnown, - ): Promise { - try { - const authentication = M_AUTHENTICATION.findIn(wellKnown) || undefined; - const homeserverAuthenticationConfig = validateWellKnownAuthentication(authentication); - - const issuerOpenIdConfigUrl = `${this.sanitizeWellKnownUrl( - homeserverAuthenticationConfig.issuer, - )}/.well-known/openid-configuration`; - const issuerWellKnown = await this.fetchWellKnownObject(issuerOpenIdConfigUrl); - - if (issuerWellKnown.action !== AutoDiscoveryAction.SUCCESS) { - logger.error("Failed to fetch issuer openid configuration"); - throw new Error(OidcError.General); - } - - const validatedIssuerConfig = validateOIDCIssuerWellKnown(issuerWellKnown.raw); - - const delegatedAuthConfig: DelegatedAuthConfig = { - state: AutoDiscoveryAction.SUCCESS, - error: null, - ...homeserverAuthenticationConfig, - ...validatedIssuerConfig, - }; - return delegatedAuthConfig; - } catch (error) { - const errorMessage = (error as Error).message as unknown as OidcError; - const errorType = Object.values(OidcError).includes(errorMessage) ? errorMessage : OidcError.General; - - const state = - errorType === OidcError.NotSupported ? AutoDiscoveryAction.IGNORE : AutoDiscoveryAction.FAIL_ERROR; - - return { - state, - error: errorType, - }; - } - } - - /** - * Validate delegated auth configuration - * - m.authentication config is present and valid - * - delegated auth issuer openid-configuration is reachable - * - delegated auth issuer openid-configuration is configured correctly for us - * When successful, validated authentication metadata and optionally signing keys will be returned - * Any errors are caught, and AutoDiscoveryState returned with error - * @param wellKnown - configuration object as returned - * by the .well-known auto-discovery endpoint - * @returns Config or failure result - */ - public static async discoverAndValidateAuthenticationConfig( - wellKnown: IClientWellKnown, - ): Promise<(OidcClientConfig & AutoDiscoveryState) | AutoDiscoveryState> { - try { - const authentication = M_AUTHENTICATION.findIn(wellKnown) || undefined; - const result = await discoverAndValidateAuthenticationConfig(authentication); - - // include this for backwards compatibility - const validatedIssuerConfig = validateOIDCIssuerWellKnown(result.metadata); - - const response = { - state: AutoDiscoveryAction.SUCCESS, - error: null, - ...validatedIssuerConfig, - ...result, - }; - return response; - } catch (error) { - const errorMessage = (error as Error).message as unknown as OidcError; - const errorType = Object.values(OidcError).includes(errorMessage) ? errorMessage : OidcError.General; - - const state = - errorType === OidcError.NotSupported ? AutoDiscoveryAction.IGNORE : AutoDiscoveryAction.FAIL_ERROR; - - return { - state, - error: errorType, - }; - } - } - /** * Attempts to automatically discover client configuration information * prior to logging in. Such information includes the homeserver URL diff --git a/src/client.ts b/src/client.ts index 15fc1a99429..3b489ad52db 100644 --- a/src/client.ts +++ b/src/client.ts @@ -625,13 +625,10 @@ export interface IServerVersions { unstable_features: Record; } -export const M_AUTHENTICATION = new UnstableValue("m.authentication", "org.matrix.msc2965.authentication"); - export interface IClientWellKnown { [key: string]: any; "m.homeserver"?: IWellKnownConfig; "m.identity_server"?: IWellKnownConfig; - [M_AUTHENTICATION.name]?: IDelegatedAuthConfig; // MSC2965 } export interface IWellKnownConfig { @@ -645,14 +642,6 @@ export interface IWellKnownConfig { server_name?: string; } -export interface IDelegatedAuthConfig { - // MSC2965 - /** The OIDC Provider/issuer the client should use */ - issuer: string; - /** The optional URL of the web UI where the user can manage their account */ - account?: string; -} - interface IKeyBackupPath { path: string; queryData?: { diff --git a/src/oidc/authorize.ts b/src/oidc/authorize.ts index c0b844436fa..35b93dc48e2 100644 --- a/src/oidc/authorize.ts +++ b/src/oidc/authorize.ts @@ -16,7 +16,6 @@ limitations under the License. import { IdTokenClaims, Log, OidcClient, SigninResponse, SigninState, WebStorageStateStore } from "oidc-client-ts"; -import { IDelegatedAuthConfig } from "../client"; import { subtleCrypto, TextEncoder } from "../crypto/crypto"; import { logger } from "../logger"; import { randomString } from "../randomstring"; @@ -209,7 +208,7 @@ export const completeAuthorizationCodeGrant = async ( code: string, state: string, ): Promise<{ - oidcClientSettings: IDelegatedAuthConfig & { clientId: string }; + oidcClientSettings: { clientId: string; issuer: string }; tokenResponse: BearerTokenResponse; homeserverUrl: string; idTokenClaims: IdTokenClaims; diff --git a/src/oidc/discovery.ts b/src/oidc/discovery.ts index 76aaeea8054..7199c8715d4 100644 --- a/src/oidc/discovery.ts +++ b/src/oidc/discovery.ts @@ -14,36 +14,35 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MetadataService, OidcClientSettingsStore, SigningKey } from "oidc-client-ts"; +import { MetadataService, OidcClientSettingsStore } from "oidc-client-ts"; -import { IDelegatedAuthConfig } from "../client"; -import { isValidatedIssuerMetadata, ValidatedIssuerMetadata, validateWellKnownAuthentication } from "./validate"; +import { isValidatedIssuerMetadata, validateOIDCIssuerWellKnown } from "./validate"; +import { Method, timeoutSignal } from "../http-api"; +import { OidcClientConfig } from "./index"; /** * @experimental * Discover and validate delegated auth configuration - * - m.authentication config is present and valid * - delegated auth issuer openid-configuration is reachable * - delegated auth issuer openid-configuration is configured correctly for us + * Fetches https://oidc-issuer.example.com/.well-known/openid-configuration and other files linked therein. * When successful, validated metadata is returned - * @param wellKnown - configuration object as returned - * by the .well-known auto-discovery endpoint + * @param issuer - the OIDC issuer as returned by the /auth_issuer API * @returns validated authentication metadata and optionally signing keys * @throws when delegated auth config is invalid or unreachable */ -export const discoverAndValidateAuthenticationConfig = async ( - authenticationConfig?: IDelegatedAuthConfig, -): Promise< - IDelegatedAuthConfig & { - metadata: ValidatedIssuerMetadata; - signingKeys?: SigningKey[]; - } -> => { - const homeserverAuthenticationConfig = validateWellKnownAuthentication(authenticationConfig); - - // create a temporary settings store so we can use metadata service for discovery +export const discoverAndValidateOIDCIssuerWellKnown = async (issuer: string): Promise => { + const issuerOpenIdConfigUrl = new URL(".well-known/openid-configuration", issuer); + const issuerWellKnownResponse = await fetch(issuerOpenIdConfigUrl, { + method: Method.Get, + signal: timeoutSignal(5000), + }); + const issuerWellKnown = await issuerWellKnownResponse.json(); + const validatedIssuerConfig = validateOIDCIssuerWellKnown(issuerWellKnown); + + // create a temporary settings store, so we can use metadata service for discovery const settings = new OidcClientSettingsStore({ - authority: homeserverAuthenticationConfig.issuer, + authority: issuer, redirect_uri: "", // Not known yet, this is here to make the type checker happy client_id: "", // Not known yet, this is here to make the type checker happy }); @@ -54,7 +53,7 @@ export const discoverAndValidateAuthenticationConfig = async ( isValidatedIssuerMetadata(metadata); return { - ...homeserverAuthenticationConfig, + ...validatedIssuerConfig, metadata, signingKeys, }; diff --git a/src/oidc/index.ts b/src/oidc/index.ts index 7c15d2ce954..7fc31836f83 100644 --- a/src/oidc/index.ts +++ b/src/oidc/index.ts @@ -14,9 +14,21 @@ See the License for the specific language governing permissions and limitations under the License. */ +import type { SigningKey } from "oidc-client-ts"; +import { ValidatedIssuerConfig, ValidatedIssuerMetadata } from "./validate"; + export * from "./authorize"; export * from "./discovery"; export * from "./error"; export * from "./register"; export * from "./tokenRefresher"; export * from "./validate"; + +/** + * Validated config for native OIDC authentication, as returned by {@link discoverAndValidateOIDCIssuerWellKnown}. + * Contains metadata and signing keys from the issuer's well-known (https://oidc-issuer.example.com/.well-known/openid-configuration). + */ +export interface OidcClientConfig extends ValidatedIssuerConfig { + metadata: ValidatedIssuerMetadata; + signingKeys?: SigningKey[]; +} diff --git a/src/oidc/register.ts b/src/oidc/register.ts index 65add493510..6e4948f5065 100644 --- a/src/oidc/register.ts +++ b/src/oidc/register.ts @@ -14,11 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { IDelegatedAuthConfig } from "../client"; +import { OidcClientConfig } from "."; import { OidcError } from "./error"; import { Method } from "../http-api"; import { logger } from "../logger"; -import { ValidatedIssuerConfig } from "./validate"; import { NonEmptyArray } from "../@types/common"; /** @@ -112,13 +111,13 @@ const doRegistration = async ( /** * Attempts dynamic registration against the configured registration endpoint - * @param delegatedAuthConfig - Auth config from ValidatedServerConfig + * @param delegatedAuthConfig - Auth config from {@link discoverAndValidateOIDCIssuerWellKnown} * @param clientMetadata - The metadata for the client which to register * @returns Promise resolved with registered clientId * @throws when registration is not supported, on failed request or invalid response */ export const registerOidcClient = async ( - delegatedAuthConfig: IDelegatedAuthConfig & ValidatedIssuerConfig, + delegatedAuthConfig: OidcClientConfig, clientMetadata: OidcRegistrationClientMetadata, ): Promise => { if (!delegatedAuthConfig.registrationEndpoint) { diff --git a/src/oidc/tokenRefresher.ts b/src/oidc/tokenRefresher.ts index 10c9bc48ea3..79ef9442276 100644 --- a/src/oidc/tokenRefresher.ts +++ b/src/oidc/tokenRefresher.ts @@ -17,9 +17,8 @@ limitations under the License. import { IdTokenClaims, OidcClient, WebStorageStateStore } from "oidc-client-ts"; import { AccessTokens } from "../http-api"; -import { IDelegatedAuthConfig } from "../client"; import { generateScope } from "./authorize"; -import { discoverAndValidateAuthenticationConfig } from "./discovery"; +import { discoverAndValidateOIDCIssuerWellKnown } from "./discovery"; import { logger } from "../logger"; /** @@ -42,9 +41,9 @@ export class OidcTokenRefresher { public constructor( /** - * Delegated auth config as found in matrix client .well-known + * The OIDC issuer as returned by the /auth_issuer API */ - authConfig: IDelegatedAuthConfig, + issuer: string, /** * id of this client as registered with the OP */ @@ -63,17 +62,17 @@ export class OidcTokenRefresher { */ private readonly idTokenClaims: IdTokenClaims, ) { - this.oidcClientReady = this.initialiseOidcClient(authConfig, clientId, deviceId, redirectUri); + this.oidcClientReady = this.initialiseOidcClient(issuer, clientId, deviceId, redirectUri); } private async initialiseOidcClient( - authConfig: IDelegatedAuthConfig, + issuer: string, clientId: string, deviceId: string, redirectUri: string, ): Promise { try { - const config = await discoverAndValidateAuthenticationConfig(authConfig); + const config = await discoverAndValidateOIDCIssuerWellKnown(issuer); const scope = generateScope(deviceId); diff --git a/src/oidc/validate.ts b/src/oidc/validate.ts index c806ca80777..38d730ba45d 100644 --- a/src/oidc/validate.ts +++ b/src/oidc/validate.ts @@ -17,7 +17,6 @@ limitations under the License. import { jwtDecode } from "jwt-decode"; import { OidcMetadata, SigninResponse } from "oidc-client-ts"; -import { IDelegatedAuthConfig } from "../client"; import { logger } from "../logger"; import { OidcError } from "./error"; @@ -35,31 +34,6 @@ export type ValidatedIssuerConfig = { accountManagementActionsSupported?: string[]; }; -/** - * Validates MSC2965 m.authentication config - * Returns valid configuration - * @param wellKnown - client well known as returned from ./well-known/client/matrix - * @returns config - when present and valid - * @throws when config is not found or invalid - */ -export const validateWellKnownAuthentication = (authentication?: IDelegatedAuthConfig): IDelegatedAuthConfig => { - if (!authentication) { - throw new Error(OidcError.NotSupported); - } - - if ( - typeof authentication.issuer === "string" && - (!authentication.hasOwnProperty("account") || typeof authentication.account === "string") - ) { - return { - issuer: authentication.issuer, - account: authentication.account, - }; - } - - throw new Error(OidcError.Misconfigured); -}; - const isRecord = (value: unknown): value is Record => !!value && typeof value === "object" && !Array.isArray(value); const requiredStringProperty = (wellKnown: Record, key: string): boolean => { @@ -150,7 +124,11 @@ export type ValidatedIssuerMetadata = Partial & | "response_types_supported" | "grant_types_supported" | "code_challenge_methods_supported" - >; + > & { + // MSC2965 extensions to the OIDC spec + account_management_uri?: string; + account_management_actions_supported?: string[]; + }; /** * Wraps validateOIDCIssuerWellKnown in a type assertion From d3dfcd924201d71b434af3d77343b5229b6ed75e Mon Sep 17 00:00:00 2001 From: Valere Date: Mon, 26 Feb 2024 15:07:28 +0100 Subject: [PATCH 20/34] Add basic retry for rust crypto outgoing requests (#4061) * Add basic retry for outgoing requests * Update doc * Remove 504 from retryable * Retry all 5xx and clarify client timeouts * code review cleaning * do not retry rust request if M_TOO_LARGE * refactor use common retry alg between scheduler and rust requests * Code review, cleaning and doc --- .../OutgoingRequestProcessor.spec.ts | 301 +++++++++++++++++- src/http-api/utils.ts | 46 +++ src/rust-crypto/OutgoingRequestProcessor.ts | 49 ++- src/scheduler.ts | 31 +- 4 files changed, 386 insertions(+), 41 deletions(-) diff --git a/spec/unit/rust-crypto/OutgoingRequestProcessor.spec.ts b/spec/unit/rust-crypto/OutgoingRequestProcessor.spec.ts index 3501ec8faed..e63243d2913 100644 --- a/spec/unit/rust-crypto/OutgoingRequestProcessor.spec.ts +++ b/spec/unit/rust-crypto/OutgoingRequestProcessor.spec.ts @@ -27,8 +27,9 @@ import { UploadSigningKeysRequest, ToDeviceRequest, } from "@matrix-org/matrix-sdk-crypto-wasm"; +import fetchMock from "fetch-mock-jest"; -import { TypedEventEmitter } from "../../../src/models/typed-event-emitter"; +import { TypedEventEmitter } from "../../../src"; import { HttpApiEvent, HttpApiEventHandlerMap, IHttpOpts, MatrixHttpApi, UIAuthCallback } from "../../../src"; import { OutgoingRequestProcessor } from "../../../src/rust-crypto/OutgoingRequestProcessor"; import { defer } from "../../../src/utils"; @@ -274,4 +275,302 @@ describe("OutgoingRequestProcessor", () => { // ... and `makeOutgoingRequest` resolves satisfactorily await result; }); + + describe("Should retry requests", () => { + beforeEach(() => { + jest.useFakeTimers(); + + // here we use another httpApi instance in order to use fetchMock + const dummyEventEmitter = new TypedEventEmitter(); + const httpApi = new MatrixHttpApi(dummyEventEmitter, { + baseUrl: "https://example.com", + prefix: "/_matrix", + onlyData: true, + }); + + processor = new OutgoingRequestProcessor(olmMachine, httpApi); + }); + + afterEach(() => { + jest.useRealTimers(); + fetchMock.reset(); + }); + + describe("Should retry on retryable errors", () => { + const retryableErrors: Array<[number, { status: number; body: { error: string } }]> = [ + [429, { status: 429, body: { error: "Too Many Requests" } }], + [500, { status: 500, body: { error: "Internal Server Error" } }], + [502, { status: 502, body: { error: "Bad Gateway" } }], + [503, { status: 503, body: { error: "Service Unavailable" } }], + [504, { status: 504, body: { error: "Gateway timeout" } }], + [505, { status: 505, body: { error: "HTTP Version Not Supported" } }], + [506, { status: 506, body: { error: "Variant Also Negotiates" } }], + [507, { status: 507, body: { error: "Insufficient Storage" } }], + [508, { status: 508, body: { error: "Loop Detected" } }], + [510, { status: 510, body: { error: "Not Extended" } }], + [511, { status: 511, body: { error: "Network Authentication Required" } }], + [525, { status: 525, body: { error: "SSL Handshake Failed" } }], + ]; + describe.each(retryableErrors)(`When status code is %s`, (_, error) => { + test.each(tests)(`for request of type %ss`, async (_, RequestClass, expectedMethod, expectedPath) => { + // first, mock up a request as we might expect to receive it from the Rust layer ... + const testBody = '{ "foo": "bar" }'; + const outgoingRequest = new RequestClass("1234", testBody); + + fetchMock.mock(expectedPath, error, { method: expectedMethod }); + + const requestPromise = processor.makeOutgoingRequest(outgoingRequest); + + // Run all timers and wait for the request promise to resolve/reject + await Promise.all([jest.runAllTimersAsync(), requestPromise.catch(() => {})]); + + await expect(requestPromise).rejects.toThrow(); + + // Should have ultimately made 5 requests (1 initial + 4 retries) + const calls = fetchMock.calls(expectedPath); + expect(calls).toHaveLength(5); + + // The promise should have been rejected + await expect(requestPromise).rejects.toThrow(); + }); + }); + }); + + it("should not retry if M_TOO_LARGE", async () => { + const testBody = '{ "messages": { "user": {"device": "bar" }}}'; + const outgoingRequest = new ToDeviceRequest("1234", "custom.type", "12345", testBody); + + fetchMock.put("express:/_matrix/client/v3/sendToDevice/:type/:txnId", { + status: 502, + body: { + errcode: "M_TOO_LARGE", + error: "Request too large", + }, + }); + + const requestPromise = processor.makeOutgoingRequest(outgoingRequest); + + await Promise.all([requestPromise.catch(() => {}), jest.runAllTimersAsync()]); + + await expect(requestPromise).rejects.toThrow(); + + const calls = fetchMock.calls("express:/_matrix/client/v3/sendToDevice/:type/:txnId"); + expect(calls).toHaveLength(1); + + // The promise should have been rejected + await expect(requestPromise).rejects.toThrow(); + }); + + it("should retry on Failed to fetch connection errors", async () => { + let callCount = 0; + fetchMock.post("path:/_matrix/client/v3/keys/upload", (url, opts) => { + callCount++; + if (callCount == 2) { + return { + status: 200, + body: "{}", + }; + } else { + throw new Error("Failed to fetch"); + } + }); + + const outgoingRequest = new KeysUploadRequest("1234", "{}"); + + const requestPromise = processor.makeOutgoingRequest(outgoingRequest); + + await Promise.all([requestPromise, jest.runAllTimersAsync()]); + + const calls = fetchMock.calls("path:/_matrix/client/v3/keys/upload"); + expect(calls).toHaveLength(2); + expect(olmMachine.markRequestAsSent).toHaveBeenCalled(); + }); + + it("should retry to send to-device", async () => { + let callCount = 0; + const testBody = '{ "messages": { "user": {"device": "bar" }}}'; + const outgoingRequest = new ToDeviceRequest("1234", "custom.type", "12345", testBody); + + fetchMock.put("express:/_matrix/client/v3/sendToDevice/:type/:txnId", (url, opts) => { + callCount++; + if (callCount == 2) { + return { + status: 200, + body: "{}", + }; + } else { + throw new Error("Failed to fetch"); + } + }); + + const requestPromise = processor.makeOutgoingRequest(outgoingRequest); + + await Promise.all([requestPromise, jest.runAllTimersAsync()]); + + const calls = fetchMock.calls("express:/_matrix/client/v3/sendToDevice/:type/:txnId"); + expect(calls).toHaveLength(2); + expect(olmMachine.markRequestAsSent).toHaveBeenCalled(); + }); + + it("should retry to call with UIA", async () => { + let callCount = 0; + const testBody = '{ "foo": "bar" }'; + const outgoingRequest = new UploadSigningKeysRequest(testBody); + + fetchMock.post("path:/_matrix/client/v3/keys/device_signing/upload", (url, opts) => { + callCount++; + if (callCount == 2) { + return { + status: 200, + body: "{}", + }; + } else { + throw new Error("Failed to fetch"); + } + }); + const authCallback: UIAuthCallback = async (makeRequest) => { + return await makeRequest({ type: "test" }); + }; + const requestPromise = processor.makeOutgoingRequest(outgoingRequest, authCallback); + + await Promise.all([requestPromise, jest.runAllTimersAsync()]); + + const calls = fetchMock.calls("path:/_matrix/client/v3/keys/device_signing/upload"); + expect(calls).toHaveLength(2); + // Will not mark as sent as it's a UIA request + }); + + it("should retry on respect server cool down on LIMIT_EXCEEDED", async () => { + const retryAfterMs = 5000; + let callCount = 0; + + fetchMock.post("path:/_matrix/client/v3/keys/upload", (url, opts) => { + callCount++; + if (callCount == 2) { + return { + status: 200, + body: "{}", + }; + } else { + return { + status: 429, + body: { + errcode: "M_LIMIT_EXCEEDED", + error: "Too many requests", + retry_after_ms: retryAfterMs, + }, + }; + } + }); + + const outgoingRequest = new KeysUploadRequest("1234", "{}"); + + const requestPromise = processor.makeOutgoingRequest(outgoingRequest); + + // advanced by less than the retryAfterMs + await jest.advanceTimersByTimeAsync(retryAfterMs - 1000); + + // should not have made a second request yet + { + const calls = fetchMock.calls("path:/_matrix/client/v3/keys/upload"); + expect(calls).toHaveLength(1); + } + + // advanced by the remaining time + await jest.advanceTimersByTimeAsync(retryAfterMs + 1000); + + await requestPromise; + + const calls = fetchMock.calls("path:/_matrix/client/v3/keys/upload"); + expect(calls).toHaveLength(2); + expect(olmMachine.markRequestAsSent).toHaveBeenCalled(); + }); + + const nonRetryableErrors: Array<[number, { status: number; body: { errcode: string } }]> = [ + [400, { status: 400, body: { errcode: "Bad Request" } }], + [401, { status: 401, body: { errcode: "M_UNKNOWN_TOKEN" } }], + [403, { status: 403, body: { errcode: "M_FORBIDDEN" } }], + ]; + + describe.each(nonRetryableErrors)("Should not retry all sort of errors", (_, error) => { + test.each(tests)("for %ss", async (_, RequestClass, expectedMethod, expectedPath) => { + const testBody = '{ "foo": "bar" }'; + const outgoingRequest = new RequestClass("1234", testBody); + + // @ts-ignore to avoid having to do if else to switch the method (.put/.post) + fetchMock[expectedMethod.toLowerCase()](expectedPath, { + status: error.status, + body: error.body, + }); + + const requestPromise = processor.makeOutgoingRequest(outgoingRequest); + + // Run all timers and wait for the request promise to resolve/reject + await Promise.all([jest.runAllTimersAsync(), requestPromise.catch(() => {})]); + + await expect(requestPromise).rejects.toThrow(); + + // Should have only tried once + const calls = fetchMock.calls(expectedPath); + expect(calls).toHaveLength(1); + + await expect(requestPromise).rejects.toThrow(); + }); + }); + + describe("Should not retry client timeouts", () => { + test.each(tests)("for %ss", async (_, RequestClass, expectedMethod, expectedPath) => { + const testBody = '{ "foo": "bar" }'; + const outgoingRequest = new RequestClass("1234", testBody); + + // @ts-ignore to avoid having to do if else to switch the method (.put/.post) + fetchMock[expectedMethod.toLowerCase()](expectedPath, () => { + // This is what a client timeout error will throw + throw new DOMException("The user aborted a request.", "AbortError"); + }); + + const requestPromise = processor.makeOutgoingRequest(outgoingRequest); + + // Run all timers and wait for the request promise to resolve/reject + await Promise.all([jest.runAllTimersAsync(), requestPromise.catch(() => {})]); + + await expect(requestPromise).rejects.toThrow(); + + // Should have only tried once + const calls = fetchMock.calls(expectedPath); + expect(calls).toHaveLength(1); + await expect(requestPromise).rejects.toThrow(); + }); + }); + + describe("Should retry until it works", () => { + it.each([1, 2, 3, 4])("should succeed if the call number %s is ok", async (successfulCall) => { + let callCount = 0; + fetchMock.post("path:/_matrix/client/v3/keys/upload", (url, opts) => { + callCount++; + if (callCount == successfulCall) { + return { + status: 200, + body: "{}", + }; + } else { + return { + status: 500, + body: { error: "Internal server error" }, + }; + } + }); + + const outgoingRequest = new KeysUploadRequest("1234", "{}"); + + const requestPromise = processor.makeOutgoingRequest(outgoingRequest); + + await Promise.all([requestPromise, jest.runAllTimersAsync()]); + + const calls = fetchMock.calls("path:/_matrix/client/v3/keys/upload"); + expect(calls).toHaveLength(successfulCall); + expect(olmMachine.markRequestAsSent).toHaveBeenCalled(); + }); + }); + }); }); diff --git a/src/http-api/utils.ts b/src/http-api/utils.ts index c49be740ef6..0b3c3554ffa 100644 --- a/src/http-api/utils.ts +++ b/src/http-api/utils.ts @@ -151,3 +151,49 @@ export async function retryNetworkOperation(maxAttempts: number, callback: () } throw lastConnectionError; } + +/** + * Calculate the backoff time for a request retry attempt. + * This produces wait times of 2, 4, 8, and 16 seconds (30s total) after which we give up. If the + * failure was due to a rate limited request, the time specified in the error is returned. + * + * Returns -1 if the error is not retryable, or if we reach the maximum number of attempts. + * + * @param err - The error thrown by the http call + * @param attempts - The number of attempts made so far, including the one that just failed. + * @param retryConnectionError - Whether to retry on {@link ConnectionError} (CORS, connection is down, etc.) + */ +export function calculateRetryBackoff(err: any, attempts: number, retryConnectionError: boolean): number { + if (attempts > 4) { + return -1; // give up + } + + if (err instanceof ConnectionError && !retryConnectionError) { + return -1; + } + + if (err.httpStatus && (err.httpStatus === 400 || err.httpStatus === 403 || err.httpStatus === 401)) { + // client error; no amount of retrying will save you now. + return -1; + } + + if (err.name === "AbortError") { + // this is a client timeout, that is already very high 60s/80s + // we don't want to retry, as it could do it for very long + return -1; + } + + // If we are trying to send an event (or similar) that is too large in any way, then retrying won't help + if (err.name === "M_TOO_LARGE") { + return -1; + } + + if (err.name === "M_LIMIT_EXCEEDED") { + const waitTime = err.data.retry_after_ms; + if (waitTime > 0) { + return waitTime; + } + } + + return 1000 * Math.pow(2, attempts); +} diff --git a/src/rust-crypto/OutgoingRequestProcessor.ts b/src/rust-crypto/OutgoingRequestProcessor.ts index 18b9d6b03fa..8e7e15584d5 100644 --- a/src/rust-crypto/OutgoingRequestProcessor.ts +++ b/src/rust-crypto/OutgoingRequestProcessor.ts @@ -15,11 +15,11 @@ limitations under the License. */ import { - OlmMachine, KeysBackupRequest, KeysClaimRequest, KeysQueryRequest, KeysUploadRequest, + OlmMachine, RoomMessageRequest, SignatureUploadRequest, ToDeviceRequest, @@ -27,8 +27,8 @@ import { } from "@matrix-org/matrix-sdk-crypto-wasm"; import { logger } from "../logger"; -import { IHttpOpts, MatrixHttpApi, Method } from "../http-api"; -import { logDuration, QueryDict } from "../utils"; +import { calculateRetryBackoff, IHttpOpts, MatrixHttpApi, Method } from "../http-api"; +import { logDuration, QueryDict, sleep } from "../utils"; import { IAuthDict, UIAuthCallback } from "../interactive-auth"; import { UIAResponse } from "../@types/uia"; import { ToDeviceMessageId } from "../@types/event"; @@ -71,15 +71,15 @@ export class OutgoingRequestProcessor { * for the complete list of request types */ if (msg instanceof KeysUploadRequest) { - resp = await this.rawJsonRequest(Method.Post, "/_matrix/client/v3/keys/upload", {}, msg.body); + resp = await this.requestWithRetry(Method.Post, "/_matrix/client/v3/keys/upload", {}, msg.body); } else if (msg instanceof KeysQueryRequest) { - resp = await this.rawJsonRequest(Method.Post, "/_matrix/client/v3/keys/query", {}, msg.body); + resp = await this.requestWithRetry(Method.Post, "/_matrix/client/v3/keys/query", {}, msg.body); } else if (msg instanceof KeysClaimRequest) { - resp = await this.rawJsonRequest(Method.Post, "/_matrix/client/v3/keys/claim", {}, msg.body); + resp = await this.requestWithRetry(Method.Post, "/_matrix/client/v3/keys/claim", {}, msg.body); } else if (msg instanceof SignatureUploadRequest) { - resp = await this.rawJsonRequest(Method.Post, "/_matrix/client/v3/keys/signatures/upload", {}, msg.body); + resp = await this.requestWithRetry(Method.Post, "/_matrix/client/v3/keys/signatures/upload", {}, msg.body); } else if (msg instanceof KeysBackupRequest) { - resp = await this.rawJsonRequest( + resp = await this.requestWithRetry( Method.Put, "/_matrix/client/v3/room_keys/keys", { version: msg.version }, @@ -91,7 +91,7 @@ export class OutgoingRequestProcessor { const path = `/_matrix/client/v3/rooms/${encodeURIComponent(msg.room_id)}/send/` + `${encodeURIComponent(msg.event_type)}/${encodeURIComponent(msg.txn_id)}`; - resp = await this.rawJsonRequest(Method.Put, path, {}, msg.body); + resp = await this.requestWithRetry(Method.Put, path, {}, msg.body); } else if (msg instanceof UploadSigningKeysRequest) { await this.makeRequestWithUIA( Method.Post, @@ -154,7 +154,7 @@ export class OutgoingRequestProcessor { const path = `/_matrix/client/v3/sendToDevice/${encodeURIComponent(request.event_type)}/` + encodeURIComponent(request.txn_id); - return await this.rawJsonRequest(Method.Put, path, {}, request.body); + return await this.requestWithRetry(Method.Put, path, {}, request.body); } private async makeRequestWithUIA( @@ -165,7 +165,7 @@ export class OutgoingRequestProcessor { uiaCallback: UIAuthCallback | undefined, ): Promise { if (!uiaCallback) { - return await this.rawJsonRequest(method, path, queryParams, body); + return await this.requestWithRetry(method, path, queryParams, body); } const parsedBody = JSON.parse(body); @@ -176,7 +176,7 @@ export class OutgoingRequestProcessor { if (auth !== null) { newBody.auth = auth; } - const resp = await this.rawJsonRequest(method, path, queryParams, JSON.stringify(newBody)); + const resp = await this.requestWithRetry(method, path, queryParams, JSON.stringify(newBody)); return JSON.parse(resp) as T; }; @@ -184,6 +184,31 @@ export class OutgoingRequestProcessor { return JSON.stringify(resp); } + private async requestWithRetry( + method: Method, + path: string, + queryParams: QueryDict, + body: string, + ): Promise { + let currentRetryCount = 0; + + // eslint-disable-next-line no-constant-condition + while (true) { + try { + return await this.rawJsonRequest(method, path, queryParams, body); + } catch (e) { + currentRetryCount++; + const backoff = calculateRetryBackoff(e, currentRetryCount, true); + if (backoff < 0) { + // Max number of retries reached, or error is not retryable. rethrow the error + throw e; + } + // wait for the specified time and then retry the request + await sleep(backoff); + } + } + } + private async rawJsonRequest(method: Method, path: string, queryParams: QueryDict, body: string): Promise { const opts = { // inhibit the JSON stringification and parsing within HttpApi. diff --git a/src/scheduler.ts b/src/scheduler.ts index 41612f1c902..6dfd212c72c 100644 --- a/src/scheduler.ts +++ b/src/scheduler.ts @@ -22,7 +22,7 @@ import { logger } from "./logger"; import { MatrixEvent } from "./models/event"; import { EventType } from "./@types/event"; import { defer, IDeferred, removeElement } from "./utils"; -import { ConnectionError, MatrixError } from "./http-api"; +import { calculateRetryBackoff, MatrixError } from "./http-api"; import { ISendEventResponse } from "./@types/requests"; const DEBUG = false; // set true to enable console logging. @@ -43,38 +43,13 @@ type ProcessFunction = (event: MatrixEvent) => Promise; // eslint-disable-next-line camelcase export class MatrixScheduler { /** - * Retries events up to 4 times using exponential backoff. This produces wait - * times of 2, 4, 8, and 16 seconds (30s total) after which we give up. If the - * failure was due to a rate limited request, the time specified in the error is - * waited before being retried. + * Default retry algorithm for the matrix scheduler. Retries events up to 4 times with exponential backoff. * @param attempts - Number of attempts that have been made, including the one that just failed (ie. starting at 1) * @see retryAlgorithm */ // eslint-disable-next-line @typescript-eslint/naming-convention public static RETRY_BACKOFF_RATELIMIT(event: MatrixEvent | null, attempts: number, err: MatrixError): number { - if (err.httpStatus === 400 || err.httpStatus === 403 || err.httpStatus === 401) { - // client error; no amount of retrying with save you now. - return -1; - } - if (err instanceof ConnectionError) { - return -1; - } - - // if event that we are trying to send is too large in any way then retrying won't help - if (err.name === "M_TOO_LARGE") { - return -1; - } - - if (err.name === "M_LIMIT_EXCEEDED") { - const waitTime = err.data.retry_after_ms; - if (waitTime > 0) { - return waitTime; - } - } - if (attempts > 4) { - return -1; // give up - } - return 1000 * Math.pow(2, attempts); + return calculateRetryBackoff(err, attempts, false); } /** From 6529f02c28dfd9634bacb00b063a45035f0ef464 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Tue, 27 Feb 2024 12:50:27 +0000 Subject: [PATCH 21/34] v31.4.0 --- CHANGELOG.md | 19 +++++++++++++++++++ package.json | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8b10154b91..7fa65a2bba3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,22 @@ +Changes in [31.4.0](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v31.4.0) (2024-02-27) +================================================================================================== +## ✨ Features + +* Validate `account_management_uri` and `account_management_actions_supported` from OIDC Issuer well-known ([#4074](https://github.com/matrix-org/matrix-js-sdk/pull/4074)). Contributed by @t3chguy. +* Allow specifying OIDC url state parameter for passing data to callback ([#4068](https://github.com/matrix-org/matrix-js-sdk/pull/4068)). Contributed by @t3chguy. +* Add getAuthIssuer method for MSC2965 ([#4071](https://github.com/matrix-org/matrix-js-sdk/pull/4071)). Contributed by @t3chguy. +* Allow specifying more OIDC client metadata for dynamic registration ([#4070](https://github.com/matrix-org/matrix-js-sdk/pull/4070)). Contributed by @t3chguy. +* Add unread marker event type ([#4069](https://github.com/matrix-org/matrix-js-sdk/pull/4069)). Contributed by @dbkr. +* Add "AsJson" forms of the key import/export methods ([#4057](https://github.com/matrix-org/matrix-js-sdk/pull/4057)). Contributed by @andybalaam. + +## 🐛 Bug Fixes + +* Ignore memberships of users that are not in the call ([#4065](https://github.com/matrix-org/matrix-js-sdk/pull/4065)). Contributed by @toger5. +* Await encrypted messages ([#4063](https://github.com/matrix-org/matrix-js-sdk/pull/4063)). Contributed by @toger5. +* ElementR | Ensure own user and device trust are updated after migration before giving back control to the app. ([#4059](https://github.com/matrix-org/matrix-js-sdk/pull/4059)). Contributed by @BillCarsonFr. +* Bump matrix-sdk-crypto-wasm to 4.5.0 ([#4060](https://github.com/matrix-org/matrix-js-sdk/pull/4060)). Contributed by @andybalaam. + + Changes in [31.3.0](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v31.3.0) (2024-02-13) ================================================================================================== ## ✨ Features diff --git a/package.json b/package.json index 48752f7be90..4cd5fcb07c5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matrix-js-sdk", - "version": "31.4.0-rc.0", + "version": "31.4.0", "description": "Matrix Client-Server SDK for Javascript", "engines": { "node": ">=18.0.0" From 6176faef48e5f952a8be82354874fd87358e97a7 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Tue, 27 Feb 2024 12:51:20 +0000 Subject: [PATCH 22/34] Resetting package fields for development --- package.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index c699dcc517b..1d560ce239b 100644 --- a/package.json +++ b/package.json @@ -30,8 +30,8 @@ "keywords": [ "matrix-org" ], - "main": "./lib/index.js", - "browser": "./lib/browser-index.js", + "main": "./src/index.ts", + "browser": "./src/browser-index.ts", "matrix_src_main": "./src/index.ts", "matrix_src_browser": "./src/browser-index.ts", "matrix_lib_main": "./lib/index.js", @@ -133,6 +133,5 @@ "outputDirectory": "coverage", "outputName": "jest-sonar-report.xml", "relativePaths": true - }, - "typings": "./lib/index.d.ts" + } } From b2e09250d9e62e05b4f1203c2a738d8b157a678a Mon Sep 17 00:00:00 2001 From: David Langley Date: Thu, 29 Feb 2024 12:20:53 +0000 Subject: [PATCH 23/34] Add job to automate adding new issues to the new project (#4087) * add job to automate adding new issues to the new project * missing jobs: --- .github/workflows/triage-incoming.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/triage-incoming.yml diff --git a/.github/workflows/triage-incoming.yml b/.github/workflows/triage-incoming.yml new file mode 100644 index 00000000000..2535fbfcb90 --- /dev/null +++ b/.github/workflows/triage-incoming.yml @@ -0,0 +1,14 @@ +name: Move new issues into Issue triage board + +on: + issues: + types: [opened] + +jobs: + automate-project-columns-next: + runs-on: ubuntu-latest + steps: + - uses: actions/add-to-project@main + with: + project-url: https://github.com/orgs/element-hq/projects/120 + github-token: ${{ secrets.ELEMENT_BOT_TOKEN }} From e4d4628cc88bee1ffa8c946da1ff26189e15a449 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 5 Mar 2024 09:34:09 +0000 Subject: [PATCH 24/34] When merging release notes, allow considering later versions in the same release cycle (#4085) * When merging release notes, allow considering later versions in the same major.minor.patch set Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Tweak comments Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- scripts/release/merge-release-notes.js | 56 +++++++++++++++++++------- 1 file changed, 41 insertions(+), 15 deletions(-) diff --git a/scripts/release/merge-release-notes.js b/scripts/release/merge-release-notes.js index 0ce98c630b4..5308cec6be9 100755 --- a/scripts/release/merge-release-notes.js +++ b/scripts/release/merge-release-notes.js @@ -2,23 +2,28 @@ const fs = require("fs"); -// Dependency can be the name of an entry in package.json, in which case the owner, repo & version will be looked up in its own package.json -// Or it can be a string in the form owner/repo@tag -// Or it can be a tuple of dependency, from version, to version, in which case a list of releases in that range (to inclusive) will be returned +async function listReleases(github, owner, repo) { + const response = await github.rest.repos.listReleases({ + owner, + repo, + per_page: 100, + }); + // Filters out draft releases + return response.data.filter((release) => !release.draft); +} + +// Dependency can be a tuple of dependency, from version, to version, in which case a list of releases in that range (to inclusive) will be returned +// Or it can be a string in the form accepted by `getRelease` async function getReleases(github, dependency) { if (Array.isArray(dependency)) { const [dep, fromVersion, toVersion] = dependency; const upstreamPackageJson = getDependencyPackageJson(dep); const [owner, repo] = upstreamPackageJson.repository.url.split("/").slice(-2); - const response = await github.rest.repos.listReleases({ - owner, - repo, - per_page: 100, - }); + const unfilteredReleases = await listReleases(github, owner, repo); // Only include non-draft & non-prerelease releases, unless the to-release is a pre-release, include that one - const releases = response.data.filter( - (release) => !release.draft && (!release.prerelease || release.tag_name === `v${toVersion}`), + const releases = unfilteredReleases.filter( + (release) => !release.prerelease || release.tag_name === `v${toVersion}`, ); const fromVersionIndex = releases.findIndex((release) => release.tag_name === `v${fromVersion}`); @@ -30,14 +35,35 @@ async function getReleases(github, dependency) { return [await getRelease(github, dependency)]; } +// Dependency can be the name of an entry in package.json, in which case the owner, repo & version will be looked up in its own package.json +// Or it can be a string in the form owner/repo@tag - in this case the tag is used exactly to find the release +// Or it can be a string in the form owner/repo~tag - in this case the latest tag in the same major.minor.patch set is used to find the release async function getRelease(github, dependency) { let owner; let repo; let tag; - if (dependency.includes("/") && dependency.includes("@")) { - owner = dependency.split("/")[0]; - repo = dependency.split("/")[1].split("@")[0]; - tag = dependency.split("@")[1]; + + if (dependency.includes("/")) { + let rest; + [owner, rest] = dependency.split("/")[0]; + + if (dependency.includes("@")) { + [repo, tag] = rest.split("@"); + } else if (dependency.includes("~")) { + [repo, tag] = rest.split("~"); + + if (tag.includes("-rc.")) { + // If the tag is an RC, find the latest matching RC in the set + try { + const releases = await listReleases(github, owner, repo); + const baseVersion = tag.split("-rc.")[0]; + const release = releases.find((release) => release.tag_name.startsWith(baseVersion)); + if (release) return release; + } catch (e) { + // Fall back to getReleaseByTag + } + } + } } else { const upstreamPackageJson = getDependencyPackageJson(dependency); [owner, repo] = upstreamPackageJson.repository.url.split("/").slice(-2); @@ -129,7 +155,7 @@ if (require.main === module) { process.exit(1); } const [releaseId, ...dependencies] = process.argv.slice(2); - main({ github, releaseId, dependencies: ["matrix-react-sdk"] }).then((output) => { + main({ github, releaseId, dependencies }).then((output) => { // eslint-disable-next-line no-console console.log(output); }); From a1f4b07b7d1915bd41d972dc98d7a244255c4462 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 5 Mar 2024 14:31:57 +0000 Subject: [PATCH 25/34] Fix bad string split destructuring Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- scripts/release/merge-release-notes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/release/merge-release-notes.js b/scripts/release/merge-release-notes.js index 5308cec6be9..06228492392 100755 --- a/scripts/release/merge-release-notes.js +++ b/scripts/release/merge-release-notes.js @@ -45,7 +45,7 @@ async function getRelease(github, dependency) { if (dependency.includes("/")) { let rest; - [owner, rest] = dependency.split("/")[0]; + [owner, rest] = dependency.split("/"); if (dependency.includes("@")) { [repo, tag] = rest.split("@"); From 84498bf77dd9bd1a4542b42baf1c500d5f7880e4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 5 Mar 2024 14:50:28 +0000 Subject: [PATCH 26/34] Update babel monorepo to v7.24.0 (#4097) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 213 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 119 insertions(+), 94 deletions(-) diff --git a/yarn.lock b/yarn.lock index 0b23d065923..98cacecb74c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -20,12 +20,12 @@ integrity sha512-uODXaU5sJw9CilmjVG9IUpc1ENivixQI7+DtebWgG80PMQBfZ/4b5PKXJ5ESJVlvafrHcuIjN0qou99zN2bDtw== "@ampproject/remapping@^2.2.0": - version "2.2.1" - resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.1.tgz#99e8e11851128b8702cd57c33684f1d0f260b630" - integrity sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg== + version "2.3.0" + resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.3.0.tgz#ed441b6fa600072520ce18b43d2c8cc8caecc7f4" + integrity sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw== dependencies: - "@jridgewell/gen-mapping" "^0.3.0" - "@jridgewell/trace-mapping" "^0.3.9" + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.24" "@babel/cli@^7.12.10": version "7.23.9" @@ -64,26 +64,26 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.9.tgz#71cdb00a1ce3a329ce4cbec3a44f9fef35669730" integrity sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ== -"@babel/compat-data@^7.22.6", "@babel/compat-data@^7.22.9", "@babel/compat-data@^7.23.3", "@babel/compat-data@^7.23.5": +"@babel/compat-data@^7.22.6", "@babel/compat-data@^7.22.9", "@babel/compat-data@^7.23.5": version "7.23.5" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.23.5.tgz#ffb878728bb6bdcb6f4510aa51b1be9afb8cfd98" integrity sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw== "@babel/core@^7.0.0", "@babel/core@^7.12.10": - version "7.23.9" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.9.tgz#b028820718000f267870822fec434820e9b1e4d1" - integrity sha512-5q0175NOjddqpvvzU+kDiSOAk4PfdO6FvwCWoQ6RO7rTzEe8vlo+4HVfcnAREhD4npMs0e9uZypjTwzZPCf/cw== + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.24.0.tgz#56cbda6b185ae9d9bed369816a8f4423c5f2ff1b" + integrity sha512-fQfkg0Gjkza3nf0c7/w6Xf34BW4YvzNfACRLmmb7XRLa6XHdR+K9AlJlxneFfWYf6uhOzuzZVTjF/8KfndZANw== dependencies: "@ampproject/remapping" "^2.2.0" "@babel/code-frame" "^7.23.5" "@babel/generator" "^7.23.6" "@babel/helper-compilation-targets" "^7.23.6" "@babel/helper-module-transforms" "^7.23.3" - "@babel/helpers" "^7.23.9" - "@babel/parser" "^7.23.9" - "@babel/template" "^7.23.9" - "@babel/traverse" "^7.23.9" - "@babel/types" "^7.23.9" + "@babel/helpers" "^7.24.0" + "@babel/parser" "^7.24.0" + "@babel/template" "^7.24.0" + "@babel/traverse" "^7.24.0" + "@babel/types" "^7.24.0" convert-source-map "^2.0.0" debug "^4.1.0" gensync "^1.0.0-beta.2" @@ -209,9 +209,9 @@ semver "^6.3.1" "@babel/helper-create-class-features-plugin@^7.22.15": - version "7.23.10" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.23.10.tgz#25d55fafbaea31fd0e723820bb6cc3df72edf7ea" - integrity sha512-2XpP2XhkXzgxecPNEEK8Vz8Asj9aRxt08oKOqtiZoqV2UGZ5T+EkyP9sXQ9nwMxBIG34a7jmasVqoMop7VdPUw== + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.0.tgz#fc7554141bdbfa2d17f7b4b80153b9b090e5d158" + integrity sha512-QAH+vfvts51BCsNZ2PhY6HAggnlS6omLLFTsIpeqZk/MmJ6cW7tgz5yRv0fMJThcr6FmbMrENh1RgrWPTYA76g== dependencies: "@babel/helper-annotate-as-pure" "^7.22.5" "@babel/helper-environment-visitor" "^7.22.20" @@ -313,7 +313,12 @@ dependencies: "@babel/types" "^7.22.5" -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.20.2", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.24.0", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz#945681931a52f15ce879fd5b86ce2dae6d3d7f2a" + integrity sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w== + +"@babel/helper-plugin-utils@^7.20.2": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz#dd7ee3735e8a313b9f7b05a773d892e88e6d7295" integrity sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg== @@ -395,14 +400,14 @@ "@babel/traverse" "^7.22.15" "@babel/types" "^7.22.15" -"@babel/helpers@^7.23.9": - version "7.23.9" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.9.tgz#c3e20bbe7f7a7e10cb9b178384b4affdf5995c7d" - integrity sha512-87ICKgU5t5SzOT7sBMfCOZQ2rHjRU+Pcb9BoILMYz600W6DkVRLFBPwQ18gwUVvggqXivaUakpnxWQGbpywbBQ== +"@babel/helpers@^7.24.0": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.24.0.tgz#a3dd462b41769c95db8091e49cfe019389a9409b" + integrity sha512-ulDZdc0Aj5uLc5nETsa7EPx2L7rM0YJM8r7ck7U73AXi7qOV44IHHRAYZHY6iU1rr3C5N4NtTmMRUJP6kwCWeA== dependencies: - "@babel/template" "^7.23.9" - "@babel/traverse" "^7.23.9" - "@babel/types" "^7.23.9" + "@babel/template" "^7.24.0" + "@babel/traverse" "^7.24.0" + "@babel/types" "^7.24.0" "@babel/highlight@^7.22.13", "@babel/highlight@^7.23.4": version "7.23.4" @@ -418,7 +423,7 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.16.tgz#180aead7f247305cce6551bea2720934e2fa2c95" integrity sha512-+gPfKv8UWeKKeJTUxe59+OobVcrYHETCsORl61EmSkmgymguYk/X5bp7GuUIXaFsc6y++v8ZxPsLSSuujqDphA== -"@babel/parser@^7.22.15", "@babel/parser@^7.23.9": +"@babel/parser@^7.22.15": version "7.23.9" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.9.tgz#7b903b6149b0f8fa7ad564af646c4c38a77fc44b" integrity sha512-9tcKgqKbs3xGJ+NtKF2ndOBBLVwPjl1SHxPQkd36r3Dlirw3xWUeGaTbqr7uGZcTaxkVNwc+03SVP7aCdWrTlA== @@ -428,6 +433,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.3.tgz#0ce0be31a4ca4f1884b5786057cadcb6c3be58f9" integrity sha512-uVsWNvlVsIninV2prNz/3lHCb+5CJ+e+IUBfbjToAHODtfGYLfCFuY4AU7TskI+dAKk+njsPiBjq1gKTvZOBaw== +"@babel/parser@^7.24.0": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.0.tgz#26a3d1ff49031c53a97d03b604375f028746a9ac" + integrity sha512-QuP/FxEAzMSjXygs8v4N9dvdXzEHN4W1oF3PxuWAtPo08UdM17u89RDMgjLn/mlc56iM0HlLmVkO/wgR+rDgHg== + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.23.3": version "7.23.3" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.23.3.tgz#5cd1c87ba9380d0afb78469292c954fee5d2411a" @@ -884,14 +894,14 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-numeric-separator" "^7.10.4" -"@babel/plugin-transform-object-rest-spread@^7.23.4": - version "7.23.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.23.4.tgz#2b9c2d26bf62710460bdc0d1730d4f1048361b83" - integrity sha512-9x9K1YyeQVw0iOXJlIzwm8ltobIIv7j2iLyP2jIhEbqPRQ7ScNgwQufU2I0Gq11VjyG4gI4yMXt2VFags+1N3g== +"@babel/plugin-transform-object-rest-spread@^7.24.0": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.24.0.tgz#7b836ad0088fdded2420ce96d4e1d3ed78b71df1" + integrity sha512-y/yKMm7buHpFFXfxVFS4Vk1ToRJDilIa6fKRioB9Vjichv58TDGXTvqV0dN7plobAmTW5eSEGXDngE+Mm+uO+w== dependencies: - "@babel/compat-data" "^7.23.3" - "@babel/helper-compilation-targets" "^7.22.15" - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/compat-data" "^7.23.5" + "@babel/helper-compilation-targets" "^7.23.6" + "@babel/helper-plugin-utils" "^7.24.0" "@babel/plugin-syntax-object-rest-spread" "^7.8.3" "@babel/plugin-transform-parameters" "^7.23.3" @@ -975,12 +985,12 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-transform-runtime@^7.12.10": - version "7.23.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.23.9.tgz#2c64d0680fc8e09e1dfe8fd5c646fe72abd82004" - integrity sha512-A7clW3a0aSjm3ONU9o2HAILSegJCYlEZmOhmBRReVtIpY/Z/p7yIZ+wR41Z+UipwdGuqwtID/V/dOdZXjwi9gQ== + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.24.0.tgz#e308fe27d08b74027d42547081eefaf4f2ffbcc9" + integrity sha512-zc0GA5IitLKJrSfXlXmp8KDqLrnGECK7YRfQBmEKg1NmBOQ7e+KuclBEKJgzifQeUYLdNiAw4B4bjyvzWVLiSA== dependencies: "@babel/helper-module-imports" "^7.22.15" - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-plugin-utils" "^7.24.0" babel-plugin-polyfill-corejs2 "^0.4.8" babel-plugin-polyfill-corejs3 "^0.9.0" babel-plugin-polyfill-regenerator "^0.5.5" @@ -1064,13 +1074,13 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/preset-env@^7.12.11": - version "7.23.9" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.23.9.tgz#beace3b7994560ed6bf78e4ae2073dff45387669" - integrity sha512-3kBGTNBBk9DQiPoXYS0g0BYlwTQYUTifqgKTjxUwEUkduRT2QOa0FPGBJ+NROQhGyYO5BuTJwGvBnqKDykac6A== + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.24.0.tgz#11536a7f4b977294f0bdfad780f01a8ac8e183fc" + integrity sha512-ZxPEzV9IgvGn73iK0E6VB9/95Nd7aMFpbE0l8KQFDG70cOV9IxRP7Y2FUPmlK0v6ImlLqYX50iuZ3ZTVhOF2lA== dependencies: "@babel/compat-data" "^7.23.5" "@babel/helper-compilation-targets" "^7.23.6" - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-plugin-utils" "^7.24.0" "@babel/helper-validator-option" "^7.23.5" "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.23.3" "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.23.3" @@ -1123,7 +1133,7 @@ "@babel/plugin-transform-new-target" "^7.23.3" "@babel/plugin-transform-nullish-coalescing-operator" "^7.23.4" "@babel/plugin-transform-numeric-separator" "^7.23.4" - "@babel/plugin-transform-object-rest-spread" "^7.23.4" + "@babel/plugin-transform-object-rest-spread" "^7.24.0" "@babel/plugin-transform-object-super" "^7.23.3" "@babel/plugin-transform-optional-catch-binding" "^7.23.4" "@babel/plugin-transform-optional-chaining" "^7.23.4" @@ -1186,20 +1196,20 @@ integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== "@babel/runtime@^7.0.0", "@babel/runtime@^7.12.5", "@babel/runtime@^7.8.4": - version "7.23.9" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.9.tgz#47791a15e4603bb5f905bc0753801cf21d6345f7" - integrity sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw== + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.0.tgz#584c450063ffda59697021430cb47101b085951e" + integrity sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw== dependencies: regenerator-runtime "^0.14.0" -"@babel/template@^7.22.15", "@babel/template@^7.23.9": - version "7.23.9" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.23.9.tgz#f881d0487cba2828d3259dcb9ef5005a9731011a" - integrity sha512-+xrD2BWLpvHKNmX2QbpdpsBaWnRxahMwJjO+KZk2JOElj5nSmKezyS1B4u+QbHMTX69t4ukm6hh9lsYQ7GHCKA== +"@babel/template@^7.22.15", "@babel/template@^7.24.0": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.24.0.tgz#c6a524aa93a4a05d66aaf31654258fae69d87d50" + integrity sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA== dependencies: "@babel/code-frame" "^7.23.5" - "@babel/parser" "^7.23.9" - "@babel/types" "^7.23.9" + "@babel/parser" "^7.24.0" + "@babel/types" "^7.24.0" "@babel/template@^7.3.3": version "7.22.15" @@ -1226,10 +1236,10 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/traverse@^7.23.9": - version "7.23.9" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.9.tgz#2f9d6aead6b564669394c5ce0f9302bb65b9d950" - integrity sha512-I/4UJ9vs90OkBtY6iiiTORVMyIhJ4kAVmsKo9KFc8UOxMeUfi2hvtIBsET5u9GizXE6/GFSuKCTNfgCswuEjRg== +"@babel/traverse@^7.24.0": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.0.tgz#4a408fbf364ff73135c714a2ab46a5eab2831b1e" + integrity sha512-HfuJlI8qq3dEDmNU5ChzzpZRWq+oxCZQyMzIMEqLho+AQnhMnKQUzH6ydo3RBl/YjPCuk68Y6s0Gx0AeyULiWw== dependencies: "@babel/code-frame" "^7.23.5" "@babel/generator" "^7.23.6" @@ -1237,8 +1247,8 @@ "@babel/helper-function-name" "^7.23.0" "@babel/helper-hoist-variables" "^7.22.5" "@babel/helper-split-export-declaration" "^7.22.6" - "@babel/parser" "^7.23.9" - "@babel/types" "^7.23.9" + "@babel/parser" "^7.24.0" + "@babel/types" "^7.24.0" debug "^4.3.1" globals "^11.1.0" @@ -1251,10 +1261,10 @@ "@babel/helper-validator-identifier" "^7.22.15" to-fast-properties "^2.0.0" -"@babel/types@^7.22.15", "@babel/types@^7.22.19", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.23.6", "@babel/types@^7.23.9", "@babel/types@^7.4.4": - version "7.23.9" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.9.tgz#1dd7b59a9a2b5c87f8b41e52770b5ecbf492e002" - integrity sha512-dQjSq/7HaSjRM43FFGnv5keM2HsxpmyV1PfaSVm0nzzjwwTmjOe6J4bC8e3+pTEIgHaHj+1ZlLThRJ2auc/w1Q== +"@babel/types@^7.22.15", "@babel/types@^7.22.19", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.23.6", "@babel/types@^7.24.0", "@babel/types@^7.4.4": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.0.tgz#3b951f435a92e7333eba05b7566fd297960ea1bf" + integrity sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w== dependencies: "@babel/helper-string-parser" "^7.23.4" "@babel/helper-validator-identifier" "^7.22.20" @@ -1610,24 +1620,29 @@ "@types/yargs" "^17.0.8" chalk "^4.0.0" -"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": - version "0.3.3" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098" - integrity sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ== +"@jridgewell/gen-mapping@^0.3.2", "@jridgewell/gen-mapping@^0.3.5": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" + integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== dependencies: - "@jridgewell/set-array" "^1.0.1" + "@jridgewell/set-array" "^1.2.1" "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.9" + "@jridgewell/trace-mapping" "^0.3.24" -"@jridgewell/resolve-uri@^3.0.3", "@jridgewell/resolve-uri@^3.1.0": +"@jridgewell/resolve-uri@^3.0.3": version "3.1.1" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== -"@jridgewell/set-array@^1.0.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" - integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== +"@jridgewell/resolve-uri@^3.1.0": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== + +"@jridgewell/set-array@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" + integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== "@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": version "1.4.15" @@ -1650,10 +1665,10 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" -"@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9": - version "0.3.22" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.22.tgz#72a621e5de59f5f1ef792d0793a82ee20f645e4c" - integrity sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw== +"@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.24": + version "0.3.25" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" + integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== dependencies: "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" @@ -2508,13 +2523,13 @@ browserslist@^4.21.9: node-releases "^2.0.14" update-browserslist-db "^1.0.13" -browserslist@^4.22.2: - version "4.22.3" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.22.3.tgz#299d11b7e947a6b843981392721169e27d60c5a6" - integrity sha512-UAp55yfwNv0klWNapjs/ktHoguxuQNGnOzxYmfnXIS+8AsRDZkSDxg7R1AX3GKzn078SBI5dzwzj/Yx0Or0e3A== +browserslist@^4.22.2, browserslist@^4.22.3: + version "4.23.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.0.tgz#8f3acc2bbe73af7213399430890f86c63a5674ab" + integrity sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ== dependencies: - caniuse-lite "^1.0.30001580" - electron-to-chromium "^1.4.648" + caniuse-lite "^1.0.30001587" + electron-to-chromium "^1.4.668" node-releases "^2.0.14" update-browserslist-db "^1.0.13" @@ -2566,11 +2581,16 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001565, caniuse-lite@^1.0.30001580: +caniuse-lite@^1.0.30001565: version "1.0.30001583" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001583.tgz#abb2970cc370801dc7e27bf290509dc132cfa390" integrity sha512-acWTYaha8xfhA/Du/z4sNZjHUWjkiuoAi2LM+T/aL+kemKQgPT1xBb/YKjlQ0Qo8gvbHsGNplrEJ+9G3gL7i4Q== +caniuse-lite@^1.0.30001587: + version "1.0.30001594" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001594.tgz#bea552414cd52c2d0c985ed9206314a696e685f5" + integrity sha512-VblSX6nYqyJVs8DKFMldE2IVCJjZ225LW00ydtUWwh5hk9IfkTOffO6r8gJNsH0qqqeAF8KrbMYA2VEwTlGW5g== + chalk@5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.2.0.tgz#249623b7d66869c673699fb66d65723e54dfcfb3" @@ -2768,11 +2788,11 @@ convert-source-map@^2.0.0: integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== core-js-compat@^3.31.0, core-js-compat@^3.34.0: - version "3.35.1" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.35.1.tgz#215247d7edb9e830efa4218ff719beb2803555e2" - integrity sha512-sftHa5qUJY3rs9Zht1WEnmkvXputCyDBczPnr7QDgL8n3qrF3CMXY4VPSYtOLLiOUJcah2WNXREd48iOl6mQIw== + version "3.36.0" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.36.0.tgz#087679119bc2fdbdefad0d45d8e5d307d45ba190" + integrity sha512-iV9Pd/PsgjNWBXeq8XRtWVSgz2tKAfhfvBs7qxYty+RlRd+OCksaWmOnc4JKrTc1cToXL1N0s3l/vwlxPtdElw== dependencies: - browserslist "^4.22.2" + browserslist "^4.22.3" core-js@^3.0.0: version "3.32.0" @@ -2947,11 +2967,16 @@ eastasianwidth@^0.2.0: resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== -electron-to-chromium@^1.4.601, electron-to-chromium@^1.4.648: +electron-to-chromium@^1.4.601: version "1.4.655" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.655.tgz#112410db0d7f9c2b4ed8baa3b1b548522a6f89d4" integrity sha512-2yszojF7vIZ68adIOvzV4bku8OZad9w5H9xF3ZAMZjPuOjBarlflUkjN6DggdV+L71WZuKUfKUhov/34+G5QHg== +electron-to-chromium@^1.4.668: + version "1.4.692" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.692.tgz#82139d20585a4b2318a02066af7593a3e6bec993" + integrity sha512-d5rZRka9n2Y3MkWRN74IoAsxR0HK3yaAt7T50e3iT9VZmCCQDT3geXUO5ZRMhDToa1pkCeQXuNo+0g+NfDOVPA== + emittery@^0.13.1: version "0.13.1" resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.13.1.tgz#c04b8c3457490e0847ae51fced3af52d338e3dad" @@ -3063,9 +3088,9 @@ es-to-primitive@^1.2.1: is-symbol "^1.0.2" escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + version "3.1.2" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" + integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== escape-string-regexp@^1.0.5: version "1.0.5" @@ -3793,9 +3818,9 @@ has@^1.0.3: integrity sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ== hasown@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.0.tgz#f4c513d454a57b7c7e1650778de226b11700546c" - integrity sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA== + version "2.0.1" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.1.tgz#26f48f039de2c0f8d3356c223fb8d50253519faa" + integrity sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA== dependencies: function-bind "^1.1.2" From 8be286308c8034332e90f9c78859981f100417bb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 5 Mar 2024 15:16:30 +0000 Subject: [PATCH 27/34] Update dependency @types/node to v18.19.21 (#4095) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 98cacecb74c..eefc048e495 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1948,9 +1948,9 @@ undici-types "~5.26.4" "@types/node@18": - version "18.19.17" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.17.tgz#a581a9fb4b2cfdbc61f008804f4436b2d5c40354" - integrity sha512-SzyGKgwPzuWp2SHhlpXKzCX0pIOfcI4V2eF37nNBJOhwlegQ83omtVQ1XxZpDE06V/d6AQvfQdPfnw0tRC//Ng== + version "18.19.21" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.21.tgz#f4ca1ac8ffb05ee4b89163c2d6fac9a1a59ee149" + integrity sha512-2Q2NeB6BmiTFQi4DHBzncSoq/cJMLDdhPaAoJFnFCyD9a8VPZRf7a1GAwp1Edb7ROaZc5Jz/tnZyL6EsWMRaqw== dependencies: undici-types "~5.26.4" From d8dae65a4deb0ee4d8842a8c9af88cc5762cd9f0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 5 Mar 2024 15:43:37 +0000 Subject: [PATCH 28/34] Update typescript-eslint monorepo to v7.1.0 (#4099) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 114 +++++++++++++++++++++++++++--------------------------- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/yarn.lock b/yarn.lock index eefc048e495..ffa5c431892 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1975,9 +1975,9 @@ integrity sha512-/wdoPq1QqkSj9/QOeKkFquEuPzQbHTWAMPH/PaUMB+JuR31lXhlWXRZ52IpfDYVlDOUBvX09uBrPwxGT1hjNBg== "@types/semver@^7.5.0": - version "7.5.6" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.6.tgz#c65b2bfce1bec346582c07724e3f8c1017a20339" - integrity sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A== + version "7.5.8" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e" + integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ== "@types/stack-utils@^2.0.0": version "2.0.3" @@ -2012,15 +2012,15 @@ "@types/yargs-parser" "*" "@typescript-eslint/eslint-plugin@^7.0.0": - version "7.0.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.0.2.tgz#c13a34057be425167cc4a765158c46fdf2fd981d" - integrity sha512-/XtVZJtbaphtdrWjr+CJclaCVGPtOdBpFEnvtNf/jRV0IiEemRrL0qABex/nEt8isYcnFacm3nPHYQwL+Wb7qg== + version "7.1.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.1.1.tgz#dd71fc5c7ecec745ca26ece506d84d203a205c0e" + integrity sha512-zioDz623d0RHNhvx0eesUmGfIjzrk18nSBC8xewepKXbBvN/7c1qImV7Hg8TI1URTxKax7/zxfxj3Uph8Chcuw== dependencies: "@eslint-community/regexpp" "^4.5.1" - "@typescript-eslint/scope-manager" "7.0.2" - "@typescript-eslint/type-utils" "7.0.2" - "@typescript-eslint/utils" "7.0.2" - "@typescript-eslint/visitor-keys" "7.0.2" + "@typescript-eslint/scope-manager" "7.1.1" + "@typescript-eslint/type-utils" "7.1.1" + "@typescript-eslint/utils" "7.1.1" + "@typescript-eslint/visitor-keys" "7.1.1" debug "^4.3.4" graphemer "^1.4.0" ignore "^5.2.4" @@ -2029,14 +2029,14 @@ ts-api-utils "^1.0.1" "@typescript-eslint/parser@^7.0.0": - version "7.0.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.0.2.tgz#95c31233d343db1ca1df8df7811b5b87ca7b1a68" - integrity sha512-GdwfDglCxSmU+QTS9vhz2Sop46ebNCXpPPvsByK7hu0rFGRHL+AusKQJ7SoN+LbLh6APFpQwHKmDSwN35Z700Q== - dependencies: - "@typescript-eslint/scope-manager" "7.0.2" - "@typescript-eslint/types" "7.0.2" - "@typescript-eslint/typescript-estree" "7.0.2" - "@typescript-eslint/visitor-keys" "7.0.2" + version "7.1.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.1.1.tgz#6a9d0a5c9ccdf5dbd3cb8c949728c64e24e07d1f" + integrity sha512-ZWUFyL0z04R1nAEgr9e79YtV5LbafdOtN7yapNbn1ansMyaegl2D4bL7vHoJ4HPSc4CaLwuCVas8CVuneKzplQ== + dependencies: + "@typescript-eslint/scope-manager" "7.1.1" + "@typescript-eslint/types" "7.1.1" + "@typescript-eslint/typescript-estree" "7.1.1" + "@typescript-eslint/visitor-keys" "7.1.1" debug "^4.3.4" "@typescript-eslint/scope-manager@5.62.0": @@ -2047,21 +2047,21 @@ "@typescript-eslint/types" "5.62.0" "@typescript-eslint/visitor-keys" "5.62.0" -"@typescript-eslint/scope-manager@7.0.2": - version "7.0.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.0.2.tgz#6ec4cc03752758ddd1fdaae6fbd0ed9a2ca4fe63" - integrity sha512-l6sa2jF3h+qgN2qUMjVR3uCNGjWw4ahGfzIYsCtFrQJCjhbrDPdiihYT8FnnqFwsWX+20hK592yX9I2rxKTP4g== +"@typescript-eslint/scope-manager@7.1.1": + version "7.1.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.1.1.tgz#9e301803ff8e21a74f50c6f89a4baccad9a48f93" + integrity sha512-cirZpA8bJMRb4WZ+rO6+mnOJrGFDd38WoXCEI57+CYBqta8Yc8aJym2i7vyqLL1vVYljgw0X27axkUXz32T8TA== dependencies: - "@typescript-eslint/types" "7.0.2" - "@typescript-eslint/visitor-keys" "7.0.2" + "@typescript-eslint/types" "7.1.1" + "@typescript-eslint/visitor-keys" "7.1.1" -"@typescript-eslint/type-utils@7.0.2": - version "7.0.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.0.2.tgz#a7fc0adff0c202562721357e7478207d380a757b" - integrity sha512-IKKDcFsKAYlk8Rs4wiFfEwJTQlHcdn8CLwLaxwd6zb8HNiMcQIFX9sWax2k4Cjj7l7mGS5N1zl7RCHOVwHq2VQ== +"@typescript-eslint/type-utils@7.1.1": + version "7.1.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.1.1.tgz#aee820d5bedd39b83c18585a526cc520ddb7a226" + integrity sha512-5r4RKze6XHEEhlZnJtR3GYeCh1IueUHdbrukV2KSlLXaTjuSfeVF8mZUVPLovidCuZfbVjfhi4c0DNSa/Rdg5g== dependencies: - "@typescript-eslint/typescript-estree" "7.0.2" - "@typescript-eslint/utils" "7.0.2" + "@typescript-eslint/typescript-estree" "7.1.1" + "@typescript-eslint/utils" "7.1.1" debug "^4.3.4" ts-api-utils "^1.0.1" @@ -2070,10 +2070,10 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== -"@typescript-eslint/types@7.0.2": - version "7.0.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.0.2.tgz#b6edd108648028194eb213887d8d43ab5750351c" - integrity sha512-ZzcCQHj4JaXFjdOql6adYV4B/oFOFjPOC9XYwCaZFRvqN8Llfvv4gSxrkQkd2u4Ci62i2c6W6gkDwQJDaRc4nA== +"@typescript-eslint/types@7.1.1": + version "7.1.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.1.1.tgz#ca33ba7cf58224fb46a84fea62593c2c53cd795f" + integrity sha512-KhewzrlRMrgeKm1U9bh2z5aoL4s7K3tK5DwHDn8MHv0yQfWFz/0ZR6trrIHHa5CsF83j/GgHqzdbzCXJ3crx0Q== "@typescript-eslint/typescript-estree@5.62.0": version "5.62.0" @@ -2088,13 +2088,13 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/typescript-estree@7.0.2": - version "7.0.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.0.2.tgz#3c6dc8a3b9799f4ef7eca0d224ded01974e4cb39" - integrity sha512-3AMc8khTcELFWcKcPc0xiLviEvvfzATpdPj/DXuOGIdQIIFybf4DMT1vKRbuAEOFMwhWt7NFLXRkbjsvKZQyvw== +"@typescript-eslint/typescript-estree@7.1.1": + version "7.1.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.1.1.tgz#09c54af0151a1b05d0875c0fc7fe2ec7a2476ece" + integrity sha512-9ZOncVSfr+sMXVxxca2OJOPagRwT0u/UHikM2Rd6L/aB+kL/QAuTnsv6MeXtjzCJYb8PzrXarypSGIPx3Jemxw== dependencies: - "@typescript-eslint/types" "7.0.2" - "@typescript-eslint/visitor-keys" "7.0.2" + "@typescript-eslint/types" "7.1.1" + "@typescript-eslint/visitor-keys" "7.1.1" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" @@ -2102,17 +2102,17 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/utils@7.0.2": - version "7.0.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.0.2.tgz#8756123054cd934c8ba7db6a6cffbc654b10b5c4" - integrity sha512-PZPIONBIB/X684bhT1XlrkjNZJIEevwkKDsdwfiu1WeqBxYEEdIgVDgm8/bbKHVu+6YOpeRqcfImTdImx/4Bsw== +"@typescript-eslint/utils@7.1.1": + version "7.1.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.1.1.tgz#bdeeb789eee4af5d3fb5400a69566d4dbf97ff3b" + integrity sha512-thOXM89xA03xAE0lW7alstvnyoBUbBX38YtY+zAUcpRPcq9EIhXPuJ0YTv948MbzmKh6e1AUszn5cBFK49Umqg== dependencies: "@eslint-community/eslint-utils" "^4.4.0" "@types/json-schema" "^7.0.12" "@types/semver" "^7.5.0" - "@typescript-eslint/scope-manager" "7.0.2" - "@typescript-eslint/types" "7.0.2" - "@typescript-eslint/typescript-estree" "7.0.2" + "@typescript-eslint/scope-manager" "7.1.1" + "@typescript-eslint/types" "7.1.1" + "@typescript-eslint/typescript-estree" "7.1.1" semver "^7.5.4" "@typescript-eslint/utils@^5.10.0": @@ -2137,12 +2137,12 @@ "@typescript-eslint/types" "5.62.0" eslint-visitor-keys "^3.3.0" -"@typescript-eslint/visitor-keys@7.0.2": - version "7.0.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.0.2.tgz#2899b716053ad7094962beb895d11396fc12afc7" - integrity sha512-8Y+YiBmqPighbm5xA2k4wKTxRzx9EkBu7Rlw+WHqMvRJ3RPz/BMBO9b2ru0LUNmXg120PHUXD5+SWFy2R8DqlQ== +"@typescript-eslint/visitor-keys@7.1.1": + version "7.1.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.1.1.tgz#e6538a58c9b157f03bcbb29e3b6a92fe39a6ab0d" + integrity sha512-yTdHDQxY7cSoCcAtiBzVzxleJhkGB9NncSIyMYe2+OGON1ZsP9zOPws/Pqgopa65jvknOjlk/w7ulPlZ78PiLQ== dependencies: - "@typescript-eslint/types" "7.0.2" + "@typescript-eslint/types" "7.1.1" eslint-visitor-keys "^3.4.1" "@ungap/structured-clone@^1.2.0": @@ -5676,14 +5676,14 @@ semver@^6.3.0, semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.3.7, semver@^7.6.0: +semver@^7.3.7, semver@^7.5.4, semver@^7.6.0: version "7.6.0" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d" integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== dependencies: lru-cache "^6.0.0" -semver@^7.5.3, semver@^7.5.4: +semver@^7.5.3: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== @@ -6065,9 +6065,9 @@ tr46@~0.0.3: integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== ts-api-utils@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.0.3.tgz#f12c1c781d04427313dbac808f453f050e54a331" - integrity sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg== + version "1.2.1" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.2.1.tgz#f716c7e027494629485b21c0df6180f4d08f5e8b" + integrity sha512-RIYA36cJn2WiH9Hy77hdF9r7oEwxAtB/TS9/S4Qd90Ap4z5FSiin5zEiTL44OII1Y3IIlEvxwxFUVgrHSZ/UpA== ts-node@^10.9.1: version "10.9.2" From a818dc1e9d6c052ff4a0231810eff824ef16bc95 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 5 Mar 2024 15:56:46 +0000 Subject: [PATCH 29/34] Update shogo82148/actions-upload-release-asset digest to 5bd52f0 (#4093) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/actions/sign-release-tarball/action.yml | 2 +- .github/actions/upload-release-assets/action.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/sign-release-tarball/action.yml b/.github/actions/sign-release-tarball/action.yml index cd663cd873c..179ce203ffb 100644 --- a/.github/actions/sign-release-tarball/action.yml +++ b/.github/actions/sign-release-tarball/action.yml @@ -22,7 +22,7 @@ runs: - name: Upload tarball signature if: ${{ inputs.upload-url }} - uses: shogo82148/actions-upload-release-asset@dccd6d23e64fd6a746dce6814c0bde0a04886085 # v1 + uses: shogo82148/actions-upload-release-asset@5bd52f05dd8076794da5975d4c0a4f3bce7dd8f5 # v1 with: upload_url: ${{ inputs.upload-url }} asset_path: ${{ env.VERSION }}.tar.gz.asc diff --git a/.github/actions/upload-release-assets/action.yml b/.github/actions/upload-release-assets/action.yml index 25eb7f03940..28f3b6d1b32 100644 --- a/.github/actions/upload-release-assets/action.yml +++ b/.github/actions/upload-release-assets/action.yml @@ -29,13 +29,13 @@ runs: - name: Upload asset signatures if: inputs.gpg-fingerprint - uses: shogo82148/actions-upload-release-asset@dccd6d23e64fd6a746dce6814c0bde0a04886085 # v1 + uses: shogo82148/actions-upload-release-asset@5bd52f05dd8076794da5975d4c0a4f3bce7dd8f5 # v1 with: upload_url: ${{ inputs.upload-url }} asset_path: ${{ inputs.asset-path }}.asc - name: Upload assets - uses: shogo82148/actions-upload-release-asset@dccd6d23e64fd6a746dce6814c0bde0a04886085 # v1 + uses: shogo82148/actions-upload-release-asset@5bd52f05dd8076794da5975d4c0a4f3bce7dd8f5 # v1 with: upload_url: ${{ inputs.upload-url }} asset_path: ${{ inputs.asset-path }} From 50b042d1ff04dcdd3d7cb7e255d17b23c1ecf04a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 5 Mar 2024 16:14:15 +0000 Subject: [PATCH 30/34] Update tspascoal/get-user-teams-membership digest to 57e9f42 (#4094) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/pull_request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index edc0b7b25b4..0711326c902 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -47,7 +47,7 @@ jobs: steps: - name: Check membership if: github.event.pull_request.user.login != 'renovate[bot]' - uses: tspascoal/get-user-teams-membership@ba78054988f58bea69b7c6136d563236f8ed2fc0 # v3 + uses: tspascoal/get-user-teams-membership@57e9f42acd78f4d0f496b3be4368fc5f62696662 # v3 id: teams with: username: ${{ github.event.pull_request.user.login }} From 8c0736a719676446080aa52eb330e0cec39a5865 Mon Sep 17 00:00:00 2001 From: Timo <16718859+toger5@users.noreply.github.com> Date: Tue, 5 Mar 2024 17:59:07 +0100 Subject: [PATCH 31/34] Make sending ContentLoaded optional for a widgetClient (#4086) * add sendContentLoaded option to widgetClient Signed-off-by: Timo K * review Signed-off-by: Timo K * add tests Signed-off-by: Timo K * another try to get the coverage up Signed-off-by: Timo K * self review Signed-off-by: Timo K --------- Signed-off-by: Timo K --- spec/unit/embedded.spec.ts | 20 +++++++++++++++++--- src/embedded.ts | 13 ++++++++++++- src/matrix.ts | 17 ++++++++++++++++- 3 files changed, 45 insertions(+), 5 deletions(-) diff --git a/spec/unit/embedded.spec.ts b/spec/unit/embedded.spec.ts index 115e0a419ca..e1e6f0513a1 100644 --- a/spec/unit/embedded.spec.ts +++ b/spec/unit/embedded.spec.ts @@ -87,9 +87,12 @@ describe("RoomWidgetClient", () => { client.stopClient(); }); - const makeClient = async (capabilities: ICapabilities): Promise => { + const makeClient = async ( + capabilities: ICapabilities, + sendContentLoaded: boolean | undefined = undefined, + ): Promise => { const baseUrl = "https://example.org"; - client = createRoomWidgetClient(widgetApi, capabilities, "!1:example.org", { baseUrl }); + client = createRoomWidgetClient(widgetApi, capabilities, "!1:example.org", { baseUrl }, sendContentLoaded); expect(widgetApi.start).toHaveBeenCalled(); // needs to have been called early in order to not miss messages widgetApi.emit("ready"); await client.startClient(); @@ -143,7 +146,7 @@ describe("RoomWidgetClient", () => { }); }); - describe("messages", () => { + describe("initialization", () => { it("requests permissions for specific message types", async () => { await makeClient({ sendMessage: [MsgType.Text], receiveMessage: [MsgType.Text] }); expect(widgetApi.requestCapabilityForRoomTimeline).toHaveBeenCalledWith("!1:example.org"); @@ -158,6 +161,15 @@ describe("RoomWidgetClient", () => { expect(widgetApi.requestCapabilityToReceiveMessage).toHaveBeenCalledWith(); }); + it("sends content loaded when configured", async () => { + await makeClient({}); + expect(widgetApi.sendContentLoaded).toHaveBeenCalled(); + }); + + it("does not sent content loaded when configured", async () => { + await makeClient({}, false); + expect(widgetApi.sendContentLoaded).not.toHaveBeenCalled(); + }); // No point in testing sending and receiving since it's done exactly the // same way as non-message events }); @@ -305,12 +317,14 @@ describe("RoomWidgetClient", () => { expect(await emittedSync).toEqual(SyncState.Syncing); }); }); + describe("oidc token", () => { it("requests an oidc token", async () => { await makeClient({}); expect(await client.getOpenIdToken()).toStrictEqual(testOIDCToken); }); }); + it("gets TURN servers", async () => { const server1: ITurnServer = { uris: [ diff --git a/src/embedded.ts b/src/embedded.ts index 178d74b2ec7..8730c22ee3f 100644 --- a/src/embedded.ts +++ b/src/embedded.ts @@ -108,11 +108,22 @@ export class RoomWidgetClient extends MatrixClient { private lifecycle?: AbortController; private syncState: SyncState | null = null; + /** + * + * @param widgetApi - The widget api to use for communication. + * @param capabilities - The capabilities the widget client will request. + * @param roomId - The room id the widget is associated with. + * @param opts - The configuration options for this client. + * @param sendContentLoaded - Whether to send a content loaded widget action immediately after initial setup. + * Set to `false` if the widget uses `waitForIFrameLoad=true` (in this case the client does not expect a content loaded action at all), + * or if the the widget wants to send the `ContentLoaded` action at a later point in time after the initial setup. + */ public constructor( private readonly widgetApi: WidgetApi, private readonly capabilities: ICapabilities, private readonly roomId: string, opts: IMatrixClientCreateOpts, + sendContentLoaded: boolean, ) { super(opts); @@ -165,7 +176,7 @@ export class RoomWidgetClient extends MatrixClient { // does *not* (yes, that is the right way around) wait for this event. Let's // start sending this, then once this has rolled out, we can change element-web to // use waitForIFrameLoad=false and have a widget API that's less racy. - widgetApi.sendContentLoaded(); + if (sendContentLoaded) widgetApi.sendContentLoaded(); } public async startClient(opts: IStartClientOpts = {}): Promise { diff --git a/src/matrix.ts b/src/matrix.ts index 9dd83affade..4e12c9feba4 100644 --- a/src/matrix.ts +++ b/src/matrix.ts @@ -164,11 +164,26 @@ export function createClient(opts: ICreateClientOpts): MatrixClient { return new MatrixClient(amendClientOpts(opts)); } +/** + * Construct a Matrix Client that works in a widget. + * This client has a subset of features compared to a full client. + * It uses the widget-api to communicate with matrix. (widget \<-\> client \<-\> homeserver) + * @returns A new matrix client with a subset of features. + * @param opts - The configuration options for this client. These configuration + * options will be passed directly to {@link MatrixClient}. + * @param widgetApi - The widget api to use for communication. + * @param capabilities - The capabilities the widget client will request. + * @param roomId - The room id the widget is associated with. + * @param sendContentLoaded - Whether to send a content loaded widget action immediately after initial setup. + * Set to `false` if the widget uses `waitForIFrameLoad=true` (in this case the client does not expect a content loaded action at all), + * or if the the widget wants to send the `ContentLoaded` action at a later point in time after the initial setup. + */ export function createRoomWidgetClient( widgetApi: WidgetApi, capabilities: ICapabilities, roomId: string, opts: ICreateClientOpts, + sendContentLoaded = true, ): MatrixClient { - return new RoomWidgetClient(widgetApi, capabilities, roomId, amendClientOpts(opts)); + return new RoomWidgetClient(widgetApi, capabilities, roomId, amendClientOpts(opts), sendContentLoaded); } From d55c6a36df539f6adacc335efe5b9be27c9cee4a Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Tue, 5 Mar 2024 17:10:33 +0000 Subject: [PATCH 32/34] PR template: reminder to document your stuff (#4081) * PR template: reminder to document your stuff * link to tsdoc, not typedoc * add full stops --- .github/PULL_REQUEST_TEMPLATE.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index a291d1b9ffc..58c696ab118 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -2,6 +2,7 @@ ## Checklist -- [ ] Tests written for new code (and old code if feasible) -- [ ] Linter and other CI checks pass -- [ ] Sign-off given on the changes (see [CONTRIBUTING.md](https://github.com/matrix-org/matrix-js-sdk/blob/develop/CONTRIBUTING.md)) +- [ ] Tests written for new code (and old code if feasible). +- [ ] New or updated `public`/`exported` symbols have accurate [TSDoc](https://tsdoc.org/) documentation. +- [ ] Linter and other CI checks pass. +- [ ] Sign-off given on the changes (see [CONTRIBUTING.md](https://github.com/matrix-org/matrix-js-sdk/blob/develop/CONTRIBUTING.md)). From 2541ca04c2ca94fa05c7b460ab0625d726948880 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 5 Mar 2024 17:54:30 +0000 Subject: [PATCH 33/34] Update all non-major dependencies (#4096) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com> --- .github/workflows/downstream-artifacts.yml | 2 +- package.json | 6 +- yarn.lock | 68 +++++++++++----------- 3 files changed, 38 insertions(+), 38 deletions(-) diff --git a/.github/workflows/downstream-artifacts.yml b/.github/workflows/downstream-artifacts.yml index 09107645f23..c6e7a66c415 100644 --- a/.github/workflows/downstream-artifacts.yml +++ b/.github/workflows/downstream-artifacts.yml @@ -16,7 +16,7 @@ concurrency: jobs: build-element-web: name: Build element-web - uses: matrix-org/matrix-react-sdk/.github/workflows/element-web.yaml@v3.92.0 + uses: matrix-org/matrix-react-sdk/.github/workflows/element-web.yaml@v3.93.0 with: matrix-js-sdk-sha: ${{ github.sha }} react-sdk-repository: matrix-org/matrix-react-sdk diff --git a/package.json b/package.json index 1d560ce239b..1911d97d170 100644 --- a/package.json +++ b/package.json @@ -67,8 +67,8 @@ "uuid": "9" }, "devDependencies": { - "@action-validator/cli": "^0.5.3", - "@action-validator/core": "^0.5.3", + "@action-validator/cli": "^0.6.0", + "@action-validator/core": "^0.6.0", "@babel/cli": "^7.12.10", "@babel/core": "^7.12.10", "@babel/eslint-parser": "^7.12.10", @@ -97,7 +97,7 @@ "babel-jest": "^29.0.0", "debug": "^4.3.4", "domexception": "^4.0.0", - "eslint": "8.56.0", + "eslint": "8.57.0", "eslint-config-google": "^0.14.0", "eslint-config-prettier": "^9.0.0", "eslint-import-resolver-typescript": "^3.5.1", diff --git a/yarn.lock b/yarn.lock index ffa5c431892..6e8a2da277d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7,17 +7,17 @@ resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== -"@action-validator/cli@^0.5.3": - version "0.5.4" - resolved "https://registry.yarnpkg.com/@action-validator/cli/-/cli-0.5.4.tgz#44b41881f717753e4fec247aaf73a99c88481e32" - integrity sha512-Puj/f8E8OzPCmDDkVslU+hvTwxM+VL9GOqmuEpdwp4E2Ufsni0lJMNvkHMBc3Da13WwGG49ydOvGVTpMT5H+7A== +"@action-validator/cli@^0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@action-validator/cli/-/cli-0.6.0.tgz#02a29e322d3794903896183281eed2b55c685851" + integrity sha512-Z8TYOK4GqUIpI0UuspUJPB6dhr0niTumhwI5iiZVqFRXm4u05bZawnFKltpvoFUfJg9mHbbIBlleqsRJAgl53Q== dependencies: chalk "5.2.0" -"@action-validator/core@^0.5.3": - version "0.5.4" - resolved "https://registry.yarnpkg.com/@action-validator/core/-/core-0.5.4.tgz#160a6d9ac8919a1eed0a0b0a7780b82ef03686fe" - integrity sha512-uODXaU5sJw9CilmjVG9IUpc1ENivixQI7+DtebWgG80PMQBfZ/4b5PKXJ5ESJVlvafrHcuIjN0qou99zN2bDtw== +"@action-validator/core@^0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@action-validator/core/-/core-0.6.0.tgz#8fbaf45562a5377140815b79cc1ac9f610ff63e5" + integrity sha512-tPglwCr8Mm8SWzwnVewwFmqRx91F0WvMsM0BRAqH4CLalyGndm53Xvp+UcUSzswpk1wkjIDYI7RyEhWMLyPkig== "@ampproject/remapping@^2.2.0": version "2.3.0" @@ -1350,18 +1350,18 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.56.0": - version "8.56.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.56.0.tgz#ef20350fec605a7f7035a01764731b2de0f3782b" - integrity sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A== +"@eslint/js@8.57.0": + version "8.57.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f" + integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g== -"@humanwhocodes/config-array@^0.11.13": - version "0.11.13" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.13.tgz#075dc9684f40a531d9b26b0822153c1e832ee297" - integrity sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ== +"@humanwhocodes/config-array@^0.11.14": + version "0.11.14" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b" + integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg== dependencies: - "@humanwhocodes/object-schema" "^2.0.1" - debug "^4.1.1" + "@humanwhocodes/object-schema" "^2.0.2" + debug "^4.3.1" minimatch "^3.0.5" "@humanwhocodes/module-importer@^1.0.1": @@ -1369,10 +1369,10 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== -"@humanwhocodes/object-schema@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz#e5211452df060fa8522b55c7b3c0c4d1981cb044" - integrity sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw== +"@humanwhocodes/object-schema@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz#d9fae00a2d5cb40f92cfe64b47ad749fbc38f917" + integrity sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw== "@isaacs/cliui@^8.0.2": version "8.0.2" @@ -3188,9 +3188,9 @@ eslint-plugin-jest@^27.1.6: "@typescript-eslint/utils" "^5.10.0" eslint-plugin-jsdoc@^48.0.0: - version "48.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.1.0.tgz#565363770b433485bfc70dc862b50b7f780529ec" - integrity sha512-g9S8ukmTd1DVcV/xeBYPPXOZ6rc8WJ4yi0+MVxJ1jBOrz5kmxV9gJJQ64ltCqIWFnBChLIhLVx3tbTSarqVyFA== + version "48.2.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.2.0.tgz#a726fbd6fa286fad8fc14f0a6aca48488d188d95" + integrity sha512-O2B1XLBJnUCRkggFzUQ+PBYJDit8iAgXdlu8ucolqGrbmOWPvttZQZX8d1sC0MbqDMSLs8SHSQxaNPRY1RQREg== dependencies: "@es-joy/jsdoccomment" "~0.42.0" are-docs-informative "^0.0.2" @@ -3268,16 +3268,16 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4 resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint@8.56.0: - version "8.56.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.56.0.tgz#4957ce8da409dc0809f99ab07a1b94832ab74b15" - integrity sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ== +eslint@8.57.0: + version "8.57.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.0.tgz#c786a6fd0e0b68941aaf624596fb987089195668" + integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.6.1" "@eslint/eslintrc" "^2.1.4" - "@eslint/js" "8.56.0" - "@humanwhocodes/config-array" "^0.11.13" + "@eslint/js" "8.57.0" + "@humanwhocodes/config-array" "^0.11.14" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" "@ungap/structured-clone" "^1.2.0" @@ -3869,9 +3869,9 @@ human-signals@^5.0.0: integrity sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ== husky@^9.0.0: - version "9.0.10" - resolved "https://registry.yarnpkg.com/husky/-/husky-9.0.10.tgz#ddca8908deb5f244e9286865ebc80b54387672c2" - integrity sha512-TQGNknoiy6bURzIO77pPRu+XHi6zI7T93rX+QnJsoYFf3xdjKOur+IlfqzJGMHIK/wXrLg+GsvMs8Op7vI2jVA== + version "9.0.11" + resolved "https://registry.yarnpkg.com/husky/-/husky-9.0.11.tgz#fc91df4c756050de41b3e478b2158b87c1e79af9" + integrity sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw== iconv-lite@0.6.3: version "0.6.3" From 7fee37680f33582c1c1e5cafdf8bf50d044e05b2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 6 Mar 2024 08:49:16 +0000 Subject: [PATCH 34/34] Update typedoc (#4098) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com> --- .eslintignore | 1 + .eslintrc.js | 3 - .github/workflows/release.yml | 41 +++---- .github/workflows/static_analysis.yml | 7 -- README.md | 2 +- package.json | 6 +- src/@types/requests.ts | 12 +- src/client.ts | 21 ++-- src/crypto/OlmDevice.ts | 13 ++- src/crypto/index.ts | 25 ----- .../request/VerificationRequest.ts | 5 +- src/http-api/fetch.ts | 4 +- src/matrixrtc/MatrixRTCSession.ts | 2 +- src/models/event-timeline-set.ts | 6 +- src/models/invites-ignorer.ts | 5 +- src/models/room-receipts.ts | 2 +- src/models/room-state.ts | 12 +- src/oidc/tokenRefresher.ts | 6 +- src/sliding-sync-sdk.ts | 2 +- src/webrtc/call.ts | 4 +- src/webrtc/mediaHandler.ts | 5 +- tsconfig.json | 7 +- typedoc.json | 13 +-- yarn.lock | 104 ++++-------------- 24 files changed, 105 insertions(+), 203 deletions(-) create mode 100644 .eslintignore diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000000..a40510e62c7 --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +_docs diff --git a/.eslintrc.js b/.eslintrc.js index e0150cca7d1..b751ebc8c42 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -103,11 +103,8 @@ module.exports = { }, }, { - // We don't need amazing docs in our spec files files: ["src/**/*.ts"], rules: { - "tsdoc/syntax": "error", - // We use some select jsdoc rules as the tsdoc linter has only one rule "jsdoc/no-types": "error", "jsdoc/empty-tags": "error", "jsdoc/check-property-names": "error", diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 451ea064248..dc155b6cedf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,12 +39,6 @@ jobs: - name: 🧮 Checkout code uses: actions/checkout@v4 - - name: 🧮 Checkout gh-pages - uses: actions/checkout@v4 - with: - ref: gh-pages - path: _docs - - name: 🔧 Yarn cache uses: actions/setup-node@v4 with: @@ -53,26 +47,21 @@ jobs: - name: 🔨 Install dependencies run: "yarn install --frozen-lockfile" - - name: 🔨 Install symlinks - run: | - sudo apt-get update - sudo apt-get install -y symlinks - - name: 📖 Generate docs - run: | - yarn tpv purge --yes --out _docs --stale --major 10 - yarn gendoc - symlinks -rc _docs - find _docs -xtype l -delete + run: yarn gendoc - - name: 🔨 Set up git - run: | - git config --global user.email "releases@riot.im" - git config --global user.name "RiotRobot" + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: _docs - - name: 🚀 Deploy - run: | - git add . --all - git commit -m "Update docs" - git push - working-directory: _docs + docs-deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: docs + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/static_analysis.yml b/.github/workflows/static_analysis.yml index 4e1070d1c96..8be2b77a6fc 100644 --- a/.github/workflows/static_analysis.yml +++ b/.github/workflows/static_analysis.yml @@ -83,13 +83,6 @@ jobs: - name: Generate Docs run: "yarn run gendoc --treatWarningsAsErrors" - # Upload artifact duplicates symlink contents so we do this to save 75% space - - name: Flatten symlink and write _redirects - run: | - find _docs -mindepth 1 -maxdepth 1 ! -type f ! -name stable -printf '/%f/* /stable/:splat\n' > _docs/_redirects - find _docs -mindepth 1 -maxdepth 1 -type l -delete - find _docs -mindepth 1 -maxdepth 1 -type d -execdir mv {} stable \; -quit - - name: Upload Artifact uses: actions/upload-artifact@v4 with: diff --git a/README.md b/README.md index f194a72715e..74a2f7be0bf 100644 --- a/README.md +++ b/README.md @@ -294,7 +294,7 @@ host the API reference from the source files like this: ``` $ yarn gendoc - $ cd _docs + $ cd docs $ python -m http.server 8005 ``` diff --git a/package.json b/package.json index 1911d97d170..49a1cb9adf7 100644 --- a/package.json +++ b/package.json @@ -121,13 +121,11 @@ "prettier": "3.2.5", "rimraf": "^5.0.0", "ts-node": "^10.9.1", - "typedoc": "^0.24.0", + "typedoc": "^0.25.10", "typedoc-plugin-coverage": "^3.0.0", "typedoc-plugin-mdn-links": "^3.0.3", "typedoc-plugin-missing-exports": "^2.0.0", - "typedoc-plugin-versions": "^0.2.3", - "typedoc-plugin-versions-cli": "^0.1.12", - "typescript": "^5.0.0" + "typescript": "^5.3.3" }, "@casualbot/jest-sonar-reporter": { "outputDirectory": "coverage", diff --git a/src/@types/requests.ts b/src/@types/requests.ts index e67fb873b76..d6b7ff75fa2 100644 --- a/src/@types/requests.ts +++ b/src/@types/requests.ts @@ -162,11 +162,21 @@ export interface ICreateRoomOpts { } export interface IRoomDirectoryOptions { + /** + * The remote server to query for the room list. + * Optional. If unspecified, get the local homeserver's public room list. + */ server?: string; + /** + * Maximum number of entries to return + */ limit?: number; + /** + * Token to paginate from + */ since?: string; - // Filter parameters + /** Filter parameters */ filter?: { // String to search for generic_search_term?: string; diff --git a/src/client.ts b/src/client.ts index 3b489ad52db..1580634e06a 100644 --- a/src/client.ts +++ b/src/client.ts @@ -3286,7 +3286,7 @@ export class MatrixClient extends TypedEventEmitter { @@ -8480,12 +8479,7 @@ export class MatrixClient extends TypedEventEmitter { @@ -9008,8 +9002,9 @@ export class MatrixClient extends TypedEventEmitter { let e2eKeys; diff --git a/src/crypto/index.ts b/src/crypto/index.ts index 0f6018b8e15..0d8f057eabc 100644 --- a/src/crypto/index.ts +++ b/src/crypto/index.ts @@ -473,8 +473,6 @@ export class Crypto extends TypedEventEmitter { diff --git a/src/http-api/fetch.ts b/src/http-api/fetch.ts index fbe842f1e9a..274f39f0d41 100644 --- a/src/http-api/fetch.ts +++ b/src/http-api/fetch.ts @@ -111,8 +111,8 @@ export class FetchHttpApi { * * @param body - The HTTP JSON body. * - * @param opts - additional options. - * When `opts.doNotAttemptTokenRefresh` is true, token refresh will not be attempted + * @param paramOpts - additional options. + * When `paramOpts.doNotAttemptTokenRefresh` is true, token refresh will not be attempted * when an expired token is encountered. Used to only attempt token refresh once. * * @returns Promise which resolves to diff --git a/src/matrixrtc/MatrixRTCSession.ts b/src/matrixrtc/MatrixRTCSession.ts index 03871bb90e8..1695ea6d703 100644 --- a/src/matrixrtc/MatrixRTCSession.ts +++ b/src/matrixrtc/MatrixRTCSession.ts @@ -610,7 +610,7 @@ export class MatrixRTCSession extends TypedEventEmitter { const eventId = event.getId(); diff --git a/src/models/room-state.ts b/src/models/room-state.ts index 52d520be177..e08f4859ffb 100644 --- a/src/models/room-state.ts +++ b/src/models/room-state.ts @@ -297,13 +297,15 @@ export class RoomState extends TypedEventEmitter /** * Get state events from the state of the room. * @param eventType - The event type of the state event. - * @param stateKey - Optional. The state_key of the state event. If - * this is `undefined` then all matching state events will be - * returned. - * @returns A list of events if state_key was - * `undefined`, else a single event (or null if no match found). + * @returns A list of events */ public getStateEvents(eventType: EventType | string): MatrixEvent[]; + /** + * Get state events from the state of the room. + * @param eventType - The event type of the state event. + * @param stateKey - The state_key of the state event. + * @returns A single event (or null if no match found). + */ public getStateEvents(eventType: EventType | string, stateKey: string): MatrixEvent | null; public getStateEvents(eventType: EventType | string, stateKey?: string): MatrixEvent[] | MatrixEvent | null { if (!this.events.has(eventType)) { diff --git a/src/oidc/tokenRefresher.ts b/src/oidc/tokenRefresher.ts index 79ef9442276..84b773531b9 100644 --- a/src/oidc/tokenRefresher.ts +++ b/src/oidc/tokenRefresher.ts @@ -113,10 +113,10 @@ export class OidcTokenRefresher { * * This function is intended to be overriden by the consumer when persistence is necessary. * - * @param accessToken - new access token - * @param refreshToken - OPTIONAL new refresh token + * @param tokens.accessToken - new access token + * @param tokens.refreshToken - OPTIONAL new refresh token */ - public async persistTokens(_tokens: { accessToken: string; refreshToken?: string }): Promise { + public async persistTokens(tokens: { accessToken: string; refreshToken?: string }): Promise { // NOOP } diff --git a/src/sliding-sync-sdk.ts b/src/sliding-sync-sdk.ts index bfe32448bd2..2b3399664ad 100644 --- a/src/sliding-sync-sdk.ts +++ b/src/sliding-sync-sdk.ts @@ -455,7 +455,7 @@ export class SlidingSyncSdk { * @returns A promise which resolves once the room has been added to the * store. */ - public async peek(_roomId: string): Promise { + public async peek(roomId: string): Promise { return null!; // TODO } diff --git a/src/webrtc/call.ts b/src/webrtc/call.ts index 187a9443fe9..92b4862de1c 100644 --- a/src/webrtc/call.ts +++ b/src/webrtc/call.ts @@ -1235,7 +1235,7 @@ export class MatrixCall extends TypedEventEmitter { @@ -1292,7 +1292,7 @@ export class MatrixCall extends TypedEventEmitter