Bump @polkadot/dev (#7466)

* Bump @polkadot/dev

* Rebump dev

* Adjust Jest with crypto

* Adjust
This commit is contained in:
Jaco 2022-04-27 10:09:59 +02:00 committed by GitHub
parent 60b5acda9f
commit 98d75f780a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 750 additions and 686 deletions

View File

@ -22,10 +22,10 @@ module.exports = {
'\\.(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'
},
setupFilesAfterEnv: ['<rootDir>/jest/jest-setup.ts'],
setupFilesAfterEnv: ['<rootDir>/jest/setupEnv.cjs'],
testEnvironment: 'jsdom',
testTimeout: 90000,
// NOTE Everything after "smoldot" is due to react-markdown being ESM - cannot wait for Jest to
// finally get this right and work in the modern world. Jest 28 maybe?
transformIgnorePatterns: ['/node_modules/(?!@polkadot|@babel/runtime/helpers/esm/|@substrate|smoldot|react-markdown|vfile|vfile-|unified|unist-|bail|is-plain-obj|trough|remark-parse|mdast-|micromark|decode-named-character-reference|character-entities|remark-rehype|property-information|hast-util-|hast-to-|space-separated-tokens|comma-separated-tokens|rehype-raw|hastscript|web-namespaces|zwitch|html-void-elements)']
// NOTE: While we can remove @polkadot/etc. react-markdown still has issues with Jest 28
// ... TL;DR We still end up with a massive list here
transformIgnorePatterns: ['/node_modules/(?!react-markdown|vfile|vfile-|unified|unist-|bail|is-plain-obj|trough|remark-parse|mdast-|micromark|decode-named-character-reference|character-entities|remark-rehype|property-information|hast-util-|hast-to-|space-separated-tokens|comma-separated-tokens|rehype-raw|hastscript|web-namespaces|zwitch|html-void-elements|multiformats|uint8arrays)']
};

View File

@ -1,18 +0,0 @@
// Copyright 2017-2022 @polkadot/apps authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '@testing-library/jest-dom';
import './substrate-connect';
import { configure } from '@testing-library/dom';
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
// eslint-disable-next-line no-global-assign
CSS = {
supports (): boolean {
return false;
}
}
configure({ asyncUtilTimeout: 10000 });

22
jest/setupEnv.cjs Normal file
View File

@ -0,0 +1,22 @@
// Copyright 2017-2022 @polkadot/apps authors & contributors
// SPDX-License-Identifier: Apache-2.0
require('@testing-library/jest-dom');
require('./substrate-connect');
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 });

View File

@ -64,7 +64,7 @@
"@babel/runtime": "^7.17.9",
"@crustio/crust-pin": "^1.0.0",
"@pinata/sdk": "^1.1.25",
"@polkadot/dev": "^0.66.10",
"@polkadot/dev": "^0.66.13",
"@types/chart.js": "^2.9.37",
"@types/file-saver": "^2.0.5",
"@types/jest": "^27.4.1",
@ -82,9 +82,9 @@
"electron-builder": "22.14.13",
"electron-builder-notarize": "^1.2.0",
"i18next-scanner": "^3.1.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-is": "^18.0.0",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"react-is": "^18.1.0",
"source-map-explorer": "^2.5.2",
"styled-components": "^5.3.5",
"webpack": "^5.72.0",

View File

@ -14,7 +14,7 @@
"dependencies": {
"@babel/core": "^7.17.9",
"@babel/polyfill": "^7.12.1",
"@polkadot/dev": "^0.66.10",
"@polkadot/dev": "^0.66.13",
"@polkadot/react-components": "^0.113.2-6",
"electron-log": "^4.4.6",
"electron-updater": "^4.6.5"
@ -25,8 +25,8 @@
"babel-loader": "^8.2.5",
"copy-webpack-plugin": "^10.2.4",
"html-webpack-plugin": "^5.5.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"thread-loader": "^3.0.4",
"tmp": "^0.2.1",
"webpack": "^5.72.0"

View File

@ -18,7 +18,7 @@
"@babel/runtime": "^7.17.9",
"@polkadot/apps-config": "^0.113.2-6",
"@polkadot/apps-routing": "^0.113.2-6",
"@polkadot/dev": "^0.66.10",
"@polkadot/dev": "^0.66.13",
"@polkadot/react-api": "^0.113.2-6",
"@polkadot/react-components": "^0.113.2-6",
"@polkadot/react-hooks": "^0.113.2-6",

View File

@ -15,7 +15,7 @@
"dependencies": {
"@babel/runtime": "^7.17.9",
"@polkadot/hw-ledger": "^9.0.1",
"@polkadot/phishing": "^0.11.91",
"@polkadot/phishing": "^0.11.98",
"@polkadot/react-components": "^0.113.2-6",
"@polkadot/react-hooks": "^0.113.2-6",
"@polkadot/util": "^9.0.1",

View File

@ -19,6 +19,6 @@
},
"devDependencies": {
"@testing-library/react": "^13.1.1",
"testcontainers": "^8.7.2"
"testcontainers": "^8.8.0"
}
}

View File

@ -31,14 +31,14 @@
"i18next": "^21.6.16",
"i18next-browser-languagedetector": "^6.1.4",
"owasp-password-strength-test": "^1.3.0",
"react": "^18.0.0",
"react": "^18.1.0",
"react-beautiful-dnd": "^13.1.0",
"react-chartjs-2": "^4.1.0",
"react-copy-to-clipboard": "^5.1.0",
"react-dom": "^18.0.0",
"react-dom": "^18.1.0",
"react-dropzone": "^11.7.1",
"react-i18next": "^11.16.7",
"react-is": "^18.0.0",
"react-is": "^18.1.0",
"react-markdown": "^8.0.3",
"react-router": "^5.3.1",
"react-router-dom": "^5.3.1",

View File

@ -14,7 +14,7 @@
"version": "0.113.2-6",
"dependencies": {
"@testing-library/react": "^13.1.1",
"testcontainers": "^8.7.2"
"testcontainers": "^8.8.0"
},
"devDependencies": {
"@polkadot/types-support": "^8.2.2-2",

1360
yarn.lock

File diff suppressed because it is too large Load Diff