Adjust test env (#9048)
* Remove jest test runner * Adjust * afterEach cleanup * Bumps * Bump dev * Add missing dep
This commit is contained in:
parent
99aeada8b7
commit
3b60b91ad5
@ -1,10 +0,0 @@
|
||||
// Copyright 2017-2023 @polkadot/apps authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
const config = require('@polkadot/dev/config/jest.cjs');
|
||||
|
||||
module.exports = {
|
||||
...config,
|
||||
moduleNameMapper: {},
|
||||
testTimeout: 2 * 60 * 1000
|
||||
};
|
||||
@ -1,11 +0,0 @@
|
||||
// Copyright 2017-2023 @polkadot/apps authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
const config = require('./jest.config.cjs');
|
||||
|
||||
module.exports = {
|
||||
...config,
|
||||
displayName: 'all-tests',
|
||||
globalSetup: './jest/globalSetup.cjs',
|
||||
globalTeardown: './jest/globalTeardown.cjs'
|
||||
};
|
||||
@ -1,52 +0,0 @@
|
||||
// Copyright 2017-2023 @polkadot/apps authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
const config = require('@polkadot/dev/config/jest.cjs');
|
||||
|
||||
const findPackages = require('./scripts/findPackages.cjs');
|
||||
|
||||
// NOTE: While we can remove @polkadot/... packages such as react-markdown still has issues with Jest 28
|
||||
// ... TL;DR We still end up with a massive list here
|
||||
const ESM_PKG = [
|
||||
// general packages
|
||||
'bail', 'character-entities', 'chart.js', 'comma-separated-tokens', 'decode-named-character-reference', 'decode-uri-component', 'filter-obj', 'hast-to-', 'hast-util-', 'hastscript', 'html-void-elements', 'is-ipfs', 'is-plain-obj', 'mdast-', 'micromark', 'multiformats', 'property-information', 'query-string', 'react-markdown', 'rehype-raw', 'remark-parse', 'remark-rehype', 'space-separated-tokens', 'split-on-first', 'trough', 'uint8arrays', 'unified', 'unist-', 'vfile', 'vfile-', 'web-namespaces', 'zwitch',
|
||||
// type packages
|
||||
'@logion/node-api'
|
||||
];
|
||||
|
||||
// Jest does not support import maps... more issues
|
||||
const MAP_ESM = {
|
||||
'is-ipfs': '<rootDir>/node_modules/is-ipfs/dist/src/index.js',
|
||||
'multiformats/basics': '<rootDir>/node_modules/multiformats/src/basics.js',
|
||||
'multiformats': '<rootDir>/node_modules/multiformats/src/index.js',
|
||||
'uint8arrays/to-string': '<rootDir>/node_modules/uint8arrays/src/to-string.js'
|
||||
}
|
||||
|
||||
// file mapping
|
||||
const MAP_FILE = {
|
||||
'\\.(css|less)$': 'empty/object',
|
||||
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': 'empty/object',
|
||||
'\\.(md)$': '<rootDir>/jest/mocks/empty.js'
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
...config,
|
||||
moduleNameMapper: {
|
||||
...MAP_ESM,
|
||||
...MAP_FILE,
|
||||
...(
|
||||
findPackages()
|
||||
.filter(({ name }) => !['@polkadot/apps'].includes(name))
|
||||
.reduce((modules, { dir, name }) => {
|
||||
modules[`${name}(.*)$`] = `<rootDir>/packages/${dir}/src/$1`;
|
||||
|
||||
return modules;
|
||||
}, {})
|
||||
),
|
||||
'@polkadot/apps/(.*)$': '<rootDir>/packages/apps/src/$1'
|
||||
},
|
||||
setupFilesAfterEnv: ['<rootDir>/jest/setupEnv.cjs'],
|
||||
testEnvironment: 'jsdom',
|
||||
testTimeout: 90000,
|
||||
transformIgnorePatterns: [`/node_modules/(?!${ESM_PKG.join('|')})`]
|
||||
};
|
||||
@ -1,25 +0,0 @@
|
||||
// Copyright 2017-2023 @polkadot/apps authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
const { AlwaysPullPolicy, GenericContainer, Wait } = require('testcontainers');
|
||||
|
||||
const startSubstrate = async () => {
|
||||
console.log('Substrate container starting...');
|
||||
|
||||
const startedTestContainer = await new GenericContainer('parity/substrate')
|
||||
.withPullPolicy(new AlwaysPullPolicy())
|
||||
.withName('polkadot-apps-test-substrate')
|
||||
.withExposedPorts(9944)
|
||||
.withCmd(['--dev', '--ws-port=9944', '--unsafe-ws-external'])
|
||||
.withWaitStrategy(Wait.forLogMessage('New epoch 0 launching'))
|
||||
.start();
|
||||
|
||||
console.log('Done.');
|
||||
|
||||
process.env.TEST_SUBSTRATE_PORT = startedTestContainer.getMappedPort(9944)?.toString() || '';
|
||||
global.__SUBSTRATE__ = startedTestContainer;
|
||||
};
|
||||
|
||||
module.exports = async () => {
|
||||
await startSubstrate();
|
||||
};
|
||||
@ -1,10 +0,0 @@
|
||||
// Copyright 2017-2023 @polkadot/apps authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
module.exports = async () => {
|
||||
console.log('Shutting down Substrate container...');
|
||||
|
||||
await global.__SUBSTRATE__.stop();
|
||||
|
||||
console.log('Done.');
|
||||
};
|
||||
@ -1,5 +0,0 @@
|
||||
// Copyright 2019-2023 @polkadot/apps authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// eslint-disable-line
|
||||
module.exports = '';
|
||||
@ -1,21 +0,0 @@
|
||||
// Copyright 2017-2023 @polkadot/apps authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
require('@testing-library/jest-dom');
|
||||
|
||||
const nodeCrypto = require('crypto');
|
||||
const { configure } = require('@testing-library/dom');
|
||||
|
||||
CSS = {
|
||||
supports () {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
window.crypto = {
|
||||
getRandomValues: function (buffer) {
|
||||
return nodeCrypto.randomFillSync(buffer);
|
||||
}
|
||||
};
|
||||
|
||||
configure({ asyncUtilTimeout: 10000 });
|
||||
14
package.json
14
package.json
@ -43,8 +43,8 @@
|
||||
"build:robohash": "node scripts/robohash.cjs",
|
||||
"build:typesBundle": "polkadot-dev-run-test --env node --require ./scripts/fixupModules.cjs --experimental-specifier-resolution=node packages/apps-config/src/api/typesBundle.spec.ts",
|
||||
"build:www": "rm -rf packages/apps/build && mkdir -p packages/apps/build && yarn run build:i18n && cd packages/apps && yarn polkadot-exec-webpack --config webpack.config.cjs",
|
||||
"ci:chainEndpoints": "polkadot-dev-run-test --env jest --require ./scripts/fixupModules.cjs packages/apps-config/src/ci/chainEndpoints -- --config ./jest-ci.config.cjs --runInBand --forceExit",
|
||||
"ci:chainTypes": "polkadot-dev-run-test --env jest --require ./scripts/fixupModules.cjs packages/apps-config/src/ci/chainTypes -- --config ./jest-ci.config.cjs --runInBand --forceExit",
|
||||
"ci:chainEndpoints": "polkadot-dev-run-test --env node packages/apps-config/src/ci/chainEndpoints --log .github/chain-endpoints.md",
|
||||
"ci:chainTypes": "echo ok",
|
||||
"clean": "polkadot-dev-clean-build",
|
||||
"clean:electronBuild": "cd packages/apps-electron && polkadot-dev-clean-build",
|
||||
"clean:electronRelease": "cd packages/apps-electron && rm -rf release",
|
||||
@ -61,17 +61,17 @@
|
||||
"start": "yarn clean && cd packages/apps && yarn polkadot-exec-webpack serve --config webpack.serve.cjs --port 3000",
|
||||
"start:electron": "yarn clean:electronBuild && concurrently 'yarn build:devElectronMain && cd packages/apps-electron && electron ./build/electron.js' 'yarn build:devElectronRenderer'",
|
||||
"test": "polkadot-dev-run-test --env browser --require ./scripts/fixupModules.cjs --experimental-specifier-resolution=node ^typesBundle ^chainEndpoints ^chainTypes ^page- ^react- ^apps-electron",
|
||||
"test:all": "polkadot-dev-run-test --env browser -- --runInBand --config ./jest-slow.config.cjs",
|
||||
"test:all": "polkadot-dev-run-test --env browser ^chainEndpoints ^chainTypes",
|
||||
"test:one": "polkadot-dev-run-test --env browser",
|
||||
"test:skipped": "echo 'tests skipped'"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.20.12",
|
||||
"@babel/register": "^7.18.9",
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/core": "^7.21.0",
|
||||
"@babel/register": "^7.21.0",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@crustio/crust-pin": "^1.0.0",
|
||||
"@pinata/sdk": "^1.2.1",
|
||||
"@polkadot/dev": "^0.68.41",
|
||||
"@polkadot/dev": "^0.69.3",
|
||||
"@types/chart.js": "^2.9.37",
|
||||
"@types/file-saver": "^2.0.5",
|
||||
"@types/jest": "^29.4.0",
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@acala-network/type-definitions": "4.1.8-13",
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@bifrost-finance/type-definitions": "1.7.2",
|
||||
"@crustio/type-definitions": "1.3.0",
|
||||
"@darwinia/types": "2.8.10",
|
||||
@ -39,6 +39,7 @@
|
||||
"@polkadot/util": "^10.4.2",
|
||||
"@polkadot/wasm-util": "^6.4.1",
|
||||
"@polkadot/x-fetch": "^10.4.2",
|
||||
"@polkadot/x-ws": "^10.4.2",
|
||||
"@polymathnetwork/polymesh-types": "0.0.2",
|
||||
"@snowfork/snowbridge-types": "0.2.7",
|
||||
"@sora-substrate/type-definitions": "1.15.2",
|
||||
|
||||
@ -1,16 +1,110 @@
|
||||
// Copyright 2017-2023 @polkadot/apps-config authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { checkEndpoints } from './runner';
|
||||
import { assert, isString } from '@polkadot/util';
|
||||
import { WebSocket } from '@polkadot/x-ws';
|
||||
|
||||
describe('--SLOW--: check configured chain endpoints', (): void => {
|
||||
beforeAll((): void => {
|
||||
jest.setTimeout(2 * 60 * 1000);
|
||||
import { createWsEndpoints } from '../endpoints';
|
||||
import { fetchJson } from './fetch';
|
||||
|
||||
interface Endpoint {
|
||||
name: string;
|
||||
ws: string;
|
||||
}
|
||||
|
||||
interface DnsResponse {
|
||||
Answer?: { name: string }[];
|
||||
Question: { name: string }[];
|
||||
}
|
||||
|
||||
const TIMEOUT = 60_000;
|
||||
|
||||
describe('check endpoints', (): void => {
|
||||
const checks = createWsEndpoints()
|
||||
.filter(({ isDisabled, isUnreachable, value }) =>
|
||||
!isDisabled &&
|
||||
!isUnreachable &&
|
||||
value &&
|
||||
isString(value) &&
|
||||
!value.includes('127.0.0.1') &&
|
||||
!value.startsWith('light://')
|
||||
)
|
||||
.map(({ text, value }): Partial<Endpoint> => ({
|
||||
name: text as string,
|
||||
ws: value
|
||||
}))
|
||||
.filter((v): v is Endpoint => !!v.ws);
|
||||
let completed = 0;
|
||||
let errored = 0;
|
||||
let websocket: WebSocket | null = null;
|
||||
|
||||
afterEach((): void => {
|
||||
if (websocket) {
|
||||
websocket.onclose = null;
|
||||
websocket.onerror = null;
|
||||
websocket.onopen = null;
|
||||
websocket.onmessage = null;
|
||||
|
||||
try {
|
||||
websocket.close();
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
|
||||
websocket = null;
|
||||
}
|
||||
|
||||
completed++;
|
||||
|
||||
if (completed === checks.length) {
|
||||
process.exit(errored);
|
||||
}
|
||||
});
|
||||
|
||||
checkEndpoints('./.github/chain-endpoints.md', [
|
||||
'No DNS entry for',
|
||||
'Timeout connecting to',
|
||||
'Unable to initialize'
|
||||
]);
|
||||
for (const { name, ws: endpoint } of checks) {
|
||||
it(`${name} @ ${endpoint}`, async (): Promise<unknown> => {
|
||||
const [,, hostWithPort] = endpoint.split('/');
|
||||
const [host] = hostWithPort.split(':');
|
||||
|
||||
return fetchJson<DnsResponse>(`https://dns.google/resolve?name=${host}`)
|
||||
.then((json) =>
|
||||
assert(json && json.Answer, 'No DNS entry')
|
||||
)
|
||||
.then(() =>
|
||||
new Promise((resolve, reject): void => {
|
||||
websocket = new WebSocket(endpoint);
|
||||
|
||||
websocket.onclose = (event: { code: number; reason: string }): void => {
|
||||
if (event.code !== 1000) {
|
||||
reject(new Error(`Disconnected, code: '${event.code}' reason: '${event.reason}'`));
|
||||
}
|
||||
};
|
||||
|
||||
websocket.onerror = (): void => {
|
||||
reject(new Error('Connection error'));
|
||||
};
|
||||
|
||||
websocket.onopen = (): void => {
|
||||
websocket?.send('{"id":"1","jsonrpc":"2.0","method":"state_getMetadata","params":[]}');
|
||||
};
|
||||
|
||||
websocket.onmessage = (message: { data: string }): void => {
|
||||
try {
|
||||
const result = (JSON.parse(message.data) as { result: unknown }).result as string;
|
||||
|
||||
assert(result.startsWith('0x'), 'Invalid response');
|
||||
resolve(result);
|
||||
} catch (e) {
|
||||
reject(e);
|
||||
}
|
||||
};
|
||||
})
|
||||
)
|
||||
.catch((e) => {
|
||||
errored++;
|
||||
|
||||
throw e;
|
||||
});
|
||||
}, TIMEOUT);
|
||||
}
|
||||
});
|
||||
|
||||
@ -1,14 +0,0 @@
|
||||
// Copyright 2017-2023 @polkadot/apps-config authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { checkEndpoints } from './runner';
|
||||
|
||||
describe.skip('--SLOW--: check configured chain types', (): void => {
|
||||
beforeAll((): void => {
|
||||
jest.setTimeout(2 * 60 * 1000);
|
||||
});
|
||||
|
||||
checkEndpoints('./.github/chain-types.md', [
|
||||
'Unknown types'
|
||||
]);
|
||||
});
|
||||
@ -3,9 +3,9 @@
|
||||
|
||||
import { fetch } from '@polkadot/x-fetch';
|
||||
|
||||
function fetchWithTimeout (url: string, timeout = 2000): Promise<Response | null> {
|
||||
const controller = new AbortController();
|
||||
let id: null | ReturnType<typeof setTimeout> = null;
|
||||
function fetchWithTimeout (url: string, timeout = 2_000): Promise<Response | null> {
|
||||
let controller: AbortController | null = new AbortController();
|
||||
let timeoutId: null | ReturnType<typeof setTimeout> = null;
|
||||
|
||||
// This is a weird mess, however we seem to have issues with Jest & hanging connections
|
||||
// in the case where things are (possibly) aborted. So we just swallow/log everything
|
||||
@ -18,20 +18,21 @@ function fetchWithTimeout (url: string, timeout = 2000): Promise<Response | null
|
||||
return null;
|
||||
}),
|
||||
new Promise<null>((resolve): void => {
|
||||
id = setTimeout((): void => {
|
||||
id = null;
|
||||
controller.abort();
|
||||
timeoutId = setTimeout((): void => {
|
||||
timeoutId = null;
|
||||
controller?.abort();
|
||||
|
||||
resolve(null);
|
||||
}, timeout);
|
||||
})
|
||||
])
|
||||
.then((response): Response | null => {
|
||||
if (id) {
|
||||
clearTimeout(id);
|
||||
.finally(() => {
|
||||
if (timeoutId) {
|
||||
clearTimeout(timeoutId);
|
||||
}
|
||||
|
||||
return response;
|
||||
controller = null;
|
||||
timeoutId = null;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -1,122 +0,0 @@
|
||||
// Copyright 2017-2023 @polkadot/apps-config authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import fs from 'fs';
|
||||
|
||||
import { ApiPromise, WsProvider } from '@polkadot/api';
|
||||
import { assert, isError, isString } from '@polkadot/util';
|
||||
|
||||
import { typesBundle } from '../api';
|
||||
import { createWsEndpoints } from '../endpoints';
|
||||
import { fetchJson } from './fetch';
|
||||
|
||||
interface Endpoint {
|
||||
name: string;
|
||||
ws: string;
|
||||
}
|
||||
|
||||
interface DnsResponse {
|
||||
Answer?: { name: string }[];
|
||||
Question: { name: string }[];
|
||||
}
|
||||
|
||||
const TICK = '`';
|
||||
|
||||
function createChecker (issueFile: string, failures: string[]): (name: string, ws: string) => Promise<boolean> {
|
||||
return async (name: string, ws: string): Promise<boolean> => {
|
||||
const [,, hostWithPort] = ws.split('/');
|
||||
const [host] = hostWithPort.split(':');
|
||||
const json = await fetchJson<DnsResponse>(`https://dns.google/resolve?name=${host}`);
|
||||
|
||||
let provider: WsProvider | null = null;
|
||||
let api: ApiPromise | null = null;
|
||||
let timerId: NodeJS.Timeout | null = null;
|
||||
let isOk = true;
|
||||
|
||||
try {
|
||||
assert(json && json.Answer, `No DNS entry for ${host}`);
|
||||
|
||||
provider = new WsProvider(ws, false);
|
||||
api = new ApiPromise({
|
||||
provider,
|
||||
throwOnConnect: true,
|
||||
throwOnUnknown: false,
|
||||
typesBundle
|
||||
});
|
||||
|
||||
setTimeout((): void => {
|
||||
provider &&
|
||||
provider
|
||||
.connect()
|
||||
.catch(() => undefined);
|
||||
}, 1000);
|
||||
|
||||
await Promise.race([
|
||||
// eslint-disable-next-line promise/param-names
|
||||
new Promise((_, reject): void => {
|
||||
timerId = setTimeout((): void => {
|
||||
timerId = null;
|
||||
reject(new Error(`Timeout connecting to ${ws}`));
|
||||
}, 30_000);
|
||||
}),
|
||||
api.isReadyOrError
|
||||
.then((a) => a.rpc.chain.getBlock())
|
||||
.then((b) => console.log(`>>> ${name} @ ${ws}`, b.toHuman()))
|
||||
]);
|
||||
} catch (error) {
|
||||
if (isError(error) && failures.some((f) => (error as Error).message.includes(f))) {
|
||||
process.env.CI_LOG && fs.appendFileSync(issueFile, `\n${TICK}${name} @ ${ws} ${error.message}${TICK}\n`);
|
||||
|
||||
isOk = false;
|
||||
}
|
||||
|
||||
console.error(JSON.stringify(error));
|
||||
} finally {
|
||||
if (timerId) {
|
||||
clearTimeout(timerId);
|
||||
}
|
||||
|
||||
if (provider) {
|
||||
try {
|
||||
if (api) {
|
||||
await api.disconnect();
|
||||
} else {
|
||||
await provider.disconnect();
|
||||
}
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return isOk;
|
||||
};
|
||||
}
|
||||
|
||||
export function checkEndpoints (issueFile: string, failures: string[]): void {
|
||||
const checker = createChecker(issueFile, failures);
|
||||
const checks: Record<string, Endpoint> = createWsEndpoints()
|
||||
.filter(({ isDisabled, isUnreachable, value }) =>
|
||||
!isDisabled &&
|
||||
!isUnreachable &&
|
||||
value &&
|
||||
isString(value) &&
|
||||
!value.includes('127.0.0.1') &&
|
||||
!value.startsWith('light://')
|
||||
)
|
||||
.map(({ text, value }): Partial<Endpoint> => ({
|
||||
name: text as string,
|
||||
ws: value
|
||||
}))
|
||||
.filter((v): v is Endpoint => !!v.ws)
|
||||
.reduce((all, e) => ({
|
||||
...all,
|
||||
[`${e.name} @ ${e.ws}`]: e
|
||||
}), {});
|
||||
|
||||
it.each(Object.keys(checks))('%s', async (key): Promise<void> => {
|
||||
const { name, ws } = checks[key];
|
||||
|
||||
expect(await checker(name, ws)).toBe(true);
|
||||
});
|
||||
}
|
||||
@ -16,7 +16,7 @@ const allEndpoints = createWsEndpoints(undefined, false, false);
|
||||
const INVALID_CHARS = ['%'];
|
||||
|
||||
describe('WS urls are all valid', (): void => {
|
||||
const endpoints: Record<string, Endpoint> = allEndpoints
|
||||
const endpoints = allEndpoints
|
||||
.filter(({ value }) =>
|
||||
value &&
|
||||
isString(value) &&
|
||||
@ -26,18 +26,14 @@ describe('WS urls are all valid', (): void => {
|
||||
name: text as string,
|
||||
provider: textBy,
|
||||
value
|
||||
}))
|
||||
.reduce((all, e) => ({
|
||||
...all,
|
||||
[`${e.name}:: ${e.provider}`]: e
|
||||
}), {});
|
||||
}));
|
||||
|
||||
it.each(Object.keys(endpoints))('%s', (key): void => {
|
||||
const { name, provider, value } = endpoints[key];
|
||||
|
||||
assert(value.startsWith('wss://') || value.startsWith('light://substrate-connect/'), `${name}:: ${provider} -> ${value} should start with wss:// or light://`);
|
||||
assert(!INVALID_CHARS.some((c) => value.includes(c)), `${value} should not contain invalid characters such as ${INVALID_CHARS.join(', ')}`);
|
||||
});
|
||||
for (const { name, provider, value } of endpoints) {
|
||||
it(`${name}:: ${provider}`, (): void => {
|
||||
assert(value.startsWith('wss://') || value.startsWith('light://substrate-connect/'), `${name}:: ${provider} -> ${value} should start with wss:// or light://`);
|
||||
assert(!INVALID_CHARS.some((c) => value.includes(c)), `${value} should not contain invalid characters such as ${INVALID_CHARS.join(', ')}`);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
describe('urls are sorted', (): void => {
|
||||
|
||||
@ -12,9 +12,9 @@
|
||||
"sideEffects": false,
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.20.12",
|
||||
"@babel/core": "^7.21.0",
|
||||
"@babel/polyfill": "^7.12.1",
|
||||
"@polkadot/dev": "^0.68.41",
|
||||
"@polkadot/dev": "^0.69.3",
|
||||
"@polkadot/react-components": "^0.124.2-87-x",
|
||||
"electron-log": "^5.0.0-beta.16",
|
||||
"electron-updater": "^5.3.0"
|
||||
|
||||
@ -13,6 +13,6 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13"
|
||||
"@babel/runtime": "^7.21.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,12 +13,12 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.20.12",
|
||||
"@babel/core": "^7.21.0",
|
||||
"@babel/polyfill": "^7.12.1",
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/apps-config": "^0.124.2-87-x",
|
||||
"@polkadot/apps-routing": "^0.124.2-87-x",
|
||||
"@polkadot/dev": "^0.68.41",
|
||||
"@polkadot/dev": "^0.69.3",
|
||||
"@polkadot/react-api": "^0.124.2-87-x",
|
||||
"@polkadot/react-components": "^0.124.2-87-x",
|
||||
"@polkadot/react-hooks": "^0.124.2-87-x",
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/hw-ledger": "^10.4.2",
|
||||
"@polkadot/phishing": "^0.19.3",
|
||||
"@polkadot/react-components": "^0.124.2-87-x",
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/react-components": "^0.124.2-87-x",
|
||||
"file-saver": "^2.0.5"
|
||||
},
|
||||
|
||||
@ -13,6 +13,6 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13"
|
||||
"@babel/runtime": "^7.21.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/react-components": "^0.124.2-87-x"
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/react-components": "^0.124.2-87-x"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/react-components": "^0.124.2-87-x"
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/react-components": "^0.124.2-87-x",
|
||||
"secp256k1": "^3.8.0"
|
||||
}
|
||||
|
||||
@ -13,6 +13,6 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13"
|
||||
"@babel/runtime": "^7.21.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/api-contract": "^9.14.2"
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/react-components": "^0.124.2-87-x",
|
||||
"@polkadot/react-query": "^0.124.2-87-x"
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/react-components": "^0.124.2-87-x",
|
||||
"@polkadot/react-query": "^0.124.2-87-x"
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/react-components": "^0.124.2-87-x"
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/react-components": "^0.124.2-87-x",
|
||||
"@polkadot/react-params": "^0.124.2-87-x",
|
||||
"@polkadot/react-signer": "^0.124.2-87-x"
|
||||
|
||||
@ -13,6 +13,6 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13"
|
||||
"@babel/runtime": "^7.21.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/react-components": "^0.124.2-87-x"
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/react-components": "^0.124.2-87-x"
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/react-components": "^0.124.2-87-x"
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/react-components": "^0.124.2-87-x",
|
||||
"@polkadot/react-query": "^0.124.2-87-x"
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/react-components": "^0.124.2-87-x"
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/react-components": "^0.124.2-87-x",
|
||||
"@polkadot/react-query": "^0.124.2-87-x"
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/react-components": "^0.124.2-87-x"
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,6 +13,6 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13"
|
||||
"@babel/runtime": "^7.21.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,6 +13,6 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13"
|
||||
"@babel/runtime": "^7.21.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13"
|
||||
"@babel/runtime": "^7.21.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"chart.js": "^3.9.1"
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/react-components": "^0.124.2-87-x"
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/react-components": "^0.124.2-87-x"
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,6 +13,6 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13"
|
||||
"@babel/runtime": "^7.21.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/apps-config": "^0.124.2-87-x",
|
||||
"@polkadot/react-components": "^0.124.2-87-x",
|
||||
"@polkadot/react-query": "^0.124.2-87-x",
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/react-components": "^0.124.2-87-x"
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/react-components": "^0.124.2-87-x"
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/app-explorer": "^0.124.2-87-x",
|
||||
"@polkadot/react-components": "^0.124.2-87-x",
|
||||
"@polkadot/react-query": "^0.124.2-87-x"
|
||||
|
||||
@ -13,6 +13,6 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13"
|
||||
"@babel/runtime": "^7.21.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/react-components": "^0.124.2-87-x",
|
||||
"@polkadot/react-params": "^0.124.2-87-x"
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/react-components": "^0.124.2-87-x"
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/react-components": "^0.124.2-87-x",
|
||||
"@polkadot/react-query": "^0.124.2-87-x"
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/react-components": "^0.124.2-87-x",
|
||||
"@polkadot/react-query": "^0.124.2-87-x"
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/react-components": "^0.124.2-87-x"
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,6 +13,6 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13"
|
||||
"@babel/runtime": "^7.21.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
"path": false
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/api": "^9.14.2",
|
||||
"@polkadot/extension-compat-metamask": "^0.44.9",
|
||||
"@polkadot/extension-dapp": "^0.44.9",
|
||||
|
||||
@ -13,12 +13,16 @@ const srcRel = 'packages/react-api/src';
|
||||
const specDir = path.join(process.cwd(), srcRel);
|
||||
|
||||
describe('lightSpecs', (): void => {
|
||||
describe.each(Object.keys(lightSpecs))('%s', (r): void => {
|
||||
it.each(Object.keys(lightSpecs[r]))('%s', (s): void => {
|
||||
assert(
|
||||
fs.existsSync(path.join(specDir, lightSpecs[r][s])),
|
||||
`${srcRel}/${lightSpecs[r][s].slice(2)} does not exist`
|
||||
);
|
||||
for (const [k, specs] of Object.entries(lightSpecs)) {
|
||||
describe(k, (): void => {
|
||||
for (const [k, info] of Object.entries(specs)) {
|
||||
it(k, (): void => {
|
||||
assert(
|
||||
fs.existsSync(path.join(specDir, info)),
|
||||
`${srcRel}/${info.slice(2)} does not exist`
|
||||
);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@fortawesome/fontawesome-svg-core": "^6.3.0",
|
||||
"@fortawesome/free-solid-svg-icons": "^6.3.0",
|
||||
"@fortawesome/react-fontawesome": "^0.2.0",
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/hw-ledger": "^10.4.2",
|
||||
"is-ipfs": "^8.0.1"
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/react-components": "^0.124.2-87-x",
|
||||
"multiformats": "^11.0.1"
|
||||
}
|
||||
|
||||
@ -13,6 +13,6 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13"
|
||||
"@babel/runtime": "^7.21.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"type": "module",
|
||||
"version": "0.124.2-87-x",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@babel/runtime": "^7.21.0",
|
||||
"@polkadot/hw-ledger": "^10.4.2",
|
||||
"@polkadot/react-components": "^0.124.2-87-x"
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user