Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3112e43715 | ||
|
|
fc9a5ac25f | ||
|
|
242b107752 | ||
|
|
bf5ba0f405 |
@@ -1,3 +1,7 @@
|
|||||||
|
# 2.2.1
|
||||||
|
|
||||||
|
- Add resolved for jest requires (tests from src)
|
||||||
|
|
||||||
# 2.1.1
|
# 2.1.1
|
||||||
|
|
||||||
- Update `detectPackage(<package.json>, __dirname?)` with calling folder
|
- Update `detectPackage(<package.json>, __dirname?)` with calling folder
|
||||||
|
|||||||
+2
-1
@@ -17,5 +17,6 @@ module.exports = Object.assign({}, config, {
|
|||||||
'<rootDir>/packages/util/build',
|
'<rootDir>/packages/util/build',
|
||||||
'<rootDir>/packages/util-crypto/build',
|
'<rootDir>/packages/util-crypto/build',
|
||||||
'<rootDir>/packages/util-rlp/build'
|
'<rootDir>/packages/util-rlp/build'
|
||||||
]
|
],
|
||||||
|
resolver: './jest.resolver.js'
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
// Copyright 2017-2020 @polkadot/util authors & contributors
|
||||||
|
// This software may be modified and distributed under the terms
|
||||||
|
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
|
module.exports = function resolver (file, config) {
|
||||||
|
if (file.includes('package.json')) {
|
||||||
|
console.error(file, config);
|
||||||
|
return path.join(config.basedir.replace('/src', '/'), file);
|
||||||
|
}
|
||||||
|
|
||||||
|
return config.defaultResolver(file, config);
|
||||||
|
};
|
||||||
+1
-1
@@ -9,5 +9,5 @@
|
|||||||
"packages": [
|
"packages": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
],
|
],
|
||||||
"version": "2.1.1"
|
"version": "2.2.1"
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "2.1.1",
|
"version": "2.2.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"yarn": "^1.10.1"
|
"yarn": "^1.10.1"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@polkadot/keyring",
|
"name": "@polkadot/keyring",
|
||||||
"version": "2.1.1",
|
"version": "2.2.1",
|
||||||
"description": "Keyring management",
|
"description": "Keyring management",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
@@ -26,12 +26,9 @@
|
|||||||
"url": "https://github.com/polkadot-js/common/issues"
|
"url": "https://github.com/polkadot-js/common/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/polkadot-js/common/tree/master/packages/keyring#readme",
|
"homepage": "https://github.com/polkadot-js/common/tree/master/packages/keyring#readme",
|
||||||
"browser": {
|
|
||||||
"../package.json": "./package.json"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.8.3",
|
"@babel/runtime": "^7.8.3",
|
||||||
"@polkadot/util": "^2.1.1",
|
"@polkadot/util": "^2.2.1",
|
||||||
"@polkadot/util-crypto": "^2.1.1"
|
"@polkadot/util-crypto": "^2.2.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,23 +7,14 @@ import { decodeAddress, encodeAddress, setSS58Format } from '@polkadot/util-cryp
|
|||||||
|
|
||||||
import Keyring from './keyring';
|
import Keyring from './keyring';
|
||||||
|
|
||||||
let dirname;
|
// eslint-disable-next-line no-useless-catch
|
||||||
let pkgJson;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
dirname = __dirname;
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||||
|
detectPackage(require('./package.json'), __dirname);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// ignore
|
throw error;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
|
||||||
pkgJson = require('./package.json');
|
|
||||||
} catch (error) {
|
|
||||||
pkgJson = require('../package.json');
|
|
||||||
}
|
|
||||||
|
|
||||||
detectPackage(pkgJson, dirname);
|
|
||||||
|
|
||||||
export default Keyring;
|
export default Keyring;
|
||||||
|
|
||||||
export {
|
export {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@polkadot/util-crypto",
|
"name": "@polkadot/util-crypto",
|
||||||
"version": "2.1.1",
|
"version": "2.2.1",
|
||||||
"description": "A collection of useful crypto utilities for @polkadot",
|
"description": "A collection of useful crypto utilities for @polkadot",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
"homepage": "https://github.com/polkadot-js/common/tree/master/packages/util-crypto#readme",
|
"homepage": "https://github.com/polkadot-js/common/tree/master/packages/util-crypto#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.8.3",
|
"@babel/runtime": "^7.8.3",
|
||||||
"@polkadot/util": "^2.1.1",
|
"@polkadot/util": "^2.2.1",
|
||||||
"@polkadot/wasm-crypto": "^0.20.1",
|
"@polkadot/wasm-crypto": "^0.20.1",
|
||||||
"@types/bs58": "^4.0.0",
|
"@types/bs58": "^4.0.0",
|
||||||
"@types/elliptic": "^6.4.12",
|
"@types/elliptic": "^6.4.12",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@polkadot/util",
|
"name": "@polkadot/util",
|
||||||
"version": "2.1.1",
|
"version": "2.2.1",
|
||||||
"description": "A collection of useful utilities for @polkadot",
|
"description": "A collection of useful utilities for @polkadot",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|||||||
Reference in New Issue
Block a user