Skip to content

Commit

Permalink
Merge branch 'release/1.10.9' into released
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack-Works committed Mar 2, 2020
2 parents 744f0ed + d606218 commit fd84b82
Show file tree
Hide file tree
Showing 58 changed files with 1,669 additions and 1,031 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
name: Bug
about: "Report a bug"
about: Report a bug
title: "[Bug] "
labels: 'Type: Bug'
assignees: neruthes, jack-works
labels: ''
assignees: Jack-Works, neruthes

---

Expand Down
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/demand.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Demand
about: "PRD for new demand"
about: PRD for new demand
title: "[Demand] "
labels: 'Demand: Draft'
assignees: neruthes
Expand All @@ -12,10 +12,10 @@ assignees: neruthes
Field | Value
--- | ---
Previous Stage | ...
Figma Link | [figma.com/...](___)
Expected UX prototype due | YYYY-MM-DD
Figma Link | Figma_Link_Here____
Expected UX prototype due | 2020-W??-5
Actual UX prototype release | -
Expected engineering due | YYYY-MM-DD
Expected engineering due | 2020-W??-5
Corresponding Pull Request | -
Completion Version | -

Expand Down
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/task.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
name: Task
about: "Non-coding task"
about: Non-coding task
title: "[Task] "
labels: 'Non-Coding Task'
assignees:
labels: Non-Coding Task
assignees: ''

---

Expand All @@ -12,7 +12,7 @@ assignees:
Field | Value
--- | ---
Parent Task/Demand | /* Issue Number*/
Expected Delivery Date | YYYY-MM-DD
Expected Delivery Date | 2020-W??-5

## Content

Expand Down
13 changes: 9 additions & 4 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const path = require('path')

