Skip to content

Commit

Permalink
Bump dev deps (#5647)
Browse files Browse the repository at this point in the history
* Bump dev deps

* Adjust

* Actual bump, fix tsconfig for typegen
  • Loading branch information
jacogr authored May 18, 2023
1 parent dd0bd21 commit 8394c71
Show file tree
Hide file tree
Showing 34 changed files with 220 additions and 238 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr-any.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ jobs:
- name: ${{ matrix.step }}
if: always()
run: |
yarn install --immutable | grep -v 'YN0013'
yarn install --immutable
yarn ${{ matrix.step }}
2 changes: 1 addition & 1 deletion .github/workflows/push-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ jobs:
node-version: 'lts/*'
- name: ${{ matrix.step }}
run: |
yarn install --immutable | grep -v 'YN0013'
yarn install --immutable
yarn ${{ matrix.step }}
5 changes: 5 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ enableImmutableInstalls: false

enableProgressBars: false

logFilters:
# Discard any "cannot be found in cache" messages
- code: YN0013
level: discard

nodeLinker: node-modules

plugins:
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
"test:one": "polkadot-dev-run-test --env node"
},
"devDependencies": {
"@polkadot/dev": "^0.73.17",
"@polkadot/dev": "^0.73.24",
"@polkadot/typegen": "workspace:packages/typegen",
"@types/node": "^20.1.3"
"@types/node": "^20.2.0"
},
"resolutions": {
"typescript": "^5.0.4"
Expand Down
2 changes: 1 addition & 1 deletion packages/api-augment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
"@polkadot/types-augment": "10.7.1",
"@polkadot/types-codec": "10.7.1",
"@polkadot/util": "^12.2.1",
"tslib": "^2.5.0"
"tslib": "^2.5.1"
}
}
22 changes: 0 additions & 22 deletions packages/api-augment/tsconfig.kusama.spec.json

This file was deleted.

