{children}
From 5d2c4c143a2908313805cf6a1b28a4f4dfcc6b15 Mon Sep 17 00:00:00 2001
From: legobeat <109787230+legobeat@users.noreply.github.com>
Date: Fri, 14 Apr 2023 10:49:22 +0900
Subject: [PATCH 07/23] devdeps: mocha@7.2.0->9.2.2 (#18195)
* devdeps: mocha@7.2.0->9.2.2
Maintenance upgrade
- Closes subdependency flat advisory
- CVE-2020-36632 / GHSA-2j2x-2gpw-d8fm
- upgrade eslint-plugin-mocha to match
- previously used `eslint-plugin-mocha` depended on mocha@^8.2.0
* devdeps: patch-bump ansi-regex
closes GHSA-93q8-gq69-wqmw
* update lavamoat policies
---
lavamoat/browserify/beta/policy.json | 10 +-
lavamoat/browserify/desktop/policy.json | 12 +-
lavamoat/browserify/flask/policy.json | 12 +-
lavamoat/browserify/main/policy.json | 10 +-
lavamoat/build-system/policy.json | 234 +++++-----
package.json | 4 +-
yarn.lock | 579 +++++++++---------------
7 files changed, 347 insertions(+), 514 deletions(-)
diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json
index e594e00f636b..6f5312b9d5c3 100644
--- a/lavamoat/browserify/beta/policy.json
+++ b/lavamoat/browserify/beta/policy.json
@@ -1054,7 +1054,7 @@
"@metamask/eth-token-tracker>deep-equal>is-date-object": true,
"@ngraveio/bc-ur>assert>object-is": true,
"@storybook/api>telejson>is-regex": true,
- "mocha>object.assign>object-keys": true,
+ "globalthis>define-properties>object-keys": true,
"string.prototype.matchall>regexp.prototype.flags": true
}
},
@@ -2484,7 +2484,7 @@
},
"browserify>has": {
"packages": {
- "mocha>object.assign>function-bind": true
+ "browserify>has>function-bind": true
}
},
"browserify>os-browserify": {
@@ -3539,7 +3539,7 @@
"globalthis>define-properties": {
"packages": {
"globalthis>define-properties>has-property-descriptors": true,
- "mocha>object.assign>object-keys": true
+ "globalthis>define-properties>object-keys": true
}
},
"globalthis>define-properties>has-property-descriptors": {
@@ -4159,7 +4159,7 @@
},
"string.prototype.matchall>call-bind": {
"packages": {
- "mocha>object.assign>function-bind": true,
+ "browserify>has>function-bind": true,
"string.prototype.matchall>get-intrinsic": true
}
},
@@ -4171,7 +4171,7 @@
},
"packages": {
"browserify>has": true,
- "mocha>object.assign>function-bind": true,
+ "browserify>has>function-bind": true,
"string.prototype.matchall>has-symbols": true
}
},
diff --git a/lavamoat/browserify/desktop/policy.json b/lavamoat/browserify/desktop/policy.json
index 16b051712c6f..ac604bd4db7f 100644
--- a/lavamoat/browserify/desktop/policy.json
+++ b/lavamoat/browserify/desktop/policy.json
@@ -1126,7 +1126,7 @@
"@metamask/eth-token-tracker>deep-equal>is-date-object": true,
"@ngraveio/bc-ur>assert>object-is": true,
"@storybook/api>telejson>is-regex": true,
- "mocha>object.assign>object-keys": true,
+ "globalthis>define-properties>object-keys": true,
"string.prototype.matchall>regexp.prototype.flags": true
}
},
@@ -2877,7 +2877,7 @@
},
"browserify>has": {
"packages": {
- "mocha>object.assign>function-bind": true
+ "browserify>has>function-bind": true
}
},
"browserify>os-browserify": {
@@ -3932,7 +3932,7 @@
"globalthis>define-properties": {
"packages": {
"globalthis>define-properties>has-property-descriptors": true,
- "mocha>object.assign>object-keys": true
+ "globalthis>define-properties>object-keys": true
}
},
"globalthis>define-properties>has-property-descriptors": {
@@ -4346,9 +4346,9 @@
"react-markdown>unified": {
"packages": {
"jsdom>request>extend": true,
+ "mocha>yargs-unparser>is-plain-obj": true,
"react-markdown>unified>bail": true,
"react-markdown>unified>is-buffer": true,
- "react-markdown>unified>is-plain-obj": true,
"react-markdown>unified>trough": true,
"react-markdown>vfile": true
}
@@ -4684,7 +4684,7 @@
},
"string.prototype.matchall>call-bind": {
"packages": {
- "mocha>object.assign>function-bind": true,
+ "browserify>has>function-bind": true,
"string.prototype.matchall>get-intrinsic": true
}
},
@@ -4696,7 +4696,7 @@
},
"packages": {
"browserify>has": true,
- "mocha>object.assign>function-bind": true,
+ "browserify>has>function-bind": true,
"string.prototype.matchall>has-symbols": true
}
},
diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json
index 16b051712c6f..ac604bd4db7f 100644
--- a/lavamoat/browserify/flask/policy.json
+++ b/lavamoat/browserify/flask/policy.json
@@ -1126,7 +1126,7 @@
"@metamask/eth-token-tracker>deep-equal>is-date-object": true,
"@ngraveio/bc-ur>assert>object-is": true,
"@storybook/api>telejson>is-regex": true,
- "mocha>object.assign>object-keys": true,
+ "globalthis>define-properties>object-keys": true,
"string.prototype.matchall>regexp.prototype.flags": true
}
},
@@ -2877,7 +2877,7 @@
},
"browserify>has": {
"packages": {
- "mocha>object.assign>function-bind": true
+ "browserify>has>function-bind": true
}
},
"browserify>os-browserify": {
@@ -3932,7 +3932,7 @@
"globalthis>define-properties": {
"packages": {
"globalthis>define-properties>has-property-descriptors": true,
- "mocha>object.assign>object-keys": true
+ "globalthis>define-properties>object-keys": true
}
},
"globalthis>define-properties>has-property-descriptors": {
@@ -4346,9 +4346,9 @@
"react-markdown>unified": {
"packages": {
"jsdom>request>extend": true,
+ "mocha>yargs-unparser>is-plain-obj": true,
"react-markdown>unified>bail": true,
"react-markdown>unified>is-buffer": true,
- "react-markdown>unified>is-plain-obj": true,
"react-markdown>unified>trough": true,
"react-markdown>vfile": true
}
@@ -4684,7 +4684,7 @@
},
"string.prototype.matchall>call-bind": {
"packages": {
- "mocha>object.assign>function-bind": true,
+ "browserify>has>function-bind": true,
"string.prototype.matchall>get-intrinsic": true
}
},
@@ -4696,7 +4696,7 @@
},
"packages": {
"browserify>has": true,
- "mocha>object.assign>function-bind": true,
+ "browserify>has>function-bind": true,
"string.prototype.matchall>has-symbols": true
}
},
diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json
index e594e00f636b..6f5312b9d5c3 100644
--- a/lavamoat/browserify/main/policy.json
+++ b/lavamoat/browserify/main/policy.json
@@ -1054,7 +1054,7 @@
"@metamask/eth-token-tracker>deep-equal>is-date-object": true,
"@ngraveio/bc-ur>assert>object-is": true,
"@storybook/api>telejson>is-regex": true,
- "mocha>object.assign>object-keys": true,
+ "globalthis>define-properties>object-keys": true,
"string.prototype.matchall>regexp.prototype.flags": true
}
},
@@ -2484,7 +2484,7 @@
},
"browserify>has": {
"packages": {
- "mocha>object.assign>function-bind": true
+ "browserify>has>function-bind": true
}
},
"browserify>os-browserify": {
@@ -3539,7 +3539,7 @@
"globalthis>define-properties": {
"packages": {
"globalthis>define-properties>has-property-descriptors": true,
- "mocha>object.assign>object-keys": true
+ "globalthis>define-properties>object-keys": true
}
},
"globalthis>define-properties>has-property-descriptors": {
@@ -4159,7 +4159,7 @@
},
"string.prototype.matchall>call-bind": {
"packages": {
- "mocha>object.assign>function-bind": true,
+ "browserify>has>function-bind": true,
"string.prototype.matchall>get-intrinsic": true
}
},
@@ -4171,7 +4171,7 @@
},
"packages": {
"browserify>has": true,
- "mocha>object.assign>function-bind": true,
+ "browserify>has>function-bind": true,
"string.prototype.matchall>has-symbols": true
}
},
diff --git a/lavamoat/build-system/policy.json b/lavamoat/build-system/policy.json
index 871dcc17288c..b3d9ce0d5b21 100644
--- a/lavamoat/build-system/policy.json
+++ b/lavamoat/build-system/policy.json
@@ -1697,7 +1697,7 @@
},
"browserify>has": {
"packages": {
- "mocha>object.assign>function-bind": true
+ "browserify>has>function-bind": true
}
},
"browserify>insert-module-globals": {
@@ -1885,12 +1885,7 @@
"process.platform": true
},
"packages": {
- "chalk>supports-color>has-flag": true
- }
- },
- "chalk>supports-color>has-flag": {
- "globals": {
- "process.argv": true
+ "sinon>supports-color>has-flag": true
}
},
"chokidar": {
@@ -2002,7 +1997,7 @@
"packages": {
"cross-spawn>path-key": true,
"cross-spawn>shebang-command": true,
- "cross-spawn>which": true
+ "mocha>which": true
}
},
"cross-spawn>path-key": {
@@ -2016,21 +2011,6 @@
"cross-spawn>shebang-command>shebang-regex": true
}
},
- "cross-spawn>which": {
- "builtin": {
- "path.join": true
- },
- "globals": {
- "process.cwd": true,
- "process.env.OSTYPE": true,
- "process.env.PATH": true,
- "process.env.PATHEXT": true,
- "process.platform": true
- },
- "packages": {
- "mocha>which>isexe": true
- }
- },
"debounce-stream>duplexer": {
"builtin": {
"stream": true
@@ -2350,7 +2330,7 @@
"process": true
},
"packages": {
- "gulp-livereload>debug>ms": true,
+ "mocha>ms": true,
"mocha>supports-color": true
}
},
@@ -2471,7 +2451,7 @@
"process": true
},
"packages": {
- "gulp-livereload>debug>ms": true,
+ "mocha>ms": true,
"mocha>supports-color": true
}
},
@@ -2871,8 +2851,8 @@
"eslint>@eslint/eslintrc>globals": true,
"eslint>ajv": true,
"eslint>minimatch": true,
- "eslint>strip-json-comments": true,
"globby>ignore": true,
+ "mocha>strip-json-comments": true,
"nock>debug": true
}
},
@@ -3094,9 +3074,9 @@
"process.cwd": true
},
"packages": {
- "chokidar>glob-parent": true,
"fast-glob>@nodelib/fs.stat": true,
"fast-glob>@nodelib/fs.walk": true,
+ "fast-glob>glob-parent": true,
"globby>merge2": true,
"stylelint>micromatch": true
}
@@ -3151,6 +3131,15 @@
"fast-glob>@nodelib/fs.walk>fastq>reusify": true
}
},
+ "fast-glob>glob-parent": {
+ "builtin": {
+ "os.platform": true,
+ "path.posix.dirname": true
+ },
+ "packages": {
+ "eslint>is-glob": true
+ }
+ },
"fs-extra": {
"builtin": {
"assert": true,
@@ -3200,7 +3189,7 @@
"globalthis>define-properties": {
"packages": {
"globalthis>define-properties>has-property-descriptors": true,
- "mocha>object.assign>object-keys": true
+ "globalthis>define-properties>object-keys": true
}
},
"globalthis>define-properties>has-property-descriptors": {
@@ -3370,8 +3359,8 @@
},
"packages": {
"gulp-dart-sass>chalk>ansi-styles": true,
- "gulp-dart-sass>chalk>supports-color": true,
- "mocha>escape-string-regexp": true
+ "gulp-dart-sass>chalk>escape-string-regexp": true,
+ "gulp-dart-sass>chalk>supports-color": true
}
},
"gulp-dart-sass>chalk>ansi-styles": {
@@ -3391,7 +3380,12 @@
"process.versions.node.split": true
},
"packages": {
- "mocha>supports-color>has-flag": true
+ "gulp-dart-sass>chalk>supports-color>has-flag": true
+ }
+ },
+ "gulp-dart-sass>chalk>supports-color>has-flag": {
+ "globals": {
+ "process.argv": true
}
},
"gulp-dart-sass>strip-ansi": {
@@ -3430,9 +3424,9 @@
"process.platform": true
},
"packages": {
+ "gulp-dart-sass>chalk>escape-string-regexp": true,
"gulp-livereload>chalk>ansi-styles": true,
- "gulp-livereload>chalk>supports-color": true,
- "mocha>escape-string-regexp": true
+ "gulp-livereload>chalk>supports-color": true
}
},
"gulp-livereload>chalk>ansi-styles": {
@@ -3452,7 +3446,12 @@
"process.versions.node.split": true
},
"packages": {
- "mocha>supports-color>has-flag": true
+ "gulp-livereload>chalk>supports-color>has-flag": true
+ }
+ },
+ "gulp-livereload>chalk>supports-color>has-flag": {
+ "globals": {
+ "process.argv": true
}
},
"gulp-livereload>debug": {
@@ -3469,7 +3468,7 @@
},
"packages": {
"gulp-livereload>chalk>supports-color": true,
- "gulp-livereload>debug>ms": true
+ "mocha>ms": true
}
},
"gulp-livereload>event-stream": {
@@ -3595,7 +3594,7 @@
"process": true
},
"packages": {
- "gulp-livereload>debug>ms": true,
+ "mocha>ms": true,
"mocha>supports-color": true
}
},
@@ -3699,9 +3698,9 @@
"process.platform": true
},
"packages": {
+ "gulp-dart-sass>chalk>escape-string-regexp": true,
"gulp-rtlcss>rtlcss>chalk>ansi-styles": true,
- "gulp-rtlcss>rtlcss>chalk>supports-color": true,
- "mocha>escape-string-regexp": true
+ "gulp-rtlcss>rtlcss>chalk>supports-color": true
}
},
"gulp-rtlcss>rtlcss>chalk>ansi-styles": {
@@ -3721,7 +3720,12 @@
"process.versions.node.split": true
},
"packages": {
- "mocha>supports-color>has-flag": true
+ "gulp-rtlcss>rtlcss>chalk>supports-color>has-flag": true
+ }
+ },
+ "gulp-rtlcss>rtlcss>chalk>supports-color>has-flag": {
+ "globals": {
+ "process.argv": true
}
},
"gulp-rtlcss>rtlcss>postcss": {
@@ -3947,7 +3951,7 @@
"process": true
},
"packages": {
- "gulp-livereload>debug>ms": true,
+ "mocha>ms": true,
"mocha>supports-color": true
}
},
@@ -5204,11 +5208,11 @@
"chokidar>normalize-path": true,
"eslint>is-glob": true,
"gulp-watch>chokidar>async-each": true,
+ "gulp-watch>glob-parent": true,
"gulp-watch>path-is-absolute": true,
"gulp>glob-watcher>anymatch": true,
"gulp>glob-watcher>chokidar>braces": true,
"gulp>glob-watcher>chokidar>fsevents": true,
- "gulp>glob-watcher>chokidar>glob-parent": true,
"gulp>glob-watcher>chokidar>is-binary-path": true,
"gulp>glob-watcher>chokidar>readdirp": true,
"gulp>glob-watcher>chokidar>upath": true,
@@ -5274,21 +5278,6 @@
"gulp-watch>chokidar>fsevents>node-pre-gyp": true
}
},
- "gulp>glob-watcher>chokidar>glob-parent": {
- "builtin": {
- "os.platform": true,
- "path": true
- },
- "packages": {
- "gulp-watch>glob-parent>path-dirname": true,
- "gulp>glob-watcher>chokidar>glob-parent>is-glob": true
- }
- },
- "gulp>glob-watcher>chokidar>glob-parent>is-glob": {
- "packages": {
- "gulp>glob-watcher>chokidar>glob-parent>is-glob>is-extglob": true
- }
- },
"gulp>glob-watcher>chokidar>is-binary-path": {
"builtin": {
"path.extname": true
@@ -5663,8 +5652,8 @@
"process.nextTick": true
},
"packages": {
+ "gulp-watch>glob-parent": true,
"gulp>glob-watcher>is-negated-glob": true,
- "gulp>vinyl-fs>glob-stream>glob-parent": true,
"gulp>vinyl-fs>glob-stream>ordered-read-streams": true,
"gulp>vinyl-fs>glob-stream>pumpify": true,
"gulp>vinyl-fs>glob-stream>to-absolute-glob": true,
@@ -5675,21 +5664,6 @@
"vinyl>remove-trailing-separator": true
}
},
- "gulp>vinyl-fs>glob-stream>glob-parent": {
- "builtin": {
- "os.platform": true,
- "path": true
- },
- "packages": {
- "gulp-watch>glob-parent>path-dirname": true,
- "gulp>vinyl-fs>glob-stream>glob-parent>is-glob": true
- }
- },
- "gulp>vinyl-fs>glob-stream>glob-parent>is-glob": {
- "packages": {
- "gulp>vinyl-fs>glob-stream>glob-parent>is-glob>is-extglob": true
- }
- },
"gulp>vinyl-fs>glob-stream>ordered-read-streams": {
"builtin": {
"util.inherits": true
@@ -5791,7 +5765,7 @@
"gulp>vinyl-fs>object.assign": {
"packages": {
"globalthis>define-properties": true,
- "mocha>object.assign>object-keys": true,
+ "globalthis>define-properties>object-keys": true,
"string.prototype.matchall>call-bind": true,
"string.prototype.matchall>has-symbols": true
}
@@ -6092,9 +6066,9 @@
"process.platform": true
},
"packages": {
+ "gulp-dart-sass>chalk>escape-string-regexp": true,
"lavamoat>@babel/highlight>chalk>ansi-styles": true,
- "lavamoat>@babel/highlight>chalk>supports-color": true,
- "mocha>escape-string-regexp": true
+ "lavamoat>@babel/highlight>chalk>supports-color": true
}
},
"lavamoat>@babel/highlight>chalk>ansi-styles": {
@@ -6114,7 +6088,12 @@
"process.versions.node.split": true
},
"packages": {
- "mocha>supports-color>has-flag": true
+ "lavamoat>@babel/highlight>chalk>supports-color>has-flag": true
+ }
+ },
+ "lavamoat>@babel/highlight>chalk>supports-color>has-flag": {
+ "globals": {
+ "process.argv": true
}
},
"lavamoat>@lavamoat/aa": {
@@ -6272,6 +6251,31 @@
"process.platform": true
}
},
+ "mocha>log-symbols": {
+ "packages": {
+ "madge>ora>is-unicode-supported": true,
+ "mocha>log-symbols>chalk": true
+ }
+ },
+ "mocha>log-symbols>chalk": {
+ "packages": {
+ "chalk>ansi-styles": true,
+ "mocha>log-symbols>chalk>supports-color": true
+ }
+ },
+ "mocha>log-symbols>chalk>supports-color": {
+ "builtin": {
+ "os.release": true,
+ "tty.isatty": true
+ },
+ "globals": {
+ "process.env": true,
+ "process.platform": true
+ },
+ "packages": {
+ "sinon>supports-color>has-flag": true
+ }
+ },
"mocha>minimatch>brace-expansion": {
"packages": {
"mocha>minimatch>brace-expansion>concat-map": true,
@@ -6280,22 +6284,15 @@
},
"mocha>supports-color": {
"builtin": {
- "os.release": true
+ "os.release": true,
+ "tty.isatty": true
},
"globals": {
"process.env": true,
- "process.platform": true,
- "process.stderr": true,
- "process.stdout": true,
- "process.versions.node.split": true
+ "process.platform": true
},
"packages": {
- "mocha>supports-color>has-flag": true
- }
- },
- "mocha>supports-color>has-flag": {
- "globals": {
- "process.argv": true
+ "sinon>supports-color>has-flag": true
}
},
"mocha>which": {
@@ -6565,9 +6562,9 @@
"react-markdown>unified": {
"packages": {
"jsdom>request>extend": true,
+ "mocha>yargs-unparser>is-plain-obj": true,
"react-markdown>unified>bail": true,
"react-markdown>unified>is-buffer": true,
- "react-markdown>unified>is-plain-obj": true,
"react-markdown>unified>trough": true,
"react-markdown>vfile": true
}
@@ -6767,6 +6764,11 @@
"process.platform": true
}
},
+ "sinon>supports-color>has-flag": {
+ "globals": {
+ "process.argv": true
+ }
+ },
"source-map": {
"builtin": {
"fs.readFile": true,
@@ -6801,7 +6803,7 @@
},
"string.prototype.matchall>call-bind": {
"packages": {
- "mocha>object.assign>function-bind": true,
+ "browserify>has>function-bind": true,
"string.prototype.matchall>get-intrinsic": true
}
},
@@ -6840,7 +6842,7 @@
},
"packages": {
"browserify>has": true,
- "mocha>object.assign>function-bind": true,
+ "browserify>has>function-bind": true,
"string.prototype.matchall>has-symbols": true
}
},
@@ -6896,6 +6898,7 @@
"globby>ignore": true,
"globby>slash": true,
"lodash": true,
+ "mocha>log-symbols": true,
"nock>debug": true,
"nyc>resolve-from": true,
"stylelint>@stylelint/postcss-css-in-js": true,
@@ -6912,7 +6915,6 @@
"stylelint>import-lazy": true,
"stylelint>known-css-properties": true,
"stylelint>leven": true,
- "stylelint>log-symbols": true,
"stylelint>mathml-tag-names": true,
"stylelint>micromatch": true,
"stylelint>normalize-selector": true,
@@ -7094,12 +7096,7 @@
"process.platform": true
},
"packages": {
- "stylelint>chalk>supports-color>has-flag": true
- }
- },
- "stylelint>chalk>supports-color>has-flag": {
- "globals": {
- "process.argv": true
+ "sinon>supports-color>has-flag": true
}
},
"stylelint>cosmiconfig": {
@@ -7212,8 +7209,8 @@
"process.platform": true
},
"packages": {
- "mocha>which": true,
- "stylelint>global-modules>global-prefix>ini": true
+ "stylelint>global-modules>global-prefix>ini": true,
+ "stylelint>global-modules>global-prefix>which": true
}
},
"stylelint>global-modules>global-prefix>ini": {
@@ -7221,39 +7218,24 @@
"process": true
}
},
- "stylelint>globjoin": {
+ "stylelint>global-modules>global-prefix>which": {
"builtin": {
"path.join": true
- }
- },
- "stylelint>log-symbols": {
- "packages": {
- "madge>ora>is-unicode-supported": true,
- "stylelint>log-symbols>chalk": true
- }
- },
- "stylelint>log-symbols>chalk": {
- "packages": {
- "chalk>ansi-styles": true,
- "stylelint>log-symbols>chalk>supports-color": true
- }
- },
- "stylelint>log-symbols>chalk>supports-color": {
- "builtin": {
- "os.release": true,
- "tty.isatty": true
},
"globals": {
- "process.env": true,
+ "process.cwd": true,
+ "process.env.OSTYPE": true,
+ "process.env.PATH": true,
+ "process.env.PATHEXT": true,
"process.platform": true
},
"packages": {
- "stylelint>log-symbols>chalk>supports-color>has-flag": true
+ "mocha>which>isexe": true
}
},
- "stylelint>log-symbols>chalk>supports-color>has-flag": {
- "globals": {
- "process.argv": true
+ "stylelint>globjoin": {
+ "builtin": {
+ "path.join": true
}
},
"stylelint>micromatch": {
@@ -7557,9 +7539,9 @@
},
"stylelint>table>slice-ansi": {
"packages": {
- "mocha>yargs>string-width>is-fullwidth-code-point": true,
"stylelint>table>slice-ansi>ansi-styles": true,
- "stylelint>table>slice-ansi>astral-regex": true
+ "stylelint>table>slice-ansi>astral-regex": true,
+ "stylelint>table>slice-ansi>is-fullwidth-code-point": true
}
},
"stylelint>table>slice-ansi>ansi-styles": {
@@ -7569,7 +7551,7 @@
},
"stylelint>table>string-width": {
"packages": {
- "mocha>yargs>string-width>is-fullwidth-code-point": true,
+ "stylelint>table>slice-ansi>is-fullwidth-code-point": true,
"stylelint>table>string-width>emoji-regex": true,
"stylelint>table>string-width>strip-ansi": true
}
diff --git a/package.json b/package.json
index ac58eca27183..c3eb9e56814b 100644
--- a/package.json
+++ b/package.json
@@ -452,7 +452,7 @@
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jest": "^26.6.0",
"eslint-plugin-jsdoc": "^39.3.3",
- "eslint-plugin-mocha": "^8.1.0",
+ "eslint-plugin-mocha": "^10.1.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.23.1",
@@ -496,7 +496,7 @@
"lockfile-lint": "^4.9.6",
"loose-envify": "^1.4.0",
"madge": "^5.0.1",
- "mocha": "^7.2.0",
+ "mocha": "^9.2.2",
"mockttp": "^2.6.0",
"nock": "^13.2.9",
"node-fetch": "^2.6.1",
diff --git a/yarn.lock b/yarn.lock
index 93b2f813e57d..81c7c68e9915 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -8174,6 +8174,13 @@ __metadata:
languageName: node
linkType: hard
+"@ungap/promise-all-settled@npm:1.1.2":
+ version: 1.1.2
+ resolution: "@ungap/promise-all-settled@npm:1.1.2"
+ checksum: 08d37fdfa23a6fe8139f1305313562ebad973f3fac01bcce2773b2bda5bcb0146dfdcf3cb6a722cf0a5f2ca0bc56a827eac8f1e7b3beddc548f654addf1fc34c
+ languageName: node
+ linkType: hard
+
"@vue/compiler-core@npm:3.1.4":
version: 3.1.4
resolution: "@vue/compiler-core@npm:3.1.4"
@@ -9133,10 +9140,10 @@ __metadata:
languageName: node
linkType: hard
-"ansi-colors@npm:3.2.3":
- version: 3.2.3
- resolution: "ansi-colors@npm:3.2.3"
- checksum: 018a92fbf8b143feb9e00559655072598902ff2cdfa07dbe24b933c70ae04845e3dda2c091ab128920fc50b3db06c3f09947f49fcb287d53beb6c5869b8bb32b
+"ansi-colors@npm:4.1.1":
+ version: 4.1.1
+ resolution: "ansi-colors@npm:4.1.1"
+ checksum: 138d04a51076cb085da0a7e2d000c5c0bb09f6e772ed5c65c53cb118d37f6c5f1637506d7155fb5f330f0abcf6f12fa2e489ac3f8cdab9da393bf1bb4f9a32b0
languageName: node
linkType: hard
@@ -9191,16 +9198,16 @@ __metadata:
linkType: hard
"ansi-regex@npm:^3.0.0":
- version: 3.0.0
- resolution: "ansi-regex@npm:3.0.0"
- checksum: 2ad11c416f81c39f5c65eafc88cf1d71aa91d76a2f766e75e457c2a3c43e8a003aadbf2966b61c497aa6a6940a36412486c975b3270cdfc3f413b69826189ec3
+ version: 3.0.1
+ resolution: "ansi-regex@npm:3.0.1"
+ checksum: 09daf180c5f59af9850c7ac1bd7fda85ba596cc8cbeb210826e90755f06c818af86d9fa1e6e8322fab2c3b9e9b03f56c537b42241139f824dd75066a1e7257cc
languageName: node
linkType: hard
"ansi-regex@npm:^4.1.0":
- version: 4.1.0
- resolution: "ansi-regex@npm:4.1.0"
- checksum: 97aa4659538d53e5e441f5ef2949a3cffcb838e57aeaad42c4194e9d7ddb37246a6526c4ca85d3940a9d1e19b11cc2e114530b54c9d700c8baf163c31779baf8
+ version: 4.1.1
+ resolution: "ansi-regex@npm:4.1.1"
+ checksum: b1a6ee44cb6ecdabaa770b2ed500542714d4395d71c7e5c25baa631f680fb2ad322eb9ba697548d498a6fd366949fc8b5bfcf48d49a32803611f648005b01888
languageName: node
linkType: hard
@@ -9289,7 +9296,7 @@ __metadata:
languageName: node
linkType: hard
-"anymatch@npm:^3.0.0, anymatch@npm:^3.0.3, anymatch@npm:^3.1.0, anymatch@npm:~3.1.1, anymatch@npm:~3.1.2":
+"anymatch@npm:^3.0.0, anymatch@npm:^3.0.3, anymatch@npm:^3.1.0, anymatch@npm:~3.1.2":
version: 3.1.2
resolution: "anymatch@npm:3.1.2"
dependencies:
@@ -11835,26 +11842,7 @@ __metadata:
languageName: node
linkType: hard
-"chokidar@npm:3.3.0":
- version: 3.3.0
- resolution: "chokidar@npm:3.3.0"
- dependencies:
- anymatch: ~3.1.1
- braces: ~3.0.2
- fsevents: ~2.1.1
- glob-parent: ~5.1.0
- is-binary-path: ~2.1.0
- is-glob: ~4.0.1
- normalize-path: ~3.0.0
- readdirp: ~3.2.0
- dependenciesMeta:
- fsevents:
- optional: true
- checksum: e9863256ebb29dbc5e58a7e2637439814beb63b772686cb9e94478312c24dcaf3d0570220c5e75ea29029f43b664f9956d87b716120d38cf755f32124f047e8e
- languageName: node
- linkType: hard
-
-"chokidar@npm:>=3.0.0 <4.0.0, chokidar@npm:^3.3.1, chokidar@npm:^3.4.0, chokidar@npm:^3.4.1, chokidar@npm:^3.4.2, chokidar@npm:^3.5.3":
+"chokidar@npm:3.5.3, chokidar@npm:>=3.0.0 <4.0.0, chokidar@npm:^3.3.1, chokidar@npm:^3.4.0, chokidar@npm:^3.4.1, chokidar@npm:^3.4.2, chokidar@npm:^3.5.3":
version: 3.5.3
resolution: "chokidar@npm:3.5.3"
dependencies:
@@ -12104,17 +12092,6 @@ __metadata:
languageName: node
linkType: hard
-"cliui@npm:^5.0.0":
- version: 5.0.0
- resolution: "cliui@npm:5.0.0"
- dependencies:
- string-width: ^3.1.0
- strip-ansi: ^5.2.0
- wrap-ansi: ^5.1.0
- checksum: 0bb8779efe299b8f3002a73619eaa8add4081eb8d1c17bc4fedc6240557fb4eacdc08fe87c39b002eacb6cfc117ce736b362dbfd8bf28d90da800e010ee97df4
- languageName: node
- linkType: hard
-
"cliui@npm:^6.0.0":
version: 6.0.0
resolution: "cliui@npm:6.0.0"
@@ -13482,15 +13459,6 @@ __metadata:
languageName: node
linkType: hard
-"debug@npm:3.2.6":
- version: 3.2.6
- resolution: "debug@npm:3.2.6"
- dependencies:
- ms: ^2.1.1
- checksum: 07bc8b3a13ef3cfa6c06baf7871dfb174c291e5f85dbf566f086620c16b9c1a0e93bb8f1935ebbd07a683249e7e30286f2966e2ef461e8fd17b1b60732062d6b
- languageName: node
- linkType: hard
-
"debug@npm:3.X, debug@npm:^3.0.0, debug@npm:^3.1.0, debug@npm:^3.2.6, debug@npm:^3.2.7":
version: 3.2.7
resolution: "debug@npm:3.2.7"
@@ -13521,6 +13489,18 @@ __metadata:
languageName: node
linkType: hard
+"debug@npm:4.3.3":
+ version: 4.3.3
+ resolution: "debug@npm:4.3.3"
+ dependencies:
+ ms: 2.1.2
+ peerDependenciesMeta:
+ supports-color:
+ optional: true
+ checksum: 14472d56fe4a94dbcfaa6dbed2dd3849f1d72ba78104a1a328047bb564643ca49df0224c3a17fa63533fd11dd3d4c8636cd861191232a2c6735af00cc2d4de16
+ languageName: node
+ linkType: hard
+
"debug@npm:~3.1.0":
version: 3.1.0
resolution: "debug@npm:3.1.0"
@@ -13554,6 +13534,13 @@ __metadata:
languageName: node
linkType: hard
+"decamelize@npm:^4.0.0":
+ version: 4.0.0
+ resolution: "decamelize@npm:4.0.0"
+ checksum: b7d09b82652c39eead4d6678bb578e3bebd848add894b76d0f6b395bc45b2d692fb88d977e7cfb93c4ed6c119b05a1347cef261174916c2e75c0a8ca57da1809
+ languageName: node
+ linkType: hard
+
"decimal.js@npm:^10.2.0, decimal.js@npm:^10.3.1":
version: 10.4.0
resolution: "decimal.js@npm:10.4.0"
@@ -14148,10 +14135,10 @@ __metadata:
languageName: node
linkType: hard
-"diff@npm:3.5.0":
- version: 3.5.0
- resolution: "diff@npm:3.5.0"
- checksum: 00842950a6551e26ce495bdbce11047e31667deea546527902661f25cc2e73358967ebc78cf86b1a9736ec3e14286433225f9970678155753a6291c3bca5227b
+"diff@npm:5.0.0, diff@npm:^5.0.0":
+ version: 5.0.0
+ resolution: "diff@npm:5.0.0"
+ checksum: f19fe29284b633afdb2725c2a8bb7d25761ea54d321d8e67987ac851c5294be4afeab532bd84531e02583a3fe7f4014aa314a3eda84f5590e7a9e6b371ef3b46
languageName: node
linkType: hard
@@ -14162,13 +14149,6 @@ __metadata:
languageName: node
linkType: hard
-"diff@npm:^5.0.0":
- version: 5.0.0
- resolution: "diff@npm:5.0.0"
- checksum: f19fe29284b633afdb2725c2a8bb7d25761ea54d321d8e67987ac851c5294be4afeab532bd84531e02583a3fe7f4014aa314a3eda84f5590e7a9e6b371ef3b46
- languageName: node
- linkType: hard
-
"diffable-html@npm:^4.1.0":
version: 4.1.0
resolution: "diffable-html@npm:4.1.0"
@@ -14951,7 +14931,14 @@ __metadata:
languageName: node
linkType: hard
-"escape-string-regexp@npm:1.0.5, escape-string-regexp@npm:^1.0.2, escape-string-regexp@npm:^1.0.5":
+"escape-string-regexp@npm:4.0.0, escape-string-regexp@npm:^4.0.0":
+ version: 4.0.0
+ resolution: "escape-string-regexp@npm:4.0.0"
+ checksum: 98b48897d93060f2322108bf29db0feba7dd774be96cd069458d1453347b25ce8682ecc39859d4bca2203cc0ab19c237bcc71755eff49a0f8d90beadeeba5cc5
+ languageName: node
+ linkType: hard
+
+"escape-string-regexp@npm:^1.0.2, escape-string-regexp@npm:^1.0.5":
version: 1.0.5
resolution: "escape-string-regexp@npm:1.0.5"
checksum: 6092fda75c63b110c706b6a9bfde8a612ad595b628f0bd2147eea1d3406723020810e591effc7db1da91d80a71a737a313567c5abb3813e8d9c71f4aa595b410
@@ -14965,13 +14952,6 @@ __metadata:
languageName: node
linkType: hard
-"escape-string-regexp@npm:^4.0.0":
- version: 4.0.0
- resolution: "escape-string-regexp@npm:4.0.0"
- checksum: 98b48897d93060f2322108bf29db0feba7dd774be96cd069458d1453347b25ce8682ecc39859d4bca2203cc0ab19c237bcc71755eff49a0f8d90beadeeba5cc5
- languageName: node
- linkType: hard
-
"escodegen@npm:^1.11.1, escodegen@npm:^1.8.1, escodegen@npm:^1.9.0":
version: 1.14.3
resolution: "escodegen@npm:1.14.3"
@@ -15142,15 +15122,15 @@ __metadata:
languageName: node
linkType: hard
-"eslint-plugin-mocha@npm:^8.1.0":
- version: 8.1.0
- resolution: "eslint-plugin-mocha@npm:8.1.0"
+"eslint-plugin-mocha@npm:^10.1.0":
+ version: 10.1.0
+ resolution: "eslint-plugin-mocha@npm:10.1.0"
dependencies:
- eslint-utils: ^2.1.0
- ramda: ^0.27.1
+ eslint-utils: ^3.0.0
+ rambda: ^7.1.0
peerDependencies:
eslint: ">=7.0.0"
- checksum: c3efc9482fbda003f15847ee581f57e68e2c223664c743ab0613488894c00dc6bb2e9cca52718b964aa6e241e6d74292fa324a6ad9b697f7046643d616bf860f
+ checksum: 67c063ba190fe8ab3186baaf800a375e9f16a17f69deaac2ea0d1825f6e4260f9a56bd510ceb2ffbe6644d7090beda0efbd2ab7824e4852ce2abee53a1086179
languageName: node
linkType: hard
@@ -15278,7 +15258,7 @@ __metadata:
languageName: node
linkType: hard
-"eslint-utils@npm:^2.0.0, eslint-utils@npm:^2.1.0":
+"eslint-utils@npm:^2.0.0":
version: 2.1.0
resolution: "eslint-utils@npm:2.1.0"
dependencies:
@@ -17076,12 +17056,13 @@ __metadata:
languageName: node
linkType: hard
-"find-up@npm:3.0.0, find-up@npm:^3.0.0":
- version: 3.0.0
- resolution: "find-up@npm:3.0.0"
+"find-up@npm:5.0.0, find-up@npm:^5.0.0":
+ version: 5.0.0
+ resolution: "find-up@npm:5.0.0"
dependencies:
- locate-path: ^3.0.0
- checksum: 38eba3fe7a66e4bc7f0f5a1366dc25508b7cfc349f852640e3678d26ad9a6d7e2c43eff0a472287de4a9753ef58f066a0ea892a256fa3636ad51b3fe1e17fae9
+ locate-path: ^6.0.0
+ path-exists: ^4.0.0
+ checksum: 07955e357348f34660bde7920783204ff5a26ac2cafcaa28bace494027158a97b9f56faaf2d89a6106211a8174db650dd9f503f9c0d526b1202d5554a00b9095
languageName: node
linkType: hard
@@ -17104,6 +17085,15 @@ __metadata:
languageName: node
linkType: hard
+"find-up@npm:^3.0.0":
+ version: 3.0.0
+ resolution: "find-up@npm:3.0.0"
+ dependencies:
+ locate-path: ^3.0.0
+ checksum: 38eba3fe7a66e4bc7f0f5a1366dc25508b7cfc349f852640e3678d26ad9a6d7e2c43eff0a472287de4a9753ef58f066a0ea892a256fa3636ad51b3fe1e17fae9
+ languageName: node
+ linkType: hard
+
"find-up@npm:^4.0.0, find-up@npm:^4.1.0":
version: 4.1.0
resolution: "find-up@npm:4.1.0"
@@ -17114,16 +17104,6 @@ __metadata:
languageName: node
linkType: hard
-"find-up@npm:^5.0.0":
- version: 5.0.0
- resolution: "find-up@npm:5.0.0"
- dependencies:
- locate-path: ^6.0.0
- path-exists: ^4.0.0
- checksum: 07955e357348f34660bde7920783204ff5a26ac2cafcaa28bace494027158a97b9f56faaf2d89a6106211a8174db650dd9f503f9c0d526b1202d5554a00b9095
- languageName: node
- linkType: hard
-
"findup-sync@npm:^2.0.0":
version: 2.0.0
resolution: "findup-sync@npm:2.0.0"
@@ -17205,14 +17185,12 @@ __metadata:
languageName: node
linkType: hard
-"flat@npm:^4.1.0":
- version: 4.1.0
- resolution: "flat@npm:4.1.0"
- dependencies:
- is-buffer: ~2.0.3
+"flat@npm:^5.0.2":
+ version: 5.0.2
+ resolution: "flat@npm:5.0.2"
bin:
flat: cli.js
- checksum: 41a91335be78c5c16813672a6371871034763db85ed84b31926b132ebeb145d63cd05460e33e4197358ed6a862e2c25c01721c8b2b20d292ff1e166795655f09
+ checksum: 12a1536ac746db74881316a181499a78ef953632ddd28050b7a3a43c62ef5462e3357c8c29d76072bb635f147f7a9a1f0c02efef6b4be28f8db62ceb3d5c7f5d
languageName: node
linkType: hard
@@ -17601,16 +17579,6 @@ __metadata:
languageName: node
linkType: hard
-"fsevents@npm:~2.1.1":
- version: 2.1.3
- resolution: "fsevents@npm:2.1.3"
- dependencies:
- node-gyp: latest
- checksum: b5ec0516b44d75b60af5c01ff80a80cd995d175e4640d2a92fbabd02991dd664d76b241b65feef0775c23d531c3c74742c0fbacd6205af812a9c3cef59f04292
- conditions: os=darwin
- languageName: node
- linkType: hard
-
"fsevents@patch:fsevents@^1.2.7#~builtin
":
version: 1.2.9
resolution: "fsevents@patch:fsevents@npm%3A1.2.9#~builtin::version=1.2.9&hash=18f3a7"
@@ -17630,15 +17598,6 @@ __metadata:
languageName: node
linkType: hard
-"fsevents@patch:fsevents@~2.1.1#~builtin":
- version: 2.1.3
- resolution: "fsevents@patch:fsevents@npm%3A2.1.3#~builtin::version=2.1.3&hash=18f3a7"
- dependencies:
- node-gyp: latest
- conditions: os=darwin
- languageName: node
- linkType: hard
-
"ftp@npm:^0.3.10":
version: 0.3.10
resolution: "ftp@npm:0.3.10"
@@ -18035,7 +17994,7 @@ __metadata:
languageName: node
linkType: hard
-"glob-parent@npm:^5.1.1, glob-parent@npm:^5.1.2, glob-parent@npm:~5.1.0, glob-parent@npm:~5.1.2":
+"glob-parent@npm:^5.1.1, glob-parent@npm:^5.1.2, glob-parent@npm:~5.1.2":
version: 5.1.2
resolution: "glob-parent@npm:5.1.2"
dependencies:
@@ -18110,9 +18069,9 @@ __metadata:
languageName: node
linkType: hard
-"glob@npm:7.1.3":
- version: 7.1.3
- resolution: "glob@npm:7.1.3"
+"glob@npm:7.2.0, glob@npm:^7.0.0, glob@npm:^7.0.3, glob@npm:^7.1.0, glob@npm:^7.1.1, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6, glob@npm:^7.1.7":
+ version: 7.2.0
+ resolution: "glob@npm:7.2.0"
dependencies:
fs.realpath: ^1.0.0
inflight: ^1.0.4
@@ -18120,7 +18079,7 @@ __metadata:
minimatch: ^3.0.4
once: ^1.3.0
path-is-absolute: ^1.0.0
- checksum: d72a834a393948d6c4a5cacc6a29fe5fe190e1cd134e55dfba09aee0be6fe15be343e96d8ec43558ab67ff8af28e4420c7f63a4d4db1c779e515015e9c318616
+ checksum: 78a8ea942331f08ed2e055cb5b9e40fe6f46f579d7fd3d694f3412fe5db23223d29b7fee1575440202e9a7ff9a72ab106a39fee39934c7bedafe5e5f8ae20134
languageName: node
linkType: hard
@@ -18138,20 +18097,6 @@ __metadata:
languageName: node
linkType: hard
-"glob@npm:^7.0.0, glob@npm:^7.0.3, glob@npm:^7.1.0, glob@npm:^7.1.1, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6, glob@npm:^7.1.7":
- version: 7.2.0
- resolution: "glob@npm:7.2.0"
- dependencies:
- fs.realpath: ^1.0.0
- inflight: ^1.0.4
- inherits: 2
- minimatch: ^3.0.4
- once: ^1.3.0
- path-is-absolute: ^1.0.0
- checksum: 78a8ea942331f08ed2e055cb5b9e40fe6f46f579d7fd3d694f3412fe5db23223d29b7fee1575440202e9a7ff9a72ab106a39fee39934c7bedafe5e5f8ae20134
- languageName: node
- linkType: hard
-
"glob@npm:^8.0.1":
version: 8.0.3
resolution: "glob@npm:8.0.3"
@@ -19998,7 +19943,7 @@ __metadata:
languageName: node
linkType: hard
-"is-buffer@npm:^2.0.0, is-buffer@npm:^2.0.5, is-buffer@npm:~2.0.3":
+"is-buffer@npm:^2.0.0, is-buffer@npm:^2.0.5":
version: 2.0.5
resolution: "is-buffer@npm:2.0.5"
checksum: 764c9ad8b523a9f5a32af29bdf772b08eb48c04d2ad0a7240916ac2688c983bf5f8504bf25b35e66240edeb9d9085461f9b5dae1f3d2861c6b06a65fe983de42
@@ -20483,7 +20428,7 @@ __metadata:
languageName: node
linkType: hard
-"is-plain-obj@npm:^2.0.0":
+"is-plain-obj@npm:^2.0.0, is-plain-obj@npm:^2.1.0":
version: 2.1.0
resolution: "is-plain-obj@npm:2.1.0"
checksum: cec9100678b0a9fe0248a81743041ed990c2d4c99f893d935545cfbc42876cbe86d207f3b895700c690ad2fa520e568c44afc1605044b535a7820c1d40e38daa
@@ -22102,27 +22047,26 @@ __metadata:
languageName: node
linkType: hard
-"js-yaml@npm:3.13.1":
- version: 3.13.1
- resolution: "js-yaml@npm:3.13.1"
+"js-yaml@npm:3.14.0":
+ version: 3.14.0
+ resolution: "js-yaml@npm:3.14.0"
dependencies:
argparse: ^1.0.7
esprima: ^4.0.0
bin:
js-yaml: bin/js-yaml.js
- checksum: 7511b764abb66d8aa963379f7d2a404f078457d106552d05a7b556d204f7932384e8477513c124749fa2de52eb328961834562bd09924902c6432e40daa408bc
+ checksum: a1a47c912ba20956f96cb0998dea2e74c7f7129d831fe33d3c5a16f3f83712ce405172a8dd1c26bf2b3ad74b54016d432ff727928670ae5a50a57a677c387949
languageName: node
linkType: hard
-"js-yaml@npm:3.14.0":
- version: 3.14.0
- resolution: "js-yaml@npm:3.14.0"
+"js-yaml@npm:4.1.0, js-yaml@npm:^4.1.0":
+ version: 4.1.0
+ resolution: "js-yaml@npm:4.1.0"
dependencies:
- argparse: ^1.0.7
- esprima: ^4.0.0
+ argparse: ^2.0.1
bin:
js-yaml: bin/js-yaml.js
- checksum: a1a47c912ba20956f96cb0998dea2e74c7f7129d831fe33d3c5a16f3f83712ce405172a8dd1c26bf2b3ad74b54016d432ff727928670ae5a50a57a677c387949
+ checksum: c7830dfd456c3ef2c6e355cc5a92e6700ceafa1d14bba54497b34a99f0376cecbb3e9ac14d3e5849b426d5a5140709a66237a8c991c675431271c4ce5504151a
languageName: node
linkType: hard
@@ -22138,17 +22082,6 @@ __metadata:
languageName: node
linkType: hard
-"js-yaml@npm:^4.1.0":
- version: 4.1.0
- resolution: "js-yaml@npm:4.1.0"
- dependencies:
- argparse: ^2.0.1
- bin:
- js-yaml: bin/js-yaml.js
- checksum: c7830dfd456c3ef2c6e355cc5a92e6700ceafa1d14bba54497b34a99f0376cecbb3e9ac14d3e5849b426d5a5140709a66237a8c991c675431271c4ce5504151a
- languageName: node
- linkType: hard
-
"jsan@npm:^3.1.13":
version: 3.1.13
resolution: "jsan@npm:3.1.13"
@@ -23447,12 +23380,13 @@ __metadata:
languageName: node
linkType: hard
-"log-symbols@npm:3.0.0":
- version: 3.0.0
- resolution: "log-symbols@npm:3.0.0"
+"log-symbols@npm:4.1.0, log-symbols@npm:^4.0.0, log-symbols@npm:^4.1.0":
+ version: 4.1.0
+ resolution: "log-symbols@npm:4.1.0"
dependencies:
- chalk: ^2.4.2
- checksum: f2322e1452d819050b11aad247660e1494f8b2219d40a964af91d5f9af1a90636f1b3d93f2952090e42af07cc5550aecabf6c1d8ec1181207e95cb66ba112361
+ chalk: ^4.1.0
+ is-unicode-supported: ^0.1.0
+ checksum: fce1497b3135a0198803f9f07464165e9eb83ed02ceb2273930a6f8a508951178d8cf4f0378e9d28300a2ed2bc49050995d2bd5f53ab716bb15ac84d58c6ef74
languageName: node
linkType: hard
@@ -23465,16 +23399,6 @@ __metadata:
languageName: node
linkType: hard
-"log-symbols@npm:^4.0.0, log-symbols@npm:^4.1.0":
- version: 4.1.0
- resolution: "log-symbols@npm:4.1.0"
- dependencies:
- chalk: ^4.1.0
- is-unicode-supported: ^0.1.0
- checksum: fce1497b3135a0198803f9f07464165e9eb83ed02ceb2273930a6f8a508951178d8cf4f0378e9d28300a2ed2bc49050995d2bd5f53ab716bb15ac84d58c6ef74
- languageName: node
- linkType: hard
-
"loglevel@npm:^1.8.0, loglevel@npm:^1.8.1":
version: 1.8.1
resolution: "loglevel@npm:1.8.1"
@@ -24371,7 +24295,7 @@ __metadata:
eslint-plugin-import: ^2.22.1
eslint-plugin-jest: ^26.6.0
eslint-plugin-jsdoc: ^39.3.3
- eslint-plugin-mocha: ^8.1.0
+ eslint-plugin-mocha: ^10.1.0
eslint-plugin-node: ^11.1.0
eslint-plugin-prettier: ^4.2.1
eslint-plugin-react: ^7.23.1
@@ -24446,7 +24370,7 @@ __metadata:
loose-envify: ^1.4.0
luxon: ^3.2.1
madge: ^5.0.1
- mocha: ^7.2.0
+ mocha: ^9.2.2
mockttp: ^2.6.0
nanoid: ^2.1.6
nock: ^13.2.9
@@ -24751,6 +24675,15 @@ __metadata:
languageName: node
linkType: hard
+"minimatch@npm:4.2.1":
+ version: 4.2.1
+ resolution: "minimatch@npm:4.2.1"
+ dependencies:
+ brace-expansion: ^1.1.7
+ checksum: 2b1514e3d0f29a549912f0db7ae7b82c5cab4a8f2dd0369f1c6451a325b3f12b2cf473c95873b6157bb8df183d6cf6db82ff03614b6adaaf1d7e055beccdfd01
+ languageName: node
+ linkType: hard
+
"minimatch@npm:^3.0.2, minimatch@npm:^3.0.4, minimatch@npm:^3.1.2":
version: 3.1.2
resolution: "minimatch@npm:3.1.2"
@@ -24921,17 +24854,6 @@ __metadata:
languageName: node
linkType: hard
-"mkdirp@npm:0.5.5":
- version: 0.5.5
- resolution: "mkdirp@npm:0.5.5"
- dependencies:
- minimist: ^1.2.5
- bin:
- mkdirp: bin/cmd.js
- checksum: 3bce20ea525f9477befe458ab85284b0b66c8dc3812f94155af07c827175948cdd8114852ac6c6d82009b13c1048c37f6d98743eb019651ee25c39acc8aabe7d
- languageName: node
- linkType: hard
-
"mkdirp@npm:^0.5.1, mkdirp@npm:^0.5.3, mkdirp@npm:^0.5.4, mkdirp@npm:^0.5.5, mkdirp@npm:^0.5.6":
version: 0.5.6
resolution: "mkdirp@npm:0.5.6"
@@ -24952,38 +24874,38 @@ __metadata:
languageName: node
linkType: hard
-"mocha@npm:^7.2.0":
- version: 7.2.0
- resolution: "mocha@npm:7.2.0"
+"mocha@npm:^9.2.2":
+ version: 9.2.2
+ resolution: "mocha@npm:9.2.2"
dependencies:
- ansi-colors: 3.2.3
+ "@ungap/promise-all-settled": 1.1.2
+ ansi-colors: 4.1.1
browser-stdout: 1.3.1
- chokidar: 3.3.0
- debug: 3.2.6
- diff: 3.5.0
- escape-string-regexp: 1.0.5
- find-up: 3.0.0
- glob: 7.1.3
+ chokidar: 3.5.3
+ debug: 4.3.3
+ diff: 5.0.0
+ escape-string-regexp: 4.0.0
+ find-up: 5.0.0
+ glob: 7.2.0
growl: 1.10.5
he: 1.2.0
- js-yaml: 3.13.1
- log-symbols: 3.0.0
- minimatch: 3.0.4
- mkdirp: 0.5.5
- ms: 2.1.1
- node-environment-flags: 1.0.6
- object.assign: 4.1.0
- strip-json-comments: 2.0.1
- supports-color: 6.0.0
- which: 1.3.1
- wide-align: 1.1.3
- yargs: 13.3.2
- yargs-parser: 13.1.2
- yargs-unparser: 1.6.0
+ js-yaml: 4.1.0
+ log-symbols: 4.1.0
+ minimatch: 4.2.1
+ ms: 2.1.3
+ nanoid: 3.3.1
+ serialize-javascript: 6.0.0
+ strip-json-comments: 3.1.1
+ supports-color: 8.1.1
+ which: 2.0.2
+ workerpool: 6.2.0
+ yargs: 16.2.0
+ yargs-parser: 20.2.4
+ yargs-unparser: 2.0.0
bin:
_mocha: bin/_mocha
mocha: bin/mocha
- checksum: d098484fe1b165bb964fdbf6b88b256c71fead47575ca7c5bcf8ed07db0dcff41905f6d2f0a05111a0441efaef9d09241a8cc1ddf7961056b28984ec63ba2874
+ checksum: 4d5ca4ce33fc66627e63acdf09a634e2358c9a00f61de7788b1091b6aad430da04f97f9ecb82d56dc034b623cb833b65576136fd010d77679c03fcea5bc1e12d
languageName: node
linkType: hard
@@ -25129,7 +25051,7 @@ __metadata:
languageName: node
linkType: hard
-"ms@npm:^2.0.0, ms@npm:^2.1.1":
+"ms@npm:2.1.3, ms@npm:^2.0.0, ms@npm:^2.1.1":
version: 2.1.3
resolution: "ms@npm:2.1.3"
checksum: aa92de608021b242401676e35cfa5aa42dd70cbdc082b916da7fb925c542173e36bce97ea3e804923fe92c0ad991434e4a38327e15a1b5b5f945d66df615ae6d
@@ -25302,6 +25224,15 @@ __metadata:
languageName: node
linkType: hard
+"nanoid@npm:3.3.1":
+ version: 3.3.1
+ resolution: "nanoid@npm:3.3.1"
+ bin:
+ nanoid: bin/nanoid.cjs
+ checksum: 4ef0969e1bbe866fc223eb32276cbccb0961900bfe79104fa5abe34361979dead8d0e061410a5c03bc3d47455685adf32c09d6f27790f4a6898fb51f7df7ec86
+ languageName: node
+ linkType: hard
+
"nanoid@npm:^2.0.0, nanoid@npm:^2.1.6":
version: 2.1.11
resolution: "nanoid@npm:2.1.11"
@@ -25502,16 +25433,6 @@ __metadata:
languageName: node
linkType: hard
-"node-environment-flags@npm:1.0.6":
- version: 1.0.6
- resolution: "node-environment-flags@npm:1.0.6"
- dependencies:
- object.getownpropertydescriptors: ^2.0.3
- semver: ^5.7.0
- checksum: 268139ed0f7fabdca346dcb26931300ec7a1dc54a58085a849e5c78a82b94967f55df40177a69d4e819da278d98686d5c4fd49ab0d7bcff16fda25b6fffc4ca3
- languageName: node
- linkType: hard
-
"node-fetch@npm:2.6.7, node-fetch@npm:^2, node-fetch@npm:^2.6.0, node-fetch@npm:^2.6.1, node-fetch@npm:^2.6.7, node-fetch@npm:~2.6.1":
version: 2.6.7
resolution: "node-fetch@npm:2.6.7"
@@ -26045,7 +25966,7 @@ __metadata:
languageName: node
linkType: hard
-"object-keys@npm:^1.0.11, object-keys@npm:^1.1.1":
+"object-keys@npm:^1.1.1":
version: 1.1.1
resolution: "object-keys@npm:1.1.1"
checksum: b363c5e7644b1e1b04aa507e88dcb8e3a2f52b6ffd0ea801e4c7a62d5aa559affe21c55a07fd4b1fd55fc03a33c610d73426664b20032405d7b92a1414c34d6a
@@ -26068,18 +25989,6 @@ __metadata:
languageName: node
linkType: hard
-"object.assign@npm:4.1.0":
- version: 4.1.0
- resolution: "object.assign@npm:4.1.0"
- dependencies:
- define-properties: ^1.1.2
- function-bind: ^1.1.1
- has-symbols: ^1.0.0
- object-keys: ^1.0.11
- checksum: 648a9a463580bf48332d9a49a76fede2660ab1ee7104d9459b8a240562246da790b4151c3c073f28fda31c1fdc555d25a1d871e72be403e997e4468c91f4801f
- languageName: node
- linkType: hard
-
"object.assign@npm:^4.0.4, object.assign@npm:^4.1.0, object.assign@npm:^4.1.2, object.assign@npm:^4.1.4":
version: 4.1.4
resolution: "object.assign@npm:4.1.4"
@@ -28441,6 +28350,13 @@ __metadata:
languageName: node
linkType: hard
+"rambda@npm:^7.1.0":
+ version: 7.5.0
+ resolution: "rambda@npm:7.5.0"
+ checksum: ad608a9a4160d0b6b0921047cea1329276bf239ff58d439135288712dcdbbf0df47c76591843ad249d89e7c5a9109ce86fe099aa54aef0dc0aa92a9b4dd1b8eb
+ languageName: node
+ linkType: hard
+
"ramda@npm:^0.21.0":
version: 0.21.0
resolution: "ramda@npm:0.21.0"
@@ -28448,13 +28364,6 @@ __metadata:
languageName: node
linkType: hard
-"ramda@npm:^0.27.1":
- version: 0.27.1
- resolution: "ramda@npm:0.27.1"
- checksum: 31a0c0ef739b2525d7615f84cbb5d3cb89ee0c795469b711f729ea1d8df0dccc3cd75d3717a1e9742d42315ce86435680b7c87743eb7618111c60c144a5b8059
- languageName: node
- linkType: hard
-
"randomatic@npm:^3.0.0":
version: 3.0.0
resolution: "randomatic@npm:3.0.0"
@@ -29208,15 +29117,6 @@ __metadata:
languageName: node
linkType: hard
-"readdirp@npm:~3.2.0":
- version: 3.2.0
- resolution: "readdirp@npm:3.2.0"
- dependencies:
- picomatch: ^2.0.4
- checksum: 0456a4465a13eb5eaf40f0e0836b1bc6b9ebe479b48ba6f63a738b127a1990fb7b38f3ec4b4b6052f9230f976bc0558f12812347dc6b42ce4d548cfe82a9b6f3
- languageName: node
- linkType: hard
-
"real-require@npm:^0.1.0":
version: 0.1.0
resolution: "real-require@npm:0.1.0"
@@ -30746,7 +30646,7 @@ __metadata:
languageName: node
linkType: hard
-"semver@npm:2 || 3 || 4 || 5, semver@npm:^5.0.3, semver@npm:^5.1.0, semver@npm:^5.3.0, semver@npm:^5.4.1, semver@npm:^5.5.0, semver@npm:^5.6.0, semver@npm:^5.7.0":
+"semver@npm:2 || 3 || 4 || 5, semver@npm:^5.0.3, semver@npm:^5.1.0, semver@npm:^5.3.0, semver@npm:^5.4.1, semver@npm:^5.5.0, semver@npm:^5.6.0":
version: 5.7.1
resolution: "semver@npm:5.7.1"
bin:
@@ -30835,6 +30735,15 @@ __metadata:
languageName: node
linkType: hard
+"serialize-javascript@npm:6.0.0, serialize-javascript@npm:^6.0.0":
+ version: 6.0.0
+ resolution: "serialize-javascript@npm:6.0.0"
+ dependencies:
+ randombytes: ^2.1.0
+ checksum: 56f90b562a1bdc92e55afb3e657c6397c01a902c588c0fe3d4c490efdcc97dcd2a3074ba12df9e94630f33a5ce5b76a74784a7041294628a6f4306e0ec84bf93
+ languageName: node
+ linkType: hard
+
"serialize-javascript@npm:^4.0.0":
version: 4.0.0
resolution: "serialize-javascript@npm:4.0.0"
@@ -30853,15 +30762,6 @@ __metadata:
languageName: node
linkType: hard
-"serialize-javascript@npm:^6.0.0":
- version: 6.0.0
- resolution: "serialize-javascript@npm:6.0.0"
- dependencies:
- randombytes: ^2.1.0
- checksum: 56f90b562a1bdc92e55afb3e657c6397c01a902c588c0fe3d4c490efdcc97dcd2a3074ba12df9e94630f33a5ce5b76a74784a7041294628a6f4306e0ec84bf93
- languageName: node
- linkType: hard
-
"serve-favicon@npm:^2.5.0":
version: 2.5.0
resolution: "serve-favicon@npm:2.5.0"
@@ -31904,7 +31804,7 @@ __metadata:
languageName: node
linkType: hard
-"string-width@npm:^1.0.2 || 2, string-width@npm:^2.0.0, string-width@npm:^2.1.1":
+"string-width@npm:^2.0.0, string-width@npm:^2.1.1":
version: 2.1.1
resolution: "string-width@npm:2.1.1"
dependencies:
@@ -31914,7 +31814,7 @@ __metadata:
languageName: node
linkType: hard
-"string-width@npm:^3.0.0, string-width@npm:^3.1.0":
+"string-width@npm:^3.0.0":
version: 3.1.0
resolution: "string-width@npm:3.1.0"
dependencies:
@@ -32072,7 +31972,7 @@ __metadata:
languageName: node
linkType: hard
-"strip-ansi@npm:^5.0.0, strip-ansi@npm:^5.1.0, strip-ansi@npm:^5.2.0":
+"strip-ansi@npm:^5.1.0":
version: 5.2.0
resolution: "strip-ansi@npm:5.2.0"
dependencies:
@@ -32201,20 +32101,20 @@ __metadata:
languageName: node
linkType: hard
-"strip-json-comments@npm:2.0.1, strip-json-comments@npm:^2.0.0, strip-json-comments@npm:~2.0.1":
- version: 2.0.1
- resolution: "strip-json-comments@npm:2.0.1"
- checksum: 1074ccb63270d32ca28edfb0a281c96b94dc679077828135141f27d52a5a398ef5e78bcf22809d23cadc2b81dfbe345eb5fd8699b385c8b1128907dec4a7d1e1
- languageName: node
- linkType: hard
-
-"strip-json-comments@npm:^3.1.0, strip-json-comments@npm:^3.1.1":
+"strip-json-comments@npm:3.1.1, strip-json-comments@npm:^3.1.0, strip-json-comments@npm:^3.1.1":
version: 3.1.1
resolution: "strip-json-comments@npm:3.1.1"
checksum: 492f73e27268f9b1c122733f28ecb0e7e8d8a531a6662efbd08e22cccb3f9475e90a1b82cab06a392f6afae6d2de636f977e231296400d0ec5304ba70f166443
languageName: node
linkType: hard
+"strip-json-comments@npm:^2.0.0, strip-json-comments@npm:~2.0.1":
+ version: 2.0.1
+ resolution: "strip-json-comments@npm:2.0.1"
+ checksum: 1074ccb63270d32ca28edfb0a281c96b94dc679077828135141f27d52a5a398ef5e78bcf22809d23cadc2b81dfbe345eb5fd8699b385c8b1128907dec4a7d1e1
+ languageName: node
+ linkType: hard
+
"strip-outer@npm:^1.0.1":
version: 1.0.1
resolution: "strip-outer@npm:1.0.1"
@@ -32473,12 +32373,12 @@ __metadata:
languageName: node
linkType: hard
-"supports-color@npm:6.0.0":
- version: 6.0.0
- resolution: "supports-color@npm:6.0.0"
+"supports-color@npm:8.1.1, supports-color@npm:^8.0.0, supports-color@npm:^8.1.0":
+ version: 8.1.1
+ resolution: "supports-color@npm:8.1.1"
dependencies:
- has-flag: ^3.0.0
- checksum: 005b4a7e5d78a9a703454f5b7da34336b82825747724d1f3eefea6c3956afcb33b79b31854a93cef0fc1f2449919ae952f79abbfd09a5b5b43ecd26407d3a3a1
+ has-flag: ^4.0.0
+ checksum: c052193a7e43c6cdc741eb7f378df605636e01ad434badf7324f17fb60c69a880d8d8fcdcb562cf94c2350e57b937d7425ab5b8326c67c2adc48f7c87c1db406
languageName: node
linkType: hard
@@ -32509,15 +32409,6 @@ __metadata:
languageName: node
linkType: hard
-"supports-color@npm:^8.0.0, supports-color@npm:^8.1.0":
- version: 8.1.1
- resolution: "supports-color@npm:8.1.1"
- dependencies:
- has-flag: ^4.0.0
- checksum: c052193a7e43c6cdc741eb7f378df605636e01ad434badf7324f17fb60c69a880d8d8fcdcb562cf94c2350e57b937d7425ab5b8326c67c2adc48f7c87c1db406
- languageName: node
- linkType: hard
-
"supports-hyperlinks@npm:^2.0.0":
version: 2.2.0
resolution: "supports-hyperlinks@npm:2.2.0"
@@ -35169,18 +35060,7 @@ __metadata:
languageName: node
linkType: hard
-"which@npm:1.3.1, which@npm:^1.2.12, which@npm:^1.2.14, which@npm:^1.2.9, which@npm:^1.3.1":
- version: 1.3.1
- resolution: "which@npm:1.3.1"
- dependencies:
- isexe: ^2.0.0
- bin:
- which: ./bin/which
- checksum: f2e185c6242244b8426c9df1510e86629192d93c1a986a7d2a591f2c24869e7ffd03d6dac07ca863b2e4c06f59a4cc9916c585b72ee9fa1aa609d0124df15e04
- languageName: node
- linkType: hard
-
-"which@npm:^2.0.1, which@npm:^2.0.2":
+"which@npm:2.0.2, which@npm:^2.0.1, which@npm:^2.0.2":
version: 2.0.2
resolution: "which@npm:2.0.2"
dependencies:
@@ -35191,12 +35071,14 @@ __metadata:
languageName: node
linkType: hard
-"wide-align@npm:1.1.3":
- version: 1.1.3
- resolution: "wide-align@npm:1.1.3"
+"which@npm:^1.2.12, which@npm:^1.2.14, which@npm:^1.2.9, which@npm:^1.3.1":
+ version: 1.3.1
+ resolution: "which@npm:1.3.1"
dependencies:
- string-width: ^1.0.2 || 2
- checksum: d09c8012652a9e6cab3e82338d1874a4d7db2ad1bd19ab43eb744acf0b9b5632ec406bdbbbb970a8f4771a7d5ef49824d038ba70aa884e7723f5b090ab87134d
+ isexe: ^2.0.0
+ bin:
+ which: ./bin/which
+ checksum: f2e185c6242244b8426c9df1510e86629192d93c1a986a7d2a591f2c24869e7ffd03d6dac07ca863b2e4c06f59a4cc9916c585b72ee9fa1aa609d0124df15e04
languageName: node
linkType: hard
@@ -35277,6 +35159,13 @@ __metadata:
languageName: node
linkType: hard
+"workerpool@npm:6.2.0":
+ version: 6.2.0
+ resolution: "workerpool@npm:6.2.0"
+ checksum: 3493b4f0ef979a23d2c1583d7ef85f62fc9463cc02f82829d3e7e663b517f8ae9707da0249b382e46ac58986deb0ca2232ee1081713741211bda9254b429c9bb
+ languageName: node
+ linkType: hard
+
"wrap-ansi@npm:^2.0.0":
version: 2.1.0
resolution: "wrap-ansi@npm:2.1.0"
@@ -35287,17 +35176,6 @@ __metadata:
languageName: node
linkType: hard
-"wrap-ansi@npm:^5.1.0":
- version: 5.1.0
- resolution: "wrap-ansi@npm:5.1.0"
- dependencies:
- ansi-styles: ^3.2.0
- string-width: ^3.0.0
- strip-ansi: ^5.0.0
- checksum: 9b48c862220e541eb0daa22661b38b947973fc57054e91be5b0f2dcc77741a6875ccab4ebe970a394b4682c8dfc17e888266a105fb8b0a9b23c19245e781ceae
- languageName: node
- linkType: hard
-
"wrap-ansi@npm:^6.2.0":
version: 6.2.0
resolution: "wrap-ansi@npm:6.2.0"
@@ -35577,13 +35455,10 @@ __metadata:
languageName: node
linkType: hard
-"yargs-parser@npm:13.1.2, yargs-parser@npm:^13.1.2":
- version: 13.1.2
- resolution: "yargs-parser@npm:13.1.2"
- dependencies:
- camelcase: ^5.0.0
- decamelize: ^1.2.0
- checksum: c8bb6f44d39a4acd94462e96d4e85469df865de6f4326e0ab1ac23ae4a835e5dd2ddfe588317ebf80c3a7e37e741bd5cb0dc8d92bcc5812baefb7df7c885e86b
+"yargs-parser@npm:20.2.4, yargs-parser@npm:^20.2.2":
+ version: 20.2.4
+ resolution: "yargs-parser@npm:20.2.4"
+ checksum: d251998a374b2743a20271c2fd752b9fbef24eb881d53a3b99a7caa5e8227fcafd9abf1f345ac5de46435821be25ec12189a11030c12ee6481fef6863ed8b924
languageName: node
linkType: hard
@@ -35617,13 +35492,6 @@ __metadata:
languageName: node
linkType: hard
-"yargs-parser@npm:^20.2.2":
- version: 20.2.4
- resolution: "yargs-parser@npm:20.2.4"
- checksum: d251998a374b2743a20271c2fd752b9fbef24eb881d53a3b99a7caa5e8227fcafd9abf1f345ac5de46435821be25ec12189a11030c12ee6481fef6863ed8b924
- languageName: node
- linkType: hard
-
"yargs-parser@npm:^21.0.0":
version: 21.0.1
resolution: "yargs-parser@npm:21.0.1"
@@ -35631,32 +35499,30 @@ __metadata:
languageName: node
linkType: hard
-"yargs-unparser@npm:1.6.0":
- version: 1.6.0
- resolution: "yargs-unparser@npm:1.6.0"
+"yargs-unparser@npm:2.0.0":
+ version: 2.0.0
+ resolution: "yargs-unparser@npm:2.0.0"
dependencies:
- flat: ^4.1.0
- lodash: ^4.17.15
- yargs: ^13.3.0
- checksum: ca662bb94af53d816d47f2162f0a1d135783f09de9fd47645a5cb18dd25532b0b710432b680d2c065ff45de122ba4a96433c41595fa7bfcc08eb12e889db95c1
+ camelcase: ^6.0.0
+ decamelize: ^4.0.0
+ flat: ^5.0.2
+ is-plain-obj: ^2.1.0
+ checksum: 68f9a542c6927c3768c2f16c28f71b19008710abd6b8f8efbac6dcce26bbb68ab6503bed1d5994bdbc2df9a5c87c161110c1dfe04c6a3fe5c6ad1b0e15d9a8a3
languageName: node
linkType: hard
-"yargs@npm:13.3.2, yargs@npm:^13.3.0":
- version: 13.3.2
- resolution: "yargs@npm:13.3.2"
+"yargs@npm:16.2.0, yargs@npm:^16.0.0, yargs@npm:^16.1.0, yargs@npm:^16.2.0":
+ version: 16.2.0
+ resolution: "yargs@npm:16.2.0"
dependencies:
- cliui: ^5.0.0
- find-up: ^3.0.0
- get-caller-file: ^2.0.1
+ cliui: ^7.0.2
+ escalade: ^3.1.1
+ get-caller-file: ^2.0.5
require-directory: ^2.1.1
- require-main-filename: ^2.0.0
- set-blocking: ^2.0.0
- string-width: ^3.0.0
- which-module: ^2.0.0
- y18n: ^4.0.0
- yargs-parser: ^13.1.2
- checksum: 75c13e837eb2bb25717957ba58d277e864efc0cca7f945c98bdf6477e6ec2f9be6afa9ed8a876b251a21423500c148d7b91e88dee7adea6029bdec97af1ef3e8
+ string-width: ^4.2.0
+ y18n: ^5.0.5
+ yargs-parser: ^20.2.2
+ checksum: b14afbb51e3251a204d81937c86a7e9d4bdbf9a2bcee38226c900d00f522969ab675703bee2a6f99f8e20103f608382936034e64d921b74df82b63c07c5e8f59
languageName: node
linkType: hard
@@ -35694,21 +35560,6 @@ __metadata:
languageName: node
linkType: hard
-"yargs@npm:^16.0.0, yargs@npm:^16.1.0, yargs@npm:^16.2.0":
- version: 16.2.0
- resolution: "yargs@npm:16.2.0"
- dependencies:
- cliui: ^7.0.2
- escalade: ^3.1.1
- get-caller-file: ^2.0.5
- require-directory: ^2.1.1
- string-width: ^4.2.0
- y18n: ^5.0.5
- yargs-parser: ^20.2.2
- checksum: b14afbb51e3251a204d81937c86a7e9d4bdbf9a2bcee38226c900d00f522969ab675703bee2a6f99f8e20103f608382936034e64d921b74df82b63c07c5e8f59
- languageName: node
- linkType: hard
-
"yargs@npm:^17.0.1, yargs@npm:^17.3.1":
version: 17.5.1
resolution: "yargs@npm:17.5.1"
From a3af0b53e32e7f04e90f9ddbb6cc1b8a723184e8 Mon Sep 17 00:00:00 2001
From: Vinicius Stevam <45455812+vinistevam@users.noreply.github.com>
Date: Fri, 14 Apr 2023 05:50:17 +0100
Subject: [PATCH 08/23] Trigger unlock popup in appStateController using
ApprovalController (#18386)
---
app/scripts/controllers/app-state.js | 51 +++-
app/scripts/controllers/app-state.test.js | 330 +++++++++++++++++++++-
app/scripts/metamask-controller.js | 8 +-
3 files changed, 377 insertions(+), 12 deletions(-)
diff --git a/app/scripts/controllers/app-state.js b/app/scripts/controllers/app-state.js
index f7669e055bcd..3360cd4f92df 100644
--- a/app/scripts/controllers/app-state.js
+++ b/app/scripts/controllers/app-state.js
@@ -1,5 +1,7 @@
import EventEmitter from 'events';
import { ObservableStore } from '@metamask/obs-store';
+import { v4 as uuid } from 'uuid';
+import log from 'loglevel';
import { METAMASK_CONTROLLER_EVENTS } from '../metamask-controller';
import { MINUTE } from '../../../shared/constants/time';
import { AUTO_LOCK_TIMEOUT_ALARM } from '../../../shared/constants/alarms';
@@ -8,8 +10,11 @@ import { isBeta } from '../../../ui/helpers/utils/build-types';
import {
ENVIRONMENT_TYPE_BACKGROUND,
POLLING_TOKEN_ENVIRONMENT_TYPES,
+ ORIGIN_METAMASK,
} from '../../../shared/constants/app';
+const APPROVAL_REQUEST_TYPE = 'unlock';
+
export default class AppStateController extends EventEmitter {
/**
* @param {object} opts
@@ -20,9 +25,9 @@ export default class AppStateController extends EventEmitter {
isUnlocked,
initState,
onInactiveTimeout,
- showUnlockRequest,
preferencesStore,
qrHardwareStore,
+ messenger,
} = opts;
super();
@@ -59,8 +64,6 @@ export default class AppStateController extends EventEmitter {
this.waitingForUnlock = [];
addUnlockListener(this.handleUnlock.bind(this));
- this._showUnlockRequest = showUnlockRequest;
-
preferencesStore.subscribe(({ preferences }) => {
const currentState = this.store.getState();
if (currentState.timeoutMinutes !== preferences.autoLockTimeLimit) {
@@ -74,6 +77,9 @@ export default class AppStateController extends EventEmitter {
const { preferences } = preferencesStore.getState();
this._setInactiveTimeout(preferences.autoLockTimeLimit);
+
+ this.messagingSystem = messenger;
+ this._approvalRequestId = null;
}
/**
@@ -108,7 +114,7 @@ export default class AppStateController extends EventEmitter {
this.waitingForUnlock.push({ resolve });
this.emit(METAMASK_CONTROLLER_EVENTS.UPDATE_BADGE);
if (shouldShowUnlockRequest) {
- this._showUnlockRequest();
+ this._requestApproval();
}
}
@@ -122,6 +128,8 @@ export default class AppStateController extends EventEmitter {
}
this.emit(METAMASK_CONTROLLER_EVENTS.UPDATE_BADGE);
}
+
+ this._acceptApproval();
}
/**
@@ -369,4 +377,39 @@ export default class AppStateController extends EventEmitter {
serviceWorkerLastActiveTime,
});
}
+
+ _requestApproval() {
+ this._approvalRequestId = uuid();
+
+ this.messagingSystem
+ .call(
+ 'ApprovalController:addRequest',
+ {
+ id: this._approvalRequestId,
+ origin: ORIGIN_METAMASK,
+ type: APPROVAL_REQUEST_TYPE,
+ },
+ true,
+ )
+ .catch(() => {
+ // Intentionally ignored as promise not currently used
+ });
+ }
+
+ _acceptApproval() {
+ if (!this._approvalRequestId) {
+ log.error('Attempted to accept missing unlock approval request');
+ return;
+ }
+ try {
+ this.messagingSystem.call(
+ 'ApprovalController:acceptRequest',
+ this._approvalRequestId,
+ );
+ } catch (error) {
+ log.error('Failed to accept transaction approval request', error);
+ }
+
+ this._approvalRequestId = null;
+ }
}
diff --git a/app/scripts/controllers/app-state.test.js b/app/scripts/controllers/app-state.test.js
index 7aa27e44b1c1..02d3cda3c789 100644
--- a/app/scripts/controllers/app-state.test.js
+++ b/app/scripts/controllers/app-state.test.js
@@ -1,12 +1,158 @@
+import { ObservableStore } from '@metamask/obs-store';
+import log from 'loglevel';
+import { ORIGIN_METAMASK } from '../../../shared/constants/app';
import AppStateController from './app-state';
+jest.mock('loglevel');
+
+let appStateController, mockStore;
+
describe('AppStateController', () => {
+ mockStore = new ObservableStore();
+ const createAppStateController = (initState = {}) => {
+ return new AppStateController({
+ addUnlockListener: jest.fn(),
+ isUnlocked: jest.fn(() => true),
+ initState,
+ onInactiveTimeout: jest.fn(),
+ showUnlockRequest: jest.fn(),
+ preferencesStore: {
+ subscribe: jest.fn(),
+ getState: jest.fn(() => ({
+ preferences: {
+ autoLockTimeLimit: 0,
+ },
+ })),
+ },
+ qrHardwareStore: {
+ subscribe: jest.fn(),
+ },
+ messenger: {
+ call: jest.fn(() => ({
+ catch: jest.fn(),
+ })),
+ },
+ });
+ };
+
+ beforeEach(() => {
+ appStateController = createAppStateController({ store: mockStore });
+ });
+
describe('setOutdatedBrowserWarningLastShown', () => {
- it('should set the last shown time', () => {
- const appStateController = new AppStateController({
+ it('sets the last shown time', () => {
+ appStateController = createAppStateController();
+ const date = new Date();
+
+ appStateController.setOutdatedBrowserWarningLastShown(date);
+
+ expect(
+ appStateController.store.getState().outdatedBrowserWarningLastShown,
+ ).toStrictEqual(date);
+ });
+
+ it('sets outdated browser warning last shown timestamp', () => {
+ const lastShownTimestamp = Date.now();
+ appStateController = createAppStateController();
+ const updateStateSpy = jest.spyOn(
+ appStateController.store,
+ 'updateState',
+ );
+
+ appStateController.setOutdatedBrowserWarningLastShown(lastShownTimestamp);
+
+ expect(updateStateSpy).toHaveBeenCalledTimes(1);
+ expect(updateStateSpy).toHaveBeenCalledWith({
+ outdatedBrowserWarningLastShown: lastShownTimestamp,
+ });
+
+ updateStateSpy.mockRestore();
+ });
+ });
+
+ describe('getUnlockPromise', () => {
+ it('waits for unlock if the extension is locked', async () => {
+ appStateController = createAppStateController();
+ const isUnlockedMock = jest
+ .spyOn(appStateController, 'isUnlocked')
+ .mockReturnValue(false);
+ const waitForUnlockSpy = jest.spyOn(appStateController, 'waitForUnlock');
+
+ appStateController.getUnlockPromise(true);
+ expect(isUnlockedMock).toHaveBeenCalled();
+ expect(waitForUnlockSpy).toHaveBeenCalledWith(expect.any(Function), true);
+ });
+
+ it('resolves immediately if the extension is already unlocked', async () => {
+ appStateController = createAppStateController();
+ const isUnlockedMock = jest
+ .spyOn(appStateController, 'isUnlocked')
+ .mockReturnValue(true);
+
+ await expect(
+ appStateController.getUnlockPromise(false),
+ ).resolves.toBeUndefined();
+
+ expect(isUnlockedMock).toHaveBeenCalled();
+ });
+ });
+
+ describe('waitForUnlock', () => {
+ it('resolves immediately if already unlocked', async () => {
+ const emitSpy = jest.spyOn(appStateController, 'emit');
+ const resolveFn = jest.fn();
+ appStateController.waitForUnlock(resolveFn, false);
+ expect(emitSpy).toHaveBeenCalledWith('updateBadge');
+ expect(appStateController.messagingSystem.call).toHaveBeenCalledTimes(0);
+ });
+
+ it('creates approval request when waitForUnlock is called with shouldShowUnlockRequest as true', async () => {
+ jest.spyOn(appStateController, 'isUnlocked').mockReturnValue(false);
+
+ const resolveFn = jest.fn();
+ appStateController.waitForUnlock(resolveFn, true);
+
+ expect(appStateController.messagingSystem.call).toHaveBeenCalledTimes(1);
+ expect(appStateController.messagingSystem.call).toHaveBeenCalledWith(
+ 'ApprovalController:addRequest',
+ expect.objectContaining({
+ id: expect.any(String),
+ origin: ORIGIN_METAMASK,
+ type: 'unlock',
+ }),
+ true,
+ );
+ });
+ });
+
+ describe('handleUnlock', () => {
+ beforeEach(() => {
+ jest.spyOn(appStateController, 'isUnlocked').mockReturnValue(false);
+ });
+ afterEach(() => {
+ jest.clearAllMocks();
+ });
+ it('accepts approval request revolving all the related promises', async () => {
+ const emitSpy = jest.spyOn(appStateController, 'emit');
+ const resolveFn = jest.fn();
+ appStateController.waitForUnlock(resolveFn, true);
+
+ appStateController.handleUnlock();
+
+ expect(emitSpy).toHaveBeenCalled();
+ expect(emitSpy).toHaveBeenCalledWith('updateBadge');
+ expect(appStateController.messagingSystem.call).toHaveBeenCalled();
+ expect(appStateController.messagingSystem.call).toHaveBeenCalledWith(
+ 'ApprovalController:acceptRequest',
+ expect.any(String),
+ );
+ });
+
+ it('logs if rejecting approval request throws', async () => {
+ appStateController._approvalRequestId = 'mock-approval-request-id';
+ appStateController = new AppStateController({
addUnlockListener: jest.fn(),
isUnlocked: jest.fn(() => true),
- initState: {},
onInactiveTimeout: jest.fn(),
showUnlockRequest: jest.fn(),
preferencesStore: {
@@ -20,14 +166,184 @@ describe('AppStateController', () => {
qrHardwareStore: {
subscribe: jest.fn(),
},
+ messenger: {
+ call: jest.fn(() => {
+ throw new Error('mock error');
+ }),
+ },
});
- const date = new Date();
- appStateController.setOutdatedBrowserWarningLastShown(date);
+ appStateController.handleUnlock();
+
+ expect(log.error).toHaveBeenCalledTimes(1);
+ expect(log.error).toHaveBeenCalledWith(
+ 'Attempted to accept missing unlock approval request',
+ );
+ });
+
+ it('returns without call messenger if no approval request in pending', async () => {
+ const emitSpy = jest.spyOn(appStateController, 'emit');
+
+ appStateController.handleUnlock();
+
+ expect(emitSpy).toHaveBeenCalledTimes(0);
+ expect(appStateController.messagingSystem.call).toHaveBeenCalledTimes(0);
+ expect(log.error).toHaveBeenCalledTimes(1);
+ expect(log.error).toHaveBeenCalledWith(
+ 'Attempted to accept missing unlock approval request',
+ );
+ });
+ });
+
+ describe('setDefaultHomeActiveTabName', () => {
+ it('sets the default home tab name', () => {
+ appStateController.setDefaultHomeActiveTabName('testTabName');
+ expect(appStateController.store.getState().defaultHomeActiveTabName).toBe(
+ 'testTabName',
+ );
+ });
+ });
+ describe('setConnectedStatusPopoverHasBeenShown', () => {
+ it('sets connected status popover as shown', () => {
+ appStateController.setConnectedStatusPopoverHasBeenShown();
expect(
- appStateController.store.getState().outdatedBrowserWarningLastShown,
- ).toStrictEqual(date);
+ appStateController.store.getState().connectedStatusPopoverHasBeenShown,
+ ).toBe(true);
+ });
+ });
+
+ describe('setRecoveryPhraseReminderHasBeenShown', () => {
+ it('sets recovery phrase reminder as shown', () => {
+ appStateController.setRecoveryPhraseReminderHasBeenShown();
+ expect(
+ appStateController.store.getState().recoveryPhraseReminderHasBeenShown,
+ ).toBe(true);
+ });
+ });
+
+ describe('setRecoveryPhraseReminderLastShown', () => {
+ it('sets the last shown time of recovery phrase reminder', () => {
+ const timestamp = Date.now();
+ appStateController.setRecoveryPhraseReminderLastShown(timestamp);
+
+ expect(
+ appStateController.store.getState().recoveryPhraseReminderLastShown,
+ ).toBe(timestamp);
+ });
+ });
+
+ describe('setLastActiveTime', () => {
+ it('sets the last active time to the current time', () => {
+ const spy = jest.spyOn(appStateController, '_resetTimer');
+ appStateController.setLastActiveTime();
+
+ expect(spy).toHaveBeenCalled();
+ });
+ });
+
+ describe('setBrowserEnvironment', () => {
+ it('sets the current browser and OS environment', () => {
+ appStateController.setBrowserEnvironment('Windows', 'Chrome');
+ expect(
+ appStateController.store.getState().browserEnvironment,
+ ).toStrictEqual({
+ os: 'Windows',
+ browser: 'Chrome',
+ });
+ });
+ });
+
+ describe('addPollingToken', () => {
+ it('adds a pollingToken for a given environmentType', () => {
+ const pollingTokenType = 'popupGasPollTokens';
+ appStateController.addPollingToken('token1', pollingTokenType);
+ expect(appStateController.store.getState()[pollingTokenType]).toContain(
+ 'token1',
+ );
+ });
+ });
+
+ describe('removePollingToken', () => {
+ it('removes a pollingToken for a given environmentType', () => {
+ const pollingTokenType = 'popupGasPollTokens';
+ appStateController.addPollingToken('token1', pollingTokenType);
+ appStateController.removePollingToken('token1', pollingTokenType);
+ expect(
+ appStateController.store.getState()[pollingTokenType],
+ ).not.toContain('token1');
+ });
+ });
+
+ describe('clearPollingTokens', () => {
+ it('clears all pollingTokens', () => {
+ appStateController.addPollingToken('token1', 'popupGasPollTokens');
+ appStateController.addPollingToken('token2', 'notificationGasPollTokens');
+ appStateController.addPollingToken('token3', 'fullScreenGasPollTokens');
+ appStateController.clearPollingTokens();
+
+ expect(
+ appStateController.store.getState().popupGasPollTokens,
+ ).toStrictEqual([]);
+ expect(
+ appStateController.store.getState().notificationGasPollTokens,
+ ).toStrictEqual([]);
+ expect(
+ appStateController.store.getState().fullScreenGasPollTokens,
+ ).toStrictEqual([]);
+ });
+ });
+
+ describe('setShowTestnetMessageInDropdown', () => {
+ it('sets whether the testnet dismissal link should be shown in the network dropdown', () => {
+ appStateController.setShowTestnetMessageInDropdown(true);
+ expect(
+ appStateController.store.getState().showTestnetMessageInDropdown,
+ ).toBe(true);
+
+ appStateController.setShowTestnetMessageInDropdown(false);
+ expect(
+ appStateController.store.getState().showTestnetMessageInDropdown,
+ ).toBe(false);
+ });
+ });
+
+ describe('setShowBetaHeader', () => {
+ it('sets whether the beta notification heading on the home page', () => {
+ appStateController.setShowBetaHeader(true);
+ expect(appStateController.store.getState().showBetaHeader).toBe(true);
+
+ appStateController.setShowBetaHeader(false);
+ expect(appStateController.store.getState().showBetaHeader).toBe(false);
+ });
+ });
+
+ describe('setCurrentPopupId', () => {
+ it('sets the currentPopupId in the appState', () => {
+ const popupId = 'popup1';
+
+ appStateController.setCurrentPopupId(popupId);
+ expect(appStateController.store.getState().currentPopupId).toBe(popupId);
+ });
+ });
+
+ describe('getCurrentPopupId', () => {
+ it('retrieves the currentPopupId saved in the appState', () => {
+ const popupId = 'popup1';
+
+ appStateController.setCurrentPopupId(popupId);
+ expect(appStateController.getCurrentPopupId()).toBe(popupId);
+ });
+ });
+
+ describe('setFirstTimeUsedNetwork', () => {
+ it('updates the array of the first time used networks', () => {
+ const chainId = '0x1';
+
+ appStateController.setFirstTimeUsedNetwork(chainId);
+ expect(appStateController.store.getState().usedNetworks[chainId]).toBe(
+ true,
+ );
});
});
});
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index 133f5a877cd8..53bba67674b5 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -520,9 +520,15 @@ export default class MetamaskController extends EventEmitter {
isUnlocked: this.isUnlocked.bind(this),
initState: initState.AppStateController,
onInactiveTimeout: () => this.setLocked(),
- showUnlockRequest: opts.showUserConfirmation,
preferencesStore: this.preferencesController.store,
qrHardwareStore: this.qrHardwareKeyring.getMemStore(),
+ messenger: this.controllerMessenger.getRestricted({
+ name: 'AppStateController',
+ allowedActions: [
+ `${this.approvalController.name}:addRequest`,
+ `${this.approvalController.name}:acceptRequest`,
+ ],
+ }),
});
const currencyRateMessenger = this.controllerMessenger.getRestricted({
From 17147b381711a59d059f88534b22b640bb41c456 Mon Sep 17 00:00:00 2001
From: legobeat <109787230+legobeat@users.noreply.github.com>
Date: Fri, 14 Apr 2023 16:59:51 +0900
Subject: [PATCH 09/23] test: increase timeout for failing tests (#18189)
---
test/e2e/tests/add-custom-network.spec.js | 4 +++-
test/e2e/tests/custom-token-add-approve.spec.js | 11 +++++++----
test/e2e/tests/send-eth.spec.js | 9 ++++++---
3 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/test/e2e/tests/add-custom-network.spec.js b/test/e2e/tests/add-custom-network.spec.js
index 3564f9f2e5e1..45bdc8e36449 100644
--- a/test/e2e/tests/add-custom-network.spec.js
+++ b/test/e2e/tests/add-custom-network.spec.js
@@ -392,7 +392,9 @@ describe('Custom network', function () {
text: 'Delete',
});
- await driver.findElement('.modal-container__footer');
+ await driver.waitForSelector('.modal-container__footer', {
+ timeout: 15000,
+ });
// should be deleted from the modal shown again to complete deletion custom network
await driver.clickElement({
tag: 'button',
diff --git a/test/e2e/tests/custom-token-add-approve.spec.js b/test/e2e/tests/custom-token-add-approve.spec.js
index 5e1addcc5ca1..c3e73d71e451 100644
--- a/test/e2e/tests/custom-token-add-approve.spec.js
+++ b/test/e2e/tests/custom-token-add-approve.spec.js
@@ -292,10 +292,13 @@ describe('Create token, approve token and approve token without gas', function (
await gasLimitInput.fill('60001');
await driver.clickElement({ text: 'Save', tag: 'button' });
- await driver.waitForSelector({
- css: '.box--flex-direction-row > h6',
- text: '0.0006 ETH',
- });
+ await driver.waitForSelector(
+ {
+ css: '.box--flex-direction-row > h6',
+ text: '0.0006 ETH',
+ },
+ { timeout: 15000 },
+ );
// editing spending cap
await driver.clickElement({
diff --git a/test/e2e/tests/send-eth.spec.js b/test/e2e/tests/send-eth.spec.js
index b5542c1cba70..d287184c3e8f 100644
--- a/test/e2e/tests/send-eth.spec.js
+++ b/test/e2e/tests/send-eth.spec.js
@@ -354,9 +354,12 @@ describe('Send ETH from dapp using advanced gas controls', function () {
'.transaction-list-item__primary-currency',
);
await txValue.click();
- const baseFeeValue = await driver.waitForSelector({
- text: '0.000000025',
- });
+ const baseFeeValue = await driver.waitForSelector(
+ {
+ text: '0.000000025',
+ },
+ { timeout: 15000 },
+ );
assert.equal(await baseFeeValue.getText(), '0.000000025');
},
);
From 3eefe874a8a224d8dfbce3d39bd51e1ba36dff2c Mon Sep 17 00:00:00 2001
From: David Drazic
Date: Fri, 14 Apr 2023 12:04:23 +0200
Subject: [PATCH 10/23] [FLASK] Revert changes made to stable permission
display (UI design) (#18470)
* Revert changes made to stable permission display (UI design)
* Add test for new component
* Update paddings for install flow
* Fix missing icons on snap installation flow
* Update storybook path
* Add targetSubjectMetadata param
---------
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
Co-authored-by: Frederik Bolding
---
.../app/flask/snap-permissions-list/index.js | 1 +
.../snap-permissions-list.js | 37 +++++++++++++++
.../snap-permissions-list.stories.js | 37 +++++++++++++++
.../snap-permissions-list.test.js | 37 +++++++++++++++
.../app/permission-cell/permission-cell.js | 11 +++--
...ission-page-container-content.component.js | 7 ++-
.../permissions-connect-permission-list.js | 43 +++++++++++-------
...issions-connect-permission-list.stories.js | 13 ------
ui/helpers/utils/permission.js | 45 ++++++++++++++++---
.../flask/snap-install/snap-install.js | 18 +++++---
.../settings/flask/view-snap/view-snap.js | 4 +-
11 files changed, 205 insertions(+), 48 deletions(-)
create mode 100644 ui/components/app/flask/snap-permissions-list/index.js
create mode 100644 ui/components/app/flask/snap-permissions-list/snap-permissions-list.js
create mode 100644 ui/components/app/flask/snap-permissions-list/snap-permissions-list.stories.js
create mode 100644 ui/components/app/flask/snap-permissions-list/snap-permissions-list.test.js
diff --git a/ui/components/app/flask/snap-permissions-list/index.js b/ui/components/app/flask/snap-permissions-list/index.js
new file mode 100644
index 000000000000..457784a5f6a4
--- /dev/null
+++ b/ui/components/app/flask/snap-permissions-list/index.js
@@ -0,0 +1 @@
+export { default } from './snap-permissions-list';
diff --git a/ui/components/app/flask/snap-permissions-list/snap-permissions-list.js b/ui/components/app/flask/snap-permissions-list/snap-permissions-list.js
new file mode 100644
index 000000000000..6dda11d04338
--- /dev/null
+++ b/ui/components/app/flask/snap-permissions-list/snap-permissions-list.js
@@ -0,0 +1,37 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import { getWeightedPermissions } from '../../../../helpers/utils/permission';
+import { useI18nContext } from '../../../../hooks/useI18nContext';
+import PermissionCell from '../../permission-cell';
+import Box from '../../../ui/box';
+
+export default function SnapPermissionsList({
+ permissions,
+ targetSubjectMetadata,
+}) {
+ const t = useI18nContext();
+
+ return (
+
+ {getWeightedPermissions(t, permissions, targetSubjectMetadata).map(
+ (permission, index) => {
+ return (
+
+ );
+ },
+ )}
+
+ );
+}
+
+SnapPermissionsList.propTypes = {
+ permissions: PropTypes.object.isRequired,
+ targetSubjectMetadata: PropTypes.object.isRequired,
+};
diff --git a/ui/components/app/flask/snap-permissions-list/snap-permissions-list.stories.js b/ui/components/app/flask/snap-permissions-list/snap-permissions-list.stories.js
new file mode 100644
index 000000000000..e3f24287e874
--- /dev/null
+++ b/ui/components/app/flask/snap-permissions-list/snap-permissions-list.stories.js
@@ -0,0 +1,37 @@
+import React from 'react';
+
+import SnapPermissionsList from '.';
+
+export default {
+ title: 'Components/App/flask/SnapPermissionsList',
+
+ component: SnapPermissionsList,
+ argTypes: {
+ permissions: {
+ control: 'object',
+ },
+ },
+};
+
+export const DefaultStory = (args) => ;
+
+DefaultStory.storyName = 'Default';
+
+DefaultStory.args = {
+ permissions: {
+ eth_accounts: {},
+ snap_dialog: {},
+ snap_getBip32PublicKey: {
+ caveats: [
+ {
+ value: [
+ {
+ path: ['m', `44'`, `0'`],
+ curve: 'secp256k1',
+ },
+ ],
+ },
+ ],
+ },
+ },
+};
diff --git a/ui/components/app/flask/snap-permissions-list/snap-permissions-list.test.js b/ui/components/app/flask/snap-permissions-list/snap-permissions-list.test.js
new file mode 100644
index 000000000000..4ba174224d41
--- /dev/null
+++ b/ui/components/app/flask/snap-permissions-list/snap-permissions-list.test.js
@@ -0,0 +1,37 @@
+import React from 'react';
+import { screen } from '@testing-library/react';
+import { renderWithProvider } from '../../../../../test/jest';
+import SnapPermissionsList from './snap-permissions-list';
+
+describe('Snap Permission List', () => {
+ const mockPermissionData = {
+ snap_dialog: {
+ caveats: null,
+ date: 1680709920602,
+ id: '4dduR1BpsmS0ZJfeVtiAh',
+ invoker: 'local:http://localhost:8080',
+ parentCapability: 'snap_dialog',
+ },
+ };
+ const mockTargetSubjectMetadata = {
+ extensionId: null,
+ iconUrl: null,
+ name: 'TypeScript Example Snap',
+ origin: 'local:http://localhost:8080',
+ subjectType: 'snap',
+ version: '0.2.2',
+ };
+
+ it('renders permissions list for snaps', () => {
+ renderWithProvider(
+ ,
+ );
+ expect(
+ screen.getByText('Display dialog windows in MetaMask.'),
+ ).toBeInTheDocument();
+ expect(screen.getByText('Approved on 2023-04-05')).toBeInTheDocument();
+ });
+});
diff --git a/ui/components/app/permission-cell/permission-cell.js b/ui/components/app/permission-cell/permission-cell.js
index ea87a381e16a..fbbafea434d8 100644
--- a/ui/components/app/permission-cell/permission-cell.js
+++ b/ui/components/app/permission-cell/permission-cell.js
@@ -53,6 +53,11 @@ const PermissionCell = ({
iconBackgroundColor = Color.backgroundAlternative;
}
+ let permissionIcon = avatarIcon;
+ if (typeof avatarIcon !== 'string' && avatarIcon?.props?.iconName) {
+ permissionIcon = avatarIcon.props.iconName;
+ }
+
return (
- {typeof avatarIcon === 'string' ? (
+ {typeof permissionIcon === 'string' ? (
) : (
- avatarIcon
+ permissionIcon
)}
diff --git a/ui/components/app/permission-page-container/permission-page-container-content/permission-page-container-content.component.js b/ui/components/app/permission-page-container/permission-page-container-content/permission-page-container-content.component.js
index ffbbca22dec0..accab2e15229 100644
--- a/ui/components/app/permission-page-container/permission-page-container-content/permission-page-container-content.component.js
+++ b/ui/components/app/permission-page-container/permission-page-container-content/permission-page-container-content.component.js
@@ -28,11 +28,14 @@ export default class PermissionPageContainerContent extends PureComponent {
};
renderRequestedPermissions() {
- const { selectedPermissions } = this.props;
+ const { selectedPermissions, subjectMetadata } = this.props;
return (
);
}
diff --git a/ui/components/app/permissions-connect-permission-list/permissions-connect-permission-list.js b/ui/components/app/permissions-connect-permission-list/permissions-connect-permission-list.js
index 5c5201f60af6..6d0ccfcb77d9 100644
--- a/ui/components/app/permissions-connect-permission-list/permissions-connect-permission-list.js
+++ b/ui/components/app/permissions-connect-permission-list/permissions-connect-permission-list.js
@@ -1,9 +1,29 @@
import React from 'react';
import PropTypes from 'prop-types';
-import { getWeightedPermissions } from '../../../helpers/utils/permission';
+import {
+ getRightIcon,
+ getWeightedPermissions,
+} from '../../../helpers/utils/permission';
import { useI18nContext } from '../../../hooks/useI18nContext';
-import PermissionCell from '../permission-cell';
-import Box from '../../ui/box';
+
+/**
+ * Get one or more permission descriptions for a permission name.
+ *
+ * @param permission - The permission to render.
+ * @param index - The index of the permission.
+ * @returns {JSX.Element} A permission description node.
+ */
+function getDescriptionNode(permission, index) {
+ const { label, leftIcon, permissionName } = permission;
+
+ return (
+
+ {typeof leftIcon === 'string' ? : leftIcon}
+ {label}
+ {getRightIcon(permission)}
+
+ );
+}
export default function PermissionsConnectPermissionList({
permissions,
@@ -12,22 +32,11 @@ export default function PermissionsConnectPermissionList({
const t = useI18nContext();
return (
-
+
{getWeightedPermissions(t, permissions, targetSubjectMetadata).map(
- (permission, index) => {
- return (
-
- );
- },
+ getDescriptionNode,
)}
-
+
);
}
diff --git a/ui/components/app/permissions-connect-permission-list/permissions-connect-permission-list.stories.js b/ui/components/app/permissions-connect-permission-list/permissions-connect-permission-list.stories.js
index dd5cfb9ba9de..9ee800b0328f 100644
--- a/ui/components/app/permissions-connect-permission-list/permissions-connect-permission-list.stories.js
+++ b/ui/components/app/permissions-connect-permission-list/permissions-connect-permission-list.stories.js
@@ -20,18 +20,5 @@ DefaultStory.storyName = 'Default';
DefaultStory.args = {
permissions: {
eth_accounts: {},
- snap_dialog: {},
- snap_getBip32PublicKey: {
- caveats: [
- {
- value: [
- {
- path: ['m', `44'`, `0'`],
- curve: 'secp256k1',
- },
- ],
- },
- ],
- },
},
};
diff --git a/ui/helpers/utils/permission.js b/ui/helpers/utils/permission.js
index b931f06569cf..09b7e1600511 100644
--- a/ui/helpers/utils/permission.js
+++ b/ui/helpers/utils/permission.js
@@ -15,13 +15,23 @@ import {
} from '../../../shared/constants/permissions';
import Tooltip from '../../components/ui/tooltip';
import {
+ AvatarIcon,
///: BEGIN:ONLY_INCLUDE_IN(flask)
Text,
+ Icon,
///: END:ONLY_INCLUDE_IN
} from '../../components/component-library';
-import { ICON_NAMES } from '../../components/component-library/icon/deprecated';
+import {
+ ICON_NAMES,
+ ICON_SIZES,
+} from '../../components/component-library/icon/deprecated';
///: BEGIN:ONLY_INCLUDE_IN(flask)
-import { Color, FONT_WEIGHT, TextVariant } from '../constants/design-system';
+import {
+ Color,
+ FONT_WEIGHT,
+ IconColor,
+ TextVariant,
+} from '../constants/design-system';
import {
coinTypeToProtocolName,
getSnapDerivationPathName,
@@ -31,10 +41,33 @@ import {
const UNKNOWN_PERMISSION = Symbol('unknown');
+///: BEGIN:ONLY_INCLUDE_IN(flask)
+const RIGHT_INFO_ICON = (
+
+);
+///: END:ONLY_INCLUDE_IN
+
+function getLeftIcon(iconName) {
+ return (
+
+ );
+}
+
export const PERMISSION_DESCRIPTIONS = deepFreeze({
[RestrictedMethods.eth_accounts]: ({ t }) => ({
label: t('permission_ethereumAccounts'),
- leftIcon: ICON_NAMES.EYE,
+ leftIcon: getLeftIcon(ICON_NAMES.EYE),
+ rightIcon: null,
weight: 2,
}),
///: BEGIN:ONLY_INCLUDE_IN(flask)
@@ -251,7 +284,8 @@ export const PERMISSION_DESCRIPTIONS = deepFreeze({
[RestrictedMethods.wallet_snap]: ({ t, permissionValue }) => {
const snaps = permissionValue.caveats[0].value;
const baseDescription = {
- leftIcon: ICON_NAMES.FLASH,
+ leftIcon: getLeftIcon(ICON_NAMES.FLASH),
+ rightIcon: RIGHT_INFO_ICON,
};
return Object.keys(snaps).map((snapId) => {
@@ -373,7 +407,8 @@ export const PERMISSION_DESCRIPTIONS = deepFreeze({
///: END:ONLY_INCLUDE_IN
[UNKNOWN_PERMISSION]: ({ t, permissionName }) => ({
label: t('permission_unknown', [permissionName ?? 'undefined']),
- leftIcon: ICON_NAMES.QUESTION,
+ leftIcon: getLeftIcon(ICON_NAMES.QUESTION),
+ rightIcon: null,
weight: 4,
}),
});
diff --git a/ui/pages/permissions-connect/flask/snap-install/snap-install.js b/ui/pages/permissions-connect/flask/snap-install/snap-install.js
index 34a0cbcd3e7a..d4b7126239ec 100644
--- a/ui/pages/permissions-connect/flask/snap-install/snap-install.js
+++ b/ui/pages/permissions-connect/flask/snap-install/snap-install.js
@@ -1,7 +1,6 @@
import PropTypes from 'prop-types';
import React, { useCallback, useState } from 'react';
import { PageContainerFooter } from '../../../../components/ui/page-container';
-import PermissionsConnectPermissionList from '../../../../components/app/permissions-connect-permission-list';
import { useI18nContext } from '../../../../hooks/useI18nContext';
import SnapInstallWarning from '../../../../components/app/flask/snap-install-warning';
import Box from '../../../../components/ui/box/box';
@@ -21,6 +20,7 @@ import SnapAuthorship from '../../../../components/app/flask/snap-authorship';
import { Text } from '../../../../components/component-library';
import { useOriginMetadata } from '../../../../hooks/useOriginMetadata';
import { getSnapName } from '../../../../helpers/utils/util';
+import SnapPermissionsList from '../../../../components/app/flask/snap-permissions-list';
export default function SnapInstall({
request,
@@ -87,12 +87,16 @@ export default function SnapInstall({
className="headers"
alignItems={AlignItems.center}
flexDirection={FLEX_DIRECTION.COLUMN}
- paddingLeft={4}
- paddingRight={4}
>
-
+
+
+
{!hasError && (
-
+
{t('snapInstall')}
)}
@@ -114,6 +118,8 @@ export default function SnapInstall({
{t('snapInstallRequestsPermission', [
@@ -121,7 +127,7 @@ export default function SnapInstall({
{snapName},
])}
-
diff --git a/ui/pages/settings/flask/view-snap/view-snap.js b/ui/pages/settings/flask/view-snap/view-snap.js
index 3261652d9886..a9ab3a0965ad 100644
--- a/ui/pages/settings/flask/view-snap/view-snap.js
+++ b/ui/pages/settings/flask/view-snap/view-snap.js
@@ -19,7 +19,6 @@ import SnapAuthorship from '../../../../components/app/flask/snap-authorship';
import Box from '../../../../components/ui/box';
import SnapRemoveWarning from '../../../../components/app/flask/snap-remove-warning';
import ToggleButton from '../../../../components/ui/toggle-button';
-import PermissionsConnectPermissionList from '../../../../components/app/permissions-connect-permission-list/permissions-connect-permission-list';
import ConnectedSitesList from '../../../../components/app/connected-sites-list';
import Tooltip from '../../../../components/ui/tooltip';
import { SNAPS_LIST_ROUTE } from '../../../../helpers/constants/routes';
@@ -38,6 +37,7 @@ import {
getTargetSubjectMetadata,
} from '../../../../selectors';
import { formatDate } from '../../../../helpers/utils/util';
+import SnapPermissionsList from '../../../../components/app/flask/snap-permissions-list';
function ViewSnap() {
const t = useI18nContext();
@@ -182,7 +182,7 @@ function ViewSnap() {
{t('snapAccess', [snap.manifest.proposedName])}
-
From 8fdbd07c91309568e1d148c47ed265f60a92d74f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ant=C3=B3nio=20Regadas?=
Date: Fri, 14 Apr 2023 11:35:58 +0100
Subject: [PATCH 11/23] [MMI] Interactive replacement token modal (#18523)
* updates styles for confirm-add-institutional-feature
* initial component
* adds tests and storybook file
* clean up styles and adds MM design system
* prettier
* locale update
* lint
* snapshot update
---------
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
---
app/_locales/en/messages.json | 15 ++
.../index.js | 1 +
.../interactive-replacement-token-modal.js | 154 ++++++++++++++++++
...ractive-replacement-token-modal.stories.js | 72 ++++++++
...nteractive-replacement-token-modal.test.js | 91 +++++++++++
...irm-add-institutional-feature.test.js.snap | 16 +-
.../confirm-add-institutional-feature.js | 25 +--
7 files changed, 357 insertions(+), 17 deletions(-)
create mode 100644 ui/components/institutional/interactive-replacement-token-modal/index.js
create mode 100644 ui/components/institutional/interactive-replacement-token-modal/interactive-replacement-token-modal.js
create mode 100644 ui/components/institutional/interactive-replacement-token-modal/interactive-replacement-token-modal.stories.js
create mode 100644 ui/components/institutional/interactive-replacement-token-modal/interactive-replacement-token-modal.test.js
diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json
index 382dd314ab87..5d7a113e0683 100644
--- a/app/_locales/en/messages.json
+++ b/app/_locales/en/messages.json
@@ -929,6 +929,21 @@
"custodianAccount": {
"message": "Custodian account"
},
+ "custodyRefreshTokenModalDescription": {
+ "message": "Please go to $1 and click the 'Connect to MMI' button within their user interface to connect your accounts to MMI again."
+ },
+ "custodyRefreshTokenModalDescription1": {
+ "message": "Your custodian issues a token that authenticates the MetaMask Institutional extension, allowing you to connect your accounts."
+ },
+ "custodyRefreshTokenModalDescription2": {
+ "message": "This token expires after a certain period for security reasons. This requires you to reconnect to MMI."
+ },
+ "custodyRefreshTokenModalSubtitle": {
+ "message": "Why am I seeing this?"
+ },
+ "custodyRefreshTokenModalTitle": {
+ "message": "Your custodian session has expired"
+ },
"custom": {
"message": "Advanced"
},
diff --git a/ui/components/institutional/interactive-replacement-token-modal/index.js b/ui/components/institutional/interactive-replacement-token-modal/index.js
new file mode 100644
index 000000000000..1f1b5f7f68b8
--- /dev/null
+++ b/ui/components/institutional/interactive-replacement-token-modal/index.js
@@ -0,0 +1 @@
+export { default } from './interactive-replacement-token-modal';
diff --git a/ui/components/institutional/interactive-replacement-token-modal/interactive-replacement-token-modal.js b/ui/components/institutional/interactive-replacement-token-modal/interactive-replacement-token-modal.js
new file mode 100644
index 000000000000..0f40723d4a4d
--- /dev/null
+++ b/ui/components/institutional/interactive-replacement-token-modal/interactive-replacement-token-modal.js
@@ -0,0 +1,154 @@
+import React, { useContext } from 'react';
+import { useDispatch, useSelector } from 'react-redux';
+import Modal from '../../app/modal';
+import { useI18nContext } from '../../../hooks/useI18nContext';
+import { MetaMetricsContext } from '../../../contexts/metametrics';
+import { hideModal } from '../../../store/actions';
+import { getSelectedAddress } from '../../../selectors/selectors';
+import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils';
+import { Text } from '../../component-library';
+import Box from '../../ui/box';
+import {
+ BLOCK_SIZES,
+ BackgroundColor,
+ DISPLAY,
+ FLEX_WRAP,
+ FLEX_DIRECTION,
+ BorderRadius,
+ FONT_WEIGHT,
+ TEXT_ALIGN,
+ AlignItems,
+} from '../../../helpers/constants/design-system';
+
+const InteractiveReplacementTokenModal = () => {
+ const t = useI18nContext();
+ const trackEvent = useContext(MetaMetricsContext);
+ const dispatch = useDispatch();
+
+ const { url } = useSelector(
+ (state) => state.metamask.interactiveReplacementToken || {},
+ );
+
+ const { custodians } = useSelector(
+ (state) => state.metamask.mmiConfiguration,
+ );
+ const address = useSelector(getSelectedAddress);
+ const custodyAccountDetails = useSelector(
+ (state) =>
+ state.metamask.custodyAccountDetails[toChecksumHexAddress(address)],
+ );
+
+ const custodianName = custodyAccountDetails?.custodianName;
+ const custodian =
+ custodians.find((item) => item.name === custodianName) || {};
+
+ const renderCustodyInfo = () => {
+ let img;
+
+ if (custodian.iconUrl) {
+ img = (
+
+
+
+
+
+ );
+ } else {
+ img = (
+
+ {custodian.displayName}
+
+ );
+ }
+
+ return (
+ <>
+ {img}
+
+ {t('custodyRefreshTokenModalTitle')}
+
+
+ {t('custodyRefreshTokenModalDescription', [custodian.displayName])}
+
+
+ {t('custodyRefreshTokenModalSubtitle')}
+
+
+ {t('custodyRefreshTokenModalDescription1')}
+
+
+ {t('custodyRefreshTokenModalDescription2')}
+
+ >
+ );
+ };
+
+ const handleSubmit = () => {
+ global.platform.openTab({
+ url,
+ });
+
+ trackEvent({
+ category: 'MMI',
+ event: 'User clicked refresh token link',
+ });
+ };
+
+ const handleClose = () => {
+ dispatch(hideModal());
+ };
+
+ return (
+
+
+ {renderCustodyInfo(custodian)}
+
+
+ );
+};
+
+export default InteractiveReplacementTokenModal;
diff --git a/ui/components/institutional/interactive-replacement-token-modal/interactive-replacement-token-modal.stories.js b/ui/components/institutional/interactive-replacement-token-modal/interactive-replacement-token-modal.stories.js
new file mode 100644
index 000000000000..86c03504c103
--- /dev/null
+++ b/ui/components/institutional/interactive-replacement-token-modal/interactive-replacement-token-modal.stories.js
@@ -0,0 +1,72 @@
+import React from 'react';
+import { Provider } from 'react-redux';
+import configureStore from '../../../store/store';
+import testData from '../../../../.storybook/test-data';
+import InteractiveReplacementTokenModal from '.';
+
+const customData = {
+ ...testData,
+ metamask: {
+ ...testData.metamask,
+ mmiConfiguration: {
+ portfolio: {
+ enabled: true,
+ url: 'https://dev.metamask-institutional.io/',
+ },
+ features: {
+ websocketApi: true,
+ },
+ custodians: [
+ {
+ refreshTokenUrl:
+ 'https://saturn-custody.dev.metamask-institutional.io/oauth/token',
+ name: 'saturn-dev',
+ displayName: 'Saturn Custody',
+ enabled: true,
+ mmiApiUrl: 'https://api.dev.metamask-institutional.io/v1',
+ websocketApiUrl:
+ 'wss://websocket.dev.metamask-institutional.io/v1/ws',
+ apiBaseUrl:
+ 'https://saturn-custody.dev.metamask-institutional.io/eth',
+ iconUrl:
+ 'https://saturn-custody-ui.dev.metamask-institutional.io/saturn.svg',
+ isNoteToTraderSupported: true,
+ },
+ ],
+ },
+ custodyAccountDetails: {
+ '0xAddress': {
+ address: '0xAddress',
+ details: 'details',
+ custodyType: 'testCustody - Saturn',
+ custodianName: 'saturn-dev',
+ },
+ },
+ provider: {
+ type: 'test',
+ },
+ selectedAddress: '0xAddress',
+ isUnlocked: true,
+ interactiveReplacementToken: {
+ oldRefreshToken: 'abc',
+ url: 'https://saturn-custody-ui.dev.metamask-institutional.io',
+ },
+ preferences: {
+ useNativeCurrencyAsPrimaryCurrency: true,
+ },
+ },
+};
+
+const store = configureStore(customData);
+
+export default {
+ title: 'Components/Institutional/InteractiveReplacementToken-Modal',
+ decorators: [(story) => {story()}],
+ component: InteractiveReplacementTokenModal,
+};
+
+export const DefaultStory = (args) => (
+
+);
+
+DefaultStory.storyName = 'InteractiveReplacementTokenModal';
diff --git a/ui/components/institutional/interactive-replacement-token-modal/interactive-replacement-token-modal.test.js b/ui/components/institutional/interactive-replacement-token-modal/interactive-replacement-token-modal.test.js
new file mode 100644
index 000000000000..4a78a223716d
--- /dev/null
+++ b/ui/components/institutional/interactive-replacement-token-modal/interactive-replacement-token-modal.test.js
@@ -0,0 +1,91 @@
+import React from 'react';
+import sinon from 'sinon';
+import configureMockStore from 'redux-mock-store';
+import { fireEvent, waitFor } from '@testing-library/react';
+import { renderWithProvider } from '../../../../test/lib/render-helpers';
+import testData from '../../../../.storybook/test-data';
+import InteractiveReplacementTokenModal from '.';
+
+describe('Interactive Replacement Token Modal', function () {
+ const mockStore = {
+ ...testData,
+ metamask: {
+ ...testData.metamask,
+ mmiConfiguration: {
+ portfolio: {
+ enabled: true,
+ url: 'https://dev.metamask-institutional.io/',
+ },
+ features: {
+ websocketApi: true,
+ },
+ custodians: [
+ {
+ refreshTokenUrl:
+ 'https://saturn-custody.dev.metamask-institutional.io/oauth/token',
+ name: 'saturn-dev',
+ displayName: 'Saturn Custody',
+ enabled: true,
+ mmiApiUrl: 'https://api.dev.metamask-institutional.io/v1',
+ websocketApiUrl:
+ 'wss://websocket.dev.metamask-institutional.io/v1/ws',
+ apiBaseUrl:
+ 'https://saturn-custody.dev.metamask-institutional.io/eth',
+ iconUrl:
+ 'https://saturn-custody-ui.dev.metamask-institutional.io/saturn.svg',
+ isNoteToTraderSupported: true,
+ },
+ ],
+ },
+ custodyAccountDetails: {
+ '0xAddress': {
+ address: '0xAddress',
+ details: 'details',
+ custodyType: 'testCustody - Saturn',
+ custodianName: 'saturn-dev',
+ },
+ },
+ provider: {
+ type: 'test',
+ },
+ selectedAddress: '0xAddress',
+ isUnlocked: true,
+ interactiveReplacementToken: {
+ oldRefreshToken: 'abc',
+ url: 'https://saturn-custody-ui.dev.metamask-institutional.io',
+ },
+ preferences: {
+ useNativeCurrencyAsPrimaryCurrency: true,
+ },
+ },
+ };
+
+ const store = configureMockStore()(mockStore);
+
+ it('should render the interactive-replacement-token-modal', () => {
+ const { getByText, getByTestId } = renderWithProvider(
+ ,
+ store,
+ );
+
+ expect(getByTestId('interactive-replacement-token-modal')).toBeVisible();
+ expect(getByText('Your custodian session has expired')).toBeInTheDocument();
+ });
+
+ it('opens new tab on Open Codefi Compliance click', async () => {
+ global.platform = { openTab: sinon.spy() };
+
+ const { container } = renderWithProvider(
+ ,
+ store,
+ );
+
+ const button = container.getElementsByClassName('btn-primary')[0];
+
+ fireEvent.click(button);
+
+ await waitFor(() => {
+ expect(global.platform.openTab.calledOnce).toStrictEqual(true);
+ });
+ });
+});
diff --git a/ui/pages/institutional/confirm-add-institutional-feature/__snapshots__/confirm-add-institutional-feature.test.js.snap b/ui/pages/institutional/confirm-add-institutional-feature/__snapshots__/confirm-add-institutional-feature.test.js.snap
index 2d68b55319b0..10ee36b9b161 100644
--- a/ui/pages/institutional/confirm-add-institutional-feature/__snapshots__/confirm-add-institutional-feature.test.js.snap
+++ b/ui/pages/institutional/confirm-add-institutional-feature/__snapshots__/confirm-add-institutional-feature.test.js.snap
@@ -42,26 +42,28 @@ exports[`Confirm Add Institutional Feature opens confirm institutional sucessful
-
+