7e784da00a
* Retry to-device messages This adds a queueToDevice API alongside sendToDevice which is a much higher-level API that adds the messages to a queue, stored in persistent storage, and retries them periodically. Also converts sending of megolm keys to use the new API. Other uses of sendToDevice are nopt converted in this PR, but could be later. Requires https://github.com/matrix-org/matrix-mock-request/pull/17 * Bump matrix-mock-request * Add more waits to make indexeddb tests pass * Switch some test expectations to queueToDevice * Stop straight away if the client has been stopped Hopefully will fix tests being flakey and logging after tests have finished. * Add return types & fix constant usage * Fix return type Co-authored-by: Germain <germains@element.io> * Fix return type Co-authored-by: Germain <germains@element.io> * Fix return type Co-authored-by: Germain <germains@element.io> * Stop the client in all test cases Co-authored-by: Germain <germains@element.io>
130 lines
4.3 KiB
JSON
130 lines
4.3 KiB
JSON
{
|
|
"name": "matrix-js-sdk",
|
|
"version": "19.2.0",
|
|
"description": "Matrix Client-Server SDK for Javascript",
|
|
"engines": {
|
|
"node": ">=12.9.0"
|
|
},
|
|
"scripts": {
|
|
"prepublishOnly": "yarn build",
|
|
"start": "echo THIS IS FOR LEGACY PURPOSES ONLY. && babel src -w -s -d lib --verbose --extensions \".ts,.js\"",
|
|
"dist": "echo 'This is for the release script so it can make assets (browser bundle).' && yarn build",
|
|
"clean": "rimraf lib dist",
|
|
"build": "yarn build:dev && yarn build:compile-browser && yarn build:minify-browser",
|
|
"build:dev": "yarn clean && git rev-parse HEAD > git-revision.txt && yarn build:compile && yarn build:types",
|
|
"build:types": "tsc -p tsconfig-build.json --emitDeclarationOnly",
|
|
"build:compile": "babel -d lib --verbose --extensions \".ts,.js\" src",
|
|
"build:compile-browser": "mkdirp dist && browserify -d src/browser-index.js -p [ tsify -p ./tsconfig-build.json ] -t [ babelify --sourceMaps=inline --presets [ @babel/preset-env @babel/preset-typescript ] ] | exorcist dist/browser-matrix.js.map > dist/browser-matrix.js",
|
|
"build:minify-browser": "terser dist/browser-matrix.js --compress --mangle --source-map --output dist/browser-matrix.min.js",
|
|
"gendoc": "jsdoc -c jsdoc.json -P package.json",
|
|
"lint": "yarn lint:types && yarn lint:js",
|
|
"lint:js": "eslint --max-warnings 0 src spec",
|
|
"lint:js-fix": "eslint --fix src spec",
|
|
"lint:types": "tsc --noEmit",
|
|
"test": "jest",
|
|
"test:watch": "jest --watch",
|
|
"coverage": "yarn test --coverage"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/matrix-org/matrix-js-sdk"
|
|
},
|
|
"keywords": [
|
|
"matrix-org"
|
|
],
|
|
"main": "./src/index.ts",
|
|
"browser": "./lib/browser-index.js",
|
|
"matrix_src_main": "./src/index.ts",
|
|
"matrix_src_browser": "./src/browser-index.js",
|
|
"matrix_lib_main": "./lib/index.js",
|
|
"matrix_lib_typings": "./lib/index.d.ts",
|
|
"author": "matrix.org",
|
|
"license": "Apache-2.0",
|
|
"files": [
|
|
"dist",
|
|
"lib",
|
|
"src",
|
|
"git-revision.txt",
|
|
"CHANGELOG.md",
|
|
"CONTRIBUTING.rst",
|
|
"LICENSE",
|
|
"README.md",
|
|
"package.json",
|
|
"release.sh"
|
|
],
|
|
"dependencies": {
|
|
"@babel/runtime": "^7.12.5",
|
|
"another-json": "^0.2.0",
|
|
"browser-request": "^0.3.3",
|
|
"bs58": "^5.0.0",
|
|
"content-type": "^1.0.4",
|
|
"loglevel": "^1.7.1",
|
|
"matrix-events-sdk": "^0.0.1-beta.7",
|
|
"p-retry": "4",
|
|
"qs": "^6.9.6",
|
|
"request": "^2.88.2",
|
|
"unhomoglyph": "^1.0.6"
|
|
},
|
|
"devDependencies": {
|
|
"@babel/cli": "^7.12.10",
|
|
"@babel/core": "^7.12.10",
|
|
"@babel/eslint-parser": "^7.12.10",
|
|
"@babel/eslint-plugin": "^7.12.10",
|
|
"@babel/plugin-proposal-class-properties": "^7.12.1",
|
|
"@babel/plugin-proposal-numeric-separator": "^7.12.7",
|
|
"@babel/plugin-proposal-object-rest-spread": "^7.12.1",
|
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
"@babel/plugin-transform-runtime": "^7.12.10",
|
|
"@babel/preset-env": "^7.12.11",
|
|
"@babel/preset-typescript": "^7.12.7",
|
|
"@babel/register": "^7.12.10",
|
|
"@matrix-org/olm": "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.12.tgz",
|
|
"@types/bs58": "^4.0.1",
|
|
"@types/content-type": "^1.1.5",
|
|
"@types/jest": "^28.0.0",
|
|
"@types/node": "16",
|
|
"@types/request": "^2.48.5",
|
|
"@typescript-eslint/eslint-plugin": "^5.6.0",
|
|
"@typescript-eslint/parser": "^5.6.0",
|
|
"allchange": "^1.0.6",
|
|
"babel-jest": "^28.0.0",
|
|
"babelify": "^10.0.0",
|
|
"better-docs": "^2.4.0-beta.9",
|
|
"browserify": "^17.0.0",
|
|
"docdash": "^1.2.0",
|
|
"eslint": "8.20.0",
|
|
"eslint-config-google": "^0.14.0",
|
|
"eslint-plugin-import": "^2.25.4",
|
|
"eslint-plugin-matrix-org": "^0.5.0",
|
|
"exorcist": "^2.0.0",
|
|
"fake-indexeddb": "^4.0.0",
|
|
"jest": "^28.0.0",
|
|
"jest-localstorage-mock": "^2.4.6",
|
|
"jest-sonar-reporter": "^2.0.0",
|
|
"jsdoc": "^3.6.6",
|
|
"matrix-mock-request": "^2.1.1",
|
|
"rimraf": "^3.0.2",
|
|
"terser": "^5.5.1",
|
|
"tsify": "^5.0.2",
|
|
"typescript": "^4.5.3"
|
|
},
|
|
"jest": {
|
|
"testEnvironment": "node",
|
|
"testMatch": [
|
|
"<rootDir>/spec/**/*.spec.{js,ts}"
|
|
],
|
|
"collectCoverageFrom": [
|
|
"<rootDir>/src/**/*.{js,ts}"
|
|
],
|
|
"coverageReporters": [
|
|
"text-summary",
|
|
"lcov"
|
|
],
|
|
"testResultsProcessor": "jest-sonar-reporter"
|
|
},
|
|
"jestSonar": {
|
|
"reportPath": "coverage",
|
|
"sonar56x": true
|
|
}
|
|
}
|