Adjust packages with known dependencies (#4356)

This commit is contained in:
Jaco
2021-12-19 22:09:32 +02:00
committed by GitHub
parent bb75aa8f74
commit e81e24fa5f
25 changed files with 58 additions and 37 deletions
+21
View File
@@ -1,5 +1,26 @@
# CHANGELOG
## master
Upgrade priority: Low. Recommended for TS users with their own non-Polkadot/Kusama chains.
- **Breaking changes** For TS users the default API augmentation is now optional. This means that the API, for TypeScript, is not decorated by default with the Substrate types and encpoints. TS users should add a singular `import '@polkadot/api-augment';` in their code to retore old behavior.
- **Breaking change** To cater for the above, chain-specific interfaces generated with older versions may not be compaitible with the current version of the API. Additionally, TS interfaces generated with this version of the API is not compatible with older API versions.
Contributed:
- Add contracts storage deposit support (Thanks to https://github.com/statictype)
Changes:
- Split `@polkadot/types-{codec, create}` packages from `types`
- Extract `@polkadot/{api, rpc, types}-augment` (now optional)
- Rework build steps to use TS project references
- Add Polkadot 9140 upgrade block
- Update to latest Substrate, Kusama & Polkadot static metadata
## 6.12.1 Dec 13, 2021
Upgrade priority: Low. Recommended for users of contracts on the current Substrate master version and TS users who generate metadata v14 interfaces.
+2
View File
@@ -25,7 +25,9 @@
"dependencies": {
"@babel/runtime": "^7.16.5",
"@polkadot/api-base": "6.12.2-21",
"@polkadot/rpc-augment": "6.12.2-21",
"@polkadot/types": "6.12.2-21",
"@polkadot/types-augment": "6.12.2-21",
"@polkadot/types-codec": "6.12.2-21"
}
}
@@ -1,4 +0,0 @@
// Copyright 2017-2021 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '@polkadot/types-augment';
@@ -1,8 +1,10 @@
// Copyright 2017-2021 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
// for the API, we decorate not only the endpoints, but all types
import '@polkadot/rpc-augment';
import '@polkadot/types-augment';
// the augmentated types (on top of @polkadot/api-base)
import './consts';
import './errors';
import './events';
+2 -1
View File
@@ -3,8 +3,9 @@
import { packageInfo as baseInfo } from '@polkadot/api-base/packageInfo';
import { packageInfo as typesInfo } from '@polkadot/types/packageInfo';
import { packageInfo as codecInfo } from '@polkadot/types-codec/packageInfo';
import { detectPackage } from '@polkadot/util';
import { packageInfo } from './packageInfo';
detectPackage(packageInfo, typeof __dirname !== 'undefined' && __dirname, [baseInfo, typesInfo]);
detectPackage(packageInfo, typeof __dirname !== 'undefined' && __dirname, [baseInfo, typesInfo, codecInfo]);
+1 -1
View File
@@ -8,8 +8,8 @@
"references": [
{ "path": "../api-base" },
{ "path": "../rpc-augment" },
{ "path": "../rpc-core" },
{ "path": "../types" },
{ "path": "../types-codec" },
{ "path": "../types-augment" }
]
}
+1
View File
@@ -24,6 +24,7 @@
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.5",
"@polkadot/rpc-core": "6.12.2-21",
"@polkadot/types": "6.12.2-21",
"@polkadot/util": "^8.2.2",
"rxjs": "^7.4.0"
+2 -1
View File
@@ -1,9 +1,10 @@
// Copyright 2017-2021 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { packageInfo as rpcInfo } from '@polkadot/rpc-core/packageInfo';
import { packageInfo as typesInfo } from '@polkadot/types/packageInfo';
import { detectPackage } from '@polkadot/util';
import { packageInfo } from './packageInfo';
detectPackage(packageInfo, typeof __dirname !== 'undefined' && __dirname, [typesInfo]);
detectPackage(packageInfo, typeof __dirname !== 'undefined' && __dirname, [rpcInfo, typesInfo]);
-2
View File
@@ -15,8 +15,6 @@
],
"references": [
{ "path": "../api" },
{ "path": "../api-augment" },
{ "path": "../rpc-augment" },
{ "path": "../types" }
]
}
+1 -4
View File
@@ -18,10 +18,7 @@
],
"references": [
{ "path": "../api" },
{ "path": "../api-augment" },
{ "path": "../api-contract" },
{ "path": "../rpc-augment" },
{ "path": "../types" },
{ "path": "../types-augment" }
{ "path": "../types" }
]
}
+3 -3
View File
@@ -24,14 +24,14 @@
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.5",
"@polkadot/api-augment": "6.12.2-21",
"@polkadot/api-base": "6.12.2-21",
"@polkadot/rpc-augment": "6.12.2-21",
"@polkadot/rpc-core": "6.12.2-21",
"@polkadot/types": "6.12.2-21",
"@polkadot/types-codec": "6.12.2-21"
},
"devDependencies": {
"@polkadot/api": "6.12.2-21"
"@polkadot/api": "6.12.2-21",
"@polkadot/api-augment": "6.12.2-21",
"@polkadot/rpc-augment": "6.12.2-21"
}
}
+3 -1
View File
@@ -24,7 +24,6 @@
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.5",
"@polkadot/api-augment": "6.12.2-21",
"@polkadot/api-base": "6.12.2-21",
"@polkadot/api-derive": "6.12.2-21",
"@polkadot/keyring": "^8.2.2",
@@ -38,5 +37,8 @@
"@polkadot/util-crypto": "^8.2.2",
"eventemitter3": "^4.0.7",
"rxjs": "^7.4.0"
},
"devDependencies": {
"@polkadot/api-augment": "6.12.2-21"
}
}
-1
View File
@@ -15,7 +15,6 @@
{ "path": "../rpc-core" },
{ "path": "../rpc-provider" },
{ "path": "../types" },
{ "path": "../types-augment" },
{ "path": "../types-known" }
]
}
-1
View File
@@ -20,7 +20,6 @@
{ "path": "../rpc-core" },
{ "path": "../rpc-provider" },
{ "path": "../types" },
{ "path": "../types-augment" },
{ "path": "../types-known" }
]
}
+2 -2
View File
@@ -24,7 +24,7 @@
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.5",
"@polkadot/types": "6.12.2-21",
"rxjs": "^7.4.0"
"@polkadot/rpc-core": "6.12.2-21",
"@polkadot/types": "6.12.2-21"
}
}
+2 -2
View File
@@ -24,13 +24,13 @@
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.5",
"@polkadot/rpc-augment": "6.12.2-21",
"@polkadot/rpc-provider": "6.12.2-21",
"@polkadot/types": "6.12.2-21",
"@polkadot/util": "^8.2.2",
"rxjs": "^7.4.0"
},
"devDependencies": {
"@polkadot/keyring": "^8.2.2"
"@polkadot/keyring": "^8.2.2",
"@polkadot/rpc-augment": "6.12.2-21"
}
}
+2 -1
View File
@@ -10,6 +10,7 @@
"**/*.spec.ts"
],
"references": [
{ "path": "../rpc-provider" }
{ "path": "../rpc-provider" },
{ "path": "../types" }
]
}
+2 -1
View File
@@ -14,6 +14,7 @@
"references": [
{ "path": "../rpc-core" },
{ "path": "../rpc-augment" },
{ "path": "../rpc-provider" }
{ "path": "../rpc-provider" },
{ "path": "../types" }
]
}
+1 -2
View File
@@ -10,7 +10,6 @@
"**/*.spec.ts"
],
"references": [
{ "path": "../types" },
{ "path": "../types-augment" }
{ "path": "../types" }
]
}
+1 -2
View File
@@ -13,7 +13,6 @@
],
"references": [
{ "path": "../rpc-provider" },
{ "path": "../types" },
{ "path": "../types-augment" }
{ "path": "../types" }
]
}
+1 -3
View File
@@ -15,8 +15,6 @@
],
"references": [
{ "path": "../types" },
{ "path": "../types-augment" },
{ "path": "../types-codec" },
{ "path": "../types-support" }
{ "path": "../types-augment" }
]
}
+1 -3
View File
@@ -13,8 +13,6 @@
],
"references": [
{ "path": "../types" },
{ "path": "../types-augment" },
{ "path": "../types-codec" },
{ "path": "../types-create" }
{ "path": "../types-codec" }
]
}
+1
View File
@@ -26,6 +26,7 @@
"@babel/runtime": "^7.16.5",
"@polkadot/networks": "^8.2.2",
"@polkadot/types": "6.12.2-21",
"@polkadot/types-create": "6.12.2-21",
"@polkadot/util": "^8.2.2"
}
}
@@ -9,7 +9,8 @@ const upgrades: ChainUpgradesRaw = [
[528470, 13], [687751, 14], [746085, 15], [787923, 16], [799302, 17],
[1205128, 18], [1603423, 23], [1733218, 24], [2005673, 25], [2436698, 26],
[3613564, 27], [3899547, 28], [4345767, 29], [4876134, 30], [5661442, 9050],
[6321619, 9080], [6713249, 9090], [7217907, 9100], [7229126, 9110], [7560558, 9122]
[6321619, 9080], [6713249, 9090], [7217907, 9100], [7229126, 9110], [7560558, 9122],
[8115869, 9140]
];
export default upgrades;
+5 -1
View File
@@ -1873,7 +1873,9 @@ __metadata:
dependencies:
"@babel/runtime": ^7.16.5
"@polkadot/api-base": 6.12.2-21
"@polkadot/rpc-augment": 6.12.2-21
"@polkadot/types": 6.12.2-21
"@polkadot/types-augment": 6.12.2-21
"@polkadot/types-codec": 6.12.2-21
languageName: unknown
linkType: soft
@@ -1883,6 +1885,7 @@ __metadata:
resolution: "@polkadot/api-base@workspace:packages/api-base"
dependencies:
"@babel/runtime": ^7.16.5
"@polkadot/rpc-core": 6.12.2-21
"@polkadot/types": 6.12.2-21
"@polkadot/util": ^8.2.2
rxjs: ^7.4.0
@@ -2057,8 +2060,8 @@ __metadata:
resolution: "@polkadot/rpc-augment@workspace:packages/rpc-augment"
dependencies:
"@babel/runtime": ^7.16.5
"@polkadot/rpc-core": 6.12.2-21
"@polkadot/types": 6.12.2-21
rxjs: ^7.4.0
languageName: unknown
linkType: soft
@@ -2170,6 +2173,7 @@ __metadata:
"@babel/runtime": ^7.16.5
"@polkadot/networks": ^8.2.2
"@polkadot/types": 6.12.2-21
"@polkadot/types-create": 6.12.2-21
"@polkadot/util": ^8.2.2
languageName: unknown
linkType: soft