Alternative solution for external libs augmentation (#7760)
* Alternative solution for external libs augmentation * include JS in project * Bump dev * Adjust eslint config * Adjust
This commit is contained in:
parent
09c46f28f6
commit
8b8ab75d43
@ -64,7 +64,7 @@
|
|||||||
"@babel/runtime": "^7.18.3",
|
"@babel/runtime": "^7.18.3",
|
||||||
"@crustio/crust-pin": "^1.0.0",
|
"@crustio/crust-pin": "^1.0.0",
|
||||||
"@pinata/sdk": "^1.1.26",
|
"@pinata/sdk": "^1.1.26",
|
||||||
"@polkadot/dev": "^0.67.4",
|
"@polkadot/dev": "^0.67.5",
|
||||||
"@types/chart.js": "^2.9.37",
|
"@types/chart.js": "^2.9.37",
|
||||||
"@types/file-saver": "^2.0.5",
|
"@types/file-saver": "^2.0.5",
|
||||||
"@types/jest": "^28.1.2",
|
"@types/jest": "^28.1.2",
|
||||||
|
|||||||
@ -31,7 +31,6 @@
|
|||||||
"@parallel-finance/type-definitions": "1.7.7",
|
"@parallel-finance/type-definitions": "1.7.7",
|
||||||
"@phala/typedefs": "0.2.30",
|
"@phala/typedefs": "0.2.30",
|
||||||
"@polkadot/api": "^8.9.1",
|
"@polkadot/api": "^8.9.1",
|
||||||
"@polkadot/api-augment": "^8.9.1",
|
|
||||||
"@polkadot/api-derive": "^8.9.1",
|
"@polkadot/api-derive": "^8.9.1",
|
||||||
"@polkadot/networks": "^9.5.1",
|
"@polkadot/networks": "^9.5.1",
|
||||||
"@polkadot/types": "^8.9.1",
|
"@polkadot/types": "^8.9.1",
|
||||||
|
|||||||
@ -1,10 +1,6 @@
|
|||||||
// Copyright 2017-2022 @polkadot/apps-config authors & contributors
|
// Copyright 2017-2022 @polkadot/apps-config authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
// Some packages may include type augmentation, ensure that we get the
|
|
||||||
// defaults in first so we highlight the issues in the packages themselves
|
|
||||||
import '@polkadot/api-augment';
|
|
||||||
|
|
||||||
import type { OverrideBundleDefinition } from '@polkadot/types/types';
|
import type { OverrideBundleDefinition } from '@polkadot/types/types';
|
||||||
|
|
||||||
import acala from './acala';
|
import acala from './acala';
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
// Copyright 2017-2022 @polkadot/apps-config authors & contributors
|
// Copyright 2017-2022 @polkadot/apps-config authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import { typesBundleForPolkadotApps } from '@mangata-finance/types';
|
// Since this libary includes augmented definitions, we inmport it via
|
||||||
|
// a CJS bridge ... which hopefully just short-circuits all of that
|
||||||
|
import { typesBundleForPolkadotApps } from '../../cjs/mangata.js';
|
||||||
|
|
||||||
export default typesBundleForPolkadotApps;
|
export default typesBundleForPolkadotApps;
|
||||||
|
|||||||
6
packages/apps-config/src/cjs/cjs/mangata.js
Normal file
6
packages/apps-config/src/cjs/cjs/mangata.js
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
// Copyright 2017-2022 @polkadot/apps-config authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
const { typesBundleForPolkadotApps } = require('../mangata.js');
|
||||||
|
|
||||||
|
module.exports = { typesBundleForPolkadotApps };
|
||||||
8
packages/apps-config/src/cjs/mangata.d.ts
vendored
Normal file
8
packages/apps-config/src/cjs/mangata.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
// Copyright 2017-2022 @polkadot/apps-config authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
import { OverrideBundleDefinition } from '@polkadot/types/types';
|
||||||
|
|
||||||
|
declare module './mangata.js' {
|
||||||
|
export const typesBundleForPolkadotApps: OverrideBundleDefinition;
|
||||||
|
}
|
||||||
6
packages/apps-config/src/cjs/mangata.js
Normal file
6
packages/apps-config/src/cjs/mangata.js
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
// Copyright 2017-2022 @polkadot/apps-config authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
const { typesBundleForPolkadotApps } = require('@mangata-finance/types');
|
||||||
|
|
||||||
|
module.exports = { typesBundleForPolkadotApps };
|
||||||
3
packages/apps-config/src/cjs/package.json
Normal file
3
packages/apps-config/src/cjs/package.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"module": "commonjs"
|
||||||
|
}
|
||||||
@ -14,7 +14,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/core": "^7.18.5",
|
"@babel/core": "^7.18.5",
|
||||||
"@babel/polyfill": "^7.12.1",
|
"@babel/polyfill": "^7.12.1",
|
||||||
"@polkadot/dev": "^0.67.4",
|
"@polkadot/dev": "^0.67.5",
|
||||||
"@polkadot/react-components": "^0.116.2-43",
|
"@polkadot/react-components": "^0.116.2-43",
|
||||||
"electron-log": "^4.4.7",
|
"electron-log": "^4.4.7",
|
||||||
"electron-updater": "^4.6.5"
|
"electron-updater": "^4.6.5"
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
"@babel/runtime": "^7.18.3",
|
"@babel/runtime": "^7.18.3",
|
||||||
"@polkadot/apps-config": "^0.116.2-43",
|
"@polkadot/apps-config": "^0.116.2-43",
|
||||||
"@polkadot/apps-routing": "^0.116.2-43",
|
"@polkadot/apps-routing": "^0.116.2-43",
|
||||||
"@polkadot/dev": "^0.67.4",
|
"@polkadot/dev": "^0.67.5",
|
||||||
"@polkadot/react-api": "^0.116.2-43",
|
"@polkadot/react-api": "^0.116.2-43",
|
||||||
"@polkadot/react-components": "^0.116.2-43",
|
"@polkadot/react-components": "^0.116.2-43",
|
||||||
"@polkadot/react-hooks": "^0.116.2-43",
|
"@polkadot/react-hooks": "^0.116.2-43",
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.18.3",
|
"@babel/runtime": "^7.18.3",
|
||||||
"@polkadot/hw-ledger": "^9.5.1",
|
"@polkadot/hw-ledger": "^9.5.1",
|
||||||
"@polkadot/phishing": "^0.14.3",
|
"@polkadot/phishing": "^0.14.4",
|
||||||
"@polkadot/react-components": "^0.116.2-43",
|
"@polkadot/react-components": "^0.116.2-43",
|
||||||
"@polkadot/react-hooks": "^0.116.2-43",
|
"@polkadot/react-hooks": "^0.116.2-43",
|
||||||
"@polkadot/util": "^9.5.1",
|
"@polkadot/util": "^9.5.1",
|
||||||
|
|||||||
@ -2,7 +2,8 @@
|
|||||||
"extends": "./tsconfig.base.json",
|
"extends": "./tsconfig.base.json",
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"build/**/*",
|
"build/**/*",
|
||||||
"**/build/**/*"
|
"**/build/**/*",
|
||||||
|
"**/node_modules/**/*"
|
||||||
],
|
],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"baseUrl": "./packages",
|
"baseUrl": "./packages",
|
||||||
|
|||||||
17
yarn.lock
17
yarn.lock
@ -2719,7 +2719,7 @@ __metadata:
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@babel/runtime": ^7.18.3
|
"@babel/runtime": ^7.18.3
|
||||||
"@polkadot/hw-ledger": ^9.5.1
|
"@polkadot/hw-ledger": ^9.5.1
|
||||||
"@polkadot/phishing": ^0.14.3
|
"@polkadot/phishing": ^0.14.4
|
||||||
"@polkadot/react-components": ^0.116.2-43
|
"@polkadot/react-components": ^0.116.2-43
|
||||||
"@polkadot/react-hooks": ^0.116.2-43
|
"@polkadot/react-hooks": ^0.116.2-43
|
||||||
"@polkadot/test-support": 0.116.2-43
|
"@polkadot/test-support": 0.116.2-43
|
||||||
@ -3022,7 +3022,6 @@ __metadata:
|
|||||||
"@parallel-finance/type-definitions": 1.7.7
|
"@parallel-finance/type-definitions": 1.7.7
|
||||||
"@phala/typedefs": 0.2.30
|
"@phala/typedefs": 0.2.30
|
||||||
"@polkadot/api": ^8.9.1
|
"@polkadot/api": ^8.9.1
|
||||||
"@polkadot/api-augment": ^8.9.1
|
|
||||||
"@polkadot/api-derive": ^8.9.1
|
"@polkadot/api-derive": ^8.9.1
|
||||||
"@polkadot/networks": ^9.5.1
|
"@polkadot/networks": ^9.5.1
|
||||||
"@polkadot/types": ^8.9.1
|
"@polkadot/types": ^8.9.1
|
||||||
@ -3050,7 +3049,7 @@ __metadata:
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@babel/core": ^7.18.5
|
"@babel/core": ^7.18.5
|
||||||
"@babel/polyfill": ^7.12.1
|
"@babel/polyfill": ^7.12.1
|
||||||
"@polkadot/dev": ^0.67.4
|
"@polkadot/dev": ^0.67.5
|
||||||
"@polkadot/react-components": ^0.116.2-43
|
"@polkadot/react-components": ^0.116.2-43
|
||||||
"@types/react-dom": ^18.0.5
|
"@types/react-dom": ^18.0.5
|
||||||
"@types/tmp": ^0.2.3
|
"@types/tmp": ^0.2.3
|
||||||
@ -3084,7 +3083,7 @@ __metadata:
|
|||||||
"@babel/runtime": ^7.18.3
|
"@babel/runtime": ^7.18.3
|
||||||
"@polkadot/apps-config": ^0.116.2-43
|
"@polkadot/apps-config": ^0.116.2-43
|
||||||
"@polkadot/apps-routing": ^0.116.2-43
|
"@polkadot/apps-routing": ^0.116.2-43
|
||||||
"@polkadot/dev": ^0.67.4
|
"@polkadot/dev": ^0.67.5
|
||||||
"@polkadot/react-api": ^0.116.2-43
|
"@polkadot/react-api": ^0.116.2-43
|
||||||
"@polkadot/react-components": ^0.116.2-43
|
"@polkadot/react-components": ^0.116.2-43
|
||||||
"@polkadot/react-hooks": ^0.116.2-43
|
"@polkadot/react-hooks": ^0.116.2-43
|
||||||
@ -3119,9 +3118,9 @@ __metadata:
|
|||||||
languageName: unknown
|
languageName: unknown
|
||||||
linkType: soft
|
linkType: soft
|
||||||
|
|
||||||
"@polkadot/dev@npm:^0.67.4":
|
"@polkadot/dev@npm:^0.67.5":
|
||||||
version: 0.67.4
|
version: 0.67.5
|
||||||
resolution: "@polkadot/dev@npm:0.67.4"
|
resolution: "@polkadot/dev@npm:0.67.5"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/cli": ^7.17.10
|
"@babel/cli": ^7.17.10
|
||||||
"@babel/core": ^7.18.5
|
"@babel/core": ^7.18.5
|
||||||
@ -3208,7 +3207,7 @@ __metadata:
|
|||||||
polkadot-exec-rollup: scripts/polkadot-exec-rollup.mjs
|
polkadot-exec-rollup: scripts/polkadot-exec-rollup.mjs
|
||||||
polkadot-exec-tsc: scripts/polkadot-exec-tsc.mjs
|
polkadot-exec-tsc: scripts/polkadot-exec-tsc.mjs
|
||||||
polkadot-exec-webpack: scripts/polkadot-exec-webpack.mjs
|
polkadot-exec-webpack: scripts/polkadot-exec-webpack.mjs
|
||||||
checksum: 456e252db6492fb275d85ef91e57f29bd0a4beaf2d23209986a31abe10f8c2f719199ca86d888f930d229b90edce743831704c7506357590da4cfc28f3b279ec
|
checksum: 587830384ca6147f0c98e87373bc09be3cfacabe88757eff95085ce85792a677cab38beae270c2f90640864047123e690c80743e8c5354d1bf1599ed8d708571
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@ -15853,7 +15852,7 @@ __metadata:
|
|||||||
"@babel/runtime": ^7.18.3
|
"@babel/runtime": ^7.18.3
|
||||||
"@crustio/crust-pin": ^1.0.0
|
"@crustio/crust-pin": ^1.0.0
|
||||||
"@pinata/sdk": ^1.1.26
|
"@pinata/sdk": ^1.1.26
|
||||||
"@polkadot/dev": ^0.67.4
|
"@polkadot/dev": ^0.67.5
|
||||||
"@types/chart.js": ^2.9.37
|
"@types/chart.js": ^2.9.37
|
||||||
"@types/file-saver": ^2.0.5
|
"@types/file-saver": ^2.0.5
|
||||||
"@types/jest": ^28.1.2
|
"@types/jest": ^28.1.2
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user