Skip to content

Commit

Permalink
update deps (#642)
Browse files Browse the repository at this point in the history
* update deps

* setup coverage

* fix config
  • Loading branch information
ermalkaleci authored Jan 23, 2024
1 parent 345803f commit e24482e
Show file tree
Hide file tree
Showing 22 changed files with 1,332 additions and 1,436 deletions.
8 changes: 4 additions & 4 deletions executor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
"build:esm": "swc ./pkg -C module.type=es6 -d dist/esm --copy-files && cp pkg/chopsticks_executor.d.ts dist/esm/index.d.ts && echo '{\"type\": \"module\"}' > dist/esm/package.json"
},
"dependencies": {
"@polkadot/util": "^12.5.1",
"@polkadot/wasm-util": "^7.2.2"
"@polkadot/util": "^12.6.2",
"@polkadot/wasm-util": "^7.3.2"
},
"devDependencies": {
"@swc/cli": "0.1.63",
"@swc/core": "^1.3.100",
"@swc/cli": "0.1.65",
"@swc/core": "^1.3.105",
"fflate": "^0.8.1"
},
"files": [
Expand Down
26 changes: 15 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
"check": "cd executor && cargo check --locked",
"test": "vitest run",
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"coverage:ui": "vitest test --ui --coverage.enabled=true",
"start": "NODE_OPTIONS='--loader ts-node/esm --loader ./loader.js --no-warnings' node packages/chopsticks/src/cli.ts",
"script:start": "yarn start",
"docs:prep": "yarn workspaces foreach --all -pvit run docs:prep && cp docs/* docs-src",
Expand All @@ -41,26 +43,28 @@
"*.{js,ts,css,md}": "prettier --write"
},
"devDependencies": {
"@swc/core": "^1.3.100",
"@types/node": "^20.10.4",
"@swc/core": "^1.3.105",
"@types/node": "^20.11.5",
"@types/prettier": "^3.0.0",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"eslint": "^8.55.0",
"@typescript-eslint/eslint-plugin": "^6.19.1",
"@typescript-eslint/parser": "^6.19.1",
"@vitest/coverage-v8": "^1.2.1",
"@vitest/ui": "^1.2.1",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-sort-imports-es6-autofix": "^0.6.0",
"husky": "^8.0.3",
"prettier": "^3.1.1",
"prettier": "^3.2.4",
"ts-node": "^10.9.2",
"typedoc": "^0.25.5",
"typedoc": "^0.25.7",
"typedoc-plugin-markdown": "^3.17.1",
"typescript": "^5.3.3",
"unplugin-swc": "^1.4.4",
"vite-tsconfig-paths": "^4.2.3",
"vitepress": "^1.0.0-rc.31",
"vitest": "^1.0.4",
"vite-tsconfig-paths": "^4.3.1",
"vitepress": "^1.0.0-rc.40",
"vitest": "^1.2.1",
"wasm-pack": "^0.12.1"
}
}
24 changes: 12 additions & 12 deletions packages/chopsticks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,31 @@
"@acala-network/chopsticks-core": "workspace:*",
"@acala-network/chopsticks-db": "workspace:*",
"@pnpm/npm-conf": "^2.2.2",
"@polkadot/api-augment": "^10.10.1",
"@polkadot/types": "^10.10.1",
"@polkadot/util": "^12.5.1",
"@polkadot/util-crypto": "^12.5.1",
"axios": "^1.6.3",
"dotenv": "^16.3.1",
"@polkadot/api-augment": "^10.11.2",
"@polkadot/types": "^10.11.2",
"@polkadot/util": "^12.6.2",
"@polkadot/util-crypto": "^12.6.2",
"axios": "^1.6.5",
"dotenv": "^16.4.0",
"global-agent": "^3.0.0",
"js-yaml": "^4.1.0",
"jsondiffpatch": "^0.5.0",
"jsondiffpatch": "^0.6.0",
"lodash": "^4.17.21",
"ws": "^8.15.0",
"ws": "^8.16.0",
"yargs": "^17.7.2",
"zod": "^3.22.4"
},
"devDependencies": {
"@swc/cli": "0.1.63",
"@swc/core": "^1.3.100",
"@swc/cli": "0.1.65",
"@swc/core": "^1.3.105",
"@types/global-agent": "^2.1.3",
"@types/js-yaml": "^4.0.9",
"@types/lodash": "^4.14.202",
"@types/node": "^20.10.4",
"@types/node": "^20.11.5",
"@types/ws": "^8.5.10",
"@types/yargs": "^17.0.32",
"typescript": "^5.3.3",
"vitest": "^1.0.4"
"vitest": "^1.2.1"
},
"files": [
"dist/esm/**",
Expand Down
4 changes: 2 additions & 2 deletions packages/chopsticks/src/utils/decoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { create } from 'jsondiffpatch'
import _ from 'lodash'

const diffPatcher = create({
array: { detectMove: false },
textDiff: { minLength: Number.MAX_VALUE }, // skip text diff
arrays: { detectMove: false },
textDiff: { minLength: Number.MAX_VALUE } as any, // skip text diff
})

export const decodeStorageDiff = async (block: Block, diff: [HexString, HexString | null][]) => {
Expand Down
6 changes: 3 additions & 3 deletions packages/chopsticks/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"rootDir": "src",
"emitDeclarationOnly": true,
"declarationDir": "dist/esm"
"declarationDir": "dist/esm",
},
"include": ["src/**/*"],
"exclude": ["src/**/*.test.ts"],
Expand All @@ -13,6 +13,6 @@
"swc": true,
"transpileOnly": true,
"files": true,
"experimentalSpecifierResolution": "node"
}
"experimentalSpecifierResolution": "node",
},
}
22 changes: 11 additions & 11 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,27 @@
},
"dependencies": {
"@acala-network/chopsticks-executor": "workspace:*",
"@polkadot/rpc-provider": "^10.10.1",
"@polkadot/types": "^10.10.1",
"@polkadot/types-codec": "^10.10.1",
"@polkadot/types-known": "^10.10.1",
"@polkadot/util": "^12.5.1",
"@polkadot/util-crypto": "^12.5.1",
"@polkadot/rpc-provider": "^10.11.2",
"@polkadot/types": "^10.11.2",
"@polkadot/types-codec": "^10.11.2",
"@polkadot/types-known": "^10.11.2",
"@polkadot/util": "^12.6.2",
"@polkadot/util-crypto": "^12.6.2",
"comlink": "^4.4.1",
"eventemitter3": "^5.0.1",
"lodash": "^4.17.21",
"lru-cache": "^10.1.0",
"pino": "^8.16.2",
"pino-pretty": "^10.2.3",
"pino": "^8.17.2",
"pino-pretty": "^10.3.1",
"rxjs": "^7.8.1",
"zod": "^3.22.4"
},
"devDependencies": {
"@swc/cli": "0.1.63",
"@swc/core": "^1.3.100",
"@swc/cli": "0.1.65",
"@swc/core": "^1.3.105",
"@types/lodash": "^4.14.202",
"typescript": "^5.3.3",
"vitest": "^1.0.4"
"vitest": "^1.2.1"
},
"files": [
"dist/esm/**",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"compilerOptions": {
"rootDir": "src",
"emitDeclarationOnly": true,
"declarationDir": "dist/esm"
"declarationDir": "dist/esm",
},
"include": ["src/**/*"],
"exclude": ["src/**/*.test.ts"]
"exclude": ["src/**/*.test.ts"],
}
10 changes: 5 additions & 5 deletions packages/db/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
},
"dependencies": {
"@acala-network/chopsticks-core": "workspace:*",
"@polkadot/util": "^12.5.1",
"@polkadot/util": "^12.6.2",
"idb": "^8.0.0",
"sqlite3": "^5.1.6",
"typeorm": "^0.3.17"
"sqlite3": "^5.1.7",
"typeorm": "^0.3.19"
},
"devDependencies": {
"@swc/cli": "0.1.63",
"@swc/core": "^1.3.100",
"@swc/cli": "0.1.65",
"@swc/core": "^1.3.105",
"typescript": "^5.3.3"
},
"files": [
Expand Down
4 changes: 2 additions & 2 deletions packages/db/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"compilerOptions": {
"rootDir": "src",
"emitDeclarationOnly": true,
"declarationDir": "dist/esm"
"declarationDir": "dist/esm",
},
"include": ["src/**/*.ts"],
"exclude": ["src/**/*.test.ts"],
"references": [{ "path": "../core/tsconfig.json" }]
"references": [{ "path": "../core/tsconfig.json" }],
}
4 changes: 2 additions & 2 deletions packages/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"devDependencies": {
"@acala-network/chopsticks": "workspace:*",
"@acala-network/chopsticks-testing": "workspace:*",
"@polkadot/api": "^10.10.1",
"@polkadot/api": "^10.11.2",
"typescript": "^5.3.3",
"vitest": "^1.0.4"
"vitest": "^1.2.1"
}
}
8 changes: 3 additions & 5 deletions packages/e2e/src/batch-request.test.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
import { WebSocket } from 'ws'
import { afterAll, beforeAll, describe, expect, it } from 'vitest'
import { afterAll, describe, expect, it } from 'vitest'

