This commit is contained in:
Jaco Greeff
2020-12-18 11:33:28 +01:00
parent 7dadac7344
commit 33fd09c053
24 changed files with 187 additions and 191 deletions
+1 -1
View File
@@ -16,7 +16,7 @@
"@babel/runtime": "^7.12.5",
"@polkadot/api": "3.0.2-8",
"@polkadot/types": "3.0.2-8",
"@polkadot/util": "^5.0.2-6",
"@polkadot/util": "^5.0.2-8",
"@polkadot/x-rxjs": "3.0.2-8",
"bn.js": "^4.11.9"
}
+3 -3
View File
@@ -17,13 +17,13 @@
"@polkadot/api": "3.0.2-8",
"@polkadot/rpc-core": "3.0.2-8",
"@polkadot/types": "3.0.2-8",
"@polkadot/util": "^5.0.2-6",
"@polkadot/util-crypto": "^5.0.2-6",
"@polkadot/util": "^5.0.2-8",
"@polkadot/util-crypto": "^5.0.2-8",
"@polkadot/x-rxjs": "3.0.2-8",
"bn.js": "^4.11.9"
},
"devDependencies": {
"@polkadot/keyring": "^5.0.2-6",
"@polkadot/keyring": "^5.0.2-8",
"@polkadot/rpc-provider": "3.0.2-8"
}
}
+3 -3
View File
@@ -18,14 +18,14 @@
"dependencies": {
"@babel/runtime": "^7.12.5",
"@polkadot/api-derive": "3.0.2-8",
"@polkadot/keyring": "^5.0.2-6",
"@polkadot/keyring": "^5.0.2-8",
"@polkadot/metadata": "3.0.2-8",
"@polkadot/rpc-core": "3.0.2-8",
"@polkadot/rpc-provider": "3.0.2-8",
"@polkadot/types": "3.0.2-8",
"@polkadot/types-known": "3.0.2-8",
"@polkadot/util": "^5.0.2-6",
"@polkadot/util-crypto": "^5.0.2-6",
"@polkadot/util": "^5.0.2-8",
"@polkadot/util-crypto": "^5.0.2-8",
"@polkadot/x-rxjs": "3.0.2-8",
"bn.js": "^4.11.9",
"eventemitter3": "^4.0.7"
-6
View File
@@ -1,6 +0,0 @@
// Copyright 2017-2020 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
import packageInfo from './package-info.json';
export { packageInfo };
-10
View File
@@ -1,10 +0,0 @@
// Copyright 2017-2020 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
const util = require('@polkadot/util');
const packageInfo = require('./package-info.json');
util.detectPackage(packageInfo, () => __dirname);
exports.packageInfo = packageInfo;
-10
View File
@@ -1,10 +0,0 @@
// Copyright 2017-2020 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { detectPackage } from '@polkadot/util';
import packageInfo from './package-info.json';
detectPackage(packageInfo, () => import.meta.url);
export { packageInfo };
+25
View File
@@ -0,0 +1,25 @@
// Copyright 2017-2020 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
// For esm, this should be import.meta.url or to get the same behavior as __dirname, we can use
//
// new URL(import.meta.url).pathname)
//
// The issue is the WP4 has "some" issues with import.meta.url. So because of bundlers, we can't have
// nice things... In this case it is even worse since import.meta.url won't even make it compile, so
// there is a complete dead end with usage thereof
//
// When that is fixed, a solution is to have both .js & .mjs files, with the following content -
//
// cjs: util.detectPackage(packageInfo, () => __dirname);
// esm: detectPackage(packageInfo, () => import.meta.url);
//
// With the above we additionally need a .d.ts to just export the packageInfo
import { detectPackage } from '@polkadot/util';
import packageInfo from './package-info.json';
detectPackage(packageInfo, typeof __dirname !== 'undefined' && __dirname);
export { packageInfo };
+3 -3
View File
@@ -19,11 +19,11 @@
"@babel/runtime": "^7.12.5",
"@polkadot/types": "3.0.2-8",
"@polkadot/types-known": "3.0.2-8",
"@polkadot/util": "^5.0.2-6",
"@polkadot/util-crypto": "^5.0.2-6",
"@polkadot/util": "^5.0.2-8",
"@polkadot/util-crypto": "^5.0.2-8",
"bn.js": "^4.11.9"
},
"devDependencies": {
"@polkadot/keyring": "^5.0.2-6"
"@polkadot/keyring": "^5.0.2-8"
}
}
-6
View File
@@ -1,6 +0,0 @@
// Copyright 2017-2020 @polkadot/metadata authors & contributors
// SPDX-License-Identifier: Apache-2.0
import packageInfo from './package-info.json';
export { packageInfo };
-10
View File
@@ -1,10 +0,0 @@
// Copyright 2017-2020 @polkadot/metadata authors & contributors
// SPDX-License-Identifier: Apache-2.0
const util = require('@polkadot/util');
const packageInfo = require('./package-info.json');
util.detectPackage(packageInfo, () => __dirname);
exports.packageInfo = packageInfo;
-10
View File
@@ -1,10 +0,0 @@
// Copyright 2017-2020 @polkadot/metadata authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { detectPackage } from '@polkadot/util';
import packageInfo from './package-info.json';
detectPackage(packageInfo, () => import.meta.url);
export { packageInfo };
+25
View File
@@ -0,0 +1,25 @@
// Copyright 2017-2020 @polkadot/metadata authors & contributors
// SPDX-License-Identifier: Apache-2.0
// For esm, this should be import.meta.url or to get the same behavior as __dirname, we can use
//
// new URL(import.meta.url).pathname)
//
// The issue is the WP4 has "some" issues with import.meta.url. So because of bundlers, we can't have
// nice things... In this case it is even worse since import.meta.url won't even make it compile, so
// there is a complete dead end with usage thereof
//
// When that is fixed, a solution is to have both .js & .mjs files, with the following content -
//
// cjs: util.detectPackage(packageInfo, () => __dirname);
// esm: detectPackage(packageInfo, () => import.meta.url);
//
// With the above we additionally need a .d.ts to just export the packageInfo
import { detectPackage } from '@polkadot/util';
import packageInfo from './package-info.json';
detectPackage(packageInfo, typeof __dirname !== 'undefined' && __dirname);
export { packageInfo };
+2 -2
View File
@@ -17,10 +17,10 @@
"@polkadot/metadata": "3.0.2-8",
"@polkadot/rpc-provider": "3.0.2-8",
"@polkadot/types": "3.0.2-8",
"@polkadot/util": "^5.0.2-6",
"@polkadot/util": "^5.0.2-8",
"@polkadot/x-rxjs": "3.0.2-8"
},
"devDependencies": {
"@polkadot/keyring": "^5.0.2-6"
"@polkadot/keyring": "^5.0.2-8"
}
}
+5 -5
View File
@@ -15,15 +15,15 @@
"dependencies": {
"@babel/runtime": "^7.12.5",
"@polkadot/types": "3.0.2-8",
"@polkadot/util": "^5.0.2-6",
"@polkadot/util-crypto": "^5.0.2-6",
"@polkadot/x-fetch": "^5.0.2-6",
"@polkadot/x-ws": "^5.0.2-6",
"@polkadot/util": "^5.0.2-8",
"@polkadot/util-crypto": "^5.0.2-8",
"@polkadot/x-fetch": "^5.0.2-8",
"@polkadot/x-ws": "^5.0.2-8",
"bn.js": "^4.11.9",
"eventemitter3": "^4.0.7"
},
"devDependencies": {
"@polkadot/keyring": "^5.0.2-6",
"@polkadot/keyring": "^5.0.2-8",
"@polkadot/metadata": "3.0.2-8",
"mock-socket": "^9.0.3",
"nock": "^13.0.5"
+1 -1
View File
@@ -27,7 +27,7 @@
"@polkadot/metadata": "3.0.2-8",
"@polkadot/rpc-provider": "3.0.2-8",
"@polkadot/types": "3.0.2-8",
"@polkadot/util": "^5.0.2-6",
"@polkadot/util": "^5.0.2-8",
"handlebars": "^4.7.6",
"websocket": "^1.0.33",
"yargs": "^16.2.0"
+1 -1
View File
@@ -15,7 +15,7 @@
"dependencies": {
"@babel/runtime": "^7.12.5",
"@polkadot/types": "3.0.2-8",
"@polkadot/util": "^5.0.2-6",
"@polkadot/util": "^5.0.2-8",
"bn.js": "^4.11.9"
},
"devDependencies": {
+3 -3
View File
@@ -18,13 +18,13 @@
"dependencies": {
"@babel/runtime": "^7.12.5",
"@polkadot/metadata": "3.0.2-8",
"@polkadot/util": "^5.0.2-6",
"@polkadot/util-crypto": "^5.0.2-6",
"@polkadot/util": "^5.0.2-8",
"@polkadot/util-crypto": "^5.0.2-8",
"@polkadot/x-rxjs": "3.0.2-8",
"@types/bn.js": "^4.11.6",
"bn.js": "^4.11.9"
},
"devDependencies": {
"@polkadot/keyring": "^5.0.2-6"
"@polkadot/keyring": "^5.0.2-8"
}
}
+1 -2
View File
@@ -63,8 +63,7 @@ function initType<T extends Codec = Codec, K extends string = string> (registry:
// An unsafe version of the `createType` below. It's unsafe because the `type`
// argument here can be any string, which, when it cannot parse, will yield a
// runtime error.
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export function createTypeUnsafe<T extends Codec = Codec, K extends string = string> (registry: Registry, type: K, params: any[] = [], { isPedantic, withoutLog }: UnsafeOptions = {}): T {
export function createTypeUnsafe<T extends Codec = Codec, K extends string = string> (registry: Registry, type: K, params: any[] = [], { withoutLog }: UnsafeOptions = {}): T {
try {
// Circle back to isPedantic when it handles all cases 100% - as of now,
// it provides false warning which is more hinderance than help
-6
View File
@@ -1,6 +0,0 @@
// Copyright 2017-2020 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
import packageInfo from './package-info.json';
export { packageInfo };
-10
View File
@@ -1,10 +0,0 @@
// Copyright 2017-2020 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
const util = require('@polkadot/util');
const packageInfo = require('./package-info.json');
util.detectPackage(packageInfo, () => __dirname);
exports.packageInfo = packageInfo;
-10
View File
@@ -1,10 +0,0 @@
// Copyright 2017-2020 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { detectPackage } from '@polkadot/util';
import packageInfo from './package-info.json';
detectPackage(packageInfo, () => import.meta.url);
export { packageInfo };
+25
View File
@@ -0,0 +1,25 @@
// Copyright 2017-2020 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
// For esm, this should be import.meta.url or to get the same behavior as __dirname, we can use
//
// new URL(import.meta.url).pathname)
//
// The issue is the WP4 has "some" issues with import.meta.url. So because of bundlers, we can't have
// nice things... In this case it is even worse since import.meta.url won't even make it compile, so
// there is a complete dead end with usage thereof
//
// When that is fixed, a solution is to have both .js & .mjs files, with the following content -
//
// cjs: util.detectPackage(packageInfo, () => __dirname);
// esm: detectPackage(packageInfo, () => import.meta.url);
//
// With the above we additionally need a .d.ts to just export the packageInfo
import { detectPackage } from '@polkadot/util';
import packageInfo from './package-info.json';
detectPackage(packageInfo, typeof __dirname !== 'undefined' && __dirname);
export { packageInfo };