Skip to content

Commit f501f62

Browse files
authored
Update plugin permissions flow (MetaMask#87)
* update plugin permissions flow add wallet_installPlugins method add wallet_enable method update inpage provider add LoginPerSite background changes
1 parent 7f884a2 commit f501f62

File tree

471 files changed

+12804
-9230
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

471 files changed

+12804
-9230
lines changed

.circleci/config.yml

Lines changed: 49 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
version: 2
1+
version: 2.1
22

33
workflows:
4-
version: 2
54
test_and_release:
65
jobs:
76
- create_release_pull_request:
@@ -23,6 +22,7 @@ workflows:
2322
- test-lint:
2423
requires:
2524
- prep-deps
25+
- test-lint-shellcheck
2626
# - test-e2e-chrome:
2727
# requires:
2828
# - prep-deps
@@ -32,6 +32,9 @@ workflows:
3232
- test-unit:
3333
requires:
3434
- prep-deps
35+
- test-unit-global:
36+
requires:
37+
- prep-deps
3538
- test-mozilla-lint:
3639
requires:
3740
- prep-deps
@@ -47,7 +50,9 @@ workflows:
4750
- all-tests-pass:
4851
requires:
4952
- test-lint
53+
- test-lint-shellcheck
5054
- test-unit
55+
- test-unit-global
5156
- test-mozilla-lint
5257
# - test-e2e-chrome
5358
# - test-e2e-firefox
@@ -74,7 +79,7 @@ workflows:
7479
jobs:
7580
create_release_pull_request:
7681
docker:
77-
- image: circleci/node:8.15.1-browsers
82+
- image: circleci/node:10.17-browsers
7883
steps:
7984
- checkout
8085
- run:
@@ -86,13 +91,13 @@ jobs:
8691
8792
prep-deps:
8893
docker:
89-
- image: circleci/node:10.16-browsers
94+
- image: circleci/node:10.17-browsers
9095
steps:
9196
- checkout
9297
- run:
9398
name: Install deps
9499
command: |
95-
yarn --frozen-lockfile --har
100+
.circleci/scripts/deps-install.sh
96101
- run:
97102
name: Collect yarn install HAR logs
98103
command: |
@@ -105,7 +110,7 @@ jobs:
105110

106111
prep-build:
107112
docker:
108-
- image: circleci/node:10.16-browsers
113+
- image: circleci/node:10.17-browsers
109114
steps:
110115
- checkout
111116
- attach_workspace:
@@ -124,7 +129,7 @@ jobs:
124129

125130
prep-docs:
126131
docker:
127-
- image: circleci/node:10.16-browsers
132+
- image: circleci/node:10.17-browsers
128133
steps:
129134
- checkout
130135
- attach_workspace:
@@ -139,7 +144,7 @@ jobs:
139144

140145
prep-scss:
141146
docker:
142-
- image: circleci/node:10.16-browsers
147+
- image: circleci/node:10.17-browsers
143148
steps:
144149
- checkout
145150
- attach_workspace:
@@ -158,18 +163,31 @@ jobs:
158163

159164
test-lint:
160165
docker:
161-
- image: circleci/node:10.16-browsers
166+
- image: circleci/node:10.17-browsers
162167
steps:
163168
- checkout
164169
- attach_workspace:
165170
at: .
166171
- run:
167-
name: Test
172+
name: Lint
168173
command: yarn lint
174+
- run:
175+
name: Verify locales
176+
command: yarn verify-locales --quiet
177+
178+
test-lint-shellcheck:
179+
docker:
180+
- image: circleci/node:10.17-browsers
181+
steps:
182+
- checkout
183+
- run: sudo apt-get install shellcheck
184+
- run:
185+
name: Shellcheck Lint
186+
command: yarn lint:shellcheck
169187

170188
test-deps:
171189
docker:
172-
- image: circleci/node:10.16-browsers
190+
- image: circleci/node:10.17-browsers
173191
steps:
174192
- checkout
175193
- attach_workspace:
@@ -180,7 +198,7 @@ jobs:
180198

181199
test-e2e-chrome:
182200
docker:
183-
- image: circleci/node:10.16-browsers
201+
- image: circleci/node:10.17-browsers
184202
steps:
185203
- checkout
186204
- attach_workspace:
@@ -195,7 +213,7 @@ jobs:
195213

196214
test-e2e-firefox:
197215
docker:
198-
- image: circleci/node:10.16-browsers
216+
- image: circleci/node:10.17-browsers
199217
steps:
200218
- checkout
201219
- run:
@@ -213,7 +231,7 @@ jobs:
213231

214232
job-publish-prerelease:
215233
docker:
216-
- image: circleci/node:10.16-browsers
234+
- image: circleci/node:10.17-browsers
217235
steps:
218236
- checkout
219237
- attach_workspace:
@@ -243,7 +261,7 @@ jobs:
243261

244262
job-publish-release:
245263
docker:
246-
- image: circleci/node:10.16-browsers
264+
- image: circleci/node:10.17-browsers
247265
steps:
248266
- checkout
249267
- attach_workspace:
@@ -267,7 +285,7 @@ jobs:
267285

268286
test-unit:
269287
docker:
270-
- image: circleci/node:10.16-browsers
288+
- image: circleci/node:10.17-browsers
271289
steps:
272290
- checkout
273291
- attach_workspace:
@@ -280,9 +298,19 @@ jobs:
280298
paths:
281299
- .nyc_output
282300
- coverage
301+
test-unit-global:
302+
docker:
303+
- image: circleci/node:10.17-browsers
304+
steps:
305+
- checkout
306+
- attach_workspace:
307+
at: .
308+
- run:
309+
name: test:unit:global
310+
command: yarn test:unit:global
283311
test-mozilla-lint:
284312
docker:
285-
- image: circleci/node:10.16-browsers
313+
- image: circleci/node:10.17-browsers
286314
steps:
287315
- checkout
288316
- attach_workspace:
@@ -293,7 +321,7 @@ jobs:
293321

294322
test-integration-flat-firefox:
295323
docker:
296-
- image: circleci/node:10.16-browsers
324+
- image: circleci/node:10.17-browsers
297325
steps:
298326
- checkout
299327
- attach_workspace:
@@ -309,7 +337,7 @@ jobs:
309337
environment:
310338
browsers: '["Chrome"]'
311339
docker:
312-
- image: circleci/node:10.16-browsers
340+
- image: circleci/node:10.17-browsers
313341
steps:
314342
- checkout
315343
- attach_workspace:
@@ -320,15 +348,15 @@ jobs:
320348

321349
all-tests-pass:
322350
docker:
323-
- image: circleci/node:10.16-browsers
351+
- image: circleci/node:10.17-browsers
324352
steps:
325353
- run:
326354
name: All Tests Passed
327355
command: echo 'weew - everything passed!'
328356

329357
coveralls-upload:
330358
docker:
331-
- image: circleci/node:10.16-browsers
359+
- image: circleci/node:10.17-browsers
332360
steps:
333361
- checkout
334362
- attach_workspace:

.circleci/scripts/deps-install.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
set -x
3+
4+
yarn --frozen-lockfile --ignore-scripts --har
5+
6+
# run each in subshell so directory change does not persist
7+
# scripts can be any of:
8+
# preinstall
9+
# install
10+
# postinstall
11+
12+
# for build
13+
(cd node_modules/node-sass && yarn run postinstall)
14+
(cd node_modules/optipng-bin && yarn run postinstall)
15+
(cd node_modules/gifsicle && yarn run postinstall)
16+
(cd node_modules/jpegtran-bin && yarn run postinstall)
17+
18+
# for test
19+
(cd node_modules/scrypt && yarn run install)
20+
(cd node_modules/weak && yarn run install)
21+
(cd node_modules/chromedriver && yarn run install)
22+
(cd node_modules/geckodriver && yarn run postinstall)
23+
24+
# for release
25+
(cd node_modules/@sentry/cli && yarn run install)

.circleci/scripts/firefox-install

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e
44
set -u
55
set -o pipefail
66

7-
FIREFOX_VERSION='68.0'
7+
FIREFOX_VERSION='70.0'
88
FIREFOX_BINARY="firefox-${FIREFOX_VERSION}.tar.bz2"
99
FIREFOX_BINARY_URL="https://ftp.mozilla.org/pub/firefox/releases/${FIREFOX_VERSION}/linux-x86_64/en-US/${FIREFOX_BINARY}"
1010
FIREFOX_PATH='/opt/firefox'

.eslintrc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
"mocha",
3131
"chai",
3232
"react",
33-
"json"
33+
"json",
34+
"import"
3435
],
3536

