Allow import.meta.url for detectPackage (#420)

* Allow import.meta.url for detectPackage

* Bump deps
This commit is contained in:
Jaco Greeff
2020-12-16 16:27:33 +01:00
committed by GitHub
parent b40167c1e2
commit fc22cc0456
15 changed files with 310 additions and 215 deletions
+4 -4
View File
@@ -10,16 +10,16 @@
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.12.5",
"@polkadot/keyring": "^5.0.1",
"@polkadot/keyring": "^5.0.2-1",
"@polkadot/ledger": "^0.63.1",
"@polkadot/ui-settings": "0.63.1",
"@polkadot/util": "^5.0.1",
"@polkadot/x-rxjs": "^3.0.1",
"@polkadot/util": "^5.0.2-1",
"@polkadot/x-rxjs": "^3.0.2-6",
"mkdirp": "^1.0.4",
"store": "^2.0.12"
},
"devDependencies": {
"@polkadot/types": "^3.0.1",
"@polkadot/types": "^3.0.2-6",
"@types/mkdirp": "^1.0.1",
"@types/store": "^2.0.2"
},
+6
View File
@@ -0,0 +1,6 @@
// Copyright 2017-2020 @polkadot/ui-keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
import packageInfo from './package-info.json';
export { packageInfo };
+10
View File
@@ -0,0 +1,10 @@
// Copyright 2017-2020 @polkadot/ui-keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
const util = require('@polkadot/util');
const packageInfo = require('./package-info.json');
util.detectPackage(packageInfo, typeof __dirname !== 'undefined' && __dirname);
exports.packageInfo = packageInfo;
@@ -3,5 +3,8 @@
import { detectPackage } from '@polkadot/util';
// eslint-disable-next-line @typescript-eslint/no-var-requires
detectPackage(require('./package.json'), typeof __dirname !== 'undefined' && __dirname);
import packageInfo from './package-info.json';
detectPackage(packageInfo, import.meta.url);
export { packageInfo };