module.exports = {
preset: 'ts-jest',
testEnvironment: 'jest-environment-jsdom-fourteen',
Expand All @@ -8,14 +9,18 @@ module.exports = {
},
},
globalSetup: path.join(__dirname, './scripts/jest-global-setup'),
setupFiles: [require.resolve('fake-indexeddb/auto'), path.join(__dirname, './scripts/jest-setup.js')],
// skip packages other than 'ts-results' and 'async-call-rpc'
transformIgnorePatterns: ['node_modules((?!(ts-results|async-call-rpc)).)*$'],
setupFiles: [
require.resolve('jest-webextension-mock'),
require.resolve('fake-indexeddb/auto'),
path.join(__dirname, './scripts/jest-setup.js'),
],
// skip packages other than 'ts-results', 'async-call-rpc' and 'holoflows/kit'
transformIgnorePatterns: ['node_modules((?!(ts-results|async-call-rpc|@holoflows\\/kit)).)*$'],
transform: {
'[/\\\\]node_modules[/\\\\].+\\.m?js$': 'jest-esm-transformer',
},
moduleNameMapper: {
'^@holoflows/kit.+$': require.resolve('@holoflows/kit/umd/index.js'),
'^@holoflows/kit.+(?<!sleep)$': require.resolve('@holoflows/kit/umd/index.js'),
'lodash-es': require.resolve('lodash'),
'idb/with-async-ittr': require.resolve('idb/with-async-ittr-cjs.js'),
},
Expand Down
29 changes: 19 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "maskbook",
"version": "1.10.8",
"version": "1.10.9",
"private": true,
"license": "AGPL-3.0-or-later",
"scripts": {
Expand Down Expand Up @@ -40,17 +40,18 @@
},
"dependencies": {
"@holoflows/kit": "https://github.com/DimensionDev/holoflows-kit",
"@material-ui/core": "4.9.2",
"@material-ui/core": "4.9.4",
"@material-ui/icons": "4.9.1",
"@material-ui/lab": "^4.0.0-alpha.39",
"@nice-labs/git-flow-init": "^1.0.1",
"@nice-labs/git-rev": "^3.3.1",
"@types/bip39": "^3.0.0",
"@types/classnames": "^2.2.7",
"@types/gun": "^0.9.2",
"@types/json-stable-stringify": "^1.0.32",
"@types/jsonwebtoken": "^8.3.7",
"@types/lodash-es": "^4.17.3",
"@types/node": "^13.7.1",
"@types/node": "^13.7.4",
"@types/qrcode": "^1.3.3",
"@types/react": "^16.9.19",
"@types/react-dom": "^16.9.5",
Expand All @@ -66,7 +67,7 @@
"elliptic": "^6.4.1",
"gun": "0.2020.116",
"husky": "^4.2.3",
"i18next": "^19.1.0",
"i18next": "^19.3.1",
"idb": "^5.0.1",
"json-stable-stringify": "^1.0.1",
"jsonwebtoken": "^8.5.1",
Expand All @@ -81,11 +82,12 @@
"react-dom": "^16.12.0",
"react-i18next": "^11.3.2",
"react-router-dom": "^5.0.0",
"react-use": "^13.26.3",
"react-window": "^1.8.5",
"tiny-secp256k1": "^1.1.2",
"ts-results": "^2.0.1",
"typeson": "^5.18.2",
"typeson-registry": "^1.0.0-alpha.34",
"typeson-registry": "^1.0.0-alpha.35",
"use-subscription": "^1.3.0",
"uuid": "^3.4.0",
"wallet.ts": "^0.2.8",
Expand All @@ -100,23 +102,28 @@
"@commitlint/config-conventional": "^8.3.4",
"@sinonjs/text-encoding": "^0.7.1",
"@storybook/addon-actions": "^5.3.13",
"@storybook/addon-docs": "^5.3.12",
"@storybook/addon-docs": "^5.3.13",
"@storybook/addon-info": "^5.3.12",
"@storybook/addon-knobs": "^5.3.12",
"@storybook/addon-links": "^5.3.12",
"@storybook/addon-viewport": "^5.3.13",
"@storybook/addons": "^5.3.12",
"@storybook/preset-typescript": "^1.2.0",
"@storybook/react": "^5.3.12",
"@storybook/react": "^5.3.13",
"@testing-library/react-hooks": "^3.2.1",
"@trust/webcrypto": "^0.9.2",
"@types/enzyme": "^3.10.5",
"@types/enzyme-adapter-react-16": "^1.0.6",
"@types/jest": "^25.1.2",
"@typescript-eslint/eslint-plugin": "^2.19.2",
"@typescript-eslint/eslint-plugin": "^2.20.0",
"@typescript-eslint/parser": "^2.19.2",
"asmcrypto.js": "^2.3.2",
"awesome-typescript-loader": "^5.2.1",
"babel-loader": "^8.0.6",
"chrome-launcher": "^0.12.0",
"copy-webpack-plugin": "^5.1.1",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.2",
"eslint": "^6.7.2",
"eslint-config-prettier": "^6.10.0",
"eslint-plugin-import": "^2.20.1",
Expand All @@ -125,23 +132,25 @@
"esm": "^3.2.25",
"fake-indexeddb": "^3.0.0",
"fork-ts-checker-notifier-webpack-plugin": "^2.0.0",
"fork-ts-checker-webpack-plugin": "^4.0.3",
"fork-ts-checker-webpack-plugin": "^4.0.4",
"html-webpack-plugin": "^4.0.0-beta.11",
"jest": "^25.1.0",
"jest-environment-jsdom-fourteen": "^1.0.1",
"jest-esm-transformer": "^1.0.0",
"jest-junit": "^10.0.0",
"jest-webextension-mock": "^3.5.0",
"lint-staged": "^10.0.7",
"npm-run-all": "^4.1.5",
"prettier": "^1.19.1",
"puppeteer-core": "^2.1.1",
"react-devtools": "^4.4.0",
"react-docgen-typescript-loader": "^3.6.0",
"react-test-renderer": "^16.12.0",
"storybook-addon-figma": "^0.1.0",
"storybook-addon-i18n": "^5.1.13",
"storybook-addon-material-ui": "^0.9.0-alpha.21",
"terser-webpack-plugin": "^2.3.4",
"ts-jest": "^25.2.0",
"ts-jest": "^25.2.1",
"ts-loader": "^6.2.1",
"ts-morph": "^6.0.3",
"ts-node": "^8.6.2",
Expand Down
9 changes: 8 additions & 1 deletion public/firefoxFix.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@
*
* If any API is complaining "this does not implements Window", add it here.
*/
const brokenAPI = ['requestAnimationFrame', 'setTimeout', 'clearTimeout', 'matchMedia', 'getComputedStyle']
const brokenAPI = [
'requestAnimationFrame',
'setTimeout',
'clearTimeout',
'matchMedia',
'getComputedStyle',
'getSelection',
]

const webAPIs = Object.getOwnPropertyDescriptors(window)
Reflect.deleteProperty(webAPIs, 'window')
Expand Down
33 changes: 33 additions & 0 deletions scripts/jest-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,36 @@ require('webcrypto-liner/build/webcrypto-liner.shim')

/* global TextEncoder, TextDecoder */
Object.assign(globalThis, require('@sinonjs/text-encoding/index'))

// TODO:
// can not find a handy createRange and getSelection polyfill for jest
// remove these polyfill if we find one in the future
document.createRange = () => {
return {
endContainer: null,
selectNodeContents(element) {
this.endContainer = element
},
}
}
globalThis.getSelection = () => {
return {
_ranges: [],
rangeCount: 0,
removeAllRanges() {},
addRange(range) {
this._ranges.push(range)
this.rangeCount = this._ranges.length
},
getRangeAt(index) {
return this._ranges[index]
},
}
}

// webkit rpc handler
globalThis.webkit = globalThis.webkit || {}
globalThis.webkit.messageHandlers = globalThis.webkit.messageHandlers || {}
globalThis.webkit.messageHandlers.maskbookjsonrpc = {
postMessage(data) {},
}
Loading

0 comments on commit fd84b82

Please sign in to comment.