Bump @polkadot/dev (#1054)
This commit is contained in:
parent
9cbae7dd17
commit
0a34efb1a3
@ -7,7 +7,8 @@ module.exports = {
|
|||||||
...base,
|
...base,
|
||||||
ignorePatterns: [
|
ignorePatterns: [
|
||||||
...base.ignorePatterns,
|
...base.ignorePatterns,
|
||||||
"i18next-scanner.config.js"
|
'jest/**/*',
|
||||||
|
'i18next-scanner.config.js'
|
||||||
],
|
],
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
...base.parserOptions,
|
...base.parserOptions,
|
||||||
|
|||||||
@ -12,5 +12,6 @@ module.exports = {
|
|||||||
'\\.(css|less)$': 'empty/object',
|
'\\.(css|less)$': 'empty/object',
|
||||||
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/packages/extension-mocks/src/fileMock.js'
|
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/packages/extension-mocks/src/fileMock.js'
|
||||||
},
|
},
|
||||||
|
setupFilesAfterEnv: ['<rootDir>/jest/setupEnv.js'],
|
||||||
testEnvironment: 'jsdom'
|
testEnvironment: 'jsdom'
|
||||||
};
|
};
|
||||||
|
|||||||
15
jest/setupEnv.js
Normal file
15
jest/setupEnv.js
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
// Copyright 2017-2022 @polkadot/extension authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
const nodeCrypto = require('crypto');
|
||||||
|
const { TextDecoder } = require('@polkadot/x-textencoder/node');
|
||||||
|
const { TextEncoder } = require('@polkadot/x-textencoder/node');
|
||||||
|
|
||||||
|
window.crypto = {
|
||||||
|
getRandomValues: function (buffer) {
|
||||||
|
return nodeCrypto.randomFillSync(buffer);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
global.TextDecoder = TextDecoder;
|
||||||
|
global.TextEncoder = TextEncoder;
|
||||||
@ -34,16 +34,16 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.17.9",
|
"@babel/core": "^7.17.9",
|
||||||
"@polkadot/dev": "^0.66.9",
|
"@polkadot/dev": "^0.66.13",
|
||||||
"@types/jest": "^27.4.1",
|
"@types/jest": "^27.4.1",
|
||||||
"i18next-scanner": "^3.1.0",
|
"i18next-scanner": "^3.1.0",
|
||||||
"sinon-chrome": "^3.0.1"
|
"sinon-chrome": "^3.0.1"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"@polkadot/api": "^8.1.1",
|
"@polkadot/api": "^8.2.2-2",
|
||||||
"@polkadot/keyring": "^9.0.1",
|
"@polkadot/keyring": "^9.0.1",
|
||||||
"@polkadot/networks": "^9.0.1",
|
"@polkadot/networks": "^9.0.1",
|
||||||
"@polkadot/types": "^8.1.1",
|
"@polkadot/types": "^8.2.2-2",
|
||||||
"@polkadot/util": "^9.0.1",
|
"@polkadot/util": "^9.0.1",
|
||||||
"@polkadot/util-crypto": "^9.0.1",
|
"@polkadot/util-crypto": "^9.0.1",
|
||||||
"@polkadot/x-fetch": "^9.0.1",
|
"@polkadot/x-fetch": "^9.0.1",
|
||||||
|
|||||||
@ -21,17 +21,17 @@
|
|||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.17.9",
|
"@babel/runtime": "^7.17.9",
|
||||||
"@polkadot/api": "^8.1.1",
|
"@polkadot/api": "^8.2.2-2",
|
||||||
"@polkadot/extension-chains": "^0.43.2-1",
|
"@polkadot/extension-chains": "^0.43.2-1",
|
||||||
"@polkadot/extension-dapp": "^0.43.2-1",
|
"@polkadot/extension-dapp": "^0.43.2-1",
|
||||||
"@polkadot/extension-inject": "^0.43.2-1",
|
"@polkadot/extension-inject": "^0.43.2-1",
|
||||||
"@polkadot/keyring": "^9.0.1",
|
"@polkadot/keyring": "^9.0.1",
|
||||||
"@polkadot/networks": "^9.0.1",
|
"@polkadot/networks": "^9.0.1",
|
||||||
"@polkadot/phishing": "^0.11.77",
|
"@polkadot/phishing": "^0.11.98",
|
||||||
"@polkadot/rpc-provider": "^8.1.1",
|
"@polkadot/rpc-provider": "^8.2.2-2",
|
||||||
"@polkadot/types": "^8.1.1",
|
"@polkadot/types": "^8.2.2-2",
|
||||||
"@polkadot/ui-keyring": "^2.0.1",
|
"@polkadot/ui-keyring": "^2.0.2-0",
|
||||||
"@polkadot/ui-settings": "^2.0.1",
|
"@polkadot/ui-settings": "^2.0.2-0",
|
||||||
"@polkadot/util": "^9.0.1",
|
"@polkadot/util": "^9.0.1",
|
||||||
"@polkadot/util-crypto": "^9.0.1",
|
"@polkadot/util-crypto": "^9.0.1",
|
||||||
"eventemitter3": "^4.0.7",
|
"eventemitter3": "^4.0.7",
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
"@babel/runtime": "^7.17.9",
|
"@babel/runtime": "^7.17.9",
|
||||||
"@metamask/detect-provider": "^1.2.0",
|
"@metamask/detect-provider": "^1.2.0",
|
||||||
"@polkadot/extension-inject": "^0.43.2-1",
|
"@polkadot/extension-inject": "^0.43.2-1",
|
||||||
"@polkadot/types": "^8.1.1",
|
"@polkadot/types": "^8.2.2-2",
|
||||||
"@polkadot/util": "^9.0.1",
|
"@polkadot/util": "^9.0.1",
|
||||||
"web3": "^1.7.3"
|
"web3": "^1.7.3"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -18,14 +18,14 @@
|
|||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.17.9",
|
"@babel/runtime": "^7.17.9",
|
||||||
"@polkadot/rpc-provider": "^8.1.1",
|
"@polkadot/rpc-provider": "^8.2.2-2",
|
||||||
"@polkadot/types": "^8.1.1",
|
"@polkadot/types": "^8.2.2-2",
|
||||||
"@polkadot/util": "^9.0.1",
|
"@polkadot/util": "^9.0.1",
|
||||||
"@polkadot/util-crypto": "^9.0.1",
|
"@polkadot/util-crypto": "^9.0.1",
|
||||||
"@polkadot/x-global": "^9.0.1"
|
"@polkadot/x-global": "^9.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/chrome": "^0.0.181",
|
"@types/chrome": "^0.0.183",
|
||||||
"@types/firefox-webext-browser": "^94.0.1"
|
"@types/firefox-webext-browser": "^94.0.1"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
|
|||||||
@ -29,21 +29,21 @@
|
|||||||
"@polkadot/hw-ledger": "^9.0.1",
|
"@polkadot/hw-ledger": "^9.0.1",
|
||||||
"@polkadot/keyring": "^9.0.1",
|
"@polkadot/keyring": "^9.0.1",
|
||||||
"@polkadot/networks": "^9.0.1",
|
"@polkadot/networks": "^9.0.1",
|
||||||
"@polkadot/react-identicon": "^2.0.1",
|
"@polkadot/react-identicon": "^2.0.2-0",
|
||||||
"@polkadot/react-qr": "^2.0.1",
|
"@polkadot/react-qr": "^2.0.2-0",
|
||||||
"@polkadot/types": "^8.1.1",
|
"@polkadot/types": "^8.2.2-2",
|
||||||
"@polkadot/types-augment": "^8.1.1",
|
"@polkadot/types-augment": "^8.2.2-2",
|
||||||
"@polkadot/ui-keyring": "^2.0.1",
|
"@polkadot/ui-keyring": "^2.0.2-0",
|
||||||
"@polkadot/ui-settings": "^2.0.1",
|
"@polkadot/ui-settings": "^2.0.2-0",
|
||||||
"@polkadot/util": "^9.0.1",
|
"@polkadot/util": "^9.0.1",
|
||||||
"@polkadot/util-crypto": "^9.0.1",
|
"@polkadot/util-crypto": "^9.0.1",
|
||||||
"file-saver": "^2.0.5",
|
"file-saver": "^2.0.5",
|
||||||
"i18next": "^21.6.16",
|
"i18next": "^21.6.16",
|
||||||
"react": "^18.0.0",
|
"react": "^18.1.0",
|
||||||
"react-dom": "^18.0.0",
|
"react-dom": "^18.1.0",
|
||||||
"react-dropzone": "^11.7.1",
|
"react-dropzone": "^11.7.1",
|
||||||
"react-i18next": "^11.16.7",
|
"react-i18next": "^11.16.7",
|
||||||
"react-is": "^18.0.0",
|
"react-is": "^18.1.0",
|
||||||
"react-router": "^5.3.1",
|
"react-router": "^5.3.1",
|
||||||
"react-router-dom": "^5.3.1",
|
"react-router-dom": "^5.3.1",
|
||||||
"styled-components": "^5.3.5"
|
"styled-components": "^5.3.5"
|
||||||
|
|||||||
6
packages/extension-ui/src/adapter.d.ts
vendored
6
packages/extension-ui/src/adapter.d.ts
vendored
@ -1,10 +1,4 @@
|
|||||||
// Copyright 2019-2022 @polkadot/extension-ui authors & contributors
|
// Copyright 2019-2022 @polkadot/extension-ui authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
// import { EnzymeAdapter } from 'enzyme';
|
|
||||||
|
|
||||||
// declare module '@wojtekmaj/enzyme-adapter-react-17' {
|
|
||||||
// export = EnzymeAdapter;
|
|
||||||
// }
|
|
||||||
|
|
||||||
declare module '@wojtekmaj/enzyme-adapter-react-17';
|
declare module '@wojtekmaj/enzyme-adapter-react-17';
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
import './i18n/i18n';
|
import './i18n/i18n';
|
||||||
|
|
||||||
import React, { Suspense } from 'react';
|
import React, { Suspense } from 'react';
|
||||||
import ReactDOM from 'react-dom';
|
import { createRoot } from 'react-dom/client';
|
||||||
import { HashRouter } from 'react-router-dom';
|
import { HashRouter } from 'react-router-dom';
|
||||||
|
|
||||||
import { View } from './components';
|
import { View } from './components';
|
||||||
@ -16,14 +16,13 @@ export default function createView (Entry: React.ComponentType, rootId = 'root')
|
|||||||
throw new Error(`Unable to find element with id '${rootId}'`);
|
throw new Error(`Unable to find element with id '${rootId}'`);
|
||||||
}
|
}
|
||||||
|
|
||||||
ReactDOM.render(
|
createRoot(rootElement).render(
|
||||||
<Suspense fallback='...'>
|
<Suspense fallback='...'>
|
||||||
<View>
|
<View>
|
||||||
<HashRouter>
|
<HashRouter>
|
||||||
<Entry />
|
<Entry />
|
||||||
</HashRouter>
|
</HashRouter>
|
||||||
</View>
|
</View>
|
||||||
</Suspense>,
|
</Suspense>
|
||||||
rootElement
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
"@polkadot/extension-ui": "^0.43.2-1"
|
"@polkadot/extension-ui": "^0.43.2-1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/dev": "^0.66.9",
|
"@polkadot/dev": "^0.66.13",
|
||||||
"babel-loader": "^8.2.5",
|
"babel-loader": "^8.2.5",
|
||||||
"browser-resolve": "^2.0.0",
|
"browser-resolve": "^2.0.0",
|
||||||
"buffer": "^6.0.3",
|
"buffer": "^6.0.3",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user