3637
"globals": {
@@ -44,17 +45,18 @@
4445
},
4546

4647
"rules": {
48+
"import/no-unresolved": ["error", { "commonjs": true }],
4749
"no-restricted-globals": ["error", "event"],
4850
"accessor-pairs": 2,
4951
"arrow-spacing": [2, { "before": true, "after": true }],
5052
"block-spacing": [2, "always"],
51-
"brace-style": [2, "1tbs", { "allowSingleLine": true }],
53+
"brace-style": 2,
5254
"camelcase": [2, { "properties": "never" }],
5355
"comma-dangle": [2, "always-multiline"],
5456
"comma-spacing": [2, { "before": false, "after": true }],
5557
"comma-style": [2, "last"],
5658
"constructor-super": 2,
57-
"curly": [2, "multi-line"],
59+
"curly": 2,
5860
"dot-location": [2, "property"],
5961
"eol-last": 2,
6062
"eqeqeq": [2, "allow-null"],
@@ -147,7 +149,11 @@
147149
"operator-linebreak": [2, "after", { "overrides": { "?": "ignore", ":": "ignore" } }],
148150
"padded-blocks": "off",
149151
"quotes": [2, "single", {"avoidEscape": true, "allowTemplateLiterals": true}],
152+
"react/jsx-boolean-value": 2,
153+
"react/jsx-curly-brace-presence": [2, { "props": "never", "children": "never" }],
154+
"react/jsx-equals-spacing": 2,
150155
"react/no-deprecated": 0,
156+
"react/default-props-match-prop-types": 2,
151157
"semi": [2, "never"],
152158
"semi-spacing": [2, { "before": false, "after": true }],
153159
"space-before-blocks": [2, "always"],

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ package.json @danjm @whymarrh @Gudahtt
55
yarn.lock @danjm @whymarrh @Gudahtt
66
ui/ @danjm @whymarrh @Gudahtt
77
app/scripts/controllers/transactions @frankiebee
8-
8+
.circleci/scripts/deps-install.sh @kumavis @Gudahtt

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v10.16.3
1+
v10.17.0

.stylelintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"always",
3434
{
3535
"ignore": [
36-
"after-comment",
36+
"after-comment"
3737
]
3838
}
3939
],

0 commit comments

Comments
 (0)