Bump deps, update tests (#728)
* Bump deps, update tests * Update stale.yml * void handlers
This commit is contained in:
parent
3ed90ae23a
commit
fb7dfb3ddc
4
.github/workflows/stale.yml
vendored
4
.github/workflows/stale.yml
vendored
@ -1,7 +1,7 @@
|
||||
name: 'Close stale issues and PRs'
|
||||
on:
|
||||
schedule:
|
||||
- cron: '15 2 * * *'
|
||||
- cron: '4 20 * * *'
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
@ -9,7 +9,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/stale@v3
|
||||
with:
|
||||
repo-token: ${{ secrets.GH_PAT }}
|
||||
repo-token: ${{ secrets.GH_PAT_BOT }}
|
||||
stale-issue-message: 'This issue has been open for 21 days with no activity and is not labelled as an enhancement. It will be closed in 7 days.'
|
||||
stale-issue-label: 'stale'
|
||||
exempt-issue-labels: '-size-l,-size-m,-size-s,-size-xl,-size-xs,[bug]'
|
||||
|
||||
@ -1,5 +1,14 @@
|
||||
# CHANGELOG
|
||||
|
||||
## 0.38.2 May 29, 2021
|
||||
|
||||
**Important** Not published to the stores, just made available to ensure users can have access to a version that uses the latest `@polkadot/{api, util}`
|
||||
|
||||
Changes:
|
||||
|
||||
- Bump `@polkadot/api` & `@polkadot/util` to latest released versions
|
||||
|
||||
|
||||
## 0.38.1 May 25, 2021
|
||||
|
||||
Contributed:
|
||||
|
||||
@ -20,5 +20,6 @@ module.exports = {
|
||||
'<rootDir>/packages/extension-inject/build',
|
||||
'<rootDir>/packages/extension-ui/build'
|
||||
],
|
||||
transformIgnorePatterns: ['/node_modules/(?!(@polkadot|@babel/runtime/helpers/esm/))']
|
||||
testEnvironment: 'jsdom',
|
||||
transformIgnorePatterns: ['/node_modules/(?!@polkadot|@babel/runtime/helpers/esm/)']
|
||||
};
|
||||
|
||||
19
package.json
19
package.json
@ -8,13 +8,13 @@
|
||||
"packages/*"
|
||||
],
|
||||
"resolutions": {
|
||||
"@polkadot/api": "^4.11.2",
|
||||
"@polkadot/keyring": "^6.5.1",
|
||||
"@polkadot/networks": "^6.5.1",
|
||||
"@polkadot/types": "^4.11.2",
|
||||
"@polkadot/util": "^6.5.1",
|
||||
"@polkadot/util-crypto": "^6.5.1",
|
||||
"@polkadot/x-fetch": "^6.5.1",
|
||||
"@polkadot/api": "^4.11.3-7",
|
||||
"@polkadot/keyring": "^6.6.1",
|
||||
"@polkadot/networks": "^6.6.1",
|
||||
"@polkadot/types": "^4.11.3-7",
|
||||
"@polkadot/util": "^6.6.1",
|
||||
"@polkadot/util-crypto": "^6.6.1",
|
||||
"@polkadot/x-fetch": "^6.6.1",
|
||||
"babel-core": "^7.0.0-bridge.0",
|
||||
"safe-buffer": "^5.2.1",
|
||||
"typescript": "^4.2.4"
|
||||
@ -33,12 +33,13 @@
|
||||
"clean": "polkadot-dev-clean-build",
|
||||
"postinstall": "polkadot-dev-yarn-only",
|
||||
"start": "yarn watch",
|
||||
"test": "polkadot-dev-run-test",
|
||||
"test": "polkadot-dev-run-test --detectOpenHandles",
|
||||
"test:one": "polkadot-dev-run-test --detectOpenHandles",
|
||||
"watch": "cd packages/extension && yarn polkadot-exec-webpack --config webpack.watch.cjs --mode development --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.14.3",
|
||||
"@polkadot/dev": "^0.62.16",
|
||||
"@polkadot/dev": "^0.62.20",
|
||||
"@types/jest": "^26.0.23",
|
||||
"i18next-scanner": "^3.0.0",
|
||||
"sinon-chrome": "^3.0.1",
|
||||
|
||||
@ -9,10 +9,10 @@
|
||||
"sideEffects": false,
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/api": "^4.11.2",
|
||||
"@polkadot/api": "^4.11.3-7",
|
||||
"@polkadot/extension-inject": "^0.38.2-1",
|
||||
"@polkadot/keyring": "^6.5.1",
|
||||
"@polkadot/phishing": "^0.6.157",
|
||||
"@polkadot/ui-keyring": "^0.77.1"
|
||||
"@polkadot/keyring": "^6.6.1",
|
||||
"@polkadot/phishing": "^0.6.160",
|
||||
"@polkadot/ui-keyring": "^0.78.1"
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,12 +3,12 @@
|
||||
|
||||
import '../../../../../__mocks__/chrome';
|
||||
|
||||
import type { ResponseSigning } from '@polkadot/extension-base/background/types';
|
||||
import type { MetadataDef } from '@polkadot/extension-inject/types';
|
||||
import type { KeyringPair } from '@polkadot/keyring/types';
|
||||
import type { ExtDef } from '@polkadot/types/extrinsic/signedExtensions/types';
|
||||
import type { SignerPayloadJSON } from '@polkadot/types/types';
|
||||
|
||||
import { ResponseSigning } from '@polkadot/extension-base/background/types';
|
||||
import { MetadataDef } from '@polkadot/extension-inject/types';
|
||||
import { KeyringPair } from '@polkadot/keyring/types';
|
||||
import { TypeRegistry } from '@polkadot/types';
|
||||
import keyring from '@polkadot/ui-keyring';
|
||||
import { cryptoWaitReady } from '@polkadot/util-crypto';
|
||||
|
||||
@ -450,7 +450,9 @@ export default class Extension {
|
||||
}
|
||||
|
||||
console.log('open', url);
|
||||
chrome.tabs.create({ url });
|
||||
|
||||
// eslint-disable-next-line no-void
|
||||
void chrome.tabs.create({ url });
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -155,7 +155,8 @@ export default class State {
|
||||
|
||||
private popupClose (): void {
|
||||
this.#windows.forEach((id: number): void =>
|
||||
chrome.windows.remove(id)
|
||||
// eslint-disable-next-line no-void
|
||||
void chrome.windows.remove(id)
|
||||
);
|
||||
this.#windows = [];
|
||||
}
|
||||
@ -258,7 +259,8 @@ export default class State {
|
||||
: (signCount ? `${signCount}` : '')
|
||||
);
|
||||
|
||||
chrome.browserAction.setBadgeText({ text });
|
||||
// eslint-disable-next-line no-void
|
||||
void chrome.browserAction.setBadgeText({ text });
|
||||
|
||||
if (shouldClose && text === '') {
|
||||
this.popupClose();
|
||||
|
||||
@ -149,7 +149,10 @@ export default class Tabs {
|
||||
tabs
|
||||
.map(({ id }) => id)
|
||||
.filter((id): id is number => isNumber(id))
|
||||
.forEach((id) => chrome.tabs.update(id, { url }));
|
||||
.forEach((id) =>
|
||||
// eslint-disable-next-line no-void
|
||||
void chrome.tabs.update(id, { url })
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
"sideEffects": false,
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/networks": "^6.5.1"
|
||||
"@polkadot/networks": "^6.6.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@polkadot/api": "*"
|
||||
|
||||
@ -10,8 +10,8 @@
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.0",
|
||||
"@polkadot/extension-inject": "^0.38.2-1",
|
||||
"@polkadot/util": "^6.5.1",
|
||||
"@polkadot/util-crypto": "^6.5.1"
|
||||
"@polkadot/util": "^6.6.1",
|
||||
"@polkadot/util-crypto": "^6.6.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@polkadot/api": "*",
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
"@babel/runtime": "^7.14.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/chrome": "^0.0.141",
|
||||
"@types/chrome": "^0.0.143",
|
||||
"@types/firefox-webext-browser": "^82.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@ -14,19 +14,19 @@
|
||||
"@fortawesome/react-fontawesome": "^0.1.14",
|
||||
"@polkadot/extension-base": "^0.38.2-1",
|
||||
"@polkadot/extension-inject": "^0.38.2-1",
|
||||
"@polkadot/hw-ledger": "^6.5.1",
|
||||
"@polkadot/keyring": "^6.5.1",
|
||||
"@polkadot/networks": "^6.5.1",
|
||||
"@polkadot/react-identicon": "^0.77.1",
|
||||
"@polkadot/react-qr": "^0.77.1",
|
||||
"@polkadot/util": "^6.5.1",
|
||||
"@polkadot/util-crypto": "^6.5.1",
|
||||
"@polkadot/hw-ledger": "^6.6.1",
|
||||
"@polkadot/keyring": "^6.6.1",
|
||||
"@polkadot/networks": "^6.6.1",
|
||||
"@polkadot/react-identicon": "^0.78.1",
|
||||
"@polkadot/react-qr": "^0.78.1",
|
||||
"@polkadot/util": "^6.6.1",
|
||||
"@polkadot/util-crypto": "^6.6.1",
|
||||
"file-saver": "^2.0.5",
|
||||
"i18next": "^19.9.2",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-dropzone": "^11.3.2",
|
||||
"react-i18next": "^11.9.0",
|
||||
"react-i18next": "^11.10.0",
|
||||
"react-is": "^17.0.2",
|
||||
"react-router": "^5.2.0",
|
||||
"react-router-dom": "^5.2.0",
|
||||
|
||||
@ -3,6 +3,8 @@
|
||||
|
||||
import '../../../../__mocks__/chrome';
|
||||
|
||||
import type { KeyringPair$Json } from '@polkadot/keyring/types';
|
||||
|
||||
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
|
||||
import { configure, mount, ReactWrapper } from 'enzyme';
|
||||
import React from 'react';
|
||||
@ -10,8 +12,6 @@ import { act } from 'react-dom/test-utils';
|
||||
import { MemoryRouter, Route } from 'react-router';
|
||||
import { ThemeProvider } from 'styled-components';
|
||||
|
||||
import { KeyringPair$Json } from '@polkadot/keyring/types';
|
||||
|
||||
import { Button, themes } from '../components';
|
||||
import * as messaging from '../messaging';
|
||||
import { flushAllPromises } from '../testHelpers';
|
||||
|
||||
@ -1,6 +1,10 @@
|
||||
// Copyright 2019-2021 @polkadot/extension-ui authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
function setImmediate (fn: () => void): void {
|
||||
setTimeout(fn, 0);
|
||||
}
|
||||
|
||||
export function flushAllPromises (): Promise<void> {
|
||||
return new Promise((resolve) => setImmediate(resolve));
|
||||
}
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
"@polkadot/extension-ui": "^0.38.2-1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/dev": "^0.62.16",
|
||||
"@polkadot/dev": "^0.62.20",
|
||||
"babel-loader": "^8.2.2",
|
||||
"browser-resolve": "^2.0.0",
|
||||
"buffer": "^6.0.3",
|
||||
@ -26,7 +26,7 @@
|
||||
"stream-browserify": "^3.0.0",
|
||||
"thread-loader": "^3.0.4",
|
||||
"url-loader": "^4.1.1",
|
||||
"webpack": "^5.37.1",
|
||||
"webpack": "^5.38.1",
|
||||
"webpack-cli": "^4.7.0",
|
||||
"webpack-extension-manifest-plugin": "^0.7.0"
|
||||
}
|
||||
|
||||
@ -12,7 +12,8 @@ import { assert } from '@polkadot/util';
|
||||
import { cryptoWaitReady } from '@polkadot/util-crypto';
|
||||
|
||||
// setup the notification (same a FF default background, white text)
|
||||
chrome.browserAction.setBadgeBackgroundColor({ color: '#d90000' });
|
||||
// eslint-disable-next-line no-void
|
||||
void chrome.browserAction.setBadgeBackgroundColor({ color: '#d90000' });
|
||||
|
||||
// listen to all messages and handle appropriately
|
||||
chrome.runtime.onConnect.addListener((port): void => {
|
||||
@ -20,8 +21,8 @@ chrome.runtime.onConnect.addListener((port): void => {
|
||||
assert([PORT_CONTENT, PORT_EXTENSION].includes(port.name), `Unknown connection from ${port.name}`);
|
||||
|
||||
// message and disconnect handlers
|
||||
port.onMessage.addListener((data): void => handlers(data, port));
|
||||
port.onDisconnect.addListener((): void => console.log(`Disconnected from ${port.name}`));
|
||||
port.onMessage.addListener((data) => handlers(data, port));
|
||||
port.onDisconnect.addListener(() => console.log(`Disconnected from ${port.name}`));
|
||||
});
|
||||
|
||||
// initial setup
|
||||
|
||||
Loading…
Reference in New Issue
Block a user