import networks from './networks.js'

describe('Batch request', async () => {
const { chain, url, teardown } = await networks.acala()
const wsClient = new WebSocket(url)

beforeAll(async () => {
await new Promise<void>((resolve) => {
wsClient.on('open', () => resolve())
})
await new Promise<void>((resolve) => {
wsClient.on('open', () => resolve())
})

afterAll(async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e/src/chopsticks-provider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ describe('chopsticks provider works', async () => {
}
})
})
chain.txPool.mode = BuildBlockMode.Batch
await new Promise((r) => setTimeout(r, 100))

await check(api.rpc.chain.getBlock()).toMatchSnapshot()
await check(api.query.system.account(alice.address)).toMatchSnapshot()
Expand Down
4 changes: 2 additions & 2 deletions packages/e2e/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "src"
"rootDir": "src",
},
"include": ["src/**/*"],
"references": [{ "path": "../core" }, { "path": "../db" }, { "path": "../chopsticks" }, { "path": "../testing" }]
"references": [{ "path": "../core" }, { "path": "../db" }, { "path": "../chopsticks" }, { "path": "../testing" }],
}
8 changes: 4 additions & 4 deletions packages/testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
},
"dependencies": {
"@acala-network/chopsticks-utils": "workspace:*",
"@polkadot/api": "^10.10.1",
"@polkadot/types": "^10.10.1"
"@polkadot/api": "^10.11.2",
"@polkadot/types": "^10.11.2"
},
"devDependencies": {
"@swc/cli": "0.1.63",
"@swc/core": "^1.3.100",
"@swc/cli": "0.1.65",
"@swc/core": "^1.3.105",
"@types/chai": "^4.3.11",
"typescript": "^5.3.3"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/testing/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"compilerOptions": {
"rootDir": "src",
"emitDeclarationOnly": true,
"declarationDir": "dist/esm"
"declarationDir": "dist/esm",
},
"include": ["src/**/*"],
"exclude": ["src/**/*.test.ts"],
"references": [{ "path": "../utils/tsconfig.json" }]
"references": [{ "path": "../utils/tsconfig.json" }],
}
8 changes: 4 additions & 4 deletions packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
},
"dependencies": {
"@acala-network/chopsticks": "workspace:*",
"@polkadot/api": "^10.10.1",
"@polkadot/types": "^10.10.1"
"@polkadot/api": "^10.11.2",
"@polkadot/types": "^10.11.2"
},
"devDependencies": {
"@swc/cli": "0.1.63",
"@swc/core": "^1.3.100",
"@swc/cli": "0.1.65",
"@swc/core": "^1.3.105",
"typescript": "^5.3.3"
},
"files": [
Expand Down
4 changes: 2 additions & 2 deletions packages/utils/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"compilerOptions": {
"rootDir": "src",
"emitDeclarationOnly": true,
"declarationDir": "dist/esm"
"declarationDir": "dist/esm",
},
"include": ["src/**/*"],
"exclude": ["src/**/*.test.ts"],
"references": [{ "path": "../chopsticks/tsconfig.json" }]
"references": [{ "path": "../chopsticks/tsconfig.json" }],
}
8 changes: 4 additions & 4 deletions packages/web-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
"@acala-network/chopsticks-db": "workspace:*",
"@emotion/react": "^11.11.3",
"@emotion/styled": "^11.11.0",
"@mui/material": "^5.14.20",
"@playwright/test": "^1.40.1",
"@types/react": "^18.2.43",
"@types/react-dom": "^18.2.17",
"@mui/material": "^5.15.6",
"@playwright/test": "^1.41.1",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
"@vitejs/plugin-react": "^4.2.1",
"crypto-browserify": "^3.12.0",
"path-browserify": "^1.0.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/web-test/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"target": "es2021",
"module": "NodeNext",
"lib": ["es2021", "dom", "dom.iterable"],
"sourceMap": true
"sourceMap": true,
},
"include": ["src/**/*"],
"references": [{ "path": "../core/tsconfig.json" }, { "path": "../db/tsconfig.json" }]
"references": [{ "path": "../core/tsconfig.json" }, { "path": "../db/tsconfig.json" }],
}
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"transpileOnly": true,
"files": true,
"esm": true,
"swc": true
}
"swc": true,
},
}
4 changes: 4 additions & 0 deletions vitest.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ export default defineConfig({
include: ['packages/**/*.test.ts'],
bail: process.env.CI ? 1 : undefined /* use defaults */,
pool: 'forks',
coverage: {
include: ['packages/chopsticks/**/*.ts', 'packages/core/**/*.ts'],
reporter: ['text', 'json-summary', 'json', 'html'],
},
},
plugins: [swc.vite(), tsconfigPaths()],
})
Loading

0 comments on commit e24482e

Please sign in to comment.