Skip to content

Commit

Permalink
Merge branch 'release-v0.7.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
richvdh committed Feb 4, 2017
2 parents 9c6973a + e8c6002 commit d76e8be
Show file tree
Hide file tree
Showing 71 changed files with 5,047 additions and 5,182 deletions.
14 changes: 11 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = {
parser: "babel-eslint",
parserOptions: {
ecmaVersion: 6,
sourceType: "module",
Expand All @@ -11,12 +12,20 @@ module.exports = {
},
extends: ["eslint:recommended", "google"],
rules: {
// rules we've always adhered to
// rules we've always adhered to or now do
"max-len": ["error", {
code: 90,
ignoreComments: true,
}],
curly: ["error", "multi-line"],
"prefer-const": ["error"],
"comma-dangle": ["error", {
arrays: "always-multiline",
objects: "always-multiline",
imports: "always-multiline",
exports: "always-multiline",
functions: "always-multiline",
}],

// loosen jsdoc requirements a little
"require-jsdoc": ["error", {
Expand Down Expand Up @@ -47,8 +56,7 @@ module.exports = {
// we set these to warnings, and assert that the number
// of warnings doesn't exceed a given threshold
"no-var": ["warn"],
"comma-dangle": ["warn"],
"brace-style": ["warn"],
"brace-style": ["warn", "1tbs", {"allowSingleLine": true}],
"prefer-rest-params": ["warn"],
"prefer-spread": ["warn"],
"one-var": ["warn"],
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ out
reports
/dist
/lib
/specbuild

# version file and tarball created by 'npm pack'
/git-revision.txt
Expand Down
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
language: node_js
node_js:
- node # Latest stable version of nodejs.
script:
- npm run lint
- npm run test
60 changes: 60 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,63 @@
Changes in [0.7.5](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v0.7.5) (2017-02-04)
================================================================================================
[Full Changelog](https://github.com/matrix-org/matrix-js-sdk/compare/v0.7.5-rc.3...v0.7.5)

No changes from 0.7.5-rc.3

Changes in [0.7.5-rc.3](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v0.7.5-rc.3) (2017-02-03)
==========================================================================================================
[Full Changelog](https://github.com/matrix-org/matrix-js-sdk/compare/v0.7.5-rc.2...v0.7.5-rc.3)

* Include DeviceInfo in deviceVerificationChanged events
[a3cc8eb](https://github.com/matrix-org/matrix-js-sdk/commit/a3cc8eb1f6d165576a342596f638316721cb26b6)
* Fix device list update
[5fd7410](https://github.com/matrix-org/matrix-js-sdk/commit/5fd74109ffc56b73deb40c2604d84c38b8032c40)


Changes in [0.7.5-rc.2](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v0.7.5-rc.2) (2017-02-03)
==========================================================================================================
[Full Changelog](https://github.com/matrix-org/matrix-js-sdk/compare/v0.7.5-rc.1...v0.7.5-rc.2)

* Use the device change notifications interface
[\#348](https://github.com/matrix-org/matrix-js-sdk/pull/348)
* Rewrite the device key query logic
[\#347](https://github.com/matrix-org/matrix-js-sdk/pull/347)

Changes in [0.7.5-rc.1](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v0.7.5-rc.1) (2017-02-03)
==========================================================================================================
[Full Changelog](https://github.com/matrix-org/matrix-js-sdk/compare/v0.7.4...v0.7.5-rc.1)

* Support for blacklisting unverified devices, both per-room and globally
[\#336](https://github.com/matrix-org/matrix-js-sdk/pull/336)
* track errors when events can't be sent
[\#349](https://github.com/matrix-org/matrix-js-sdk/pull/349)
* Factor out device list management
[\#346](https://github.com/matrix-org/matrix-js-sdk/pull/346)
* Support for warning users when unknown devices show up
[\#335](https://github.com/matrix-org/matrix-js-sdk/pull/335)
* Enable sourcemaps in browserified distro
[\#345](https://github.com/matrix-org/matrix-js-sdk/pull/345)
* Record all e2e room settings in localstorage
[\#344](https://github.com/matrix-org/matrix-js-sdk/pull/344)
* Make Olm work with browserified js-sdk
[\#340](https://github.com/matrix-org/matrix-js-sdk/pull/340)
* Make browserify a dev dependency
[\#339](https://github.com/matrix-org/matrix-js-sdk/pull/339)
* Allow single line brace-style
[\#338](https://github.com/matrix-org/matrix-js-sdk/pull/338)
* Turn on comma-dangle for function calls
[\#333](https://github.com/matrix-org/matrix-js-sdk/pull/333)
* Add prefer-const
[\#331](https://github.com/matrix-org/matrix-js-sdk/pull/331)
* Support for importing and exporting megolm sessions
[\#326](https://github.com/matrix-org/matrix-js-sdk/pull/326)
* Fix linting on all tests
[\#329](https://github.com/matrix-org/matrix-js-sdk/pull/329)
* Fix ESLint warnings and errors
[\#325](https://github.com/matrix-org/matrix-js-sdk/pull/325)
* BREAKING CHANGE: Remove WebStorageStore
[\#324](https://github.com/matrix-org/matrix-js-sdk/pull/324)

Changes in [0.7.4](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v0.7.4) (2017-01-16)
================================================================================================
[Full Changelog](https://github.com/matrix-org/matrix-js-sdk/compare/v0.7.4-rc.1...v0.7.4)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ Later versions of the SDK will:
Usage
=====


Conventions
-----------

Expand Down
31 changes: 31 additions & 0 deletions docs/warning-on-unverified-devices.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Random notes from Matthew on the two possible approaches for warning users about unexpected
unverified devices popping up in their rooms....

Original idea...
================

Warn when an existing user adds an unknown device to a room.

Warn when a user joins the room with unverified or unknown devices.

Warn when you initial sync if the room has any unverified devices in it.
^ this is good enough if we're doing local storage.
OR, better:
Warn when you initial sync if the room has any new undefined devices since you were last there.
=> This means persisting the rooms that devices are in, across initial syncs.


Updated idea...
===============

Warn when the user tries to send a message:
- If the room has unverified devices which the user has not yet been told about in the context of this room
...or in the context of this user? currently all verification is per-user, not per-room.
...this should be good enough.

- so track whether we have warned the user or not about unverified devices - blocked, unverified, verified, unverified_warned.
throw an error when trying to encrypt if there are pure unverified devices there
app will have to search for the devices which are pure unverified to warn about them - have to do this from MembersList anyway?
- or megolm could warn which devices are causing the problems.

Why do we wait to establish outbound sessions? It just makes a horrible pause when we first try to send a message... but could otherwise unnecessarily consume resources?
7 changes: 5 additions & 2 deletions jenkins.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#!/bin/bash -l

set -x

export NVM_DIR="/home/jenkins/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
nvm use 4
npm install

nvm use 6 || exit $?
npm install || exit $?

RC=0

Expand Down
33 changes: 24 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
{
"name": "matrix-js-sdk",
"version": "0.7.4",
"version": "0.7.5",
"description": "Matrix Client-Server SDK for Javascript",
"main": "index.js",
"scripts": {
"test": "istanbul cover --report cobertura --config .istanbul.yml -i \"lib/**/*.js\" jasmine-node -- spec --verbose --junitreport --captureExceptions",
"check": "jasmine-node spec --verbose --junitreport --captureExceptions",
"buildtest": "babel -s -d specbuild spec",
"test": "npm run buildtest && istanbul cover --report cobertura --config .istanbul.yml -i \"lib/**/*.js\" jasmine-node -- specbuild --verbose --junitreport --captureExceptions",
"check": "npm run buildtest && jasmine-node specbuild --verbose --junitreport --captureExceptions",
"gendoc": "jsdoc -r lib -P package.json -R README.md -d .jsdoc",
"start": "babel -s -w -d lib src",
"build": "babel -s -d lib src && rimraf dist && mkdir dist && browserify --exclude olm browser-index.js -o dist/browser-matrix.js --ignore-missing && uglifyjs -c -m -o dist/browser-matrix.min.js dist/browser-matrix.js",
"build": "babel -s -d lib src && rimraf dist && mkdir dist && browserify -d browser-index.js | exorcist dist/browser-matrix.js.map > dist/browser-matrix.js && uglifyjs -c -m -o dist/browser-matrix.min.js --source-map dist/browser-matrix.min.js.map --in-source-map dist/browser-matrix.js.map dist/browser-matrix.js",
"dist": "npm run build",
"watch": "watchify --exclude olm browser-index.js -o dist/browser-matrix-dev.js -v",
"lint": "eslint --max-warnings 3480 src spec",
"prepublish": "npm run lint && npm run build && git rev-parse HEAD > git-revision.txt"
"watch": "watchify -d browser-index.js -o 'exorcist dist/browser-matrix.js.map > dist/browser-matrix.js' -v",
"lint": "eslint --max-warnings 121 src spec",
"prepublish": "npm run build && git rev-parse HEAD > git-revision.txt"
},
"repository": {
"url": "https://github.com/matrix-org/matrix-js-sdk"
Expand All @@ -24,6 +25,7 @@
"author": "matrix.org",
"license": "Apache-2.0",
"files": [
".babelrc",
".eslintrc.js",
"spec/.eslintrc.js",
"CHANGELOG.md",
Expand All @@ -46,23 +48,36 @@
"dependencies": {
"another-json": "^0.2.0",
"browser-request": "^0.3.3",
"browserify": "^10.2.3",
"q": "^1.4.1",
"request": "^2.53.0"
},
"devDependencies": {
"babel-cli": "^6.18.0",
"babel-eslint": "^7.1.1",
"babel-preset-es2015": "^6.18.0",
"browserify": "^14.0.0",
"browserify-shim": "^3.8.13",
"eslint": "^3.13.1",
"eslint-config-google": "^0.7.1",
"exorcist": "^0.4.0",
"istanbul": "^0.3.13",
"jasmine-node": "^1.14.5",
"jsdoc": "^3.4.0",
"rimraf": "^2.5.4",
"sourceify": "^0.1.0",
"uglifyjs": "^2.4.10",
"watchify": "^3.2.1"
},
"optionalDependencies": {
"olm": "https://matrix.org/packages/npm/olm/olm-2.1.0.tgz"
"olm": "https://matrix.org/packages/npm/olm/olm-2.2.1.tgz"
},
"browserify": {
"transform": [
"sourceify",
"browserify-shim"
]
},
"browserify-shim": {
"olm": "global:Olm"
}
}
10 changes: 6 additions & 4 deletions spec/MockStorageApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,16 @@ MockStorageApi.prototype = {
return this.keys[index];
},
_recalc: function() {
var keys = [];
for (var k in this.data) {
if (!this.data.hasOwnProperty(k)) { continue; }
const keys = [];
for (const k in this.data) {
if (!this.data.hasOwnProperty(k)) {
continue;
}
keys.push(k);
}
this.keys = keys;
this.length = keys.length;
}
},
};

/** */
Expand Down
Loading

0 comments on commit d76e8be

Please sign in to comment.