Skip to content

Commit 5d086fe

Browse files
committed
Merge tag 'v26.2.0' into sc
* The Browserify artifact is being deprecated, scheduled for removal in the October 10th release cycle. ([\matrix-org#3189](matrix-org#3189)). * ElementR: Add `CryptoApi#bootstrapSecretStorage` ([\matrix-org#3483](matrix-org#3483)). Contributed by @florianduros. * Deprecate `MatrixClient.findVerificationRequestDMInProgress`, `MatrixClient.getVerificationRequestsToDeviceInProgress`, and `MatrixClient.requestVerification`, in favour of methods in `CryptoApi`. ([\matrix-org#3474](matrix-org#3474)). * Introduce a new `Crypto.VerificationRequest` interface, and deprecate direct access to the old `VerificationRequest` class. Also deprecate some related classes that were exported from `src/crypto/verification/request/VerificationRequest` ([\matrix-org#3449](matrix-org#3449)). * OIDC: navigate to authorization endpoint ([\matrix-org#3499](matrix-org#3499)). Contributed by @kerryarchibald. * Support for interactive device verification in Element-R. ([\matrix-org#3505](matrix-org#3505)). * Support for interactive device verification in Element-R. ([\matrix-org#3508](matrix-org#3508)). * Support for interactive device verification in Element-R. ([\matrix-org#3490](matrix-org#3490)). Fixes element-hq/element-web#25316. * Element-R: Store cross signing keys in secret storage ([\matrix-org#3498](matrix-org#3498)). Contributed by @florianduros. * OIDC: add dynamic client registration util function ([\matrix-org#3481](matrix-org#3481)). Contributed by @kerryarchibald. * Add getLastUnthreadedReceiptFor utility to Thread delegating to the underlying Room ([\matrix-org#3493](matrix-org#3493)). * ElementR: Add `rust-crypto#createRecoveryKeyFromPassphrase` implementation ([\matrix-org#3472](matrix-org#3472)). Contributed by @florianduros. * Aggregate relations regardless of whether event fits into the timeline ([\matrix-org#3496](matrix-org#3496)). Fixes element-hq/element-web#25596. * Fix bug where switching media caused media in subsequent calls to fail ([\matrix-org#3489](matrix-org#3489)). * Fix: remove polls from room state on redaction ([\matrix-org#3475](matrix-org#3475)). Fixes element-hq/element-web#25573. Contributed by @kerryarchibald. * Fix export type `GeneratedSecretStorageKey` ([\matrix-org#3479](matrix-org#3479)). Contributed by @florianduros. * Close IDB database before deleting it to prevent spurious unexpected close errors ([\matrix-org#3478](matrix-org#3478)). Fixes element-hq/element-web#25597.
2 parents 10fe11f + 3f095ca commit 5d086fe

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+3105
-571
lines changed

.eslintrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ module.exports = {
7474
"jest/no-standalone-expect": [
7575
"error",
7676
{
77-
additionalTestBlockFunctions: ["beforeAll", "beforeEach", "oldBackendOnly"],
77+
additionalTestBlockFunctions: ["beforeAll", "beforeEach", "oldBackendOnly", "newBackendOnly"],
7878
},
7979
],
8080
},

.github/workflows/cypress.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ concurrency:
1515
jobs:
1616
cypress:
1717
name: Cypress
18-
uses: matrix-org/matrix-react-sdk/.github/workflows/cypress.yaml@develop
18+
uses: matrix-org/matrix-react-sdk/.github/workflows/cypress.yaml@v3.74.0
1919
permissions:
2020
actions: read
2121
issues: read

.github/workflows/downstream-artifacts.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ concurrency:
1919
jobs:
2020
build-element-web:
2121
name: Build element-web
22-
uses: matrix-org/matrix-react-sdk/.github/workflows/element-web.yaml@develop
22+
uses: matrix-org/matrix-react-sdk/.github/workflows/element-web.yaml@v3.73.1
2323
with:
2424
matrix-js-sdk-sha: ${{ github.sha }}
2525
react-sdk-repository: matrix-org/matrix-react-sdk

.github/workflows/release-npm.yml

+6-8
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,16 @@ jobs:
2424

2525
- name: 🚀 Publish to npm
2626
id: npm-publish
27-
uses: JS-DevTools/npm-publish@0f451a94170d1699fd50710966d48fb26194d939 # v1
27+
uses: JS-DevTools/npm-publish@a25b4180b728b0279fca97d4e5bccf391685aead # v2.2.0
2828
with:
2929
token: ${{ secrets.NPM_TOKEN }}
3030
access: public
3131
tag: next
32+
ignore-scripts: false
3233

3334
- name: 🎖️ Add `latest` dist-tag to final releases
34-
if: github.event.release.prerelease == false
35-
run: |
36-
package=$(cat package.json | jq -er .name)
37-
npm dist-tag add "$package@$release" latest
35+
if: github.event.release.prerelease == false && steps.npm-publish.outputs.id
36+
run: npm dist-tag add "$release" latest
3837
env:
39-
# JS-DevTools/npm-publish overrides `NODE_AUTH_TOKEN` with `INPUT_TOKEN` in .npmrc
40-
INPUT_TOKEN: ${{ secrets.NPM_TOKEN }}
41-
release: ${{ steps.npm-publish.outputs.version }}
38+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
39+
release: ${{ steps.npm-publish.outputs.id }}

CHANGELOG.md

+26
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
Changes in [26.2.0](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v26.2.0) (2023-07-04)
2+
==================================================================================================
3+
4+
## 🦖 Deprecations
5+
* The Browserify artifact is being deprecated, scheduled for removal in the October 10th release cycle. ([\#3189](https://github.com/matrix-org/matrix-js-sdk/issues/3189)).
6+
* ElementR: Add `CryptoApi#bootstrapSecretStorage` ([\#3483](https://github.com/matrix-org/matrix-js-sdk/pull/3483)). Contributed by @florianduros.
7+
* Deprecate `MatrixClient.findVerificationRequestDMInProgress`, `MatrixClient.getVerificationRequestsToDeviceInProgress`, and `MatrixClient.requestVerification`, in favour of methods in `CryptoApi`. ([\#3474](https://github.com/matrix-org/matrix-js-sdk/pull/3474)).
8+
* Introduce a new `Crypto.VerificationRequest` interface, and deprecate direct access to the old `VerificationRequest` class. Also deprecate some related classes that were exported from `src/crypto/verification/request/VerificationRequest` ([\#3449](https://github.com/matrix-org/matrix-js-sdk/pull/3449)).
9+
10+
## ✨ Features
11+
* OIDC: navigate to authorization endpoint ([\#3499](https://github.com/matrix-org/matrix-js-sdk/pull/3499)). Contributed by @kerryarchibald.
12+
* Support for interactive device verification in Element-R. ([\#3505](https://github.com/matrix-org/matrix-js-sdk/pull/3505)).
13+
* Support for interactive device verification in Element-R. ([\#3508](https://github.com/matrix-org/matrix-js-sdk/pull/3508)).
14+
* Support for interactive device verification in Element-R. ([\#3490](https://github.com/matrix-org/matrix-js-sdk/pull/3490)). Fixes vector-im/element-web#25316.
15+
* Element-R: Store cross signing keys in secret storage ([\#3498](https://github.com/matrix-org/matrix-js-sdk/pull/3498)). Contributed by @florianduros.
16+
* OIDC: add dynamic client registration util function ([\#3481](https://github.com/matrix-org/matrix-js-sdk/pull/3481)). Contributed by @kerryarchibald.
17+
* Add getLastUnthreadedReceiptFor utility to Thread delegating to the underlying Room ([\#3493](https://github.com/matrix-org/matrix-js-sdk/pull/3493)).
18+
* ElementR: Add `rust-crypto#createRecoveryKeyFromPassphrase` implementation ([\#3472](https://github.com/matrix-org/matrix-js-sdk/pull/3472)). Contributed by @florianduros.
19+
20+
## 🐛 Bug Fixes
21+
* Aggregate relations regardless of whether event fits into the timeline ([\#3496](https://github.com/matrix-org/matrix-js-sdk/pull/3496)). Fixes vector-im/element-web#25596.
22+
* Fix bug where switching media caused media in subsequent calls to fail ([\#3489](https://github.com/matrix-org/matrix-js-sdk/pull/3489)).
23+
* Fix: remove polls from room state on redaction ([\#3475](https://github.com/matrix-org/matrix-js-sdk/pull/3475)). Fixes vector-im/element-web#25573. Contributed by @kerryarchibald.
24+
* Fix export type `GeneratedSecretStorageKey` ([\#3479](https://github.com/matrix-org/matrix-js-sdk/pull/3479)). Contributed by @florianduros.
25+
* Close IDB database before deleting it to prevent spurious unexpected close errors ([\#3478](https://github.com/matrix-org/matrix-js-sdk/pull/3478)). Fixes vector-im/element-web#25597.
26+
127
Changes in [26.1.0](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v26.1.0) (2023-06-20)
228
==================================================================================================
329

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "matrix-js-sdk",
3-
"version": "26.1.0",
3+
"version": "26.2.0",
44
"description": "Matrix Client-Server SDK for Javascript",
55
"engines": {
66
"node": ">=16.0.0"
@@ -55,7 +55,7 @@
5555
],
5656
"dependencies": {
5757
"@babel/runtime": "^7.12.5",
58-
"@matrix-org/matrix-sdk-crypto-js": "^0.1.0-alpha.10",
58+
"@matrix-org/matrix-sdk-crypto-js": "^0.1.0-alpha.11",
5959
"another-json": "^0.2.0",
6060
"bs58": "^5.0.0",
6161
"content-type": "^1.0.4",
@@ -107,7 +107,7 @@
107107
"eslint-import-resolver-typescript": "^3.5.1",
108108
"eslint-plugin-import": "^2.26.0",
109109
"eslint-plugin-jest": "^27.1.6",
110-
"eslint-plugin-jsdoc": "^45.0.0",
110+
"eslint-plugin-jsdoc": "^46.0.0",
111111
"eslint-plugin-matrix-org": "^1.0.0",
112112
"eslint-plugin-tsdoc": "^0.2.17",
113113
"eslint-plugin-unicorn": "^47.0.0",

spec/integ/crypto/cross-signing.spec.ts

+4-34
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ import "fake-indexeddb/auto";
1919
import { IDBFactory } from "fake-indexeddb";
2020

2121
import { CRYPTO_BACKENDS, InitCrypto } from "../../test-utils/test-utils";
22-
import { createClient, MatrixClient, IAuthDict, UIAuthCallback } from "../../../src";
22+
import { createClient, IAuthDict, MatrixClient } from "../../../src";
23+
import { mockSetupCrossSigningRequests } from "../../test-utils/mockEndpoints";
2324

2425
afterEach(() => {
2526
// reset fake-indexeddb after each test, to make sure we don't leak connections
@@ -62,45 +63,14 @@ describe.each(Object.entries(CRYPTO_BACKENDS))("cross-signing (%s)", (backend: s
6263
});
6364

6465
/**
65-
* Mock the requests needed to set up cross signing
66-
*
67-
* Return `{}` for `GET _matrix/client/r0/user/:userId/account_data/:type` request
68-
* Return `{}` for `POST _matrix/client/v3/keys/signatures/upload` request (named `upload-sigs` for fetchMock check)
69-
* Return `{}` for `POST /_matrix/client/(unstable|v3)/keys/device_signing/upload` request (named `upload-keys` for fetchMock check)
70-
*/
71-
function mockSetupCrossSigningRequests(): void {
72-
// have account_data requests return an empty object
73-
fetchMock.get("express:/_matrix/client/r0/user/:userId/account_data/:type", {});
74-
75-
// we expect a request to upload signatures for our device ...
76-
fetchMock.post({ url: "path:/_matrix/client/v3/keys/signatures/upload", name: "upload-sigs" }, {});
77-
78-
// ... and one to upload the cross-signing keys (with UIA)
79-
fetchMock.post(
80-
// legacy crypto uses /unstable/; /v3/ is correct
81-
{
82-
url: new RegExp("/_matrix/client/(unstable|v3)/keys/device_signing/upload"),
83-
name: "upload-keys",
84-
},
85-
{},
86-
);
87-
}
88-
89-
/**
90-
* Create cross-signing keys, publish the keys
91-
* Mock and bootstrap all the required steps
66+
* Create cross-signing keys and publish the keys
9267
*
9368
* @param authDict - The parameters to as the `auth` dict in the key upload request.
9469
* @see https://spec.matrix.org/v1.6/client-server-api/#authentication-types
9570
*/
9671
async function bootstrapCrossSigning(authDict: IAuthDict): Promise<void> {
97-
const uiaCallback: UIAuthCallback<void> = async (makeRequest) => {
98-
await makeRequest(authDict);
99-
};
100-
101-
// now bootstrap cross signing, and check it resolves successfully
10272
await aliceClient.getCrypto()?.bootstrapCrossSigning({
103-
authUploadDeviceSigningKeys: uiaCallback,
73+
authUploadDeviceSigningKeys: (makeRequest) => makeRequest(authDict).then(() => undefined),
10474
});
10575
}
10676

0 commit comments

Comments
 (0)