Allow detectPackage with import.meta.url (#2962)
* Allow detectPackage with import.meta.url * Fix detectPackage import * header naming
This commit is contained in:
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
// Copyright 2017-2020 @polkadot/api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import packageInfo from './package-info.json';
|
||||
|
||||
export { packageInfo };
|
||||
@@ -0,0 +1,10 @@
|
||||
// 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, typeof __dirname !== 'undefined' && __dirname);
|
||||
|
||||
exports.packageInfo = packageInfo;
|
||||
@@ -5,6 +5,6 @@ import { detectPackage } from '@polkadot/util';
|
||||
|
||||
import packageInfo from './package-info.json';
|
||||
|
||||
detectPackage(packageInfo, typeof __dirname !== 'undefined' && __dirname);
|
||||
detectPackage(packageInfo, import.meta.url);
|
||||
|
||||
export { packageInfo };
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// Copyright 2017-2020 @polkadot/metadata authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import packageInfo from './package-info.json';
|
||||
|
||||
export { packageInfo };
|
||||
@@ -0,0 +1,10 @@
|
||||
// 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, typeof __dirname !== 'undefined' && __dirname);
|
||||
|
||||
exports.packageInfo = packageInfo;
|
||||
@@ -5,4 +5,6 @@ import { detectPackage } from '@polkadot/util';
|
||||
|
||||
import packageInfo from './package-info.json';
|
||||
|
||||
detectPackage(packageInfo, typeof __dirname !== 'undefined' && __dirname);
|
||||
detectPackage(packageInfo, import.meta.url);
|
||||
|
||||
export { packageInfo };
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// Copyright 2017-2020 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import packageInfo from './package-info.json';
|
||||
|
||||
export { packageInfo };
|
||||
@@ -0,0 +1,10 @@
|
||||
// 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, typeof __dirname !== 'undefined' && __dirname);
|
||||
|
||||
exports.packageInfo = packageInfo;
|
||||
@@ -5,4 +5,6 @@ import { detectPackage } from '@polkadot/util';
|
||||
|
||||
import packageInfo from './package-info.json';
|
||||
|
||||
detectPackage(packageInfo, typeof __dirname !== 'undefined' && __dirname);
|
||||
detectPackage(packageInfo, import.meta.url);
|
||||
|
||||
export { packageInfo };
|
||||
Reference in New Issue
Block a user