2 changes: 1 addition & 1 deletion packages/api-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
"@polkadot/types": "10.7.1",
"@polkadot/util": "^12.2.1",
"rxjs": "^7.8.1",
"tslib": "^2.5.0"
"tslib": "^2.5.1"
}
}
2 changes: 1 addition & 1 deletion packages/api-contract/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@polkadot/util": "^12.2.1",
"@polkadot/util-crypto": "^12.2.1",
"rxjs": "^7.8.1",
"tslib": "^2.5.0"
"tslib": "^2.5.1"
},
"devDependencies": {
"@polkadot/api-augment": "10.7.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/api-derive/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@polkadot/util": "^12.2.1",
"@polkadot/util-crypto": "^12.2.1",
"rxjs": "^7.8.1",
"tslib": "^2.5.0"
"tslib": "^2.5.1"
},
"devDependencies": {
"@polkadot/api": "10.7.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@polkadot/util-crypto": "^12.2.1",
"eventemitter3": "^5.0.1",
"rxjs": "^7.8.1",
"tslib": "^2.5.0"
"tslib": "^2.5.1"
},
"devDependencies": {
"@polkadot/api-augment": "10.7.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/rpc-augment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
"@polkadot/types": "10.7.1",
"@polkadot/types-codec": "10.7.1",
"@polkadot/util": "^12.2.1",
"tslib": "^2.5.0"
"tslib": "^2.5.1"
}
}
2 changes: 1 addition & 1 deletion packages/rpc-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@polkadot/types": "10.7.1",
"@polkadot/util": "^12.2.1",
"rxjs": "^7.8.1",
"tslib": "^2.5.0"
"tslib": "^2.5.1"
},
"devDependencies": {
"@polkadot/keyring": "^12.2.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/rpc-provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"eventemitter3": "^5.0.1",
"mock-socket": "^9.2.1",
"nock": "^13.3.1",
"tslib": "^2.5.0"
"tslib": "^2.5.1"
},
"devDependencies": {
"@substrate/connect": "0.7.26"
Expand Down
2 changes: 1 addition & 1 deletion packages/rpc-provider/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src",
"resolveJsonModule": true,
"emitDeclarationOnly": false,
"resolveJsonModule": true,
"noEmit": true
},
"include": [
Expand Down
2 changes: 1 addition & 1 deletion packages/typegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@polkadot/util-crypto": "^12.2.1",
"@polkadot/x-ws": "^12.2.1",
"handlebars": "^4.7.7",
"tslib": "^2.5.0",
"tslib": "^2.5.1",
"yargs": "^17.7.2"
},
"devDependencies": {
Expand Down
6 changes: 6 additions & 0 deletions packages/typegen/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
"outDir": "./build",
"rootDir": "./src"
},
"include": [
"src/**/*"
],
"exclude": [
"scripts/**/*"
],
"references": [
{ "path": "../api/tsconfig.build.json" },
{ "path": "../api-augment/tsconfig.build.json" },
Expand Down
19 changes: 19 additions & 0 deletions packages/typegen/tsconfig.scripts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./scripts",
"emitDeclarationOnly": false,
"noEmit": true
},
"include": [
"scripts/**/*"
],
"exclude": [
"src/**/*"
],
"references": [
{ "path": "../typegen/tsconfig.build.json" }
]
}
2 changes: 1 addition & 1 deletion packages/types-augment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
"@polkadot/types": "10.7.1",
"@polkadot/types-codec": "10.7.1",
"@polkadot/util": "^12.2.1",
"tslib": "^2.5.0"
"tslib": "^2.5.1"
}
}
2 changes: 1 addition & 1 deletion packages/types-codec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"dependencies": {
"@polkadot/util": "^12.2.1",
"@polkadot/x-bigint": "^12.2.1",
"tslib": "^2.5.0"
"tslib": "^2.5.1"
},
"devDependencies": {
"@polkadot/types": "10.7.1",
Expand Down
3 changes: 1 addition & 2 deletions packages/types-codec/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src",
"resolveJsonModule": true
"rootDir": "./src"
},
"exclude": [
"**/*.data.ts",
Expand Down
1 change: 0 additions & 1 deletion packages/types-codec/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"outDir": "./build",
"rootDir": "./src",
"emitDeclarationOnly": false,
"resolveJsonModule": true,
"noEmit": true
},
"include": [
Expand Down
2 changes: 1 addition & 1 deletion packages/types-create/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"dependencies": {
"@polkadot/types-codec": "10.7.1",
"@polkadot/util": "^12.2.1",
"tslib": "^2.5.0"
"tslib": "^2.5.1"
},
"devDependencies": {
"@polkadot/types": "10.7.1"
Expand Down
3 changes: 1 addition & 2 deletions packages/types-create/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src",
"resolveJsonModule": true
"rootDir": "./src"
},
"exclude": [
"**/*.spec.ts"
Expand Down
1 change: 0 additions & 1 deletion packages/types-create/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"outDir": "./build",
"rootDir": "./src",
"emitDeclarationOnly": false,
"resolveJsonModule": true,
"noEmit": true
},
"include": [
Expand Down
2 changes: 1 addition & 1 deletion packages/types-known/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@polkadot/types-codec": "10.7.1",
"@polkadot/types-create": "10.7.1",
"@polkadot/util": "^12.2.1",
"tslib": "^2.5.0"
"tslib": "^2.5.1"
},
"devDependencies": {
"@polkadot/api": "10.7.1"
Expand Down
1 change: 0 additions & 1 deletion packages/types-known/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"outDir": "./build",
"rootDir": "./src",
"emitDeclarationOnly": false,
"resolveJsonModule": true,
"noEmit": true
},
"include": [
Expand Down
2 changes: 1 addition & 1 deletion packages/types-support/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
"main": "index.js",
"dependencies": {
"@polkadot/util": "^12.2.1",
"tslib": "^2.5.0"
"tslib": "^2.5.1"
}
}
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@polkadot/util": "^12.2.1",
"@polkadot/util-crypto": "^12.2.1",
"rxjs": "^7.8.1",
"tslib": "^2.5.0"
"tslib": "^2.5.1"
},
"devDependencies": {
"@polkadot/keyring": "^12.2.1",
Expand Down
3 changes: 1 addition & 2 deletions packages/types/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src",
"resolveJsonModule": true
"rootDir": "./src"
},
"exclude": [
"**/checkTypes.manual.ts",
Expand Down
12 changes: 9 additions & 3 deletions scripts/metadata-get.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import fs from 'node:fs';

import { fetch } from '@polkadot/x-fetch';

const META = 14;
const PREAMBLE = `// Copyright 2017-2023 @polkadot/types-support authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n/* eslint-disable */\n\n`;
const CMD = {
kusama: `${PREAMBLE}// cargo run --release -- purge-chain -y --chain kusama-dev && cargo run --release -- --chain kusama-dev --alice --force-authoring\n\nexport default`,
Expand All @@ -15,6 +14,11 @@ const CMD = {

let requestId = 0;

/**
*
* @param {'rpc_methods' | 'state_getMetadata' | 'state_getRuntimeVersion'} method
* @returns {Promise<any>}
*/
async function get (method) {
const res = await fetch('http://127.0.0.1:9944', {
body: JSON.stringify({
Expand All @@ -34,6 +38,7 @@ async function get (method) {
return body.result;
}

/** @type {[string[], string, { specName: 'polkadot' | 'kusama' | 'node'; specVersion: string; }]} */
const [methods, metadata, version] = await Promise.all([
get('rpc_methods'),
get('state_getMetadata'),
Expand All @@ -42,10 +47,11 @@ const [methods, metadata, version] = await Promise.all([
const chain = version.specName === 'node'
? 'substrate'
: version.specName;
const path = `packages/types-support/src/metadata/v${META}/${chain}`;
const metaVer = parseInt(metadata.substring(10, 12), 16);
const path = `packages/types-support/src/metadata/v${metaVer}/${chain}`;

fs.writeFileSync(`${path}-hex.ts`, `${CMD[chain]} '${metadata}';\n`);
fs.writeFileSync(`${path}-rpc.ts`, `${CMD[chain]} ${JSON.stringify(methods, null, 2)};\n`);
fs.writeFileSync(`${path}-ver.ts`, `${CMD[chain]} ${JSON.stringify(version, null, 2)};\n`);

console.log(`Done. ${chain}/${version.specVersion}`);
console.log(`Retrieved ${chain}/${version.specVersion}, metadata v${metaVer}`);
2 changes: 1 addition & 1 deletion tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
{ "path": "./packages/api/tsconfig.spec.json" },
{ "path": "./packages/api-augment/tsconfig.build.json" },
{ "path": "./packages/api-augment/tsconfig.kusama.json" },
{ "path": "./packages/api-augment/tsconfig.kusama.spec.json" },
{ "path": "./packages/api-augment/tsconfig.polkadot.json" },
{ "path": "./packages/api-base/tsconfig.build.json" },
{ "path": "./packages/api-contract/tsconfig.build.json" },
Expand All @@ -21,6 +20,7 @@
{ "path": "./packages/rpc-provider/tsconfig.build.json" },
{ "path": "./packages/rpc-provider/tsconfig.spec.json" },
{ "path": "./packages/typegen/tsconfig.build.json" },
{ "path": "./packages/typegen/tsconfig.scripts.json" },
{ "path": "./packages/types/tsconfig.build.json" },
{ "path": "./packages/types/tsconfig.spec.json" },
{ "path": "./packages/types-augment/tsconfig.build.json" },
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.eslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"include": [
"packages/**/src/**/*",
"packages/**/scripts/**/*",
"packages/**/test/**/*"
"scripts/*"
],
"exclude": [
"**/node_modules/**/*"
Expand Down
13 changes: 10 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@
"extends": "./tsconfig.base.json",
"compilerOptions": {
"baseUrl": "./packages",
"composite": false
"composite": false,
"resolveJsonModule": true
},
"include": [
"packages/**/src/**/*"
"packages/**/src/**/*",
"packages/**/scripts/**/*",
"scripts/*"
],
"exclude": [
"**/node_modules/**/*"
"**/node_modules/**/*",
// these include the different-chain augmentations, which then overrides
// the substrate base. TS only allow single augmentations, so exclude here
"packages/api-augment/src/kusama/*.ts",
"packages/api-augment/src/polkadot/*.ts"
]
}
Loading

0 comments on commit 8394c71

Please sign in to comment.