From 5859f91bbe1ee7bf00e41d2b68a05de57d80393a Mon Sep 17 00:00:00 2001 From: neeboo Date: Sat, 18 May 2019 00:40:00 +0800 Subject: [PATCH] [breaking] rename packages dependency prefix to `@harmony-js` --- packages/harmony-account/README.md | 2 +- packages/harmony-account/package.json | 14 +++++++------- packages/harmony-account/src/account.ts | 8 ++++---- packages/harmony-account/src/utils.ts | 8 ++++---- packages/harmony-account/src/wallet.ts | 8 ++++---- .../harmony-contract/__test__/abiCoder.test.ts | 4 ++-- packages/harmony-contract/package.json | 14 +++++++------- packages/harmony-contract/src/abi/abiCoder.ts | 4 ++-- packages/harmony-contract/src/abi/api.ts | 4 ++-- packages/harmony-contract/src/abi/utils.ts | 4 ++-- packages/harmony-contract/src/contract.ts | 6 +++--- packages/harmony-contract/src/contractFactory.ts | 2 +- packages/harmony-contract/src/events/event.ts | 2 +- packages/harmony-contract/src/methods/method.ts | 8 ++++---- .../harmony-contract/src/models/AbiItemModel.ts | 2 +- packages/harmony-contract/src/utils/formatter.ts | 4 ++-- packages/harmony-contract/src/utils/mapper.ts | 2 +- .../harmony-core/__test__/blockchain.test.ts | 2 +- packages/harmony-core/package.json | 16 ++++++++-------- packages/harmony-core/src/blockchain.ts | 6 +++--- packages/harmony-core/src/harmony.ts | 12 ++++++------ packages/harmony-core/src/types.ts | 6 +++--- packages/harmony-crypto/package.json | 6 +++--- packages/harmony-crypto/src/keyTool.ts | 2 +- packages/harmony-crypto/src/keystore.ts | 2 +- packages/harmony-crypto/src/signature.ts | 4 ++++ packages/harmony-network/package.json | 8 ++++---- .../harmony-network/src/messenger/messenger.ts | 2 +- .../src/messenger/responseMiddleware.ts | 2 +- .../harmony-network/src/providers/baseSocket.ts | 2 +- packages/harmony-network/src/providers/ws.ts | 2 +- .../harmony-network/src/tracker/baseTracker.ts | 2 +- packages/harmony-transaction/package.json | 12 ++++++------ packages/harmony-transaction/src/factory.ts | 4 ++-- packages/harmony-transaction/src/transaction.ts | 6 +++--- packages/harmony-transaction/src/utils.ts | 6 +++--- packages/harmony-utils/__test__/fixture.ts | 2 +- packages/harmony-utils/package.json | 4 ++-- scripts/projects.ts | 2 +- 39 files changed, 105 insertions(+), 101 deletions(-) diff --git a/packages/harmony-account/README.md b/packages/harmony-account/README.md index 4a76a6b..93ba36a 100644 --- a/packages/harmony-account/README.md +++ b/packages/harmony-account/README.md @@ -14,7 +14,7 @@ ```js -import { Wallet } from '@harmony/account'; +import { Wallet } from '@harmony-js/account'; const wallet = new Wallet(); diff --git a/packages/harmony-account/package.json b/packages/harmony-account/package.json index 3637edb..c6231d3 100644 --- a/packages/harmony-account/package.json +++ b/packages/harmony-account/package.json @@ -1,5 +1,5 @@ { - "name": "@harmony/account", + "name": "@harmony-js/account", "version": "0.0.6", "description": "account and wallet for harmony", "main": "dist/index.js", @@ -17,11 +17,11 @@ "author": "neeboo@firestack.one", "license": "ISC", "dependencies": { - "@harmony/core": "0.0.6", - "@harmony/crypto": "0.0.6", - "@harmony/network": "0.0.6", - "@harmony/transaction": "0.0.6", - "@harmony/utils": "0.0.6" + "@harmony-js/core": "0.0.6", + "@harmony-js/crypto": "0.0.6", + "@harmony-js/network": "0.0.6", + "@harmony-js/transaction": "0.0.6", + "@harmony-js/utils": "0.0.6" }, - "gitHead": "fcb10df63e2369534342a235edd70091154e2390" + "gitHead": "4e20cd3884ccf4199497737b2bd474cb479c24c1" } diff --git a/packages/harmony-account/src/account.ts b/packages/harmony-account/src/account.ts index 3cb214c..89df269 100644 --- a/packages/harmony-account/src/account.ts +++ b/packages/harmony-account/src/account.ts @@ -8,11 +8,11 @@ import { EncryptOptions, Keystore, Signature, -} from '@harmony/crypto'; +} from '@harmony-js/crypto'; -import { isPrivateKey, add0xToString, hexToNumber } from '@harmony/utils'; -import { Transaction } from '@harmony/transaction'; -import { Messenger, RPCMethod } from '@harmony/network'; +import { isPrivateKey, add0xToString, hexToNumber } from '@harmony-js/utils'; +import { Transaction } from '@harmony-js/transaction'; +import { Messenger, RPCMethod } from '@harmony-js/network'; import { Shards } from './types'; import { RLPSign, defaultMessenger } from './utils'; diff --git a/packages/harmony-account/src/utils.ts b/packages/harmony-account/src/utils.ts index a4a9e5c..3442d62 100644 --- a/packages/harmony-account/src/utils.ts +++ b/packages/harmony-account/src/utils.ts @@ -1,7 +1,7 @@ -import { HttpProvider, Messenger } from '@harmony/network'; -import { Transaction, TxParams } from '@harmony/transaction'; -import { sign, keccak256, Signature } from '@harmony/crypto'; -import { ChainType } from '@harmony/utils'; +import { HttpProvider, Messenger } from '@harmony-js/network'; +import { Transaction, TxParams } from '@harmony-js/transaction'; +import { sign, keccak256, Signature } from '@harmony-js/crypto'; +import { ChainType } from '@harmony-js/utils'; export const RLPSign = ( transaction: Transaction, diff --git a/packages/harmony-account/src/wallet.ts b/packages/harmony-account/src/wallet.ts index 843d499..224b72d 100644 --- a/packages/harmony-account/src/wallet.ts +++ b/packages/harmony-account/src/wallet.ts @@ -1,8 +1,8 @@ -import { bip39, hdkey, EncryptOptions } from '@harmony/crypto'; -import { Messenger } from '@harmony/network'; -import { isPrivateKey, isAddress } from '@harmony/utils'; +import { bip39, hdkey, EncryptOptions } from '@harmony-js/crypto'; +import { Messenger } from '@harmony-js/network'; +import { isPrivateKey, isAddress } from '@harmony-js/utils'; import { Account } from './account'; -import { Transaction } from '@harmony/transaction'; +import { Transaction } from '@harmony-js/transaction'; import { defaultMessenger } from './utils'; class Wallet { diff --git a/packages/harmony-contract/__test__/abiCoder.test.ts b/packages/harmony-contract/__test__/abiCoder.test.ts index 8499bfb..3931487 100644 --- a/packages/harmony-contract/__test__/abiCoder.test.ts +++ b/packages/harmony-contract/__test__/abiCoder.test.ts @@ -1,6 +1,6 @@ import { AbiCoder } from '../src/abi/abiCoder'; -import { BN } from '@harmony/crypto'; -import { isArray } from '@harmony/utils'; +import { BN } from '@harmony-js/crypto'; +import { isArray } from '@harmony-js/utils'; import { abis } from './fixtures/abiv2'; function getValues(object: any, format?: any, named?: any): any { diff --git a/packages/harmony-contract/package.json b/packages/harmony-contract/package.json index f3fce1e..2facd09 100644 --- a/packages/harmony-contract/package.json +++ b/packages/harmony-contract/package.json @@ -1,5 +1,5 @@ { - "name": "@harmony/contract", + "name": "@harmony-js/contract", "version": "0.0.6", "description": "contract libraries for harmony", "main": "dist/index.js", @@ -17,12 +17,12 @@ }, "license": "ISC", "dependencies": { - "@harmony/account": "0.0.6", - "@harmony/crypto": "0.0.6", - "@harmony/network": "0.0.6", - "@harmony/transaction": "0.0.6", - "@harmony/utils": "0.0.6", + "@harmony-js/account": "0.0.6", + "@harmony-js/crypto": "0.0.6", + "@harmony-js/network": "0.0.6", + "@harmony-js/transaction": "0.0.6", + "@harmony-js/utils": "0.0.6", "abi-decoder": "^1.2.0" }, - "gitHead": "fcb10df63e2369534342a235edd70091154e2390" + "gitHead": "4e20cd3884ccf4199497737b2bd474cb479c24c1" } diff --git a/packages/harmony-contract/src/abi/abiCoder.ts b/packages/harmony-contract/src/abi/abiCoder.ts index 6c721e0..3adccd9 100644 --- a/packages/harmony-contract/src/abi/abiCoder.ts +++ b/packages/harmony-contract/src/abi/abiCoder.ts @@ -18,8 +18,8 @@ import { Arrayish, checkNew, bytesPadRight, -} from '@harmony/crypto'; -import { hexToBN } from '@harmony/utils'; +} from '@harmony-js/crypto'; +import { hexToBN } from '@harmony-js/utils'; const NegativeOne: BN = new BN(-1); const One: BN = new BN(1); diff --git a/packages/harmony-contract/src/abi/api.ts b/packages/harmony-contract/src/abi/api.ts index 0e88cbc..7e39a8c 100644 --- a/packages/harmony-contract/src/abi/api.ts +++ b/packages/harmony-contract/src/abi/api.ts @@ -1,6 +1,6 @@ import { AbiCoder as ABICoder, ParamType, toUtf8Bytes } from './abiCoder'; -import { isObject, isArray } from '@harmony/utils'; -import { keccak256, Arrayish } from '@harmony/crypto'; +import { isObject, isArray } from '@harmony-js/utils'; +import { keccak256, Arrayish } from '@harmony-js/crypto'; import { jsonInterfaceMethodToString, bnToString } from './utils'; export class AbiCoderClass { diff --git a/packages/harmony-contract/src/abi/utils.ts b/packages/harmony-contract/src/abi/utils.ts index 4ded2be..0ef487c 100644 --- a/packages/harmony-contract/src/abi/utils.ts +++ b/packages/harmony-contract/src/abi/utils.ts @@ -1,5 +1,5 @@ -import { isObject, isArray } from '@harmony/utils'; -import { BN } from '@harmony/crypto'; +import { isObject, isArray } from '@harmony-js/utils'; +import { BN } from '@harmony-js/crypto'; export const jsonInterfaceMethodToString = (json: any): string => { if (isObject(json) && json.name && json.name.includes('(')) { diff --git a/packages/harmony-contract/src/contract.ts b/packages/harmony-contract/src/contract.ts index a71d8c6..fd564ee 100644 --- a/packages/harmony-contract/src/contract.ts +++ b/packages/harmony-contract/src/contract.ts @@ -1,6 +1,6 @@ -import { Wallet } from '@harmony/account'; -// import { Emitter } from '@harmony/network'; -import { Transaction } from '@harmony/transaction'; +import { Wallet } from '@harmony-js/account'; +// import { Emitter } from '@harmony-js/network'; +import { Transaction } from '@harmony-js/transaction'; import { AbiCoder } from './abi/index'; import { abiMapper } from './utils/mapper'; import { ContractOptions } from './utils/options'; diff --git a/packages/harmony-contract/src/contractFactory.ts b/packages/harmony-contract/src/contractFactory.ts index 5739e36..71bc84a 100644 --- a/packages/harmony-contract/src/contractFactory.ts +++ b/packages/harmony-contract/src/contractFactory.ts @@ -1,4 +1,4 @@ -import { Wallet } from '@harmony/account'; +import { Wallet } from '@harmony-js/account'; import { Contract } from './contract'; import { ContractOptions } from './utils/options'; diff --git a/packages/harmony-contract/src/events/event.ts b/packages/harmony-contract/src/events/event.ts index 84427f6..9462c21 100644 --- a/packages/harmony-contract/src/events/event.ts +++ b/packages/harmony-contract/src/events/event.ts @@ -1,5 +1,5 @@ import { AbiItemModel } from '../models/types'; -import { Messenger, RPCMethod, WSProvider } from '@harmony/network'; +import { Messenger, RPCMethod, WSProvider } from '@harmony-js/network'; import { Contract } from '../contract'; import { decode as eventLogDecoder } from '../utils/decoder'; import { inputLogFormatter, outputLogFormatter } from '../utils/formatter'; diff --git a/packages/harmony-contract/src/methods/method.ts b/packages/harmony-contract/src/methods/method.ts index eb704af..a39868e 100644 --- a/packages/harmony-contract/src/methods/method.ts +++ b/packages/harmony-contract/src/methods/method.ts @@ -1,11 +1,11 @@ -import { Wallet } from '@harmony/account'; +import { Wallet } from '@harmony-js/account'; import { TransactionFactory, Transaction, // TxStatus, -} from '@harmony/transaction'; -import { RPCMethod, getResultForData, Emitter } from '@harmony/network'; -import { hexToNumber, hexToBN } from '@harmony/utils'; +} from '@harmony-js/transaction'; +import { RPCMethod, getResultForData, Emitter } from '@harmony-js/network'; +import { hexToNumber, hexToBN } from '@harmony-js/utils'; import { AbiItemModel } from '../models/types'; import { Contract } from '../contract'; import { methodEncoder } from '../utils/encoder'; diff --git a/packages/harmony-contract/src/models/AbiItemModel.ts b/packages/harmony-contract/src/models/AbiItemModel.ts index f0085b3..7cc9ee3 100644 --- a/packages/harmony-contract/src/models/AbiItemModel.ts +++ b/packages/harmony-contract/src/models/AbiItemModel.ts @@ -1,4 +1,4 @@ -import { isArray } from '@harmony/utils'; +import { isArray } from '@harmony-js/utils'; import { AbiItemModel, AbiOutput, AbiInput } from './types'; export class AbiItem { diff --git a/packages/harmony-contract/src/utils/formatter.ts b/packages/harmony-contract/src/utils/formatter.ts index 14d25e2..b811b6c 100644 --- a/packages/harmony-contract/src/utils/formatter.ts +++ b/packages/harmony-contract/src/utils/formatter.ts @@ -3,14 +3,14 @@ import { isHexString, keccak256, toChecksumAddress, -} from '@harmony/crypto'; +} from '@harmony-js/crypto'; import { numberToHex, isArray, hexToNumber, isString, isAddress, -} from '@harmony/utils'; +} from '@harmony-js/utils'; import { toUtf8Bytes } from '../abi/abiCoder'; export const inputLogFormatter = (options: any) => { diff --git a/packages/harmony-contract/src/utils/mapper.ts b/packages/harmony-contract/src/utils/mapper.ts index 16a37db..be6ace5 100644 --- a/packages/harmony-contract/src/utils/mapper.ts +++ b/packages/harmony-contract/src/utils/mapper.ts @@ -1,4 +1,4 @@ -import { isArray } from '@harmony/utils'; +import { isArray } from '@harmony-js/utils'; import { AbiItem } from '../models/AbiItemModel'; import { AbiModel } from '../models/AbiModel'; import { AbiItemModel } from '../models/types'; diff --git a/packages/harmony-core/__test__/blockchain.test.ts b/packages/harmony-core/__test__/blockchain.test.ts index b888f06..f1651d6 100644 --- a/packages/harmony-core/__test__/blockchain.test.ts +++ b/packages/harmony-core/__test__/blockchain.test.ts @@ -1,7 +1,7 @@ // tslint:disable-next-line: no-implicit-dependencies import fetch from 'jest-fetch-mock'; import { Blockchain } from '../src/blockchain'; -import { HttpProvider, Messenger } from '@harmony/network'; +import { HttpProvider, Messenger } from '@harmony-js/network'; const provider = new HttpProvider('https://mock.com'); const messenger = new Messenger(provider); diff --git a/packages/harmony-core/package.json b/packages/harmony-core/package.json index 93d88fa..5438d74 100644 --- a/packages/harmony-core/package.json +++ b/packages/harmony-core/package.json @@ -1,5 +1,5 @@ { - "name": "@harmony/core", + "name": "@harmony-js/core", "version": "0.0.6", "description": "harmony core package", "main": "dist/index.js", @@ -17,12 +17,12 @@ "author": "neeboo@firestack.one", "license": "ISC", "dependencies": { - "@harmony/account": "0.0.6", - "@harmony/contract": "0.0.6", - "@harmony/crypto": "0.0.6", - "@harmony/network": "0.0.6", - "@harmony/transaction": "0.0.6", - "@harmony/utils": "0.0.6" + "@harmony-js/account": "0.0.6", + "@harmony-js/contract": "0.0.6", + "@harmony-js/crypto": "0.0.6", + "@harmony-js/network": "0.0.6", + "@harmony-js/transaction": "0.0.6", + "@harmony-js/utils": "0.0.6" }, - "gitHead": "fcb10df63e2369534342a235edd70091154e2390" + "gitHead": "4e20cd3884ccf4199497737b2bd474cb479c24c1" } diff --git a/packages/harmony-core/src/blockchain.ts b/packages/harmony-core/src/blockchain.ts index 7fc1ab5..f966a07 100644 --- a/packages/harmony-core/src/blockchain.ts +++ b/packages/harmony-core/src/blockchain.ts @@ -3,16 +3,16 @@ import { Messenger, ResponseMiddleware, WSProvider, -} from '@harmony/network'; +} from '@harmony-js/network'; import { assertObject, AssertType, HarmonyCore, DefaultBlockParams, -} from '@harmony/utils'; +} from '@harmony-js/utils'; -import { Transaction } from '@harmony/transaction'; +import { Transaction } from '@harmony-js/transaction'; class Blockchain extends HarmonyCore { messenger: Messenger; diff --git a/packages/harmony-core/src/harmony.ts b/packages/harmony-core/src/harmony.ts index f1991bc..18d2976 100644 --- a/packages/harmony-core/src/harmony.ts +++ b/packages/harmony-core/src/harmony.ts @@ -1,10 +1,10 @@ -import * as crypto from '@harmony/crypto'; -import * as utils from '@harmony/utils'; +import * as crypto from '@harmony-js/crypto'; +import * as utils from '@harmony-js/utils'; -import { HttpProvider, Messenger, WSProvider } from '@harmony/network'; -import { TransactionFactory, Transaction } from '@harmony/transaction'; -import { ContractFactory, Contract } from '@harmony/contract'; -import { Wallet, Account } from '@harmony/account'; +import { HttpProvider, Messenger, WSProvider } from '@harmony-js/network'; +import { TransactionFactory, Transaction } from '@harmony-js/transaction'; +import { ContractFactory, Contract } from '@harmony-js/contract'; +import { Wallet, Account } from '@harmony-js/account'; import { Blockchain } from './blockchain'; export class Harmony extends utils.HarmonyCore { diff --git a/packages/harmony-core/src/types.ts b/packages/harmony-core/src/types.ts index bcc314d..b269ed3 100644 --- a/packages/harmony-core/src/types.ts +++ b/packages/harmony-core/src/types.ts @@ -1,6 +1,6 @@ -import { HttpProvider, Messenger } from '@harmony/network'; -import { TransactionFactory, Transaction } from '@harmony/transaction'; -import { Wallet, Account } from '@harmony/account'; +import { HttpProvider, Messenger } from '@harmony-js/network'; +import { TransactionFactory, Transaction } from '@harmony-js/transaction'; +import { Wallet, Account } from '@harmony-js/account'; import { Blockchain } from './blockchain'; export interface HarmonyModule { diff --git a/packages/harmony-crypto/package.json b/packages/harmony-crypto/package.json index 255fdf4..ab51293 100644 --- a/packages/harmony-crypto/package.json +++ b/packages/harmony-crypto/package.json @@ -1,5 +1,5 @@ { - "name": "@harmony/crypto", + "name": "@harmony-js/crypto", "version": "0.0.6", "description": "crypto libraries for harmony", "main": "dist/index.js", @@ -17,7 +17,7 @@ }, "license": "ISC", "dependencies": { - "@harmony/utils": "0.0.6", + "@harmony-js/utils": "0.0.6", "aes-js": "^3.1.2", "base-x": "^3.0.5", "bip39": "^2.5.0", @@ -30,5 +30,5 @@ "scrypt.js": "^0.3.0", "uuid": "^3.3.2" }, - "gitHead": "fcb10df63e2369534342a235edd70091154e2390" + "gitHead": "4e20cd3884ccf4199497737b2bd474cb479c24c1" } diff --git a/packages/harmony-crypto/src/keyTool.ts b/packages/harmony-crypto/src/keyTool.ts index 259baaa..7d50662 100644 --- a/packages/harmony-crypto/src/keyTool.ts +++ b/packages/harmony-crypto/src/keyTool.ts @@ -4,7 +4,7 @@ import * as errors from './errors'; import { keccak256 } from './keccak256'; import { randomBytes } from './random'; -import { isPrivateKey, strip0x } from '@harmony/utils'; +import { isPrivateKey, strip0x } from '@harmony-js/utils'; import { encode } from './rlp'; const secp256k1 = elliptic.ec('secp256k1'); diff --git a/packages/harmony-crypto/src/keystore.ts b/packages/harmony-crypto/src/keystore.ts index d685c48..c51449b 100644 --- a/packages/harmony-crypto/src/keystore.ts +++ b/packages/harmony-crypto/src/keystore.ts @@ -2,7 +2,7 @@ import aes from 'aes-js'; import scrypt from 'scrypt.js'; import { pbkdf2Sync } from 'pbkdf2'; import uuid from 'uuid'; -import { isPrivateKey } from '@harmony/utils'; +import { isPrivateKey } from '@harmony-js/utils'; import { randomBytes } from './random'; import { getAddressFromPrivateKey } from './keyTool'; import { diff --git a/packages/harmony-crypto/src/signature.ts b/packages/harmony-crypto/src/signature.ts index e69de29..d894ec7 100644 --- a/packages/harmony-crypto/src/signature.ts +++ b/packages/harmony-crypto/src/signature.ts @@ -0,0 +1,4 @@ +// Copyright (c) 2019 suwei +// +// This software is released under the MIT License. +// https://opensource.org/licenses/MIT diff --git a/packages/harmony-network/package.json b/packages/harmony-network/package.json index 4d2a602..4051621 100644 --- a/packages/harmony-network/package.json +++ b/packages/harmony-network/package.json @@ -1,5 +1,5 @@ { - "name": "@harmony/network", + "name": "@harmony-js/network", "version": "0.0.6", "description": "network suites for harmony", "main": "dist/index.js", @@ -17,11 +17,11 @@ "author": "neeboo@firestack.one", "license": "ISC", "dependencies": { - "@harmony/core": "0.0.6", - "@harmony/utils": "0.0.6", + "@harmony-js/core": "0.0.6", + "@harmony-js/utils": "0.0.6", "cross-fetch": "^3.0.2", "mitt": "^1.1.3", "websocket": "^1.0.28" }, - "gitHead": "fcb10df63e2369534342a235edd70091154e2390" + "gitHead": "4e20cd3884ccf4199497737b2bd474cb479c24c1" } diff --git a/packages/harmony-network/src/messenger/messenger.ts b/packages/harmony-network/src/messenger/messenger.ts index 957eaed..80f5448 100644 --- a/packages/harmony-network/src/messenger/messenger.ts +++ b/packages/harmony-network/src/messenger/messenger.ts @@ -1,4 +1,4 @@ -import { HarmonyCore, ChainType, isString, ChainID } from '@harmony/utils'; +import { HarmonyCore, ChainType, isString, ChainID } from '@harmony-js/utils'; import { JsonRpc } from '../rpcMethod/rpcbuilder'; import { ResponseMiddleware } from './responseMiddleware'; import { HttpProvider } from '../providers/http'; diff --git a/packages/harmony-network/src/messenger/responseMiddleware.ts b/packages/harmony-network/src/messenger/responseMiddleware.ts index a6e707d..99748a6 100644 --- a/packages/harmony-network/src/messenger/responseMiddleware.ts +++ b/packages/harmony-network/src/messenger/responseMiddleware.ts @@ -1,5 +1,5 @@ import { RPCResponseBody } from '../types'; -import { isObject } from '@harmony/utils'; +import { isObject } from '@harmony-js/utils'; /** * @class ResponseMiddleware * @description Response middleware of RPC diff --git a/packages/harmony-network/src/providers/baseSocket.ts b/packages/harmony-network/src/providers/baseSocket.ts index 3d2ee5d..942c20e 100644 --- a/packages/harmony-network/src/providers/baseSocket.ts +++ b/packages/harmony-network/src/providers/baseSocket.ts @@ -1,4 +1,4 @@ -import { isWs } from '@harmony/utils'; +import { isWs } from '@harmony-js/utils'; import mitt from 'mitt'; import { BaseProvider } from './baseProvider'; diff --git a/packages/harmony-network/src/providers/ws.ts b/packages/harmony-network/src/providers/ws.ts index 70eab75..c19a08e 100644 --- a/packages/harmony-network/src/providers/ws.ts +++ b/packages/harmony-network/src/providers/ws.ts @@ -6,7 +6,7 @@ import { SocketState, // EmittType, } from './baseSocket'; -import { isWs, isObject, isArray } from '@harmony/utils'; +import { isWs, isObject, isArray } from '@harmony-js/utils'; import { JsonRpc } from '../rpcMethod/rpcbuilder'; import { composeMiddleware } from '../rpcMethod/net'; import { RPCRequestPayload } from '../types'; diff --git a/packages/harmony-network/src/tracker/baseTracker.ts b/packages/harmony-network/src/tracker/baseTracker.ts index 075741c..8f5ca27 100644 --- a/packages/harmony-network/src/tracker/baseTracker.ts +++ b/packages/harmony-network/src/tracker/baseTracker.ts @@ -1,4 +1,4 @@ -import { isHex, hexToNumber } from '@harmony/utils'; +import { isHex, hexToNumber } from '@harmony-js/utils'; import { Emitter } from '../providers/emitter'; const sec = 1000; diff --git a/packages/harmony-transaction/package.json b/packages/harmony-transaction/package.json index 23d1445..2d8486f 100644 --- a/packages/harmony-transaction/package.json +++ b/packages/harmony-transaction/package.json @@ -1,5 +1,5 @@ { - "name": "@harmony/transaction", + "name": "@harmony-js/transaction", "version": "0.0.6", "description": "transaction package for harmony", "main": "dist/index.js", @@ -17,10 +17,10 @@ "author": "neeboo@firestack.one", "license": "ISC", "dependencies": { - "@harmony/core": "0.0.6", - "@harmony/crypto": "0.0.6", - "@harmony/network": "0.0.6", - "@harmony/utils": "0.0.6" + "@harmony-js/core": "0.0.6", + "@harmony-js/crypto": "0.0.6", + "@harmony-js/network": "0.0.6", + "@harmony-js/utils": "0.0.6" }, - "gitHead": "fcb10df63e2369534342a235edd70091154e2390" + "gitHead": "4e20cd3884ccf4199497737b2bd474cb479c24c1" } diff --git a/packages/harmony-transaction/src/factory.ts b/packages/harmony-transaction/src/factory.ts index 443bd7a..9580196 100644 --- a/packages/harmony-transaction/src/factory.ts +++ b/packages/harmony-transaction/src/factory.ts @@ -1,5 +1,5 @@ -import { getContractAddress } from '@harmony/crypto'; -import { Messenger } from '@harmony/network'; +import { getContractAddress } from '@harmony-js/crypto'; +import { Messenger } from '@harmony-js/network'; import { Transaction } from './transaction'; import { TxParams, TxStatus } from './types'; diff --git a/packages/harmony-transaction/src/transaction.ts b/packages/harmony-transaction/src/transaction.ts index 58248e5..3d1fb10 100644 --- a/packages/harmony-transaction/src/transaction.ts +++ b/packages/harmony-transaction/src/transaction.ts @@ -6,9 +6,9 @@ import { stripZeros, Signature, splitSignature, -} from '@harmony/crypto'; -import { add0xToString, numberToHex } from '@harmony/utils'; -import { Messenger, RPCMethod, Emitter } from '@harmony/network'; +} from '@harmony-js/crypto'; +import { add0xToString, numberToHex } from '@harmony-js/utils'; +import { Messenger, RPCMethod, Emitter } from '@harmony-js/network'; import { TxParams, TxStatus, TransasctionReceipt } from './types'; import { recover, diff --git a/packages/harmony-transaction/src/utils.ts b/packages/harmony-transaction/src/utils.ts index 1555952..08e8605 100644 --- a/packages/harmony-transaction/src/utils.ts +++ b/packages/harmony-transaction/src/utils.ts @@ -4,7 +4,7 @@ import { isAddress, strip0x, ChainType, -} from '@harmony/utils'; +} from '@harmony-js/utils'; import { decode, encode, @@ -13,8 +13,8 @@ import { BN, hexZeroPad, recoverAddress, -} from '@harmony/crypto'; -import { HttpProvider, Messenger } from '@harmony/network'; +} from '@harmony-js/crypto'; +import { HttpProvider, Messenger } from '@harmony-js/network'; import { TxParams } from './types'; export const transactionFields = [ diff --git a/packages/harmony-utils/__test__/fixture.ts b/packages/harmony-utils/__test__/fixture.ts index e3f6df4..9d936dd 100644 --- a/packages/harmony-utils/__test__/fixture.ts +++ b/packages/harmony-utils/__test__/fixture.ts @@ -5,7 +5,7 @@ export const basicType = { float: 0.1, text: 'testString', jsonString: - '{"name":"@harmony/utils","version":"0.0.48","description":"utils for harmony"}', + '{"name":"@harmony-js/utils","version":"0.0.48","description":"utils for harmony"}', hexNumber: 0x123, hexString: '0x123', bool: true, diff --git a/packages/harmony-utils/package.json b/packages/harmony-utils/package.json index 0ffad4e..f03eb05 100644 --- a/packages/harmony-utils/package.json +++ b/packages/harmony-utils/package.json @@ -1,5 +1,5 @@ { - "name": "@harmony/utils", + "name": "@harmony-js/utils", "version": "0.0.6", "description": "utils for harmony", "main": "dist/index.js", @@ -20,5 +20,5 @@ "@types/bn.js": "^4.11.3", "bn.js": "^4.11.8" }, - "gitHead": "fcb10df63e2369534342a235edd70091154e2390" + "gitHead": "4e20cd3884ccf4199497737b2bd474cb479c24c1" } diff --git a/scripts/projects.ts b/scripts/projects.ts index 70db65c..bfdfe5a 100644 --- a/scripts/projects.ts +++ b/scripts/projects.ts @@ -65,7 +65,7 @@ export const projects = fs const pkgGlobalName = camelCase(pkgName); const pkgPath = path.join(packagesPath, p); const pkgSrc = path.join(pkgPath, 'src'); - const pkgScopedName = `@harmony/${p.replace('harmony-', '')}`; + const pkgScopedName = `@harmony-js/${p.replace('harmony-', '')}`; const pkgDist = path.join(pkgPath, 'dist'); const pkgUmd = path.join(pkgDist, 'index.umd.js');