diff --git a/.babelrc b/.babelrc index a541d8d01..6f4f54a93 100644 --- a/.babelrc +++ b/.babelrc @@ -1,11 +1,9 @@ { + "sourceMaps": true, "presets": [ ["@babel/preset-env", { "targets": { - "browsers": [ - "last 2 versions" - ], - "node": 12 + "node": 10 }, "modules": "commonjs" }], diff --git a/.buildkite/pipeline.yaml b/.buildkite/pipeline.yaml index db885300a..4b2f319c8 100644 --- a/.buildkite/pipeline.yaml +++ b/.buildkite/pipeline.yaml @@ -1,11 +1,35 @@ steps: - - label: ":eslint: Lint" + - label: ":eslint: JS Lint" command: - "yarn install" - - "yarn lint" + - "yarn lint:js" plugins: - docker#v3.0.1: - image: "node:10" + image: "node:12" + + - label: ":tslint: TS Lint" + command: + - "yarn install" + - "yarn lint:ts" + plugins: + - docker#v3.0.1: + image: "node:12" + + - label: ":typescript: Types Lint" + command: + - "yarn install" + - "yarn lint:types" + plugins: + - docker#v3.0.1: + image: "node:12" + + - label: "🛠 Build" + command: + - "yarn install" + - "yarn build" + plugins: + - docker#v3.0.1: + image: "node:12" - label: ":jest: Tests" command: @@ -13,7 +37,7 @@ steps: - "yarn test" plugins: - docker#v3.0.1: - image: "node:10" + image: "node:12" - label: "📃 Docs" command: @@ -21,7 +45,7 @@ steps: - "yarn gendoc" plugins: - docker#v3.0.1: - image: "node:10" + image: "node:12" - wait diff --git a/CHANGELOG.md b/CHANGELOG.md index 73e8a523c..27d834bb7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,61 @@ +Changes in [3.0.0](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v3.0.0) (2020-01-13) +================================================================================================ +[Full Changelog](https://github.com/matrix-org/matrix-js-sdk/compare/v3.0.0-rc.1...v3.0.0) + + * No changes from rc.1 + +Changes in [3.0.0-rc.1](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v3.0.0-rc.1) (2020-01-06) +========================================================================================================== +[Full Changelog](https://github.com/matrix-org/matrix-js-sdk/compare/v2.4.6...v3.0.0-rc.1) + +BREAKING CHANGES +================ + * matrix-js-sdk no longer uses bluebird promises, so promises returned + by the js-sdk no longer support the done() method. Code that calls + done() on promises returned by the js-sdk will break and will need + to be updated to remove the done() call. + +All Changes +=========== + * Make displayName disambiguation more fuzzy especially against RTL/LTR + content + [\#1141](https://github.com/matrix-org/matrix-js-sdk/pull/1141) + * stop trying to resend event if we get M_TOO_LARGE + [\#1129](https://github.com/matrix-org/matrix-js-sdk/pull/1129) + * Fix creating a key backup with cross signing diabled + [\#1139](https://github.com/matrix-org/matrix-js-sdk/pull/1139) + * Use checkDeviceTrust with key backup + [\#1138](https://github.com/matrix-org/matrix-js-sdk/pull/1138) + * Add support for passthrough SSSS secrets + [\#1128](https://github.com/matrix-org/matrix-js-sdk/pull/1128) + * Add support for key backups using secret storage + [\#1118](https://github.com/matrix-org/matrix-js-sdk/pull/1118) + * Remove unused user verification event + [\#1117](https://github.com/matrix-org/matrix-js-sdk/pull/1117) + * Fix check for private keys + [\#1116](https://github.com/matrix-org/matrix-js-sdk/pull/1116) + * Restore watching mode for `start:watch` + [\#1115](https://github.com/matrix-org/matrix-js-sdk/pull/1115) + * Add secret storage bootstrap flow + [\#1079](https://github.com/matrix-org/matrix-js-sdk/pull/1079) + * Part 1 of many: Upgrade to babel@7 and TypeScript + [\#1112](https://github.com/matrix-org/matrix-js-sdk/pull/1112) + * Remove Bluebird: phase 2.5 + [\#1100](https://github.com/matrix-org/matrix-js-sdk/pull/1100) + * Remove Bluebird: phase 3 + [\#1088](https://github.com/matrix-org/matrix-js-sdk/pull/1088) + * ignore m.key.verification.done messages when we don't expect any more + messages + [\#1104](https://github.com/matrix-org/matrix-js-sdk/pull/1104) + * dont cancel on remote echo of own .request event + [\#1111](https://github.com/matrix-org/matrix-js-sdk/pull/1111) + * Refactor verification request code + [\#1109](https://github.com/matrix-org/matrix-js-sdk/pull/1109) + * Fix device list's cross-signing storage path + [\#1105](https://github.com/matrix-org/matrix-js-sdk/pull/1105) + * yarn upgrade + [\#1103](https://github.com/matrix-org/matrix-js-sdk/pull/1103) + Changes in [2.4.6](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v2.4.6) (2019-12-09) ================================================================================================ [Full Changelog](https://github.com/matrix-org/matrix-js-sdk/compare/v2.4.6-rc.1...v2.4.6) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index b4b7f67f1..d8ce41f99 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -36,8 +36,16 @@ minutes. Code style ~~~~~~~~~~ -The code-style for matrix-js-sdk is not formally documented, but contributors -are encouraged to read the code style document for matrix-react-sdk +The js-sdk aims to target TypeScript/ES6. All new files should be written in +TypeScript and existing files should use ES6 principles where possible. + +Members should not be exported as a default export in general - it causes problems +with the architecture of the SDK (index file becomes less clear) and could +introduce naming problems (as default exports get aliased upon import). In +general, avoid using `export default`. + +The remaining code-style for matrix-js-sdk is not formally documented, but +contributors are encouraged to read the code style document for matrix-react-sdk (``_) and follow the principles set out there. diff --git a/README.md b/README.md index f9f6029cb..c252447c4 100644 --- a/README.md +++ b/README.md @@ -9,12 +9,16 @@ Quickstart In a browser ------------ -Download either the full or minified version from +Download the browser version from https://github.com/matrix-org/matrix-js-sdk/releases/latest and add that as a ``