mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-06-12 09:41:01 +00:00
Allow import.meta.url for detectPackage (#420)
* Allow import.meta.url for detectPackage * Bump deps
This commit is contained in:
+6
@@ -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 };
|
||||
@@ -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;
|
||||
+5
-2
@@ -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 };
|
||||
Reference in New Issue
Block a user