Bump deps (w/ eslint updates) (#533)

This commit is contained in:
Jaco
2023-08-16 09:17:00 +03:00
committed by GitHub
parent 71291442bb
commit ee26a6ef98
13 changed files with 772 additions and 525 deletions

View File

@@ -44,10 +44,10 @@
"test:wasm-crypto:rust": "cd packages/wasm-crypto && RUST_BACKTRACE=full cargo test --release -- --test-threads=1 --nocapture"
},
"devDependencies": {
"@polkadot/dev": "^0.75.26",
"@polkadot/dev": "^0.76.13",
"@polkadot/util": "^12.3.2",
"@polkadot/x-randomvalues": "^12.3.2",
"@types/node": "^20.4.0",
"@types/node": "^20.5.0",
"fflate": "^0.8.0"
},
"resolutions": {

View File

@@ -22,7 +22,7 @@
"main": "index.js",
"dependencies": {
"@polkadot/wasm-util": "7.2.2-10-x",
"tslib": "^2.6.0"
"tslib": "^2.6.1"
},
"devDependencies": {
"@polkadot/util": "^12.3.2",

View File

@@ -20,7 +20,7 @@ export function createWasmFn <C extends WasmBaseInstance> (root: 'crypto', wasmB
};
try {
if (!wasmBytes || !wasmBytes.length) {
if (!wasmBytes?.length) {
throw new Error('No WebAssembly provided for initialization');
} else if (typeof WebAssembly !== 'object' || typeof WebAssembly.instantiate !== 'function') {
throw new Error('WebAssembly is not available in your environment');

View File

@@ -7,7 +7,7 @@ export type WasmImports = Record<string, (...args: never[]) => unknown>;
// Use non-strong types instead of WebAssembly.Memory which may not
// be available as part of the TS environment types (it needs dom)
export type WasmMemory = { buffer: ArrayBuffer };
export interface WasmMemory { buffer: ArrayBuffer }
export declare interface InitResult<C extends WasmBaseInstance> {
error: string | null;

View File

@@ -18,7 +18,7 @@
"version": "7.2.2-10-x",
"main": "index.js",
"dependencies": {
"tslib": "^2.6.0"
"tslib": "^2.6.1"
},
"devDependencies": {
"@polkadot/util": "^12.3.2"

View File

@@ -27,7 +27,7 @@
"@polkadot/wasm-crypto-asmjs": "7.2.2-10-x",
"@polkadot/wasm-crypto-wasm": "7.2.2-10-x",
"@polkadot/wasm-util": "7.2.2-10-x",
"tslib": "^2.6.0"
"tslib": "^2.6.1"
},
"devDependencies": {
"@polkadot/util": "^12.3.2",

View File

@@ -19,7 +19,7 @@
"main": "index.js",
"dependencies": {
"@polkadot/wasm-util": "7.2.2-10-x",
"tslib": "^2.6.0"
"tslib": "^2.6.1"
},
"devDependencies": {
"@polkadot/util": "^12.3.2"

View File

@@ -34,7 +34,7 @@
"@polkadot/wasm-crypto-init": "7.2.2-10-x",
"@polkadot/wasm-crypto-wasm": "7.2.2-10-x",
"@polkadot/wasm-util": "7.2.2-10-x",
"tslib": "^2.6.0"
"tslib": "^2.6.1"
},
"devDependencies": {
"@polkadot/util": "^12.3.2",

View File

@@ -62,7 +62,6 @@ export function runAll (name, wasm) {
try {
console.time(timerId);
console.log();
// console.log(timerId);
test(wasm);
@@ -89,11 +88,13 @@ export function runAll (name, wasm) {
export function runUnassisted (type, wasm) {
console.log(`\n*** ${type}: Running tests`);
// for these we are pass-through describe and it handlers
// For these we are pass-through describe and it handlers
// @ts-expect-error We are hacking this, so expect TS to be unhappy...
globalThis.describe = (name, fn) => {
console.log('\n', name);
// We expect this to be handled top-level, in the test itself
// eslint-disable-next-line @typescript-eslint/no-floating-promises
fn();
};
@@ -101,13 +102,14 @@ export function runUnassisted (type, wasm) {
globalThis.it = (name, fn) => {
console.log(`\t${name}`);
// We expect this to be handled top-level, in the test itself
// eslint-disable-next-line @typescript-eslint/no-floating-promises
fn();
};
console.time(type);
initRun(type, wasm)
// eslint-disable-next-line promise/always-return
.then(() => {
runAll(type, wasm);
console.log(`\n*** ${type}: All passed`);

View File

@@ -12,9 +12,7 @@
import * as wasm from '../build-deno/mod.ts';
import { initRun, tests } from './all/index.js';
interface Tests {
[key: string]: (wasm: unknown) => void;
}
type Tests = Record<string, (wasm: unknown) => void>;
declare const globalThis: {
it: (name: string, fn: () => void) => unknown;

View File

@@ -14,7 +14,7 @@ import { pathToFileURL } from 'node:url';
* @returns {*}
*/
export function resolve (specifier, context, nextResolve) {
if (/^@polkadot\/wasm-/.test(specifier)) {
if (specifier.startsWith('@polkadot/wasm-')) {
const parts = specifier.split(/[\\/]/);
return {

View File

@@ -21,7 +21,7 @@
"version": "7.2.2-10-x",
"main": "index.js",
"dependencies": {
"tslib": "^2.6.0"
"tslib": "^2.6.1"
},
"devDependencies": {
"@polkadot/util": "^12.3.2"

1263
yarn.lock

File diff suppressed because it is too large Load Diff