From 9f1c212596f04b61fedf90d5a896b5f4e44ce729 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 29 Mar 2018 13:00:42 +0200 Subject: Update Yarn lock and fix dep versions --- packages/website/package.json | 4 ++-- yarn.lock | 18 +++++++++++------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/packages/website/package.json b/packages/website/package.json index 3869fb040..b62b294df 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -38,7 +38,7 @@ "less": "^2.7.2", "lodash": "^4.17.4", "material-ui": "^0.17.1", - "moment": "^2.18.1", + "moment": "2.13.0", "query-string": "^5.0.1", "react": "15.6.1", "react-copy-to-clipboard": "^4.2.3", @@ -73,7 +73,7 @@ "@types/jsonschema": "^1.1.1", "@types/lodash": "4.14.104", "@types/material-ui": "0.18.0", - "@types/moment": "^2.13.0", + "@types/moment": "2.13.0", "@types/node": "^8.0.53", "@types/query-string": "^5.0.1", "@types/react": "^16.0.34", diff --git a/yarn.lock b/yarn.lock index 106548195..f3929e07e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -212,7 +212,7 @@ version "2.2.48" resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-2.2.48.tgz#3523b126a0b049482e1c3c11877460f76622ffab" -"@types/moment@^2.13.0": +"@types/moment@2.13.0": version "2.13.0" resolved "https://registry.yarnpkg.com/@types/moment/-/moment-2.13.0.tgz#604ebd189bc3bc34a1548689404e61a2a4aac896" dependencies: @@ -752,7 +752,7 @@ async-eventemitter@^0.2.2: dependencies: async "^2.4.0" -"async-eventemitter@github:ahultgren/async-eventemitter#fa06e39e56786ba541c180061dbf2c0a5bbf951c": +async-eventemitter@ahultgren/async-eventemitter#fa06e39e56786ba541c180061dbf2c0a5bbf951c: version "0.2.3" resolved "https://codeload.github.com/ahultgren/async-eventemitter/tar.gz/fa06e39e56786ba541c180061dbf2c0a5bbf951c" dependencies: @@ -1684,13 +1684,13 @@ big.js@^3.1.3: version "3.2.0" resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" -"bignumber.js@git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2": +"bignumber.js@git+https://github.com/debris/bignumber.js#master": version "2.0.7" - resolved "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2" + resolved "git+https://github.com/debris/bignumber.js#c7a38de919ed75e6fb6ba38051986e294b328df9" -"bignumber.js@git+https://github.com/debris/bignumber.js.git#master": +"bignumber.js@git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2": version "2.0.7" - resolved "git+https://github.com/debris/bignumber.js.git#c7a38de919ed75e6fb6ba38051986e294b328df9" + resolved "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2" "bignumber.js@git+https://github.com/frozeman/bignumber.js-nolookahead.git": version "2.0.7" @@ -7627,10 +7627,14 @@ modify-values@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" -moment@*, moment@^2.18.1, moment@^2.6.0: +moment@*, moment@^2.6.0: version "2.21.0" resolved "https://registry.yarnpkg.com/moment/-/moment-2.21.0.tgz#2a114b51d2a6ec9e6d83cf803f838a878d8a023a" +moment@2.13.0: + version "2.13.0" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.13.0.tgz#24162d99521e6d40f99ae6939e806d2139eaac52" + mout@^0.11.0: version "0.11.1" resolved "https://registry.yarnpkg.com/mout/-/mout-0.11.1.tgz#ba3611df5f0e5b1ffbfd01166b8f02d1f5fa2b99" -- cgit From 743c3dbe01b3ffaa1743c2907cbcab1d7ed78d72 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 29 Mar 2018 14:06:29 +0200 Subject: Generate CHANGELOG.json files and add convert_changelog script --- packages/0x.js/CHANGELOG.json | 970 +++++++++++++++++++++ packages/abi-gen/CHANGELOG.json | 77 ++ packages/assert/CHANGELOG.json | 52 ++ packages/base-contract/CHANGELOG.json | 12 + packages/connect/CHANGELOG.json | 121 +++ packages/deployer/CHANGELOG.json | 94 ++ packages/dev-utils/CHANGELOG.json | 67 ++ packages/json-schemas/CHANGELOG.json | 34 + packages/monorepo-scripts/CHANGELOG.json | 12 + packages/monorepo-scripts/package.json | 3 + .../monorepo-scripts/src/convert_changelogs.ts | 80 ++ packages/monorepo-scripts/src/types.ts | 17 + packages/react-docs/CHANGELOG.json | 47 + packages/react-shared/CHANGELOG.json | 14 + packages/sol-cov/CHANGELOG.json | 1 + packages/sra-report/CHANGELOG.json | 28 + packages/subproviders/CHANGELOG.json | 132 +++ packages/tslint-config/CHANGELOG.json | 71 ++ packages/types/CHANGELOG.json | 68 ++ packages/typescript-typings/CHANGELOG.json | 6 + packages/utils/CHANGELOG.json | 75 ++ packages/web3-wrapper/CHANGELOG.json | 64 ++ 22 files changed, 2045 insertions(+) create mode 100644 packages/0x.js/CHANGELOG.json create mode 100644 packages/abi-gen/CHANGELOG.json create mode 100644 packages/assert/CHANGELOG.json create mode 100644 packages/base-contract/CHANGELOG.json create mode 100644 packages/connect/CHANGELOG.json create mode 100644 packages/deployer/CHANGELOG.json create mode 100644 packages/dev-utils/CHANGELOG.json create mode 100644 packages/json-schemas/CHANGELOG.json create mode 100644 packages/monorepo-scripts/CHANGELOG.json create mode 100644 packages/monorepo-scripts/src/convert_changelogs.ts create mode 100644 packages/monorepo-scripts/src/types.ts create mode 100644 packages/react-docs/CHANGELOG.json create mode 100644 packages/react-shared/CHANGELOG.json create mode 100644 packages/sol-cov/CHANGELOG.json create mode 100644 packages/sra-report/CHANGELOG.json create mode 100644 packages/subproviders/CHANGELOG.json create mode 100644 packages/tslint-config/CHANGELOG.json create mode 100644 packages/types/CHANGELOG.json create mode 100644 packages/typescript-typings/CHANGELOG.json create mode 100644 packages/utils/CHANGELOG.json create mode 100644 packages/web3-wrapper/CHANGELOG.json diff --git a/packages/0x.js/CHANGELOG.json b/packages/0x.js/CHANGELOG.json new file mode 100644 index 000000000..6c7ec8651 --- /dev/null +++ b/packages/0x.js/CHANGELOG.json @@ -0,0 +1,970 @@ +[ + { + "version": "0.34.0", + "changes": [ + { + "note": "Fix the bug causing `zeroEx.exchange.fillOrdersUpToAsync` validation to fail if there were some extra orders passed", + "pr": "470" + } + ] + }, + { + "version": "0.33.2", + "changes": [ + { + "note": "Consolidate all `console.log` calls into `logUtils` in the `@0xproject/utils` package", + "pr": "452" + }, + { + "note": "Consolidate `Order`, `SignedOrder`, and `ECSignature` into the `@0xproject/types` package", + "pr": "456" + } + ], + "timestamp": 1521327600, + "isPublished": true + }, + { + "version": "0.33.1", + "changes": [ + { + "note": "Add missing EthersJs typescript typings as dependency" + } + ], + "timestamp": 1520463600, + "isPublished": true + }, + { + "version": "0.33.0", + "changes": [ + { + "note": "Validate and lowercase all addresses in public methods", + "pr": "373" + }, + { + "note": "Improve validation to force passing contract addresses on private networks", + "pr": "385" + }, + { + "note": "Change `LogErrorContractEventArgs.errorId` type from `BigNumber` to `number`", + "pr": "413" + }, + { + "note": "Rename all public `_unsubscribeAll` methods to `unsubscribeAll`", + "pr": "415" + }, + { + "note": "Move web3 typings from devDep to dep since cannot use this package without it", + "pr": "429" + } + ], + "timestamp": 1520118000, + "isPublished": true + }, + { + "version": "0.32.2", + "changes": [ + { + "note": "Fix publishing issue where .npmignore was not properly excluding undesired content", + "pr": "389" + } + ], + "timestamp": 1518130800, + "isPublished": true + }, + { + "version": "0.32.1", + "changes": [ + { + "note": "Reorganized `BlockParamLiteral` export into `@0xproject/types` package", + "pr": "355" + }, + { + "note": "Now using `abi-gen` package to generate ContractEventArgs types", + "pr": "371" + } + ], + "timestamp": 1517958000, + "isPublished": true + }, + { + "version": "0.32.0", + "changes": [ + { + "note": "Add `zeroEx.etherToken.getContractAddressIfExists`", + "pr": "350" + }, + { + "note": "Fixed the bug causing order watcher to throw if there is an event with the same signature but different indexed fields", + "pr": "366" + } + ], + "timestamp": 1517785200, + "isPublished": true + }, + { + "version": "0.31.1", + "changes": [ + { + "note": "Fix the bug causing order watcher to throw if makerToken === zrx", + "pr": "357" + } + ], + "timestamp": 1517439600, + "isPublished": true + }, + { + "version": "0.31.0", + "changes": [ + { + "note": "Add the `shouldAddPersonalMessagePrefix` parameter to `signOrderHashAsync` so that the" + } + ], + "timestamp": 1517266800, + "isPublished": true + }, + { + "version": "0.30.2", + "changes": [ + { + "note": "Add Rinkeby testnet addresses to artifacts ", + "pr": "337" + }, + { + "note": "Move @0xproject/types to dependencies from devDependencies fixing missing type errors" + } + ], + "timestamp": 1517180400, + "isPublished": true + }, + { + "version": "0.30.1", + "changes": [ + { + "note": "Fix a bug allowing negative fill values ", + "pr": "212" + }, + { + "note": "Fix a bug that made it impossible to pass a custom ZRX address ", + "pr": "341" + } + ], + "timestamp": 1516748400, + "isPublished": true + }, + { + "version": "0.30.0", + "changes": [ + { + "note": "Add an error parameter to the order watcher callback", + "pr": "312" + }, + { + "note": "Fix a bug making it impossible to catch some errors from awaitTransactionMinedAsync", + "pr": "312" + }, + { + "note": "Fix a bug in fillOrdersUpTo validation making it impossible to fill up to if user doesn't have enough balance to fully fill all the orders", + "pr": "321" + } + ], + "timestamp": 1516143600, + "isPublished": true + }, + { + "version": "0.29.1", + "changes": [ + { + "note": "Fixed bignumber config issue #301", + "pr": "305" + } + ], + "timestamp": 1515625200, + "isPublished": true + }, + { + "version": "0.29.0", + "changes": [ + { + "note": "Assert baseUnit amount supplied to `toUnitAmount` is integer amount.", + "pr": "287" + }, + { + "note": "`toBaseUnitAmount` throws if amount supplied has too many decimals", + "pr": "287" + } + ], + "timestamp": 1514415600, + "isPublished": true + }, + { + "version": "0.28.0", + "changes": [ + { + "note": "Add `etherTokenAddress` arg to `depositAsync` and `withdrawAsync` methods on `zeroEx.etherToken`", + "pr": "267" + }, + { + "note": "Removed accidentally included `unsubscribeAll` method from `zeroEx.proxy`, `zeroEx.etherToken` and `zeroEx.tokenRegistry`", + "pr": "267" + }, + { + "note": "Removed `etherTokenContractAddress` from `ZeroEx` constructor arg `ZeroExConfig`", + "pr": "267" + }, + { + "note": "Rename `SubscriptionOpts` to `BlockRange`", + "pr": "272" + }, + { + "note": "Add `zeroEx.etherToken.subscribe`, `zeroEx.etherToken.unsubscribe`, `zeroEx.etherToken.unsubscribeAll`", + "pr": "277" + }, + { + "note": "Add `zeroEx.etherToken.getLogsAsync`", + "pr": "277" + }, + { + "note": "Add new public types `BlockParamLiteral`, `EtherTokenEvents`, `EtherTokenContractEventArgs`, `DepositContractEventArgs`, `WithdrawalContractEventArgs`", + "pr": "277" + }, + { + "note": "Support `Deposit` and `Withdraw` events on etherToken", + "pr": "277" + }, + { + "note": "Improve the error message when taker is not a string", + "pr": "278" + } + ], + "timestamp": 1513724400, + "isPublished": true + }, + { + "version": "0.27.1", + "changes": [ + { + "note": "Export `TransactionOpts` type" + } + ], + "timestamp": 1511823600, + "isPublished": true + }, + { + "version": "0.27.0", + "changes": [ + { + "note": "Make `ZeroExConfig` required parameter of `ZeroEx` constructor", + "pr": "233" + }, + { + "note": "Add a required property `networkId` to `ZeroExConfig`", + "pr": "233" + }, + { + "note": "Make all `getContractAddress` functions, `zeroEx.exchange.subscribe`, `zeroEx.exchange.getZRXTokenAddress` sync", + "pr": "233" + }, + { + "note": "Remove `ZeroExError.ContractNotFound` and replace it with contract-specific errors", + "pr": "233" + }, + { + "note": "Make `DecodedLogEvent` contain `LogWithDecodedArgs` under log key instead of merging it in like web3 does", + "pr": "234" + }, + { + "note": "Rename `removed` to `isRemoved` in `DecodedLogEvent`", + "pr": "234" + }, + { + "note": "Add config allowing to specify gasPrice and gasLimit for every transaction sending method", + "pr": "235" + }, + { + "note": "All transaction sending methods now call `estimateGas` if no gas amount was supplied", + "pr": "235" + }, + { + "note": "Modify order validation methods to validate against the `latest` block, not against the `pending` block", + "pr": "236" + } + ], + "timestamp": 1511823600, + "isPublished": true + }, + { + "version": "0.26.0", + "changes": [ + { + "note": "Add post-formatter for logs converting `blockNumber`, `logIndex`, `transactionIndex` from hexes to numbers", + "pr": "231" + }, + { + "note": "Remove support for Async callback types when used in Subscribe functions", + "pr": "222" + }, + { + "note": "In OrderWatcher subscribe to ZRX Token Transfer and Approval events when maker token is different", + "pr": "225" + } + ], + "timestamp": 1511218800, + "isPublished": true + }, + { + "version": "0.25.1", + "changes": [ + { + "note": "Standardise on Cancelled over Canceled", + "pr": "217" + }, + { + "note": "Add missing `DecodedLogEvent` type to exported types", + "pr": "205" + }, + { + "note": "Normalized the transactionReceipt status to be `null|0|1`, 1 meaning transaction execution successful, 0 unsuccessful and `null` if it is a pre-byzantinium transaction.", + "pr": "200" + } + ], + "timestamp": 1510527600, + "isPublished": true + }, + { + "version": "0.23.0", + "changes": [ + { + "note": "Fixed unhandled promise rejection error in subscribe methods", + "pr": "209" + }, + { + "note": "Subscribe callbacks now receive an error object as their first argument" + } + ], + "timestamp": 1510441200, + "isPublished": true + }, + { + "version": "0.22.6", + "changes": [ + { + "note": "Add a timeout parameter to transaction awaiting", + "pr": "206" + } + ], + "timestamp": 1510268400, + "isPublished": true + }, + { + "version": "0.22.5", + "changes": [ + { + "note": "Re-publish v0.22.4 to fix publishing issue" + } + ], + "timestamp": 1510009200, + "isPublished": true + }, + { + "version": "0.22.4", + "changes": [ + { + "note": "Upgraded bignumber.js to a new version that ships with native typings" + } + ], + "timestamp": 1508882400, + "isPublished": true + }, + { + "version": "0.22.3", + "changes": [ + { + "note": "Fixed an issue with new version of testrpc and unlimited proxy allowance", + "pr": "199" + } + ], + "timestamp": 1508882400, + "isPublished": true + }, + { + "version": "0.22.2", + "changes": [ + { + "note": "Fixed rounding of maker fill amount and incorrect validation of partial fees", + "pr": "197" + } + ], + "timestamp": 1508796000, + "isPublished": true + }, + { + "version": "0.22.0", + "changes": [ + { + "note": "Started using `OrderFillRequest` interface instead of `OrderFillOrKillRequest` interface for `zeroEx.exchange.batchFillOrKill`", + "pr": "187" + }, + { + "note": "Removed `OrderFillOrKillRequest`", + "pr": "187" + } + ], + "timestamp": 1508104800, + "isPublished": true + }, + { + "version": "0.21.4", + "changes": [ + { + "note": "Made 0x.js more type-safe by making `getLogsAsync` and `subscribe/subscribeAsync` generics parametrized with arg type", + "pr": "194" + } + ], + "timestamp": 1507845600, + "isPublished": true + }, + { + "version": "0.21.3", + "changes": [ + { + "note": "Fixed a bug causing order fills to throw `INSUFFICIENT_TAKER_ALLOWANCE`", + "pr": "193" + } + ], + "timestamp": 1507759200, + "isPublished": true + }, + { + "version": "0.21.2", + "changes": [ + { + "note": "Exported `ContractEventArg` as a public type", + "pr": "190" + } + ], + "timestamp": 1507672800, + "isPublished": true + }, + { + "version": "0.21.1", + "changes": [ + { + "note": "Fixed a bug in subscriptions", + "pr": "189" + } + ], + "timestamp": 1507672800, + "isPublished": true + }, + { + "version": "0.21.0", + "changes": [ + { + "note": "Complete rewrite of subscription logic", + "pr": "182" + }, + { + "note": "Subscriptions no longer return historical logs. If you want them - use `getLogsAsync`" + }, + { + "note": "Subscriptions now use [ethereumjs-blockstream](https://github.com/ethereumjs/ethereumjs-blockstream) under the hood" + }, + { + "note": "Subscriptions correctly handle block re-orgs (forks)" + }, + { + "note": "Subscriptions correctly backfill logs (connection problems)" + }, + { + "note": "They no longer setup filters on the underlying nodes, so you can use them with infura without a filter Subprovider" + }, + { + "note": "Removed `ContractEventEmitter` and added `LogEvent`" + }, + { + "note": "Renamed `zeroEx.token.subscribeAsync` to `zeroEx.token.subscribe`" + }, + { + "note": "Added `zeroEx.token.unsubscribe` and `zeroEx.exchange.unsubscribe`" + }, + { + "note": "Renamed `zeroEx.exchange.stopWatchingAllEventsAsync` to `zeroEx.exhange.unsubscribeAll`" + }, + { + "note": "Renamed `zeroEx.token.stopWatchingAllEventsAsync` to `zeroEx.token.unsubscribeAll`" + }, + { + "note": "Fixed the batch fills validation by emulating all balance & proxy allowance changes", + "pr": "185" + } + ], + "timestamp": 1507586400, + "isPublished": true + }, + { + "version": "0.20.0", + "changes": [ + { + "note": "Add `zeroEx.token.getLogsAsync`", + "pr": "178" + }, + { + "note": "Add `zeroEx.exchange.getLogsAsync`", + "pr": "178" + }, + { + "note": "Fixed fees validation when one of the tokens transferred is ZRX", + "pr": "181" + } + ], + "timestamp": 1507154400, + "isPublished": true + }, + { + "version": "0.19.0", + "changes": [ + { + "note": "Made order validation optional ", + "pr": "172" + }, + { + "note": "Added Ropsten testnet support", + "pr": "173" + }, + { + "note": "Fixed a bug causing awaitTransactionMinedAsync to DDos backend nodes", + "pr": "175" + } + ], + "timestamp": 1506636000, + "isPublished": true + }, + { + "version": "0.18.0", + "changes": [ + { + "note": "Added `zeroEx.exchange.validateOrderFillableOrThrowAsync` to simplify orderbook pruning", + "pr": "170" + } + ], + "timestamp": 1506376800, + "isPublished": true + }, + { + "version": "0.17.0", + "changes": [ + { + "note": "Made `zeroEx.exchange.getZRXTokenAddressAsync` public", + "pr": "171" + } + ], + "timestamp": 1506376800, + "isPublished": true + }, + { + "version": "0.16.0", + "changes": [ + { + "note": "Added the ability to specify custom contract addresses to be used with 0x.js", + "pr": "165" + }, + { + "note": "ZeroExConfig.exchangeContractAddress" + }, + { + "note": "ZeroExConfig.tokenRegistryContractAddress" + }, + { + "note": "ZeroExConfig.etherTokenContractAddress" + }, + { + "note": "Added `zeroEx.tokenRegistry.getContractAddressAsync`", + "pr": "165" + } + ], + "timestamp": 1505858400, + "isPublished": true + }, + { + "version": "0.15.0", + "changes": [ + { + "note": "Added the ability to specify a historical `blockNumber` at which to query the blockchain's state when calling a token or exchange method", + "pr": "161" + } + ], + "timestamp": 1504821600, + "isPublished": true + }, + { + "version": "0.14.2", + "changes": [ + { + "note": "Fixed an issue with bignumber.js types not found", + "pr": "160" + } + ], + "timestamp": 1504735200, + "isPublished": true + }, + { + "version": "0.14.1", + "changes": [ + { + "note": "Fixed an issue with Artifact type not found", + "pr": "159" + } + ], + "timestamp": 1504735200, + "isPublished": true + }, + { + "version": "0.14.0", + "changes": [ + { + "note": "Added `zeroEx.exchange.throwLogErrorsAsErrors` method to public interface", + "pr": "157" + }, + { + "note": "Fixed an issue with overlapping async intervals in `zeroEx.awaitTransactionMinedAsync`", + "pr": "157" + }, + { + "note": "Fixed an issue with log decoder returning `BigNumber`s as `strings`", + "pr": "157" + } + ], + "timestamp": 1504648800, + "isPublished": true + }, + { + "version": "0.13.0", + "changes": [ + { + "note": "Made all the functions submitting transactions to the network to immediately return transaction hash", + "pr": "151" + }, + { + "note": "Added `zeroEx.awaitTransactionMinedAsync`", + "pr": "151" + }, + { + "note": "Added `TransactionReceiptWithDecodedLogs`, `LogWithDecodedArgs`, `DecodedLogArgs` to public types", + "pr": "151" + }, + { + "note": "Added signature validation to `validateFillOrderThrowIfInvalidAsync`", + "pr": "152" + } + ], + "timestamp": 1504648800, + "isPublished": true + }, + { + "version": "0.12.1", + "changes": [ + { + "note": "Added the support for web3@1.x.x provider", + "pr": "142" + }, + { + "note": "Added the optional `zeroExConfig` parameter to the constructor of `ZeroEx`", + "pr": "139" + }, + { + "note": "Added the ability to specify `gasPrice` when instantiating `ZeroEx`", + "pr": "139" + } + ], + "timestamp": 1504303200, + "isPublished": true + }, + { + "version": "0.11.0", + "changes": [ + { + "note": "Added `zeroEx.token.setUnlimitedProxyAllowanceAsync`", + "pr": "137" + }, + { + "note": "Added `zeroEx.token.setUnlimitedAllowanceAsync`", + "pr": "137" + }, + { + "note": "Added `zeroEx.token.UNLIMITED_ALLOWANCE_IN_BASE_UNITS`", + "pr": "137" + } + ], + "timestamp": 1503525600, + "isPublished": true + }, + { + "version": "0.10.4", + "changes": [ + { + "note": "Fixed a bug where checksummed addresses were being pulled from artifacts and not lower-cased.", + "pr": "135" + } + ], + "timestamp": 1503525600, + "isPublished": true + }, + { + "version": "0.10.1", + "changes": [ + { + "note": "Added `zeroEx.exchange.validateFillOrderThrowIfInvalidAsync`", + "pr": "128" + }, + { + "note": "Added `zeroEx.exchange.validateFillOrKillOrderThrowIfInvalidAsync`", + "pr": "128" + }, + { + "note": "Added `zeroEx.exchange.validateCancelOrderThrowIfInvalidAsync`", + "pr": "128" + }, + { + "note": "Added `zeroEx.exchange.isRoundingErrorAsync`", + "pr": "128" + }, + { + "note": "Added `zeroEx.proxy.getContractAddressAsync`", + "pr": "130" + }, + { + "note": "Added `zeroEx.tokenRegistry.getTokenAddressesAsync`", + "pr": "132" + }, + { + "note": "Added `zeroEx.tokenRegistry.getTokenAddressBySymbolIfExistsAsync`", + "pr": "132" + }, + { + "note": "Added `zeroEx.tokenRegistry.getTokenAddressByNameIfExistsAsync`", + "pr": "132" + }, + { + "note": "Added `zeroEx.tokenRegistry.getTokenBySymbolIfExistsAsync`", + "pr": "132" + }, + { + "note": "Added `zeroEx.tokenRegistry.getTokenByNameIfExistsAsync`", + "pr": "132" + }, + { + "note": "Added clear error message when checksummed address is passed to a public method", + "pr": "124" + }, + { + "note": "Fixes the description of `shouldThrowOnInsufficientBalanceOrAllowance` in docs", + "pr": "127" + } + ], + "timestamp": 1503525600, + "isPublished": true + }, + { + "version": "0.9.3", + "changes": [ + { + "note": "Update contract artifacts to include latest Kovan and Mainnet deploys", + "pr": "118" + } + ], + "timestamp": 1503352800, + "isPublished": true + }, + { + "version": "0.9.2", + "changes": [ + { + "note": "*This version was unpublished because of a publishing issue.*" + }, + { + "note": "Update contract artifacts to include latest Kovan and Mainnet deploys", + "pr": "118" + } + ], + "timestamp": 1503266400, + "isPublished": true + }, + { + "version": "0.9.1", + "changes": [ + { + "note": "Fixed the bug causing `zeroEx.token.getBalanceAsync()` to fail if no addresses available", + "pr": "120" + } + ], + "timestamp": 1502834400, + "isPublished": true + }, + { + "version": "0.9.0", + "changes": [ + { + "note": "Migrated to the new version of smart contracts", + "pr": "101" + }, + { + "note": "Removed the ability to call methods on multiple authorized Exchange smart contracts", + "pr": "106" + }, + { + "note": "Made `zeroEx.getOrderHashHex` a static method", + "pr": "107" + }, + { + "note": "Cached `net_version` requests and invalidate the cache on calls to `setProvider`", + "pr": "95" + }, + { + "note": "Renamed `zeroEx.exchange.batchCancelOrderAsync` to `zeroEx.exchange.batchCancelOrdersAsync`" + }, + { + "note": "Renamed `zeroEx.exchange.batchFillOrderAsync` to `zeroEx.exchange.batchFillOrdersAsync`" + }, + { + "note": "Updated to typescript v2.4", + "pr": "104" + }, + { + "note": "Fixed an issue with incorrect balance/allowance validation when ZRX is one of the tokens traded", + "pr": "109" + } + ], + "timestamp": 1501020000, + "isPublished": true + }, + { + "version": "0.8.0", + "changes": [ + { + "note": "Added the ability to call methods on different authorized versions of the Exchange smart contract", + "pr": "82" + }, + { + "note": "Updated contract artifacts to reflect latest changes to the smart contracts (0xproject/contracts#59)" + }, + { + "note": "Added `zeroEx.proxy.isAuthorizedAsync` and `zeroEx.proxy.getAuthorizedAddressesAsync`", + "pr": "89" + }, + { + "note": "Added `zeroEx.token.subscribeAsync`", + "pr": "90" + }, + { + "note": "Made contract invalidation functions private", + "pr": "90" + }, + { + "note": "`zeroEx.token.invalidateContractInstancesAsync`" + }, + { + "note": "`zeroEx.exchange.invalidateContractInstancesAsync`" + }, + { + "note": "`zeroEx.proxy.invalidateContractInstance`" + }, + { + "note": "`zeroEx.tokenRegistry.invalidateContractInstance`" + }, + { + "note": "Fixed the bug where `zeroEx.setProviderAsync` didn't invalidate etherToken contract's instance" + } + ], + "timestamp": 1499119200, + "isPublished": true + }, + { + "version": "0.7.1", + "changes": [ + { + "note": "Added the ability to convert Ether to wrapped Ether tokens and back via `zeroEx.etherToken.depostAsync` and `zeroEx.etherToken.withdrawAsync`", + "pr": "81" + } + ], + "timestamp": 1498428000, + "isPublished": true + }, + { + "version": "0.7.0", + "changes": [ + { + "note": "Added Kovan smart contract artifacts", + "pr": "78" + }, + { + "note": "Started returning fillAmount from `fillOrderAsync` and `fillUpToAsync`", + "pr": "72" + }, + { + "note": "Started returning cancelledAmount from `cancelOrderAsync`", + "pr": "72" + }, + { + "note": "Renamed type `LogCancelArgs` to `LogCancelContractEventArgs` and `LogFillArgs` to `LogFillContractEventArgs`" + } + ], + "timestamp": 1498082400, + "isPublished": true + }, + { + "version": "0.6.2", + "changes": [ + { + "note": "Reduced bundle size" + }, + { + "note": "Improved documentation" + } + ], + "timestamp": 1497996000, + "isPublished": true + }, + { + "version": "0.6.1", + "changes": [ + { + "note": "Improved documentation" + } + ], + "timestamp": 1497823200, + "isPublished": true + }, + { + "version": "0.6.0", + "changes": [ + { + "note": "Made `ZeroEx` class accept `Web3Provider` instance instead of `Web3` instance" + }, + { + "note": "Added types for contract event arguments" + } + ], + "timestamp": 1497823200, + "isPublished": true + }, + { + "version": "0.5.2", + "changes": [ + { + "note": "Fixed the bug in `postpublish` script that caused that only unminified UMD bundle was uploaded to release page" + } + ], + "timestamp": 1497477600, + "isPublished": true + }, + { + "version": "0.5.1", + "changes": [ + { + "note": "Added `postpublish` script to publish to Github Releases with assets." + } + ], + "timestamp": 1497477600, + "isPublished": true + } +] \ No newline at end of file diff --git a/packages/abi-gen/CHANGELOG.json b/packages/abi-gen/CHANGELOG.json new file mode 100644 index 000000000..bbe9f9d86 --- /dev/null +++ b/packages/abi-gen/CHANGELOG.json @@ -0,0 +1,77 @@ +[ + { + "version": "0.2.5", + "changes": [ + { + "note": "Consolidate all `console.log` calls into `logUtils` in the `@0xproject/utils` package", + "pr": "452" + } + ], + "timestamp": 1521327600, + "isPublished": true + }, + { + "version": "0.2.4", + "changes": [ + { + "note": "Add a `backend` parameter that allows you to specify the Ethereum library you use in your templates (`web3` or `ethers`). Ethers auto-converts small ints to numbers whereas Web3 doesn't. Defaults to `web3`", + "pr": "413" + }, + { + "note": "Add support for [tuple types](https://solidity.readthedocs.io/en/develop/abi-spec.html#handling-tuple-types)", + "pr": "413" + }, + { + "note": "Add `hasReturnValue` to context data", + "pr": "413" + } + ], + "timestamp": 1520118000, + "isPublished": true + }, + { + "version": "0.2.1", + "changes": [ + { + "note": "Fix publishing issue where .npmignore was not properly excluding undesired content", + "pr": "389" + } + ], + "timestamp": 1518130800, + "isPublished": true + }, + { + "version": "0.2.0", + "changes": [ + { + "note": "Added CLI options for explicit specifying location of partials and main template", + "pr": "346" + }, + { + "note": "Added CLI option to specify networkId, adding support for the JSON artifact format found in @0xproject/contracts", + "pr": "388" + } + ], + "timestamp": 1517958000, + "isPublished": true + }, + { + "version": "0.1.0", + "changes": [ + { + "note": "Fixed array typings with union types", + "pr": "295" + }, + { + "note": "Add event ABIs to context data passed to templates", + "pr": "302" + }, + { + "note": "Add constructor ABIs to context data passed to templates", + "pr": "304" + } + ], + "timestamp": 1515625200, + "isPublished": true + } +] \ No newline at end of file diff --git a/packages/assert/CHANGELOG.json b/packages/assert/CHANGELOG.json new file mode 100644 index 000000000..da9a8204e --- /dev/null +++ b/packages/assert/CHANGELOG.json @@ -0,0 +1,52 @@ +[ + { + "version": "0.2.0", + "changes": [ + { + "note": "Rename `isHttpUrl` to `isWebUri`", + "pr": "412" + } + ], + "timestamp": 1520463600, + "isPublished": true + }, + { + "version": "0.1.0", + "changes": [ + { + "note": "Remove isETHAddressHex checksum address check and assume address will be lowercased ", + "pr": "373" + }, + { + "note": "Add an optional parameter `subSchemas` to `doesConformToSchema` method", + "pr": "385" + } + ], + "timestamp": 1520118000, + "isPublished": true + }, + { + "version": "0.0.18", + "changes": [ + { + "note": "Fix publishing issue where .npmignore was not properly excluding undesired content", + "pr": "389" + } + ], + "timestamp": 1486594800, + "isPublished": true + }, + { + "version": "0.0.4", + "changes": [ + { + "note": "Re-publish Assert previously published under NPM package @0xproject/0x-assert" + }, + { + "note": "Added assertion isValidBaseUnitAmount which checks both that the value is a valid bigNumber and that it does not contain decimals." + } + ], + "timestamp": 1510614000, + "isPublished": true + } +] \ No newline at end of file diff --git a/packages/base-contract/CHANGELOG.json b/packages/base-contract/CHANGELOG.json new file mode 100644 index 000000000..cbdd45732 --- /dev/null +++ b/packages/base-contract/CHANGELOG.json @@ -0,0 +1,12 @@ +[ + { + "version": "0.0.2", + "changes": [ + { + "note": "Initial release" + } + ], + "timestamp": 1520118000, + "isPublished": true + } +] \ No newline at end of file diff --git a/packages/connect/CHANGELOG.json b/packages/connect/CHANGELOG.json new file mode 100644 index 000000000..e22b257e2 --- /dev/null +++ b/packages/connect/CHANGELOG.json @@ -0,0 +1,121 @@ +[ + { + "version": "0.6.4", + "changes": [ + { + "note": "Consolidate `Order`, `SignedOrder`, and `ECSignature` into the `@0xproject/types` package", + "pr": "456" + } + ], + "timestamp": 1521327600, + "isPublished": true + }, + { + "version": "0.6.2", + "changes": [ + { + "note": "Fix JSON parse empty response", + "pr": "407" + } + ], + "timestamp": 1518735600, + "isPublished": true + }, + { + "version": "0.6.0", + "changes": [ + { + "note": "Add pagination options to HttpClient methods", + "pr": "393" + }, + { + "note": "Add heartbeat configuration to WebSocketOrderbookChannel constructor", + "pr": "406" + } + ], + "timestamp": 1518735600, + "isPublished": true + }, + { + "version": "0.5.7", + "changes": [ + { + "note": "Fix publishing issue where .npmignore was not properly excluding undesired content", + "pr": "389" + } + ], + "timestamp": 1518130800, + "isPublished": true + }, + { + "version": "0.5.0", + "changes": [ + { + "note": "Sanitize api endpoint url and remove trailing slashes", + "pr": "318" + }, + { + "note": "Improve error message text in HttpClient", + "pr": "318" + }, + { + "note": "Stop appending '/v0' to api endpoint url in HttpClient", + "pr": "318" + } + ], + "timestamp": 1516143600, + "isPublished": true + }, + { + "version": "0.4.0", + "changes": [ + { + "note": "Prevent getFeesAsync method on HttpClient from mutating input", + "pr": "296" + } + ], + "timestamp": 1515625200, + "isPublished": true + }, + { + "version": "0.3.0", + "changes": [ + { + "note": "Expose WebSocketOrderbookChannel and associated types to public interface", + "pr": "251" + }, + { + "note": "Remove tokenA and tokenB fields from OrdersRequest", + "pr": "256" + } + ], + "timestamp": 1512687600, + "isPublished": true + }, + { + "version": "0.2.0", + "changes": [ + { + "note": "Add SignedOrder and TokenTradeInfo to the public interface" + }, + { + "note": "Add ECSignature and Order to the public interface" + }, + { + "note": "Remove dependency on 0x.js" + } + ], + "timestamp": 1511910000, + "isPublished": true + }, + { + "version": "0.1.0", + "changes": [ + { + "note": "Provide a HttpClient class for interacting with standard relayer api compliant HTTP urls" + } + ], + "timestamp": 1511305200, + "isPublished": true + } +] \ No newline at end of file diff --git a/packages/deployer/CHANGELOG.json b/packages/deployer/CHANGELOG.json new file mode 100644 index 000000000..b3cd53b7e --- /dev/null +++ b/packages/deployer/CHANGELOG.json @@ -0,0 +1,94 @@ +[ + { + "version": "0.3.1", + "changes": [ + { + "note": "Add TS types for `yargs`" + } + ], + "timestamp": 1521327600, + "isPublished": true + }, + { + "version": "0.3.0", + "changes": [ + { + "note": "Add support for Solidity 0.4.20 and 0.4.21" + }, + { + "note": "Replace `jsonrpcPort` config with `jsonrpcUrl`", + "pr": "426" + }, + { + "note": "Replace `jsonrpc-port` CLI option with `jsonrpc-url`", + "pr": "426" + }, + { + "note": "Export the `Compiler`", + "pr": "426" + }, + { + "note": "Load solc from remote source instead of having it locally", + "pr": "426" + }, + { + "note": "Add `bytecode`, `runtime_bytecode`, `source_map`, `source_map_runtime` and `sources` fields to artifacts", + "pr": "426" + }, + { + "note": "Remove 0x-specific `migrate` command", + "pr": "426" + }, + { + "note": "Allow deployer to accept a provider instead of port and host. This makes it possible to run it with in-process ganache-core", + "pr": "426" + }, + { + "note": "Consolidate all `console.log` calls into `logUtils` in the `@0xproject/utils` package", + "pr": "452" + }, + { + "note": "Add `#!/usr/bin/env node` pragma above `cli.ts` script to fix command-line error." + } + ], + "timestamp": 1521327600, + "isPublished": true + }, + { + "version": "0.2.0", + "changes": [ + { + "note": "Check dependencies when determining if contracts should be recompiled", + "pr": "408" + }, + { + "note": "Improve an error message for when deployer is supplied with an incorrect number of constructor arguments", + "pr": "419" + } + ], + "timestamp": 1520118000, + "isPublished": true + }, + { + "version": "0.1.0", + "changes": [ + { + "note": "Add the ability to pass in specific contracts to compile in CLI", + "pr": "400" + } + ], + "timestamp": 1518735600, + "isPublished": true + }, + { + "version": "0.0.8", + "changes": [ + { + "note": "Fix publishing issue where .npmignore was not properly excluding undesired content", + "pr": "389" + } + ], + "timestamp": 1518130800, + "isPublished": true + } +] \ No newline at end of file diff --git a/packages/dev-utils/CHANGELOG.json b/packages/dev-utils/CHANGELOG.json new file mode 100644 index 000000000..f59439f3d --- /dev/null +++ b/packages/dev-utils/CHANGELOG.json @@ -0,0 +1,67 @@ +[ + { + "version": "0.3.1", + "changes": [ + { + "note": "Reduce npm package size by adding an `.npmignore` file." + }, + { + "note": "Move `@0xproject/web3_wrapper` to dependencies from devDependencies." + } + ], + "timestamp": 1521327600, + "isPublished": true + }, + { + "version": "0.3.0", + "changes": [ + { + "note": "Add coverage subprovider if SOLIDITY_COVERAGE env variable is true", + "pr": "426" + }, + { + "note": "Refactor `BlockchainLifecycle` to work with in-process ganache", + "pr": "426" + }, + { + "note": "Remove `RPC` class and move it's logic to `Web3Wrapper`", + "pr": "426" + } + ], + "timestamp": 1521327600, + "isPublished": true + }, + { + "version": "0.2.0", + "changes": [ + { + "note": "Remove subproviders", + "pr": "392" + } + ], + "timestamp": 1518735600, + "isPublished": true + }, + { + "version": "0.0.12", + "changes": [ + { + "note": "Fix publishing issue where .npmignore was not properly excluding undesired content", + "pr": "389" + } + ], + "timestamp": 1518130800, + "isPublished": true + }, + { + "version": "0.0.11", + "changes": [ + { + "note": "Updated `types-ethereumjs-util` dev dependency", + "pr": "352" + } + ], + "timestamp": 1517958000, + "isPublished": true + } +] \ No newline at end of file diff --git a/packages/json-schemas/CHANGELOG.json b/packages/json-schemas/CHANGELOG.json new file mode 100644 index 000000000..3c78543e9 --- /dev/null +++ b/packages/json-schemas/CHANGELOG.json @@ -0,0 +1,34 @@ +[ + { + "version": "0.7.13", + "changes": [ + { + "note": " Fix publishing issue where .npmignore was not properly excluding undesired content", + "pr": "389" + } + ], + "timestamp": 1518130800, + "isPublished": true + }, + { + "version": "0.7.0", + "changes": [ + { + "note": "Rename `subscriptionOptsSchema` to `blockRangeSchema`", + "pr": "272" + } + ], + "timestamp": 1513724400, + "isPublished": true + }, + { + "version": "0.6.7", + "changes": [ + { + "note": "Re-publish JSON-schema previously published under NPM package 0x-json-schemas" + } + ], + "timestamp": 1510614000, + "isPublished": true + } +] \ No newline at end of file diff --git a/packages/monorepo-scripts/CHANGELOG.json b/packages/monorepo-scripts/CHANGELOG.json new file mode 100644 index 000000000..a8418d03f --- /dev/null +++ b/packages/monorepo-scripts/CHANGELOG.json @@ -0,0 +1,12 @@ +[ + { + "version": "0.1.13", + "changes": [ + { + "note": "Add postpublish utils" + } + ], + "timestamp": 1521327600, + "isPublished": true + } +] \ No newline at end of file diff --git a/packages/monorepo-scripts/package.json b/packages/monorepo-scripts/package.json index 5333e6cad..9dcb8ee14 100644 --- a/packages/monorepo-scripts/package.json +++ b/packages/monorepo-scripts/package.json @@ -7,6 +7,7 @@ "scripts": { "build:watch": "tsc -w", "deps_versions": "node ./lib/deps_versions.js", + "convert_changelogs": "yarn build; node ./lib/convert_changelogs.js", "lint": "tslint --project . 'src/**/*.ts'", "clean": "shx rm -rf lib", "build": "tsc" @@ -24,6 +25,7 @@ "devDependencies": { "@0xproject/tslint-config": "0.4.8", "@types/glob": "^5.0.33", + "@types/moment": "2.13.0", "@types/node": "^8.0.53", "@types/rimraf": "^2.0.2", "lerna-get-packages": "^1.0.0", @@ -37,6 +39,7 @@ "es6-promisify": "^5.0.0", "glob": "^7.1.2", "lodash": "^4.17.4", + "moment": "2.13.0", "promisify-child-process": "^1.0.5", "publish-release": "0xproject/publish-release", "rimraf": "^2.6.2", diff --git a/packages/monorepo-scripts/src/convert_changelogs.ts b/packages/monorepo-scripts/src/convert_changelogs.ts new file mode 100644 index 000000000..419f36ff4 --- /dev/null +++ b/packages/monorepo-scripts/src/convert_changelogs.ts @@ -0,0 +1,80 @@ +#!/usr/bin/env node + +import * as fs from 'fs'; +import lernaGetPackages = require('lerna-get-packages'); +import * as _ from 'lodash'; +import * as moment from 'moment'; +import * as path from 'path'; + +import { Changelog, Changes, UpdatedPackage } from './types'; +import { utils } from './utils'; + +const MONOREPO_ROOT_PATH = path.join(__dirname, '../../..'); + +(async () => { + const allLernaPackages = lernaGetPackages(MONOREPO_ROOT_PATH); + const publicLernaPackages = _.filter(allLernaPackages, pkg => !pkg.package.private); + _.each(publicLernaPackages, lernaPackage => { + const changelogMdIfExists = getChangelogMdIfExists(lernaPackage.package.name, lernaPackage.location); + if (_.isUndefined(changelogMdIfExists)) { + throw new Error(`${lernaPackage.package.name} should have CHANGELOG.md b/c it's public. Add one.`); + } + + const lines = (changelogMdIfExists as any).split('\n'); + const changelogs: Changelog[] = []; + let changelog: Changelog = { + version: '', + changes: [], + }; + for (const line of lines) { + if (_.startsWith(line, '## ')) { + const version = line.substr(4).split(' - ')[0]; + const dateStr = line.split('_')[1]; + let date; + if (!_.includes(dateStr, 'TBD')) { + date = moment(dateStr, 'MMMM D, YYYY'); + } + changelog = { + version, + changes: [], + }; + if (!_.isUndefined(date)) { + changelog.timestamp = date.unix(); + } + if (!_.includes(dateStr, 'TBD')) { + changelog.isPublished = true; + } + (changelogs as any).push(changelog); + } else if (_.includes(line, '* ')) { + const note = line.split('* ')[1].split(' (#')[0]; + const prChunk = line.split(' (#')[1]; + let pr; + if (!_.isUndefined(prChunk)) { + pr = prChunk.split(')')[0]; + } + const changes = { + note, + pr, + }; + changelog.changes.push(changes); + } + } + const changelogJson = JSON.stringify(changelogs, null, '\t'); + fs.writeFileSync(`${lernaPackage.location}/CHANGELOG.json`, changelogJson); + }); +})().catch(err => { + utils.log(err.stdout); + process.exit(1); +}); + +function getChangelogMdIfExists(packageName: string, location: string): string | undefined { + const changelogPath = path.join(location, 'CHANGELOG.md'); + let changelogMd: string; + try { + changelogMd = fs.readFileSync(changelogPath, 'utf-8'); + return changelogMd; + } catch (err) { + // If none exists, create new, empty one. + return undefined; + } +} diff --git a/packages/monorepo-scripts/src/types.ts b/packages/monorepo-scripts/src/types.ts new file mode 100644 index 000000000..045316ab5 --- /dev/null +++ b/packages/monorepo-scripts/src/types.ts @@ -0,0 +1,17 @@ +export interface UpdatedPackage { + name: string; + version: string; + private: boolean; +} + +export interface Changes { + note: string; + pr?: number; +} + +export interface Changelog { + timestamp?: number; + version: string; + changes: Changes[]; + isPublished?: boolean; +} diff --git a/packages/react-docs/CHANGELOG.json b/packages/react-docs/CHANGELOG.json new file mode 100644 index 000000000..9bd78e6df --- /dev/null +++ b/packages/react-docs/CHANGELOG.json @@ -0,0 +1,47 @@ +[ + { + "version": "0.0.4", + "changes": [ + { + "note": "Handle `reflection` type rendering so that anonymous function type declarations render properly", + "pr": "465" + }, + { + "note": "Rename `MethodSignature` to `Signature` and change it's props so that it can be used to render method and function signatures.", + "pr": "465" + }, + { + "note": "Rename `MethodBlock` to `SignatureBlock` since it is not used to render method and function signature blocks.", + "pr": "465" + }, + { + "note": "Add support for documenting exported functions.", + "pr": "465" + } + ] + }, + { + "version": "0.0.3", + "changes": [ + { + "note": "Move TS typings from devDependencies to dependencies since they are needed by the package user." + } + ], + "timestamp": 1521327600, + "isPublished": true + }, + { + "version": "0.0.2", + "changes": [ + { + "note": "Move example out into a separate sub-package" + }, + { + "note": "Consolidate all `console.log` calls into `logUtils` in the `@0xproject/utils` package", + "pr": "452" + } + ], + "timestamp": 1521327600, + "isPublished": true + } +] \ No newline at end of file diff --git a/packages/react-shared/CHANGELOG.json b/packages/react-shared/CHANGELOG.json new file mode 100644 index 000000000..9f16c6f21 --- /dev/null +++ b/packages/react-shared/CHANGELOG.json @@ -0,0 +1,14 @@ +[ + { + "version": "0.1.0", + "changes": [ + { + "note": "Added new colors", + "pr": "468" + }, + { + "note": "Fix section and menuItem text display to replace dashes with spaces." + } + ] + } +] \ No newline at end of file diff --git a/packages/sol-cov/CHANGELOG.json b/packages/sol-cov/CHANGELOG.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/packages/sol-cov/CHANGELOG.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/packages/sra-report/CHANGELOG.json b/packages/sra-report/CHANGELOG.json new file mode 100644 index 000000000..ee57bcad3 --- /dev/null +++ b/packages/sra-report/CHANGELOG.json @@ -0,0 +1,28 @@ +[ + { + "version": "0.0.3", + "changes": [ + { + "note": "Added postman collection unit tests", + "pr": "451" + } + ] + }, + { + "version": "0.0.2", + "changes": [ + { + "note": "Consolidate all `console.log` calls into `logUtils` in the `@0xproject/utils` package", + "pr": "452" + } + ], + "timestamp": 1521327600, + "isPublished": true + }, + { + "version": "0.0.1", + "changes": [], + "timestamp": 1520463600, + "isPublished": true + } +] \ No newline at end of file diff --git a/packages/subproviders/CHANGELOG.json b/packages/subproviders/CHANGELOG.json new file mode 100644 index 000000000..cfe44e266 --- /dev/null +++ b/packages/subproviders/CHANGELOG.json @@ -0,0 +1,132 @@ +[ + { + "version": "0.8.1", + "changes": [ + { + "note": "Introduce `JSONRPCRequestPayloadWithMethod` type", + "pr": "465" + }, + { + "note": "Export `ErrorCallback` type.", + "pr": "465" + } + ] + }, + { + "version": "0.8.0", + "changes": [ + { + "note": "Export `GanacheSubprovider` and `Subprovider`", + "pr": "426" + }, + { + "note": "Make all subproviders to derive from `Subprovider`", + "pr": "426" + }, + { + "note": "Add types for `NextCallback`, `OnNextCompleted`", + "pr": "426" + }, + { + "note": "Ignore `ganache-core` dependency when using package in a browser environment." + } + ], + "timestamp": 1521327600, + "isPublished": true + }, + { + "version": "0.7.0", + "changes": [ + { + "note": "Updated legerco packages. Removed node-hid package as a dependency and make it an optional dependency. It is still used in integration tests but is causing problems for users on Linux distros.", + "pr": "437" + } + ], + "timestamp": 1520463600, + "isPublished": true + }, + { + "version": "0.6.0", + "changes": [ + { + "note": "Move web3 types from being a devDep to a dep since one cannot use this package without it", + "pr": "429" + }, + { + "note": "Add `numberOfAccounts` param to `LedgerSubprovider` method `getAccountsAsync`", + "pr": "432" + } + ], + "timestamp": 1520118000, + "isPublished": true + }, + { + "version": "0.5.0", + "changes": [ + { + "note": "Add EmptyWalletSubprovider and FakeGasEstimateSubprovider", + "pr": "392" + } + ], + "timestamp": 1518735600, + "isPublished": true + }, + { + "version": "0.4.1", + "changes": [ + { + "note": "Fix publishing issue where .npmignore was not properly excluding undesired content", + "pr": "389" + } + ], + "timestamp": 1518130800, + "isPublished": true + }, + { + "version": "0.4.0", + "changes": [ + { + "note": "Added NonceTrackerSubprovider", + "pr": "355" + }, + { + "note": "InjectedWeb3Subprovider accepts a Provider in the constructor, previously it was a Web3 object", + "pr": "363" + } + ], + "timestamp": 1517958000, + "isPublished": true + }, + { + "version": "0.3.6", + "changes": [ + { + "note": "Return a transaction hash from `_sendTransactionAsync`", + "pr": "303" + } + ], + "timestamp": 1517094000, + "isPublished": true + }, + { + "version": "0.3.0", + "changes": [ + { + "note": "Allow LedgerSubprovider to handle `eth_sign` in addition to `personal_sign` RPC requests" + } + ], + "timestamp": 1514415600, + "isPublished": true + }, + { + "version": "0.2.0", + "changes": [ + { + "note": "Improve the performance of address fetching", + "pr": "271" + } + ], + "timestamp": 1513724400, + "isPublished": true + } +] \ No newline at end of file diff --git a/packages/tslint-config/CHANGELOG.json b/packages/tslint-config/CHANGELOG.json new file mode 100644 index 000000000..6270b9b9d --- /dev/null +++ b/packages/tslint-config/CHANGELOG.json @@ -0,0 +1,71 @@ +[ + { + "version": "0.4.9", + "changes": [ + { + "note": "Move devDeps to deps to fix missed dependency issue in published package." + } + ], + "timestamp": 1518130800, + "isPublished": true + }, + { + "version": "0.4.8", + "changes": [ + { + "note": "Fix publish issue where custom TSLint rules were not being included", + "pr": "389" + } + ], + "timestamp": 1518130800, + "isPublished": true + }, + { + "version": "0.4.7", + "changes": [ + { + "note": "Modified custom 'underscore-privates' rule, changing it to 'underscore-private-and-protected' requiring underscores to be prepended to both private and protected variable names", + "pr": "354" + } + ], + "timestamp": 1517958000, + "isPublished": true + }, + { + "version": "0.4.0", + "changes": [ + { + "note": "Added custom 'underscore-privates' rule, requiring underscores to be prepended to private variable names" + }, + { + "note": "Because our tools can be used in both a TS and JS environment, we want to make the private methods of any public facing interface show up at the bottom of auto-complete lists. Additionally, we wanted to remain consistent with respect to our usage of underscores in order to enforce this rule with a linter rule, rather then manual code reviews." + } + ], + "timestamp": 1514415600, + "isPublished": true + }, + { + "version": "0.3.0", + "changes": [ + { + "note": "Added rules for unused imports, variables and Async suffixes", + "pr": "265" + } + ], + "timestamp": 1513724400, + "isPublished": true + }, + { + "version": "0.1.0", + "changes": [ + { + "note": "Re-published TsLintConfig previously published under NPM package `tslint-config-0xproject`" + }, + { + "note": "Updated to TSLint v5.8.0, requiring several rule additions to keep our conventions aligned." + } + ], + "timestamp": 1510614000, + "isPublished": true + } +] \ No newline at end of file diff --git a/packages/types/CHANGELOG.json b/packages/types/CHANGELOG.json new file mode 100644 index 000000000..d3ab3dfd0 --- /dev/null +++ b/packages/types/CHANGELOG.json @@ -0,0 +1,68 @@ +[ + { + "version": "0.4.0", + "changes": [ + { + "note": "Remove `JSONRPCPayload`", + "pr": "426" + }, + { + "note": "Consolidate `Order`, `SignedOrder`, and `ECSignature` into the `@0xproject/types` package", + "pr": "456" + } + ], + "timestamp": 1521327600, + "isPublished": true + }, + { + "version": "0.3.1", + "changes": [ + { + "note": "Added `RawLogEntry` type." + } + ], + "timestamp": 1520463600, + "isPublished": true + }, + { + "version": "0.3.0", + "changes": [ + { + "note": "Add `data` to `TxData`", + "pr": "413" + }, + { + "note": "Add `number` as an option to `ContractEventArg`", + "pr": "413" + }, + { + "note": "Move web3 types from devDep to dep since required when using this package", + "pr": "429" + } + ], + "timestamp": 1520118000, + "isPublished": true + }, + { + "version": "0.2.1", + "changes": [ + { + "note": "Fix publishing issue where .npmignore was not properly excluding undesired content", + "pr": "389" + } + ], + "timestamp": 1518130800, + "isPublished": true + }, + { + "version": "0.2.0", + "changes": [ + { + "note": "Added BlockLiteralParam and BlockParam, refactored out of 0x.js types.", + "pr": "355" + } + ], + "timestamp": 1517958000, + "isPublished": true + } +] \ No newline at end of file diff --git a/packages/typescript-typings/CHANGELOG.json b/packages/typescript-typings/CHANGELOG.json new file mode 100644 index 000000000..e12b8fe19 --- /dev/null +++ b/packages/typescript-typings/CHANGELOG.json @@ -0,0 +1,6 @@ +[ + { + "version": "0.x.x", + "changes": [] + } +] \ No newline at end of file diff --git a/packages/utils/CHANGELOG.json b/packages/utils/CHANGELOG.json new file mode 100644 index 000000000..8dc1973be --- /dev/null +++ b/packages/utils/CHANGELOG.json @@ -0,0 +1,75 @@ +[ + { + "version": "0.4.3", + "changes": [ + { + "note": "Add `@types/node` to dependencies since `intervalUtils` has the `NodeJS` type as part of its public interface." + } + ], + "timestamp": 1521327600, + "isPublished": true + }, + { + "version": "0.4.2", + "changes": [ + { + "note": "Consolidate all `console.log` calls into `logUtils` in the `@0xproject/utils` package", + "pr": "452" + } + ], + "timestamp": 1521327600, + "isPublished": true + }, + { + "version": "0.4.0", + "changes": [ + { + "note": "Use `ethers-contracts` as a backend to decode event args", + "pr": "413" + }, + { + "note": "Move web3 types from devDep to dep since required when using this package", + "pr": "429" + } + ], + "timestamp": 1520118000, + "isPublished": true + }, + { + "version": "0.3.2", + "changes": [ + { + "note": "Fix publishing issue where .npmignore was not properly excluding undesired content", + "pr": "389" + } + ], + "timestamp": 1518130800, + "isPublished": true + }, + { + "version": "0.3.0", + "changes": [ + { + "note": "Fix a bug related to event signature collisions (argument indexes aren't included in event signatures) in the abi_decoder. The decoder used to throw on unknown events with identical signatures as a known event (except indexes).", + "pr": "366" + } + ], + "timestamp": 1517785200, + "isPublished": true + }, + { + "version": "0.2.0", + "changes": [ + { + "note": "Add `onError` parameter to `intervalUtils.setAsyncExcludingInterval`", + "pr": "312" + }, + { + "note": "Add `intervalUtils.setInterval`", + "pr": "312" + } + ], + "timestamp": 1516143600, + "isPublished": true + } +] \ No newline at end of file diff --git a/packages/web3-wrapper/CHANGELOG.json b/packages/web3-wrapper/CHANGELOG.json new file mode 100644 index 000000000..ca3df6d51 --- /dev/null +++ b/packages/web3-wrapper/CHANGELOG.json @@ -0,0 +1,64 @@ +[ + { + "version": "0.4.0", + "changes": [ + { + "note": "Rename `signTransactionAsync` to `signMessageAsync` for clarity", + "pr": "465" + } + ] + }, + { + "version": "0.3.0", + "changes": [ + { + "note": "Add `web3Wrapper.takeSnapshotAsync`, `web3Wrapper.revertSnapshotAsync`, `web3Wrapper.mineBlockAsync`, `web3Wrapper.increaseTimeAsync`", + "pr": "426" + }, + { + "note": "Add `web3Wrapper.isZeroExWeb3Wrapper` for runtime instanceOf checks", + "pr": "426" + }, + { + "note": "Add a `getProvider` method", + "pr": "444" + } + ], + "timestamp": 1521327600, + "isPublished": true + }, + { + "version": "0.2.0", + "changes": [ + { + "note": "Ensure all returned user addresses are lowercase", + "pr": "373" + }, + { + "note": "Add `web3Wrapper.callAsync`", + "pr": "413" + }, + { + "note": "Make `web3Wrapper.estimateGas` accept whole `txData` instead of `data`", + "pr": "413" + }, + { + "note": "Remove `web3Wrapper.getContractInstance`", + "pr": "413" + } + ], + "timestamp": 1520118000, + "isPublished": true + }, + { + "version": "0.1.12", + "changes": [ + { + "note": "Fix publishing issue where .npmignore was not properly excluding undesired content", + "pr": "389" + } + ], + "timestamp": 1518130800, + "isPublished": true + } +] \ No newline at end of file -- cgit From 397cd77ef91e88da4dd71908770659343f0b7c35 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 29 Mar 2018 15:02:46 +0200 Subject: Fix semver-sort version --- packages/monorepo-scripts/package.json | 2 +- yarn.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/monorepo-scripts/package.json b/packages/monorepo-scripts/package.json index 9dcb8ee14..4a2cf52e1 100644 --- a/packages/monorepo-scripts/package.json +++ b/packages/monorepo-scripts/package.json @@ -43,7 +43,7 @@ "promisify-child-process": "^1.0.5", "publish-release": "0xproject/publish-release", "rimraf": "^2.6.2", - "semver-sort": "^0.0.4" + "semver-sort": "0.0.4" }, "publishConfig": { "access": "public" diff --git a/yarn.lock b/yarn.lock index f3929e07e..9689f2b64 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10228,7 +10228,7 @@ semver-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-1.0.0.tgz#92a4969065f9c70c694753d55248fc68f8f652c9" -semver-sort@0.0.4, semver-sort@^0.0.4: +semver-sort@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/semver-sort/-/semver-sort-0.0.4.tgz#34fdbddc6a6b2b4161398c3c4dba56243bfeaa8b" dependencies: -- cgit From bd7b5c51b2be9140c9d5ba3ca208ba4231eca83c Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 29 Mar 2018 15:18:42 +0200 Subject: Add 0.x.x edgecase --- packages/monorepo-scripts/src/convert_changelogs.ts | 5 ++++- packages/monorepo-scripts/src/utils.ts | 9 +++++++++ packages/typescript-typings/CHANGELOG.json | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/monorepo-scripts/src/convert_changelogs.ts b/packages/monorepo-scripts/src/convert_changelogs.ts index 419f36ff4..76ce50ced 100644 --- a/packages/monorepo-scripts/src/convert_changelogs.ts +++ b/packages/monorepo-scripts/src/convert_changelogs.ts @@ -28,7 +28,10 @@ const MONOREPO_ROOT_PATH = path.join(__dirname, '../../..'); }; for (const line of lines) { if (_.startsWith(line, '## ')) { - const version = line.substr(4).split(' - ')[0]; + let version = line.substr(4).split(' - ')[0]; + if (version === '0.x.x') { + version = utils.getNextPatchVersion(lernaPackage.package.version); + } const dateStr = line.split('_')[1]; let date; if (!_.includes(dateStr, 'TBD')) { diff --git a/packages/monorepo-scripts/src/utils.ts b/packages/monorepo-scripts/src/utils.ts index 5423cabd9..73f6260d3 100644 --- a/packages/monorepo-scripts/src/utils.ts +++ b/packages/monorepo-scripts/src/utils.ts @@ -1,5 +1,14 @@ +import * as _ from 'lodash'; + export const utils = { log(...args: any[]): void { console.log(...args); // tslint:disable-line:no-console }, + getNextPatchVersion(currentVersion: string): string { + const versionSegments = currentVersion.split('.'); + const patch = _.parseInt(_.last(versionSegments) as string); + const newPatch = patch + 1; + const newPatchVersion = `${versionSegments[0]}.${versionSegments[1]}.${newPatch}`; + return newPatchVersion; + }, }; diff --git a/packages/typescript-typings/CHANGELOG.json b/packages/typescript-typings/CHANGELOG.json index e12b8fe19..1bb6b752c 100644 --- a/packages/typescript-typings/CHANGELOG.json +++ b/packages/typescript-typings/CHANGELOG.json @@ -1,6 +1,6 @@ [ { - "version": "0.x.x", + "version": "0.0.2", "changes": [] } ] \ No newline at end of file -- cgit From a6ae1efadb83366e6af89daa183adb51fdeea3b8 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 29 Mar 2018 15:26:47 +0200 Subject: Begin global pre-publishing script. Updates changelog.json files in packages to be published --- packages/monorepo-scripts/package.json | 1 + packages/monorepo-scripts/src/custom_prepublish.ts | 117 +++++++++++++++++++++ packages/monorepo-scripts/src/globals.d.ts | 1 + 3 files changed, 119 insertions(+) create mode 100644 packages/monorepo-scripts/src/custom_prepublish.ts diff --git a/packages/monorepo-scripts/package.json b/packages/monorepo-scripts/package.json index 4a2cf52e1..09b7a340d 100644 --- a/packages/monorepo-scripts/package.json +++ b/packages/monorepo-scripts/package.json @@ -7,6 +7,7 @@ "scripts": { "build:watch": "tsc -w", "deps_versions": "node ./lib/deps_versions.js", + "publish:prepublish": "yarn build; node ./lib/custom_prepublish.js", "convert_changelogs": "yarn build; node ./lib/convert_changelogs.js", "lint": "tslint --project . 'src/**/*.ts'", "clean": "shx rm -rf lib", diff --git a/packages/monorepo-scripts/src/custom_prepublish.ts b/packages/monorepo-scripts/src/custom_prepublish.ts new file mode 100644 index 000000000..7f0e186bd --- /dev/null +++ b/packages/monorepo-scripts/src/custom_prepublish.ts @@ -0,0 +1,117 @@ +#!/usr/bin/env node + +import * as fs from 'fs'; +import lernaGetPackages = require('lerna-get-packages'); +import * as _ from 'lodash'; +import * as moment from 'moment'; +import * as path from 'path'; +import { exec as execAsync } from 'promisify-child-process'; +import semverSort = require('semver-sort'); + +import { Changelog, Changes, UpdatedPackage } from './types'; +import { utils } from './utils'; + +const MONOREPO_ROOT_PATH = path.join(__dirname, '../../..'); +const TODAYS_TIMESTAMP = moment().unix(); + +(async () => { + const updatedPublicPackages = await getPublicLernaUpdatedPackagesAsync(); + const updatedPackageNames = _.map(updatedPublicPackages, pkg => pkg.name); + + const allLernaPackages = lernaGetPackages(MONOREPO_ROOT_PATH); + const relevantLernaPackages = _.filter(allLernaPackages, pkg => { + return _.includes(updatedPackageNames, pkg.package.name); + }); + _.each(relevantLernaPackages, lernaPackage => { + const changelogJSONPath = path.join(lernaPackage.location, 'CHANGELOG.json'); + const changelogJSON = getChangelogJSONOrCreateIfMissing(lernaPackage.package.name, changelogJSONPath); + let changelogs: Changelog[]; + try { + changelogs = JSON.parse(changelogJSON); + } catch (err) { + throw new Error( + `${lernaPackage.package.name}'s CHANGELOG.json contains invalid JSON. Please fix and try again.`, + ); + } + + const currentVersion = lernaPackage.package.version; + const shouldAddNewEntry = shouldAddNewChangelogEntry(changelogs); + if (shouldAddNewEntry) { + // Create a new entry for a patch version with generic changelog entry. + const nextPatchVersion = utils.getNextPatchVersion(currentVersion); + const newChangelogEntry: Changelog = { + timestamp: TODAYS_TIMESTAMP, + version: nextPatchVersion, + changes: [ + { + note: 'Dependencies updated', + }, + ], + }; + changelogs = [newChangelogEntry, ...changelogs]; + } else { + // Update existing entry with timestamp + const lastEntry = changelogs[0]; + if (_.isUndefined(lastEntry.timestamp)) { + lastEntry.timestamp = TODAYS_TIMESTAMP; + } + // Check version number is correct. + const proposedNextVersion = lastEntry.version; + lastEntry.version = updateVersionNumberIfNeeded(currentVersion, proposedNextVersion); + changelogs[0] = lastEntry; + } + + // Save updated CHANGELOG.json + fs.writeFileSync(changelogJSONPath, JSON.stringify(changelogs, null, '\t')); + // Generate updated CHANGELOG.md + const changelogMd = generateChangelogMd(changelogs); + }); +})().catch(err => { + utils.log(err); + process.exit(1); +}); + +async function getPublicLernaUpdatedPackagesAsync(): Promise { + const result = await execAsync(`./node_modules/lerna/bin/lerna.js updated --json`, { cwd: MONOREPO_ROOT_PATH }); + const updatedPackages = JSON.parse(result.stdout); + const updatedPublicPackages = _.filter(updatedPackages, updatedPackage => !updatedPackage.private); + return updatedPublicPackages; +} + +function updateVersionNumberIfNeeded(currentVersion: string, proposedNextVersion: string) { + console.log('currentVersion', currentVersion); + console.log('proposedNextVersion', proposedNextVersion); + if (proposedNextVersion === currentVersion) { + return utils.getNextPatchVersion(currentVersion); + } + const sortedVersions = semverSort.desc([proposedNextVersion, currentVersion]); + if (sortedVersions[0] !== proposedNextVersion) { + return utils.getNextPatchVersion(currentVersion); + } + return proposedNextVersion; +} + +function getChangelogJSONOrCreateIfMissing(packageName: string, changelogPath: string): string { + let changelogJSON: string; + try { + changelogJSON = fs.readFileSync(changelogPath, 'utf-8'); + return changelogJSON; + } catch (err) { + // If none exists, create new, empty one. + const emptyChangelogJSON = JSON.stringify([]); + fs.writeFileSync(changelogPath, emptyChangelogJSON); + return emptyChangelogJSON; + } +} + +function shouldAddNewChangelogEntry(changelogs: Changelog[]): boolean { + if (_.isEmpty(changelogs)) { + return true; + } + const lastEntry = changelogs[0]; + return !!lastEntry.isPublished; +} + +function generateChangelogMd(changelogs: Changelog[]): string { + return ''; +} diff --git a/packages/monorepo-scripts/src/globals.d.ts b/packages/monorepo-scripts/src/globals.d.ts index 1d49559f2..90adc0b78 100644 --- a/packages/monorepo-scripts/src/globals.d.ts +++ b/packages/monorepo-scripts/src/globals.d.ts @@ -11,6 +11,7 @@ declare interface LernaPackage { location: string; package: { private?: boolean; + version: string; name: string; main?: string; config?: { -- cgit From ac35d8127e1ee3dfaf8e1aa0e182279a9a58787e Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 29 Mar 2018 17:02:44 +0200 Subject: remove console.logs --- packages/monorepo-scripts/src/custom_prepublish.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/monorepo-scripts/src/custom_prepublish.ts b/packages/monorepo-scripts/src/custom_prepublish.ts index 7f0e186bd..90db51465 100644 --- a/packages/monorepo-scripts/src/custom_prepublish.ts +++ b/packages/monorepo-scripts/src/custom_prepublish.ts @@ -79,8 +79,6 @@ async function getPublicLernaUpdatedPackagesAsync(): Promise { } function updateVersionNumberIfNeeded(currentVersion: string, proposedNextVersion: string) { - console.log('currentVersion', currentVersion); - console.log('proposedNextVersion', proposedNextVersion); if (proposedNextVersion === currentVersion) { return utils.getNextPatchVersion(currentVersion); } -- cgit From 29aa09e448c7b379eeea680e2e7c89a4998b04b8 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 29 Mar 2018 17:41:39 +0200 Subject: Generate CHANGELOG.mds --- packages/monorepo-scripts/src/custom_prepublish.ts | 29 +++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/packages/monorepo-scripts/src/custom_prepublish.ts b/packages/monorepo-scripts/src/custom_prepublish.ts index 90db51465..b18389fcd 100644 --- a/packages/monorepo-scripts/src/custom_prepublish.ts +++ b/packages/monorepo-scripts/src/custom_prepublish.ts @@ -65,6 +65,8 @@ const TODAYS_TIMESTAMP = moment().unix(); fs.writeFileSync(changelogJSONPath, JSON.stringify(changelogs, null, '\t')); // Generate updated CHANGELOG.md const changelogMd = generateChangelogMd(changelogs); + const changelogMdPath = path.join(lernaPackage.location, 'CHANGELOG.md'); + fs.writeFileSync(changelogMdPath, changelogMd); }); })().catch(err => { utils.log(err); @@ -111,5 +113,30 @@ function shouldAddNewChangelogEntry(changelogs: Changelog[]): boolean { } function generateChangelogMd(changelogs: Changelog[]): string { - return ''; + let changelogMd = ` + +CHANGELOG + `; + + _.each(changelogs, changelog => { + const date = moment(changelog.timestamp, 'X').format('MMMM D, YYYY'); + const title = `\n## v${changelog.version} - _${date}_\n\n`; + changelogMd += title; + + let changes = ''; + _.each(changelog.changes, change => { + let line = ` * ${change.note}`; + if (!_.isUndefined(change.pr)) { + line += ` (#${change.pr})`; + } + line += '\n'; + changes += line; + }); + changelogMd += `${changes}`; + }); + + return changelogMd; } -- cgit From 37f210e9f023bf955fd9c48f86beacb7b868b20c Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 29 Mar 2018 17:46:43 +0200 Subject: Fix changelog.json --- packages/0x.js/CHANGELOG.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/0x.js/CHANGELOG.json b/packages/0x.js/CHANGELOG.json index 6c7ec8651..3f518aa72 100644 --- a/packages/0x.js/CHANGELOG.json +++ b/packages/0x.js/CHANGELOG.json @@ -116,7 +116,8 @@ "version": "0.31.0", "changes": [ { - "note": "Add the `shouldAddPersonalMessagePrefix` parameter to `signOrderHashAsync` so that the" + "note": "Add the `shouldAddPersonalMessagePrefix` parameter to `signOrderHashAsync` so that the caller can decide on whether to add the personalMessage prefix before relaying the request to the signer. Parity Signer, Ledger and TestRPC add the prefix themselves, Metamask expects it to have already been added.", + "pr": "349" } ], "timestamp": 1517266800, -- cgit From cc4ff568a9ad976efe28af1eeb0737e9d09ed0fe Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 29 Mar 2018 20:02:43 +0200 Subject: Improve README --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3a873fa46..8ab4bbbdf 100644 --- a/README.md +++ b/README.md @@ -87,13 +87,17 @@ yarn install ### Build -Build all packages +Build all packages. You need to do this before working on any given package. Although these packages +as independent, when run from within the monorepo, they are internally symlinked, to make development +easier. You can change several packages and run the changes without publishing them first to NPM. When +running `rebuild`, Lerna will figure out the dependency order of all the packages, and built them in +this order. ```bash -yarn lerna:run build +yarn lerna:rebuild ``` -Continuously rebuild on exchange +Continuously rebuild on change ```bash yarn dev -- cgit From 84b820abc62c0aabea974ab8ed22f3ada05240fb Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 29 Mar 2018 20:03:11 +0200 Subject: Show semver diff --- packages/monorepo-scripts/src/custom_prepublish.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/monorepo-scripts/src/custom_prepublish.ts b/packages/monorepo-scripts/src/custom_prepublish.ts index b18389fcd..98ed3e8d3 100644 --- a/packages/monorepo-scripts/src/custom_prepublish.ts +++ b/packages/monorepo-scripts/src/custom_prepublish.ts @@ -6,6 +6,7 @@ import * as _ from 'lodash'; import * as moment from 'moment'; import * as path from 'path'; import { exec as execAsync } from 'promisify-child-process'; +import semverDiff = require('semver-diff'); import semverSort = require('semver-sort'); import { Changelog, Changes, UpdatedPackage } from './types'; @@ -22,7 +23,9 @@ const TODAYS_TIMESTAMP = moment().unix(); const relevantLernaPackages = _.filter(allLernaPackages, pkg => { return _.includes(updatedPackageNames, pkg.package.name); }); + const packageToVersionChange: { [name: string]: string } = {}; _.each(relevantLernaPackages, lernaPackage => { + const packageName = lernaPackage.package.name; const changelogJSONPath = path.join(lernaPackage.location, 'CHANGELOG.json'); const changelogJSON = getChangelogJSONOrCreateIfMissing(lernaPackage.package.name, changelogJSONPath); let changelogs: Changelog[]; @@ -49,6 +52,7 @@ const TODAYS_TIMESTAMP = moment().unix(); ], }; changelogs = [newChangelogEntry, ...changelogs]; + packageToVersionChange[packageName] = semverDiff(currentVersion, nextPatchVersion); } else { // Update existing entry with timestamp const lastEntry = changelogs[0]; @@ -59,6 +63,7 @@ const TODAYS_TIMESTAMP = moment().unix(); const proposedNextVersion = lastEntry.version; lastEntry.version = updateVersionNumberIfNeeded(currentVersion, proposedNextVersion); changelogs[0] = lastEntry; + packageToVersionChange[packageName] = semverDiff(currentVersion, lastEntry.version); } // Save updated CHANGELOG.json @@ -68,6 +73,11 @@ const TODAYS_TIMESTAMP = moment().unix(); const changelogMdPath = path.join(lernaPackage.location, 'CHANGELOG.md'); fs.writeFileSync(changelogMdPath, changelogMd); }); + utils.log(`All CHANGELOGS successfully updated. Please commit and push these changes to development.`); + utils.log(`New package versions are:`); + _.each(packageToVersionChange, (versionChange: string, pkgName: string) => { + utils.log(`${pkgName}: ${versionChange}`); + }); })().catch(err => { utils.log(err); process.exit(1); -- cgit From c9df3887316bdc0f7b19c87df21d566047445728 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 30 Mar 2018 12:28:48 +0200 Subject: Add committing and pushing CHANGELOG changes to Github --- packages/monorepo-scripts/package.json | 1 + packages/monorepo-scripts/src/custom_prepublish.ts | 19 +++++++++++++------ packages/monorepo-scripts/src/globals.d.ts | 1 + 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/packages/monorepo-scripts/package.json b/packages/monorepo-scripts/package.json index 09b7a340d..e8c7974e3 100644 --- a/packages/monorepo-scripts/package.json +++ b/packages/monorepo-scripts/package.json @@ -44,6 +44,7 @@ "promisify-child-process": "^1.0.5", "publish-release": "0xproject/publish-release", "rimraf": "^2.6.2", + "semver-diff": "^2.1.0", "semver-sort": "0.0.4" }, "publishConfig": { diff --git a/packages/monorepo-scripts/src/custom_prepublish.ts b/packages/monorepo-scripts/src/custom_prepublish.ts index 98ed3e8d3..2e6b78a71 100644 --- a/packages/monorepo-scripts/src/custom_prepublish.ts +++ b/packages/monorepo-scripts/src/custom_prepublish.ts @@ -12,8 +12,10 @@ import semverSort = require('semver-sort'); import { Changelog, Changes, UpdatedPackage } from './types'; import { utils } from './utils'; +const IS_DRY_RUN = true; const MONOREPO_ROOT_PATH = path.join(__dirname, '../../..'); const TODAYS_TIMESTAMP = moment().unix(); +const LERNA_EXECUTABLE = './node_modules/lerna/bin/lerna.js'; (async () => { const updatedPublicPackages = await getPublicLernaUpdatedPackagesAsync(); @@ -73,18 +75,23 @@ const TODAYS_TIMESTAMP = moment().unix(); const changelogMdPath = path.join(lernaPackage.location, 'CHANGELOG.md'); fs.writeFileSync(changelogMdPath, changelogMd); }); - utils.log(`All CHANGELOGS successfully updated. Please commit and push these changes to development.`); - utils.log(`New package versions are:`); - _.each(packageToVersionChange, (versionChange: string, pkgName: string) => { - utils.log(`${pkgName}: ${versionChange}`); - }); + + if (!IS_DRY_RUN) { + await execAsync(`git add . --all`, { cwd: MONOREPO_ROOT_PATH }); + await execAsync(`git commit -m "Updated CHANGELOGS"`, { cwd: MONOREPO_ROOT_PATH }); + await execAsync(`git push`, { cwd: MONOREPO_ROOT_PATH }); + } + + // _.each(packageToVersionChange, (versionChange: string, pkgName: string) => { + // utils.log(`${pkgName}: ${versionChange}`); + // }); })().catch(err => { utils.log(err); process.exit(1); }); async function getPublicLernaUpdatedPackagesAsync(): Promise { - const result = await execAsync(`./node_modules/lerna/bin/lerna.js updated --json`, { cwd: MONOREPO_ROOT_PATH }); + const result = await execAsync(`${LERNA_EXECUTABLE} updated --json`, { cwd: MONOREPO_ROOT_PATH }); const updatedPackages = JSON.parse(result.stdout); const updatedPublicPackages = _.filter(updatedPackages, updatedPackage => !updatedPackage.private); return updatedPublicPackages; diff --git a/packages/monorepo-scripts/src/globals.d.ts b/packages/monorepo-scripts/src/globals.d.ts index 90adc0b78..c5898d0f5 100644 --- a/packages/monorepo-scripts/src/globals.d.ts +++ b/packages/monorepo-scripts/src/globals.d.ts @@ -1,6 +1,7 @@ declare module 'async-child-process'; declare module 'publish-release'; declare module 'es6-promisify'; +declare module 'semver-diff'; // semver-sort declarations declare module 'semver-sort' { -- cgit From ef4919217079dae761db9394527172ed06c1d030 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 30 Mar 2018 12:43:03 +0200 Subject: Add check that timestamp has been set before generating MD version --- packages/monorepo-scripts/src/custom_prepublish.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/monorepo-scripts/src/custom_prepublish.ts b/packages/monorepo-scripts/src/custom_prepublish.ts index 2e6b78a71..f49b67142 100644 --- a/packages/monorepo-scripts/src/custom_prepublish.ts +++ b/packages/monorepo-scripts/src/custom_prepublish.ts @@ -139,7 +139,12 @@ CHANGELOG `; _.each(changelogs, changelog => { - const date = moment(changelog.timestamp, 'X').format('MMMM D, YYYY'); + if (_.isUndefined(changelog.timestamp)) { + throw new Error( + 'All CHANGELOG.json entries must be updated to include a timestamp before generating their MD version', + ); + } + const date = moment(`${changelog.timestamp}`, 'X').format('MMMM D, YYYY'); const title = `\n## v${changelog.version} - _${date}_\n\n`; changelogMd += title; -- cgit From 52243373233b90344c5cb791bc8999e5fbbc0859 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 30 Mar 2018 14:29:07 +0200 Subject: Call `lerna publish` and supply it with new package versions --- packages/monorepo-scripts/src/custom_prepublish.ts | 43 +++++++++++++++++++--- packages/monorepo-scripts/src/types.ts | 7 ++++ 2 files changed, 45 insertions(+), 5 deletions(-) diff --git a/packages/monorepo-scripts/src/custom_prepublish.ts b/packages/monorepo-scripts/src/custom_prepublish.ts index f49b67142..4265ee9e2 100644 --- a/packages/monorepo-scripts/src/custom_prepublish.ts +++ b/packages/monorepo-scripts/src/custom_prepublish.ts @@ -5,17 +5,22 @@ import lernaGetPackages = require('lerna-get-packages'); import * as _ from 'lodash'; import * as moment from 'moment'; import * as path from 'path'; -import { exec as execAsync } from 'promisify-child-process'; +import { exec as execAsync, spawn } from 'promisify-child-process'; import semverDiff = require('semver-diff'); import semverSort = require('semver-sort'); -import { Changelog, Changes, UpdatedPackage } from './types'; +import { Changelog, Changes, SemVerIndex, UpdatedPackage } from './types'; import { utils } from './utils'; const IS_DRY_RUN = true; const MONOREPO_ROOT_PATH = path.join(__dirname, '../../..'); const TODAYS_TIMESTAMP = moment().unix(); const LERNA_EXECUTABLE = './node_modules/lerna/bin/lerna.js'; +const semverNameToIndex: { [semver: string]: number } = { + patch: SemVerIndex.Patch, + minor: SemVerIndex.Minor, + major: SemVerIndex.Major, +}; (async () => { const updatedPublicPackages = await getPublicLernaUpdatedPackagesAsync(); @@ -25,6 +30,9 @@ const LERNA_EXECUTABLE = './node_modules/lerna/bin/lerna.js'; const relevantLernaPackages = _.filter(allLernaPackages, pkg => { return _.includes(updatedPackageNames, pkg.package.name); }); + const relevantPackageNames = _.map(relevantLernaPackages, pkg => pkg.package.name); + utils.log(`Will update CHANGELOGs and publish: \n${relevantPackageNames.join('\n')}\n`); + const packageToVersionChange: { [name: string]: string } = {}; _.each(relevantLernaPackages, lernaPackage => { const packageName = lernaPackage.package.name; @@ -70,26 +78,51 @@ const LERNA_EXECUTABLE = './node_modules/lerna/bin/lerna.js'; // Save updated CHANGELOG.json fs.writeFileSync(changelogJSONPath, JSON.stringify(changelogs, null, '\t')); + utils.log(`${packageName}: Updated CHANGELOG.json`); // Generate updated CHANGELOG.md const changelogMd = generateChangelogMd(changelogs); const changelogMdPath = path.join(lernaPackage.location, 'CHANGELOG.md'); fs.writeFileSync(changelogMdPath, changelogMd); + utils.log(`${packageName}: Updated CHANGELOG.md`); }); if (!IS_DRY_RUN) { await execAsync(`git add . --all`, { cwd: MONOREPO_ROOT_PATH }); await execAsync(`git commit -m "Updated CHANGELOGS"`, { cwd: MONOREPO_ROOT_PATH }); await execAsync(`git push`, { cwd: MONOREPO_ROOT_PATH }); + utils.log(`Pushed CHANGELOG updates to Github`); } - // _.each(packageToVersionChange, (versionChange: string, pkgName: string) => { - // utils.log(`${pkgName}: ${versionChange}`); - // }); + await lernaPublishAsync(packageToVersionChange); })().catch(err => { utils.log(err); process.exit(1); }); +async function lernaPublishAsync(packageToVersionChange: { [name: string]: string }) { + // HACK: Lerna publish does not provide a way to specify multiple package versions as + // flags so instead we need to interact with their interactive prompt interface. + const child = spawn('lerna', ['publish'], { cwd: MONOREPO_ROOT_PATH }); + child.stdout.on('data', (data: Buffer) => { + const output = data.toString('utf8'); + const isVersionPrompt = _.includes(output, 'Select a new version'); + if (isVersionPrompt) { + const outputStripLeft = output.split('new version for ')[1]; + const packageName = outputStripLeft.split(' ')[0]; + let versionChange = packageToVersionChange[packageName]; + const isPrivatePackage = _.isUndefined(versionChange); + if (isPrivatePackage) { + versionChange = 'patch'; // Always patch updates to private packages. + } + child.stdin.write(`${semverNameToIndex[versionChange]}\n`); + } + const isFinalPrompt = _.includes(output, 'Are you sure you want to publish the above changes?'); + if (isFinalPrompt && !IS_DRY_RUN) { + child.stdin.write(`y\n`); + } + }); +} + async function getPublicLernaUpdatedPackagesAsync(): Promise { const result = await execAsync(`${LERNA_EXECUTABLE} updated --json`, { cwd: MONOREPO_ROOT_PATH }); const updatedPackages = JSON.parse(result.stdout); diff --git a/packages/monorepo-scripts/src/types.ts b/packages/monorepo-scripts/src/types.ts index 045316ab5..7adec202f 100644 --- a/packages/monorepo-scripts/src/types.ts +++ b/packages/monorepo-scripts/src/types.ts @@ -15,3 +15,10 @@ export interface Changelog { changes: Changes[]; isPublished?: boolean; } + +export enum SemVerIndex { + Invalid, + Patch, + Minor, + Major, +} -- cgit From d502f793032d71156739b07b8d322a058c4aba62 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 30 Mar 2018 14:29:30 +0200 Subject: Rename prepublish to publish now that it goes straight to actually publishing the packages --- packages/monorepo-scripts/package.json | 2 +- packages/monorepo-scripts/src/custom_prepublish.ts | 197 --------------------- packages/monorepo-scripts/src/publish.ts | 197 +++++++++++++++++++++ 3 files changed, 198 insertions(+), 198 deletions(-) delete mode 100644 packages/monorepo-scripts/src/custom_prepublish.ts create mode 100644 packages/monorepo-scripts/src/publish.ts diff --git a/packages/monorepo-scripts/package.json b/packages/monorepo-scripts/package.json index e8c7974e3..7c87199fc 100644 --- a/packages/monorepo-scripts/package.json +++ b/packages/monorepo-scripts/package.json @@ -7,7 +7,7 @@ "scripts": { "build:watch": "tsc -w", "deps_versions": "node ./lib/deps_versions.js", - "publish:prepublish": "yarn build; node ./lib/custom_prepublish.js", + "publish": "yarn build; node ./lib/publish.js", "convert_changelogs": "yarn build; node ./lib/convert_changelogs.js", "lint": "tslint --project . 'src/**/*.ts'", "clean": "shx rm -rf lib", diff --git a/packages/monorepo-scripts/src/custom_prepublish.ts b/packages/monorepo-scripts/src/custom_prepublish.ts deleted file mode 100644 index 4265ee9e2..000000000 --- a/packages/monorepo-scripts/src/custom_prepublish.ts +++ /dev/null @@ -1,197 +0,0 @@ -#!/usr/bin/env node - -import * as fs from 'fs'; -import lernaGetPackages = require('lerna-get-packages'); -import * as _ from 'lodash'; -import * as moment from 'moment'; -import * as path from 'path'; -import { exec as execAsync, spawn } from 'promisify-child-process'; -import semverDiff = require('semver-diff'); -import semverSort = require('semver-sort'); - -import { Changelog, Changes, SemVerIndex, UpdatedPackage } from './types'; -import { utils } from './utils'; - -const IS_DRY_RUN = true; -const MONOREPO_ROOT_PATH = path.join(__dirname, '../../..'); -const TODAYS_TIMESTAMP = moment().unix(); -const LERNA_EXECUTABLE = './node_modules/lerna/bin/lerna.js'; -const semverNameToIndex: { [semver: string]: number } = { - patch: SemVerIndex.Patch, - minor: SemVerIndex.Minor, - major: SemVerIndex.Major, -}; - -(async () => { - const updatedPublicPackages = await getPublicLernaUpdatedPackagesAsync(); - const updatedPackageNames = _.map(updatedPublicPackages, pkg => pkg.name); - - const allLernaPackages = lernaGetPackages(MONOREPO_ROOT_PATH); - const relevantLernaPackages = _.filter(allLernaPackages, pkg => { - return _.includes(updatedPackageNames, pkg.package.name); - }); - const relevantPackageNames = _.map(relevantLernaPackages, pkg => pkg.package.name); - utils.log(`Will update CHANGELOGs and publish: \n${relevantPackageNames.join('\n')}\n`); - - const packageToVersionChange: { [name: string]: string } = {}; - _.each(relevantLernaPackages, lernaPackage => { - const packageName = lernaPackage.package.name; - const changelogJSONPath = path.join(lernaPackage.location, 'CHANGELOG.json'); - const changelogJSON = getChangelogJSONOrCreateIfMissing(lernaPackage.package.name, changelogJSONPath); - let changelogs: Changelog[]; - try { - changelogs = JSON.parse(changelogJSON); - } catch (err) { - throw new Error( - `${lernaPackage.package.name}'s CHANGELOG.json contains invalid JSON. Please fix and try again.`, - ); - } - - const currentVersion = lernaPackage.package.version; - const shouldAddNewEntry = shouldAddNewChangelogEntry(changelogs); - if (shouldAddNewEntry) { - // Create a new entry for a patch version with generic changelog entry. - const nextPatchVersion = utils.getNextPatchVersion(currentVersion); - const newChangelogEntry: Changelog = { - timestamp: TODAYS_TIMESTAMP, - version: nextPatchVersion, - changes: [ - { - note: 'Dependencies updated', - }, - ], - }; - changelogs = [newChangelogEntry, ...changelogs]; - packageToVersionChange[packageName] = semverDiff(currentVersion, nextPatchVersion); - } else { - // Update existing entry with timestamp - const lastEntry = changelogs[0]; - if (_.isUndefined(lastEntry.timestamp)) { - lastEntry.timestamp = TODAYS_TIMESTAMP; - } - // Check version number is correct. - const proposedNextVersion = lastEntry.version; - lastEntry.version = updateVersionNumberIfNeeded(currentVersion, proposedNextVersion); - changelogs[0] = lastEntry; - packageToVersionChange[packageName] = semverDiff(currentVersion, lastEntry.version); - } - - // Save updated CHANGELOG.json - fs.writeFileSync(changelogJSONPath, JSON.stringify(changelogs, null, '\t')); - utils.log(`${packageName}: Updated CHANGELOG.json`); - // Generate updated CHANGELOG.md - const changelogMd = generateChangelogMd(changelogs); - const changelogMdPath = path.join(lernaPackage.location, 'CHANGELOG.md'); - fs.writeFileSync(changelogMdPath, changelogMd); - utils.log(`${packageName}: Updated CHANGELOG.md`); - }); - - if (!IS_DRY_RUN) { - await execAsync(`git add . --all`, { cwd: MONOREPO_ROOT_PATH }); - await execAsync(`git commit -m "Updated CHANGELOGS"`, { cwd: MONOREPO_ROOT_PATH }); - await execAsync(`git push`, { cwd: MONOREPO_ROOT_PATH }); - utils.log(`Pushed CHANGELOG updates to Github`); - } - - await lernaPublishAsync(packageToVersionChange); -})().catch(err => { - utils.log(err); - process.exit(1); -}); - -async function lernaPublishAsync(packageToVersionChange: { [name: string]: string }) { - // HACK: Lerna publish does not provide a way to specify multiple package versions as - // flags so instead we need to interact with their interactive prompt interface. - const child = spawn('lerna', ['publish'], { cwd: MONOREPO_ROOT_PATH }); - child.stdout.on('data', (data: Buffer) => { - const output = data.toString('utf8'); - const isVersionPrompt = _.includes(output, 'Select a new version'); - if (isVersionPrompt) { - const outputStripLeft = output.split('new version for ')[1]; - const packageName = outputStripLeft.split(' ')[0]; - let versionChange = packageToVersionChange[packageName]; - const isPrivatePackage = _.isUndefined(versionChange); - if (isPrivatePackage) { - versionChange = 'patch'; // Always patch updates to private packages. - } - child.stdin.write(`${semverNameToIndex[versionChange]}\n`); - } - const isFinalPrompt = _.includes(output, 'Are you sure you want to publish the above changes?'); - if (isFinalPrompt && !IS_DRY_RUN) { - child.stdin.write(`y\n`); - } - }); -} - -async function getPublicLernaUpdatedPackagesAsync(): Promise { - const result = await execAsync(`${LERNA_EXECUTABLE} updated --json`, { cwd: MONOREPO_ROOT_PATH }); - const updatedPackages = JSON.parse(result.stdout); - const updatedPublicPackages = _.filter(updatedPackages, updatedPackage => !updatedPackage.private); - return updatedPublicPackages; -} - -function updateVersionNumberIfNeeded(currentVersion: string, proposedNextVersion: string) { - if (proposedNextVersion === currentVersion) { - return utils.getNextPatchVersion(currentVersion); - } - const sortedVersions = semverSort.desc([proposedNextVersion, currentVersion]); - if (sortedVersions[0] !== proposedNextVersion) { - return utils.getNextPatchVersion(currentVersion); - } - return proposedNextVersion; -} - -function getChangelogJSONOrCreateIfMissing(packageName: string, changelogPath: string): string { - let changelogJSON: string; - try { - changelogJSON = fs.readFileSync(changelogPath, 'utf-8'); - return changelogJSON; - } catch (err) { - // If none exists, create new, empty one. - const emptyChangelogJSON = JSON.stringify([]); - fs.writeFileSync(changelogPath, emptyChangelogJSON); - return emptyChangelogJSON; - } -} - -function shouldAddNewChangelogEntry(changelogs: Changelog[]): boolean { - if (_.isEmpty(changelogs)) { - return true; - } - const lastEntry = changelogs[0]; - return !!lastEntry.isPublished; -} - -function generateChangelogMd(changelogs: Changelog[]): string { - let changelogMd = ` - -CHANGELOG - `; - - _.each(changelogs, changelog => { - if (_.isUndefined(changelog.timestamp)) { - throw new Error( - 'All CHANGELOG.json entries must be updated to include a timestamp before generating their MD version', - ); - } - const date = moment(`${changelog.timestamp}`, 'X').format('MMMM D, YYYY'); - const title = `\n## v${changelog.version} - _${date}_\n\n`; - changelogMd += title; - - let changes = ''; - _.each(changelog.changes, change => { - let line = ` * ${change.note}`; - if (!_.isUndefined(change.pr)) { - line += ` (#${change.pr})`; - } - line += '\n'; - changes += line; - }); - changelogMd += `${changes}`; - }); - - return changelogMd; -} diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts new file mode 100644 index 000000000..4265ee9e2 --- /dev/null +++ b/packages/monorepo-scripts/src/publish.ts @@ -0,0 +1,197 @@ +#!/usr/bin/env node + +import * as fs from 'fs'; +import lernaGetPackages = require('lerna-get-packages'); +import * as _ from 'lodash'; +import * as moment from 'moment'; +import * as path from 'path'; +import { exec as execAsync, spawn } from 'promisify-child-process'; +import semverDiff = require('semver-diff'); +import semverSort = require('semver-sort'); + +import { Changelog, Changes, SemVerIndex, UpdatedPackage } from './types'; +import { utils } from './utils'; + +const IS_DRY_RUN = true; +const MONOREPO_ROOT_PATH = path.join(__dirname, '../../..'); +const TODAYS_TIMESTAMP = moment().unix(); +const LERNA_EXECUTABLE = './node_modules/lerna/bin/lerna.js'; +const semverNameToIndex: { [semver: string]: number } = { + patch: SemVerIndex.Patch, + minor: SemVerIndex.Minor, + major: SemVerIndex.Major, +}; + +(async () => { + const updatedPublicPackages = await getPublicLernaUpdatedPackagesAsync(); + const updatedPackageNames = _.map(updatedPublicPackages, pkg => pkg.name); + + const allLernaPackages = lernaGetPackages(MONOREPO_ROOT_PATH); + const relevantLernaPackages = _.filter(allLernaPackages, pkg => { + return _.includes(updatedPackageNames, pkg.package.name); + }); + const relevantPackageNames = _.map(relevantLernaPackages, pkg => pkg.package.name); + utils.log(`Will update CHANGELOGs and publish: \n${relevantPackageNames.join('\n')}\n`); + + const packageToVersionChange: { [name: string]: string } = {}; + _.each(relevantLernaPackages, lernaPackage => { + const packageName = lernaPackage.package.name; + const changelogJSONPath = path.join(lernaPackage.location, 'CHANGELOG.json'); + const changelogJSON = getChangelogJSONOrCreateIfMissing(lernaPackage.package.name, changelogJSONPath); + let changelogs: Changelog[]; + try { + changelogs = JSON.parse(changelogJSON); + } catch (err) { + throw new Error( + `${lernaPackage.package.name}'s CHANGELOG.json contains invalid JSON. Please fix and try again.`, + ); + } + + const currentVersion = lernaPackage.package.version; + const shouldAddNewEntry = shouldAddNewChangelogEntry(changelogs); + if (shouldAddNewEntry) { + // Create a new entry for a patch version with generic changelog entry. + const nextPatchVersion = utils.getNextPatchVersion(currentVersion); + const newChangelogEntry: Changelog = { + timestamp: TODAYS_TIMESTAMP, + version: nextPatchVersion, + changes: [ + { + note: 'Dependencies updated', + }, + ], + }; + changelogs = [newChangelogEntry, ...changelogs]; + packageToVersionChange[packageName] = semverDiff(currentVersion, nextPatchVersion); + } else { + // Update existing entry with timestamp + const lastEntry = changelogs[0]; + if (_.isUndefined(lastEntry.timestamp)) { + lastEntry.timestamp = TODAYS_TIMESTAMP; + } + // Check version number is correct. + const proposedNextVersion = lastEntry.version; + lastEntry.version = updateVersionNumberIfNeeded(currentVersion, proposedNextVersion); + changelogs[0] = lastEntry; + packageToVersionChange[packageName] = semverDiff(currentVersion, lastEntry.version); + } + + // Save updated CHANGELOG.json + fs.writeFileSync(changelogJSONPath, JSON.stringify(changelogs, null, '\t')); + utils.log(`${packageName}: Updated CHANGELOG.json`); + // Generate updated CHANGELOG.md + const changelogMd = generateChangelogMd(changelogs); + const changelogMdPath = path.join(lernaPackage.location, 'CHANGELOG.md'); + fs.writeFileSync(changelogMdPath, changelogMd); + utils.log(`${packageName}: Updated CHANGELOG.md`); + }); + + if (!IS_DRY_RUN) { + await execAsync(`git add . --all`, { cwd: MONOREPO_ROOT_PATH }); + await execAsync(`git commit -m "Updated CHANGELOGS"`, { cwd: MONOREPO_ROOT_PATH }); + await execAsync(`git push`, { cwd: MONOREPO_ROOT_PATH }); + utils.log(`Pushed CHANGELOG updates to Github`); + } + + await lernaPublishAsync(packageToVersionChange); +})().catch(err => { + utils.log(err); + process.exit(1); +}); + +async function lernaPublishAsync(packageToVersionChange: { [name: string]: string }) { + // HACK: Lerna publish does not provide a way to specify multiple package versions as + // flags so instead we need to interact with their interactive prompt interface. + const child = spawn('lerna', ['publish'], { cwd: MONOREPO_ROOT_PATH }); + child.stdout.on('data', (data: Buffer) => { + const output = data.toString('utf8'); + const isVersionPrompt = _.includes(output, 'Select a new version'); + if (isVersionPrompt) { + const outputStripLeft = output.split('new version for ')[1]; + const packageName = outputStripLeft.split(' ')[0]; + let versionChange = packageToVersionChange[packageName]; + const isPrivatePackage = _.isUndefined(versionChange); + if (isPrivatePackage) { + versionChange = 'patch'; // Always patch updates to private packages. + } + child.stdin.write(`${semverNameToIndex[versionChange]}\n`); + } + const isFinalPrompt = _.includes(output, 'Are you sure you want to publish the above changes?'); + if (isFinalPrompt && !IS_DRY_RUN) { + child.stdin.write(`y\n`); + } + }); +} + +async function getPublicLernaUpdatedPackagesAsync(): Promise { + const result = await execAsync(`${LERNA_EXECUTABLE} updated --json`, { cwd: MONOREPO_ROOT_PATH }); + const updatedPackages = JSON.parse(result.stdout); + const updatedPublicPackages = _.filter(updatedPackages, updatedPackage => !updatedPackage.private); + return updatedPublicPackages; +} + +function updateVersionNumberIfNeeded(currentVersion: string, proposedNextVersion: string) { + if (proposedNextVersion === currentVersion) { + return utils.getNextPatchVersion(currentVersion); + } + const sortedVersions = semverSort.desc([proposedNextVersion, currentVersion]); + if (sortedVersions[0] !== proposedNextVersion) { + return utils.getNextPatchVersion(currentVersion); + } + return proposedNextVersion; +} + +function getChangelogJSONOrCreateIfMissing(packageName: string, changelogPath: string): string { + let changelogJSON: string; + try { + changelogJSON = fs.readFileSync(changelogPath, 'utf-8'); + return changelogJSON; + } catch (err) { + // If none exists, create new, empty one. + const emptyChangelogJSON = JSON.stringify([]); + fs.writeFileSync(changelogPath, emptyChangelogJSON); + return emptyChangelogJSON; + } +} + +function shouldAddNewChangelogEntry(changelogs: Changelog[]): boolean { + if (_.isEmpty(changelogs)) { + return true; + } + const lastEntry = changelogs[0]; + return !!lastEntry.isPublished; +} + +function generateChangelogMd(changelogs: Changelog[]): string { + let changelogMd = ` + +CHANGELOG + `; + + _.each(changelogs, changelog => { + if (_.isUndefined(changelog.timestamp)) { + throw new Error( + 'All CHANGELOG.json entries must be updated to include a timestamp before generating their MD version', + ); + } + const date = moment(`${changelog.timestamp}`, 'X').format('MMMM D, YYYY'); + const title = `\n## v${changelog.version} - _${date}_\n\n`; + changelogMd += title; + + let changes = ''; + _.each(changelog.changes, change => { + let line = ` * ${change.note}`; + if (!_.isUndefined(change.pr)) { + line += ` (#${change.pr})`; + } + line += '\n'; + changes += line; + }); + changelogMd += `${changes}`; + }); + + return changelogMd; +} -- cgit From 9c856de49ce0871b2093df90ab46410e91381424 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 30 Mar 2018 14:45:39 +0200 Subject: Move monorepo root constant to constants file --- packages/monorepo-scripts/src/constants.ts | 5 +++++ packages/monorepo-scripts/src/publish.ts | 14 +++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 packages/monorepo-scripts/src/constants.ts diff --git a/packages/monorepo-scripts/src/constants.ts b/packages/monorepo-scripts/src/constants.ts new file mode 100644 index 000000000..74387a159 --- /dev/null +++ b/packages/monorepo-scripts/src/constants.ts @@ -0,0 +1,5 @@ +import * as path from 'path'; + +export const constants = { + monorepoRootPath: path.join(__dirname, '../../..'), +}; diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts index 4265ee9e2..3de382c50 100644 --- a/packages/monorepo-scripts/src/publish.ts +++ b/packages/monorepo-scripts/src/publish.ts @@ -9,11 +9,11 @@ import { exec as execAsync, spawn } from 'promisify-child-process'; import semverDiff = require('semver-diff'); import semverSort = require('semver-sort'); +import { constants } from './constants'; import { Changelog, Changes, SemVerIndex, UpdatedPackage } from './types'; import { utils } from './utils'; const IS_DRY_RUN = true; -const MONOREPO_ROOT_PATH = path.join(__dirname, '../../..'); const TODAYS_TIMESTAMP = moment().unix(); const LERNA_EXECUTABLE = './node_modules/lerna/bin/lerna.js'; const semverNameToIndex: { [semver: string]: number } = { @@ -26,7 +26,7 @@ const semverNameToIndex: { [semver: string]: number } = { const updatedPublicPackages = await getPublicLernaUpdatedPackagesAsync(); const updatedPackageNames = _.map(updatedPublicPackages, pkg => pkg.name); - const allLernaPackages = lernaGetPackages(MONOREPO_ROOT_PATH); + const allLernaPackages = lernaGetPackages(constants.monorepoRootPath); const relevantLernaPackages = _.filter(allLernaPackages, pkg => { return _.includes(updatedPackageNames, pkg.package.name); }); @@ -87,9 +87,9 @@ const semverNameToIndex: { [semver: string]: number } = { }); if (!IS_DRY_RUN) { - await execAsync(`git add . --all`, { cwd: MONOREPO_ROOT_PATH }); - await execAsync(`git commit -m "Updated CHANGELOGS"`, { cwd: MONOREPO_ROOT_PATH }); - await execAsync(`git push`, { cwd: MONOREPO_ROOT_PATH }); + await execAsync(`git add . --all`, { cwd: constants.monorepoRootPath }); + await execAsync(`git commit -m "Updated CHANGELOGS"`, { cwd: constants.monorepoRootPath }); + await execAsync(`git push`, { cwd: constants.monorepoRootPath }); utils.log(`Pushed CHANGELOG updates to Github`); } @@ -102,7 +102,7 @@ const semverNameToIndex: { [semver: string]: number } = { async function lernaPublishAsync(packageToVersionChange: { [name: string]: string }) { // HACK: Lerna publish does not provide a way to specify multiple package versions as // flags so instead we need to interact with their interactive prompt interface. - const child = spawn('lerna', ['publish'], { cwd: MONOREPO_ROOT_PATH }); + const child = spawn('lerna', ['publish'], { cwd: constants.monorepoRootPath }); child.stdout.on('data', (data: Buffer) => { const output = data.toString('utf8'); const isVersionPrompt = _.includes(output, 'Select a new version'); @@ -124,7 +124,7 @@ async function lernaPublishAsync(packageToVersionChange: { [name: string]: strin } async function getPublicLernaUpdatedPackagesAsync(): Promise { - const result = await execAsync(`${LERNA_EXECUTABLE} updated --json`, { cwd: MONOREPO_ROOT_PATH }); + const result = await execAsync(`${LERNA_EXECUTABLE} updated --json`, { cwd: constants.monorepoRootPath }); const updatedPackages = JSON.parse(result.stdout); const updatedPublicPackages = _.filter(updatedPackages, updatedPackage => !updatedPackage.private); return updatedPublicPackages; -- cgit From 95eb11405156a42ae734ed74945b44a9125d23b3 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 30 Mar 2018 14:46:15 +0200 Subject: rename variable called `path` to `includePath` to avoid conflict with `path` package --- packages/monorepo-scripts/src/postpublish_utils.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/monorepo-scripts/src/postpublish_utils.ts b/packages/monorepo-scripts/src/postpublish_utils.ts index 898b00c47..c4f3135a5 100644 --- a/packages/monorepo-scripts/src/postpublish_utils.ts +++ b/packages/monorepo-scripts/src/postpublish_utils.ts @@ -122,14 +122,16 @@ export const postpublishUtils = { }, adjustFileIncludePaths(fileIncludes: string[], cwd: string): string[] { const fileIncludesAdjusted = _.map(fileIncludes, fileInclude => { - let path = _.startsWith(fileInclude, './') ? `${cwd}/${fileInclude.substr(2)}` : `${cwd}/${fileInclude}`; + let includePath = _.startsWith(fileInclude, './') + ? `${cwd}/${fileInclude.substr(2)}` + : `${cwd}/${fileInclude}`; // HACK: tsconfig.json needs wildcard directory endings as `/**/*` // but TypeDoc needs it as `/**` in order to pick up files at the root - if (_.endsWith(path, '/**/*')) { - path = path.slice(0, -2); + if (_.endsWith(includePath, '/**/*')) { + includePath = includePath.slice(0, -2); } - return path; + return includePath; }); return fileIncludesAdjusted; }, -- cgit From 4bc6096ec0415a83446b274f249c57ceb4fe93a3 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 30 Mar 2018 14:48:20 +0200 Subject: Fetch Github release notes from CHANGELOG.json and update CHANGELOG once they've been successfully published to Github --- packages/monorepo-scripts/src/postpublish_utils.ts | 36 ++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/packages/monorepo-scripts/src/postpublish_utils.ts b/packages/monorepo-scripts/src/postpublish_utils.ts index c4f3135a5..fb1680afd 100644 --- a/packages/monorepo-scripts/src/postpublish_utils.ts +++ b/packages/monorepo-scripts/src/postpublish_utils.ts @@ -1,9 +1,12 @@ import { execAsync } from 'async-child-process'; import * as promisify from 'es6-promisify'; +import * as fs from 'fs'; import * as _ from 'lodash'; +import * as path from 'path'; import * as publishRelease from 'publish-release'; import semverSort = require('semver-sort'); +import { constants } from './constants'; import { utils } from './utils'; const publishReleaseAsync = promisify(publishRelease); @@ -88,23 +91,52 @@ export const postpublishUtils = { ); }, async publishReleaseNotesAsync(cwd: string, packageName: string, version: string, assets: string[]): Promise { + const notes = this.getReleaseNotes(packageName); const releaseName = this.getReleaseName(packageName, version); const tag = this.getTag(packageName, version); - utils.log('POSTPUBLISH: Releasing ', releaseName, '...'); const finalAssets = this.adjustAssetPaths(cwd, assets); + utils.log('POSTPUBLISH: Releasing ', releaseName, '...'); const result = await publishReleaseAsync({ token: githubPersonalAccessToken, owner: '0xProject', repo: '0x-monorepo', tag, name: releaseName, - notes: 'N/A', + notes, draft: false, prerelease: false, reuseRelease: true, reuseDraftOnly: false, assets, }); + this.updateChangelogIsPublished(packageName); + }, + getReleaseNotes(packageName: string) { + const changelogJSONPath = path.join(constants.monorepoRootPath, 'packages', packageName, 'CHANGELOG.json'); + const changelogJSON = fs.readFileSync(changelogJSONPath, 'utf-8'); + const changelogs = JSON.parse(changelogJSON); + const latestLog = changelogs[0]; + if (_.isUndefined(latestLog.isPublished)) { + let notes = ''; + _.each(latestLog.changes, change => { + notes = `* ${change.note}`; + if (change.pr) { + notes += ` (${change.pr})`; + } + notes += `\n`; + }); + return notes; + } + return 'N/A'; + }, + updateChangelogIsPublished(packageName: string) { + const changelogJSONPath = path.join(constants.monorepoRootPath, 'packages', packageName, 'CHANGELOG.json'); + const changelogJSON = fs.readFileSync(changelogJSONPath, 'utf-8'); + const changelogs = JSON.parse(changelogJSON); + const latestLog = changelogs[0]; + latestLog.isPublished = true; + changelogs[0] = latestLog; + fs.writeFileSync(changelogJSONPath, JSON.stringify(changelogs, null, '\t')); }, getTag(packageName: string, version: string) { return `${packageName}@${version}`; -- cgit From 1eff120f49a89e82a975d18dd986639dd6ddbf21 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 30 Mar 2018 14:58:11 +0200 Subject: Remove top-level internal dep b/c it's not clear to me what it's used for --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 457268454..0e5b7a257 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,6 @@ "mnemonic": "concert load couple harbor equip island argue ramp clarify fence smart topic" }, "devDependencies": { - "@0xproject/utils": "^0.4.2", "async-child-process": "^1.1.1", "coveralls": "^3.0.0", "ethereumjs-testrpc": "^6.0.3", -- cgit From ddb8e26becb3f8d5bd8426663dbdea2cf1bf484f Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 30 Mar 2018 15:07:24 +0200 Subject: Expose publish command from top-level dir --- package.json | 4 ++-- packages/monorepo-scripts/src/publish.ts | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 0e5b7a257..e513e452a 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,8 @@ "test:installation": "node ./packages/monorepo-scripts/lib/test_installation.js", "lerna:run": "lerna run", "lerna:rebuild": "lerna run clean; lerna run build;", - "lerna:publish": - "yarn install; lerna run clean; lerna run build; lerna publish --registry=https://registry.npmjs.org/" + "publish": + "yarn install; yarn lerna:rebuild; node ./packages/monorepo-scripts/lib/publish.js" }, "config": { "mnemonic": "concert load couple harbor equip island argue ramp clarify fence smart topic" diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts index 3de382c50..a05cf6d04 100644 --- a/packages/monorepo-scripts/src/publish.ts +++ b/packages/monorepo-scripts/src/publish.ts @@ -102,7 +102,9 @@ const semverNameToIndex: { [semver: string]: number } = { async function lernaPublishAsync(packageToVersionChange: { [name: string]: string }) { // HACK: Lerna publish does not provide a way to specify multiple package versions as // flags so instead we need to interact with their interactive prompt interface. - const child = spawn('lerna', ['publish'], { cwd: constants.monorepoRootPath }); + const child = spawn('lerna', ['publish', '--registry=https://registry.npmjs.org/'], { + cwd: constants.monorepoRootPath, + }); child.stdout.on('data', (data: Buffer) => { const output = data.toString('utf8'); const isVersionPrompt = _.includes(output, 'Select a new version'); -- cgit From 08a69ebd6e9c04326836ab2ee486d1f1abe7c566 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 30 Mar 2018 15:27:47 +0200 Subject: Add more logging --- package.json | 2 +- packages/monorepo-scripts/src/publish.ts | 9 +++++++++ yarn.lock | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index e513e452a..31b669bc7 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "test:installation": "node ./packages/monorepo-scripts/lib/test_installation.js", "lerna:run": "lerna run", "lerna:rebuild": "lerna run clean; lerna run build;", - "publish": + "lerna:publish": "yarn install; yarn lerna:rebuild; node ./packages/monorepo-scripts/lib/publish.js" }, "config": { diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts index a05cf6d04..8093cb66c 100644 --- a/packages/monorepo-scripts/src/publish.ts +++ b/packages/monorepo-scripts/src/publish.ts @@ -93,6 +93,11 @@ const semverNameToIndex: { [semver: string]: number } = { utils.log(`Pushed CHANGELOG updates to Github`); } + utils.log('Version updates to apply:'); + _.each(packageToVersionChange, (versionChange: string, packageName: string) => { + utils.log(`${packageName} -> ${versionChange}`); + }); + utils.log(`Calling 'lerna publish'...`); await lernaPublishAsync(packageToVersionChange); })().catch(err => { utils.log(err); @@ -121,6 +126,10 @@ async function lernaPublishAsync(packageToVersionChange: { [name: string]: strin const isFinalPrompt = _.includes(output, 'Are you sure you want to publish the above changes?'); if (isFinalPrompt && !IS_DRY_RUN) { child.stdin.write(`y\n`); + } else if (isFinalPrompt && IS_DRY_RUN) { + utils.log( + `Submitted all versions to Lerna but since this is a dry run, did not confirm. You need to CTRL-C to exit.`, + ); } }); } diff --git a/yarn.lock b/yarn.lock index 9689f2b64..9f1cf1e87 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10218,7 +10218,7 @@ semaphore@>=1.0.1, semaphore@^1.0.3: version "1.1.0" resolved "https://registry.yarnpkg.com/semaphore/-/semaphore-1.1.0.tgz#aaad8b86b20fe8e9b32b16dc2ee682a8cd26a8aa" -semver-diff@^2.0.0: +semver-diff@^2.0.0, semver-diff@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-2.1.0.tgz#4bbb8437c8d37e4b0cf1a68fd726ec6d645d6d36" dependencies: -- cgit From f55a300f43da3e2460837aedfac9287f1342c46c Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 30 Mar 2018 15:28:08 +0200 Subject: Set IS_DRY_RUN to false --- packages/monorepo-scripts/src/publish.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts index 8093cb66c..905fee196 100644 --- a/packages/monorepo-scripts/src/publish.ts +++ b/packages/monorepo-scripts/src/publish.ts @@ -13,7 +13,7 @@ import { constants } from './constants'; import { Changelog, Changes, SemVerIndex, UpdatedPackage } from './types'; import { utils } from './utils'; -const IS_DRY_RUN = true; +const IS_DRY_RUN = false; const TODAYS_TIMESTAMP = moment().unix(); const LERNA_EXECUTABLE = './node_modules/lerna/bin/lerna.js'; const semverNameToIndex: { [semver: string]: number } = { -- cgit From ddd3d284d94043b27977714d4f49353c01c40bd3 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 30 Mar 2018 15:48:39 +0200 Subject: Remove CHANGELOG.json files since will be generated on development --- packages/0x.js/CHANGELOG.json | 971 ----------------------------- packages/abi-gen/CHANGELOG.json | 77 --- packages/assert/CHANGELOG.json | 52 -- packages/base-contract/CHANGELOG.json | 12 - packages/connect/CHANGELOG.json | 121 ---- packages/deployer/CHANGELOG.json | 94 --- packages/dev-utils/CHANGELOG.json | 67 -- packages/json-schemas/CHANGELOG.json | 34 - packages/monorepo-scripts/CHANGELOG.json | 12 - packages/react-docs/CHANGELOG.json | 47 -- packages/react-shared/CHANGELOG.json | 14 - packages/sol-cov/CHANGELOG.json | 1 - packages/sra-report/CHANGELOG.json | 28 - packages/subproviders/CHANGELOG.json | 132 ---- packages/tslint-config/CHANGELOG.json | 71 --- packages/types/CHANGELOG.json | 68 -- packages/typescript-typings/CHANGELOG.json | 6 - packages/utils/CHANGELOG.json | 75 --- packages/web3-wrapper/CHANGELOG.json | 64 -- 19 files changed, 1946 deletions(-) delete mode 100644 packages/0x.js/CHANGELOG.json delete mode 100644 packages/abi-gen/CHANGELOG.json delete mode 100644 packages/assert/CHANGELOG.json delete mode 100644 packages/base-contract/CHANGELOG.json delete mode 100644 packages/connect/CHANGELOG.json delete mode 100644 packages/deployer/CHANGELOG.json delete mode 100644 packages/dev-utils/CHANGELOG.json delete mode 100644 packages/json-schemas/CHANGELOG.json delete mode 100644 packages/monorepo-scripts/CHANGELOG.json delete mode 100644 packages/react-docs/CHANGELOG.json delete mode 100644 packages/react-shared/CHANGELOG.json delete mode 100644 packages/sol-cov/CHANGELOG.json delete mode 100644 packages/sra-report/CHANGELOG.json delete mode 100644 packages/subproviders/CHANGELOG.json delete mode 100644 packages/tslint-config/CHANGELOG.json delete mode 100644 packages/types/CHANGELOG.json delete mode 100644 packages/typescript-typings/CHANGELOG.json delete mode 100644 packages/utils/CHANGELOG.json delete mode 100644 packages/web3-wrapper/CHANGELOG.json diff --git a/packages/0x.js/CHANGELOG.json b/packages/0x.js/CHANGELOG.json deleted file mode 100644 index 3f518aa72..000000000 --- a/packages/0x.js/CHANGELOG.json +++ /dev/null @@ -1,971 +0,0 @@ -[ - { - "version": "0.34.0", - "changes": [ - { - "note": "Fix the bug causing `zeroEx.exchange.fillOrdersUpToAsync` validation to fail if there were some extra orders passed", - "pr": "470" - } - ] - }, - { - "version": "0.33.2", - "changes": [ - { - "note": "Consolidate all `console.log` calls into `logUtils` in the `@0xproject/utils` package", - "pr": "452" - }, - { - "note": "Consolidate `Order`, `SignedOrder`, and `ECSignature` into the `@0xproject/types` package", - "pr": "456" - } - ], - "timestamp": 1521327600, - "isPublished": true - }, - { - "version": "0.33.1", - "changes": [ - { - "note": "Add missing EthersJs typescript typings as dependency" - } - ], - "timestamp": 1520463600, - "isPublished": true - }, - { - "version": "0.33.0", - "changes": [ - { - "note": "Validate and lowercase all addresses in public methods", - "pr": "373" - }, - { - "note": "Improve validation to force passing contract addresses on private networks", - "pr": "385" - }, - { - "note": "Change `LogErrorContractEventArgs.errorId` type from `BigNumber` to `number`", - "pr": "413" - }, - { - "note": "Rename all public `_unsubscribeAll` methods to `unsubscribeAll`", - "pr": "415" - }, - { - "note": "Move web3 typings from devDep to dep since cannot use this package without it", - "pr": "429" - } - ], - "timestamp": 1520118000, - "isPublished": true - }, - { - "version": "0.32.2", - "changes": [ - { - "note": "Fix publishing issue where .npmignore was not properly excluding undesired content", - "pr": "389" - } - ], - "timestamp": 1518130800, - "isPublished": true - }, - { - "version": "0.32.1", - "changes": [ - { - "note": "Reorganized `BlockParamLiteral` export into `@0xproject/types` package", - "pr": "355" - }, - { - "note": "Now using `abi-gen` package to generate ContractEventArgs types", - "pr": "371" - } - ], - "timestamp": 1517958000, - "isPublished": true - }, - { - "version": "0.32.0", - "changes": [ - { - "note": "Add `zeroEx.etherToken.getContractAddressIfExists`", - "pr": "350" - }, - { - "note": "Fixed the bug causing order watcher to throw if there is an event with the same signature but different indexed fields", - "pr": "366" - } - ], - "timestamp": 1517785200, - "isPublished": true - }, - { - "version": "0.31.1", - "changes": [ - { - "note": "Fix the bug causing order watcher to throw if makerToken === zrx", - "pr": "357" - } - ], - "timestamp": 1517439600, - "isPublished": true - }, - { - "version": "0.31.0", - "changes": [ - { - "note": "Add the `shouldAddPersonalMessagePrefix` parameter to `signOrderHashAsync` so that the caller can decide on whether to add the personalMessage prefix before relaying the request to the signer. Parity Signer, Ledger and TestRPC add the prefix themselves, Metamask expects it to have already been added.", - "pr": "349" - } - ], - "timestamp": 1517266800, - "isPublished": true - }, - { - "version": "0.30.2", - "changes": [ - { - "note": "Add Rinkeby testnet addresses to artifacts ", - "pr": "337" - }, - { - "note": "Move @0xproject/types to dependencies from devDependencies fixing missing type errors" - } - ], - "timestamp": 1517180400, - "isPublished": true - }, - { - "version": "0.30.1", - "changes": [ - { - "note": "Fix a bug allowing negative fill values ", - "pr": "212" - }, - { - "note": "Fix a bug that made it impossible to pass a custom ZRX address ", - "pr": "341" - } - ], - "timestamp": 1516748400, - "isPublished": true - }, - { - "version": "0.30.0", - "changes": [ - { - "note": "Add an error parameter to the order watcher callback", - "pr": "312" - }, - { - "note": "Fix a bug making it impossible to catch some errors from awaitTransactionMinedAsync", - "pr": "312" - }, - { - "note": "Fix a bug in fillOrdersUpTo validation making it impossible to fill up to if user doesn't have enough balance to fully fill all the orders", - "pr": "321" - } - ], - "timestamp": 1516143600, - "isPublished": true - }, - { - "version": "0.29.1", - "changes": [ - { - "note": "Fixed bignumber config issue #301", - "pr": "305" - } - ], - "timestamp": 1515625200, - "isPublished": true - }, - { - "version": "0.29.0", - "changes": [ - { - "note": "Assert baseUnit amount supplied to `toUnitAmount` is integer amount.", - "pr": "287" - }, - { - "note": "`toBaseUnitAmount` throws if amount supplied has too many decimals", - "pr": "287" - } - ], - "timestamp": 1514415600, - "isPublished": true - }, - { - "version": "0.28.0", - "changes": [ - { - "note": "Add `etherTokenAddress` arg to `depositAsync` and `withdrawAsync` methods on `zeroEx.etherToken`", - "pr": "267" - }, - { - "note": "Removed accidentally included `unsubscribeAll` method from `zeroEx.proxy`, `zeroEx.etherToken` and `zeroEx.tokenRegistry`", - "pr": "267" - }, - { - "note": "Removed `etherTokenContractAddress` from `ZeroEx` constructor arg `ZeroExConfig`", - "pr": "267" - }, - { - "note": "Rename `SubscriptionOpts` to `BlockRange`", - "pr": "272" - }, - { - "note": "Add `zeroEx.etherToken.subscribe`, `zeroEx.etherToken.unsubscribe`, `zeroEx.etherToken.unsubscribeAll`", - "pr": "277" - }, - { - "note": "Add `zeroEx.etherToken.getLogsAsync`", - "pr": "277" - }, - { - "note": "Add new public types `BlockParamLiteral`, `EtherTokenEvents`, `EtherTokenContractEventArgs`, `DepositContractEventArgs`, `WithdrawalContractEventArgs`", - "pr": "277" - }, - { - "note": "Support `Deposit` and `Withdraw` events on etherToken", - "pr": "277" - }, - { - "note": "Improve the error message when taker is not a string", - "pr": "278" - } - ], - "timestamp": 1513724400, - "isPublished": true - }, - { - "version": "0.27.1", - "changes": [ - { - "note": "Export `TransactionOpts` type" - } - ], - "timestamp": 1511823600, - "isPublished": true - }, - { - "version": "0.27.0", - "changes": [ - { - "note": "Make `ZeroExConfig` required parameter of `ZeroEx` constructor", - "pr": "233" - }, - { - "note": "Add a required property `networkId` to `ZeroExConfig`", - "pr": "233" - }, - { - "note": "Make all `getContractAddress` functions, `zeroEx.exchange.subscribe`, `zeroEx.exchange.getZRXTokenAddress` sync", - "pr": "233" - }, - { - "note": "Remove `ZeroExError.ContractNotFound` and replace it with contract-specific errors", - "pr": "233" - }, - { - "note": "Make `DecodedLogEvent` contain `LogWithDecodedArgs` under log key instead of merging it in like web3 does", - "pr": "234" - }, - { - "note": "Rename `removed` to `isRemoved` in `DecodedLogEvent`", - "pr": "234" - }, - { - "note": "Add config allowing to specify gasPrice and gasLimit for every transaction sending method", - "pr": "235" - }, - { - "note": "All transaction sending methods now call `estimateGas` if no gas amount was supplied", - "pr": "235" - }, - { - "note": "Modify order validation methods to validate against the `latest` block, not against the `pending` block", - "pr": "236" - } - ], - "timestamp": 1511823600, - "isPublished": true - }, - { - "version": "0.26.0", - "changes": [ - { - "note": "Add post-formatter for logs converting `blockNumber`, `logIndex`, `transactionIndex` from hexes to numbers", - "pr": "231" - }, - { - "note": "Remove support for Async callback types when used in Subscribe functions", - "pr": "222" - }, - { - "note": "In OrderWatcher subscribe to ZRX Token Transfer and Approval events when maker token is different", - "pr": "225" - } - ], - "timestamp": 1511218800, - "isPublished": true - }, - { - "version": "0.25.1", - "changes": [ - { - "note": "Standardise on Cancelled over Canceled", - "pr": "217" - }, - { - "note": "Add missing `DecodedLogEvent` type to exported types", - "pr": "205" - }, - { - "note": "Normalized the transactionReceipt status to be `null|0|1`, 1 meaning transaction execution successful, 0 unsuccessful and `null` if it is a pre-byzantinium transaction.", - "pr": "200" - } - ], - "timestamp": 1510527600, - "isPublished": true - }, - { - "version": "0.23.0", - "changes": [ - { - "note": "Fixed unhandled promise rejection error in subscribe methods", - "pr": "209" - }, - { - "note": "Subscribe callbacks now receive an error object as their first argument" - } - ], - "timestamp": 1510441200, - "isPublished": true - }, - { - "version": "0.22.6", - "changes": [ - { - "note": "Add a timeout parameter to transaction awaiting", - "pr": "206" - } - ], - "timestamp": 1510268400, - "isPublished": true - }, - { - "version": "0.22.5", - "changes": [ - { - "note": "Re-publish v0.22.4 to fix publishing issue" - } - ], - "timestamp": 1510009200, - "isPublished": true - }, - { - "version": "0.22.4", - "changes": [ - { - "note": "Upgraded bignumber.js to a new version that ships with native typings" - } - ], - "timestamp": 1508882400, - "isPublished": true - }, - { - "version": "0.22.3", - "changes": [ - { - "note": "Fixed an issue with new version of testrpc and unlimited proxy allowance", - "pr": "199" - } - ], - "timestamp": 1508882400, - "isPublished": true - }, - { - "version": "0.22.2", - "changes": [ - { - "note": "Fixed rounding of maker fill amount and incorrect validation of partial fees", - "pr": "197" - } - ], - "timestamp": 1508796000, - "isPublished": true - }, - { - "version": "0.22.0", - "changes": [ - { - "note": "Started using `OrderFillRequest` interface instead of `OrderFillOrKillRequest` interface for `zeroEx.exchange.batchFillOrKill`", - "pr": "187" - }, - { - "note": "Removed `OrderFillOrKillRequest`", - "pr": "187" - } - ], - "timestamp": 1508104800, - "isPublished": true - }, - { - "version": "0.21.4", - "changes": [ - { - "note": "Made 0x.js more type-safe by making `getLogsAsync` and `subscribe/subscribeAsync` generics parametrized with arg type", - "pr": "194" - } - ], - "timestamp": 1507845600, - "isPublished": true - }, - { - "version": "0.21.3", - "changes": [ - { - "note": "Fixed a bug causing order fills to throw `INSUFFICIENT_TAKER_ALLOWANCE`", - "pr": "193" - } - ], - "timestamp": 1507759200, - "isPublished": true - }, - { - "version": "0.21.2", - "changes": [ - { - "note": "Exported `ContractEventArg` as a public type", - "pr": "190" - } - ], - "timestamp": 1507672800, - "isPublished": true - }, - { - "version": "0.21.1", - "changes": [ - { - "note": "Fixed a bug in subscriptions", - "pr": "189" - } - ], - "timestamp": 1507672800, - "isPublished": true - }, - { - "version": "0.21.0", - "changes": [ - { - "note": "Complete rewrite of subscription logic", - "pr": "182" - }, - { - "note": "Subscriptions no longer return historical logs. If you want them - use `getLogsAsync`" - }, - { - "note": "Subscriptions now use [ethereumjs-blockstream](https://github.com/ethereumjs/ethereumjs-blockstream) under the hood" - }, - { - "note": "Subscriptions correctly handle block re-orgs (forks)" - }, - { - "note": "Subscriptions correctly backfill logs (connection problems)" - }, - { - "note": "They no longer setup filters on the underlying nodes, so you can use them with infura without a filter Subprovider" - }, - { - "note": "Removed `ContractEventEmitter` and added `LogEvent`" - }, - { - "note": "Renamed `zeroEx.token.subscribeAsync` to `zeroEx.token.subscribe`" - }, - { - "note": "Added `zeroEx.token.unsubscribe` and `zeroEx.exchange.unsubscribe`" - }, - { - "note": "Renamed `zeroEx.exchange.stopWatchingAllEventsAsync` to `zeroEx.exhange.unsubscribeAll`" - }, - { - "note": "Renamed `zeroEx.token.stopWatchingAllEventsAsync` to `zeroEx.token.unsubscribeAll`" - }, - { - "note": "Fixed the batch fills validation by emulating all balance & proxy allowance changes", - "pr": "185" - } - ], - "timestamp": 1507586400, - "isPublished": true - }, - { - "version": "0.20.0", - "changes": [ - { - "note": "Add `zeroEx.token.getLogsAsync`", - "pr": "178" - }, - { - "note": "Add `zeroEx.exchange.getLogsAsync`", - "pr": "178" - }, - { - "note": "Fixed fees validation when one of the tokens transferred is ZRX", - "pr": "181" - } - ], - "timestamp": 1507154400, - "isPublished": true - }, - { - "version": "0.19.0", - "changes": [ - { - "note": "Made order validation optional ", - "pr": "172" - }, - { - "note": "Added Ropsten testnet support", - "pr": "173" - }, - { - "note": "Fixed a bug causing awaitTransactionMinedAsync to DDos backend nodes", - "pr": "175" - } - ], - "timestamp": 1506636000, - "isPublished": true - }, - { - "version": "0.18.0", - "changes": [ - { - "note": "Added `zeroEx.exchange.validateOrderFillableOrThrowAsync` to simplify orderbook pruning", - "pr": "170" - } - ], - "timestamp": 1506376800, - "isPublished": true - }, - { - "version": "0.17.0", - "changes": [ - { - "note": "Made `zeroEx.exchange.getZRXTokenAddressAsync` public", - "pr": "171" - } - ], - "timestamp": 1506376800, - "isPublished": true - }, - { - "version": "0.16.0", - "changes": [ - { - "note": "Added the ability to specify custom contract addresses to be used with 0x.js", - "pr": "165" - }, - { - "note": "ZeroExConfig.exchangeContractAddress" - }, - { - "note": "ZeroExConfig.tokenRegistryContractAddress" - }, - { - "note": "ZeroExConfig.etherTokenContractAddress" - }, - { - "note": "Added `zeroEx.tokenRegistry.getContractAddressAsync`", - "pr": "165" - } - ], - "timestamp": 1505858400, - "isPublished": true - }, - { - "version": "0.15.0", - "changes": [ - { - "note": "Added the ability to specify a historical `blockNumber` at which to query the blockchain's state when calling a token or exchange method", - "pr": "161" - } - ], - "timestamp": 1504821600, - "isPublished": true - }, - { - "version": "0.14.2", - "changes": [ - { - "note": "Fixed an issue with bignumber.js types not found", - "pr": "160" - } - ], - "timestamp": 1504735200, - "isPublished": true - }, - { - "version": "0.14.1", - "changes": [ - { - "note": "Fixed an issue with Artifact type not found", - "pr": "159" - } - ], - "timestamp": 1504735200, - "isPublished": true - }, - { - "version": "0.14.0", - "changes": [ - { - "note": "Added `zeroEx.exchange.throwLogErrorsAsErrors` method to public interface", - "pr": "157" - }, - { - "note": "Fixed an issue with overlapping async intervals in `zeroEx.awaitTransactionMinedAsync`", - "pr": "157" - }, - { - "note": "Fixed an issue with log decoder returning `BigNumber`s as `strings`", - "pr": "157" - } - ], - "timestamp": 1504648800, - "isPublished": true - }, - { - "version": "0.13.0", - "changes": [ - { - "note": "Made all the functions submitting transactions to the network to immediately return transaction hash", - "pr": "151" - }, - { - "note": "Added `zeroEx.awaitTransactionMinedAsync`", - "pr": "151" - }, - { - "note": "Added `TransactionReceiptWithDecodedLogs`, `LogWithDecodedArgs`, `DecodedLogArgs` to public types", - "pr": "151" - }, - { - "note": "Added signature validation to `validateFillOrderThrowIfInvalidAsync`", - "pr": "152" - } - ], - "timestamp": 1504648800, - "isPublished": true - }, - { - "version": "0.12.1", - "changes": [ - { - "note": "Added the support for web3@1.x.x provider", - "pr": "142" - }, - { - "note": "Added the optional `zeroExConfig` parameter to the constructor of `ZeroEx`", - "pr": "139" - }, - { - "note": "Added the ability to specify `gasPrice` when instantiating `ZeroEx`", - "pr": "139" - } - ], - "timestamp": 1504303200, - "isPublished": true - }, - { - "version": "0.11.0", - "changes": [ - { - "note": "Added `zeroEx.token.setUnlimitedProxyAllowanceAsync`", - "pr": "137" - }, - { - "note": "Added `zeroEx.token.setUnlimitedAllowanceAsync`", - "pr": "137" - }, - { - "note": "Added `zeroEx.token.UNLIMITED_ALLOWANCE_IN_BASE_UNITS`", - "pr": "137" - } - ], - "timestamp": 1503525600, - "isPublished": true - }, - { - "version": "0.10.4", - "changes": [ - { - "note": "Fixed a bug where checksummed addresses were being pulled from artifacts and not lower-cased.", - "pr": "135" - } - ], - "timestamp": 1503525600, - "isPublished": true - }, - { - "version": "0.10.1", - "changes": [ - { - "note": "Added `zeroEx.exchange.validateFillOrderThrowIfInvalidAsync`", - "pr": "128" - }, - { - "note": "Added `zeroEx.exchange.validateFillOrKillOrderThrowIfInvalidAsync`", - "pr": "128" - }, - { - "note": "Added `zeroEx.exchange.validateCancelOrderThrowIfInvalidAsync`", - "pr": "128" - }, - { - "note": "Added `zeroEx.exchange.isRoundingErrorAsync`", - "pr": "128" - }, - { - "note": "Added `zeroEx.proxy.getContractAddressAsync`", - "pr": "130" - }, - { - "note": "Added `zeroEx.tokenRegistry.getTokenAddressesAsync`", - "pr": "132" - }, - { - "note": "Added `zeroEx.tokenRegistry.getTokenAddressBySymbolIfExistsAsync`", - "pr": "132" - }, - { - "note": "Added `zeroEx.tokenRegistry.getTokenAddressByNameIfExistsAsync`", - "pr": "132" - }, - { - "note": "Added `zeroEx.tokenRegistry.getTokenBySymbolIfExistsAsync`", - "pr": "132" - }, - { - "note": "Added `zeroEx.tokenRegistry.getTokenByNameIfExistsAsync`", - "pr": "132" - }, - { - "note": "Added clear error message when checksummed address is passed to a public method", - "pr": "124" - }, - { - "note": "Fixes the description of `shouldThrowOnInsufficientBalanceOrAllowance` in docs", - "pr": "127" - } - ], - "timestamp": 1503525600, - "isPublished": true - }, - { - "version": "0.9.3", - "changes": [ - { - "note": "Update contract artifacts to include latest Kovan and Mainnet deploys", - "pr": "118" - } - ], - "timestamp": 1503352800, - "isPublished": true - }, - { - "version": "0.9.2", - "changes": [ - { - "note": "*This version was unpublished because of a publishing issue.*" - }, - { - "note": "Update contract artifacts to include latest Kovan and Mainnet deploys", - "pr": "118" - } - ], - "timestamp": 1503266400, - "isPublished": true - }, - { - "version": "0.9.1", - "changes": [ - { - "note": "Fixed the bug causing `zeroEx.token.getBalanceAsync()` to fail if no addresses available", - "pr": "120" - } - ], - "timestamp": 1502834400, - "isPublished": true - }, - { - "version": "0.9.0", - "changes": [ - { - "note": "Migrated to the new version of smart contracts", - "pr": "101" - }, - { - "note": "Removed the ability to call methods on multiple authorized Exchange smart contracts", - "pr": "106" - }, - { - "note": "Made `zeroEx.getOrderHashHex` a static method", - "pr": "107" - }, - { - "note": "Cached `net_version` requests and invalidate the cache on calls to `setProvider`", - "pr": "95" - }, - { - "note": "Renamed `zeroEx.exchange.batchCancelOrderAsync` to `zeroEx.exchange.batchCancelOrdersAsync`" - }, - { - "note": "Renamed `zeroEx.exchange.batchFillOrderAsync` to `zeroEx.exchange.batchFillOrdersAsync`" - }, - { - "note": "Updated to typescript v2.4", - "pr": "104" - }, - { - "note": "Fixed an issue with incorrect balance/allowance validation when ZRX is one of the tokens traded", - "pr": "109" - } - ], - "timestamp": 1501020000, - "isPublished": true - }, - { - "version": "0.8.0", - "changes": [ - { - "note": "Added the ability to call methods on different authorized versions of the Exchange smart contract", - "pr": "82" - }, - { - "note": "Updated contract artifacts to reflect latest changes to the smart contracts (0xproject/contracts#59)" - }, - { - "note": "Added `zeroEx.proxy.isAuthorizedAsync` and `zeroEx.proxy.getAuthorizedAddressesAsync`", - "pr": "89" - }, - { - "note": "Added `zeroEx.token.subscribeAsync`", - "pr": "90" - }, - { - "note": "Made contract invalidation functions private", - "pr": "90" - }, - { - "note": "`zeroEx.token.invalidateContractInstancesAsync`" - }, - { - "note": "`zeroEx.exchange.invalidateContractInstancesAsync`" - }, - { - "note": "`zeroEx.proxy.invalidateContractInstance`" - }, - { - "note": "`zeroEx.tokenRegistry.invalidateContractInstance`" - }, - { - "note": "Fixed the bug where `zeroEx.setProviderAsync` didn't invalidate etherToken contract's instance" - } - ], - "timestamp": 1499119200, - "isPublished": true - }, - { - "version": "0.7.1", - "changes": [ - { - "note": "Added the ability to convert Ether to wrapped Ether tokens and back via `zeroEx.etherToken.depostAsync` and `zeroEx.etherToken.withdrawAsync`", - "pr": "81" - } - ], - "timestamp": 1498428000, - "isPublished": true - }, - { - "version": "0.7.0", - "changes": [ - { - "note": "Added Kovan smart contract artifacts", - "pr": "78" - }, - { - "note": "Started returning fillAmount from `fillOrderAsync` and `fillUpToAsync`", - "pr": "72" - }, - { - "note": "Started returning cancelledAmount from `cancelOrderAsync`", - "pr": "72" - }, - { - "note": "Renamed type `LogCancelArgs` to `LogCancelContractEventArgs` and `LogFillArgs` to `LogFillContractEventArgs`" - } - ], - "timestamp": 1498082400, - "isPublished": true - }, - { - "version": "0.6.2", - "changes": [ - { - "note": "Reduced bundle size" - }, - { - "note": "Improved documentation" - } - ], - "timestamp": 1497996000, - "isPublished": true - }, - { - "version": "0.6.1", - "changes": [ - { - "note": "Improved documentation" - } - ], - "timestamp": 1497823200, - "isPublished": true - }, - { - "version": "0.6.0", - "changes": [ - { - "note": "Made `ZeroEx` class accept `Web3Provider` instance instead of `Web3` instance" - }, - { - "note": "Added types for contract event arguments" - } - ], - "timestamp": 1497823200, - "isPublished": true - }, - { - "version": "0.5.2", - "changes": [ - { - "note": "Fixed the bug in `postpublish` script that caused that only unminified UMD bundle was uploaded to release page" - } - ], - "timestamp": 1497477600, - "isPublished": true - }, - { - "version": "0.5.1", - "changes": [ - { - "note": "Added `postpublish` script to publish to Github Releases with assets." - } - ], - "timestamp": 1497477600, - "isPublished": true - } -] \ No newline at end of file diff --git a/packages/abi-gen/CHANGELOG.json b/packages/abi-gen/CHANGELOG.json deleted file mode 100644 index bbe9f9d86..000000000 --- a/packages/abi-gen/CHANGELOG.json +++ /dev/null @@ -1,77 +0,0 @@ -[ - { - "version": "0.2.5", - "changes": [ - { - "note": "Consolidate all `console.log` calls into `logUtils` in the `@0xproject/utils` package", - "pr": "452" - } - ], - "timestamp": 1521327600, - "isPublished": true - }, - { - "version": "0.2.4", - "changes": [ - { - "note": "Add a `backend` parameter that allows you to specify the Ethereum library you use in your templates (`web3` or `ethers`). Ethers auto-converts small ints to numbers whereas Web3 doesn't. Defaults to `web3`", - "pr": "413" - }, - { - "note": "Add support for [tuple types](https://solidity.readthedocs.io/en/develop/abi-spec.html#handling-tuple-types)", - "pr": "413" - }, - { - "note": "Add `hasReturnValue` to context data", - "pr": "413" - } - ], - "timestamp": 1520118000, - "isPublished": true - }, - { - "version": "0.2.1", - "changes": [ - { - "note": "Fix publishing issue where .npmignore was not properly excluding undesired content", - "pr": "389" - } - ], - "timestamp": 1518130800, - "isPublished": true - }, - { - "version": "0.2.0", - "changes": [ - { - "note": "Added CLI options for explicit specifying location of partials and main template", - "pr": "346" - }, - { - "note": "Added CLI option to specify networkId, adding support for the JSON artifact format found in @0xproject/contracts", - "pr": "388" - } - ], - "timestamp": 1517958000, - "isPublished": true - }, - { - "version": "0.1.0", - "changes": [ - { - "note": "Fixed array typings with union types", - "pr": "295" - }, - { - "note": "Add event ABIs to context data passed to templates", - "pr": "302" - }, - { - "note": "Add constructor ABIs to context data passed to templates", - "pr": "304" - } - ], - "timestamp": 1515625200, - "isPublished": true - } -] \ No newline at end of file diff --git a/packages/assert/CHANGELOG.json b/packages/assert/CHANGELOG.json deleted file mode 100644 index da9a8204e..000000000 --- a/packages/assert/CHANGELOG.json +++ /dev/null @@ -1,52 +0,0 @@ -[ - { - "version": "0.2.0", - "changes": [ - { - "note": "Rename `isHttpUrl` to `isWebUri`", - "pr": "412" - } - ], - "timestamp": 1520463600, - "isPublished": true - }, - { - "version": "0.1.0", - "changes": [ - { - "note": "Remove isETHAddressHex checksum address check and assume address will be lowercased ", - "pr": "373" - }, - { - "note": "Add an optional parameter `subSchemas` to `doesConformToSchema` method", - "pr": "385" - } - ], - "timestamp": 1520118000, - "isPublished": true - }, - { - "version": "0.0.18", - "changes": [ - { - "note": "Fix publishing issue where .npmignore was not properly excluding undesired content", - "pr": "389" - } - ], - "timestamp": 1486594800, - "isPublished": true - }, - { - "version": "0.0.4", - "changes": [ - { - "note": "Re-publish Assert previously published under NPM package @0xproject/0x-assert" - }, - { - "note": "Added assertion isValidBaseUnitAmount which checks both that the value is a valid bigNumber and that it does not contain decimals." - } - ], - "timestamp": 1510614000, - "isPublished": true - } -] \ No newline at end of file diff --git a/packages/base-contract/CHANGELOG.json b/packages/base-contract/CHANGELOG.json deleted file mode 100644 index cbdd45732..000000000 --- a/packages/base-contract/CHANGELOG.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "version": "0.0.2", - "changes": [ - { - "note": "Initial release" - } - ], - "timestamp": 1520118000, - "isPublished": true - } -] \ No newline at end of file diff --git a/packages/connect/CHANGELOG.json b/packages/connect/CHANGELOG.json deleted file mode 100644 index e22b257e2..000000000 --- a/packages/connect/CHANGELOG.json +++ /dev/null @@ -1,121 +0,0 @@ -[ - { - "version": "0.6.4", - "changes": [ - { - "note": "Consolidate `Order`, `SignedOrder`, and `ECSignature` into the `@0xproject/types` package", - "pr": "456" - } - ], - "timestamp": 1521327600, - "isPublished": true - }, - { - "version": "0.6.2", - "changes": [ - { - "note": "Fix JSON parse empty response", - "pr": "407" - } - ], - "timestamp": 1518735600, - "isPublished": true - }, - { - "version": "0.6.0", - "changes": [ - { - "note": "Add pagination options to HttpClient methods", - "pr": "393" - }, - { - "note": "Add heartbeat configuration to WebSocketOrderbookChannel constructor", - "pr": "406" - } - ], - "timestamp": 1518735600, - "isPublished": true - }, - { - "version": "0.5.7", - "changes": [ - { - "note": "Fix publishing issue where .npmignore was not properly excluding undesired content", - "pr": "389" - } - ], - "timestamp": 1518130800, - "isPublished": true - }, - { - "version": "0.5.0", - "changes": [ - { - "note": "Sanitize api endpoint url and remove trailing slashes", - "pr": "318" - }, - { - "note": "Improve error message text in HttpClient", - "pr": "318" - }, - { - "note": "Stop appending '/v0' to api endpoint url in HttpClient", - "pr": "318" - } - ], - "timestamp": 1516143600, - "isPublished": true - }, - { - "version": "0.4.0", - "changes": [ - { - "note": "Prevent getFeesAsync method on HttpClient from mutating input", - "pr": "296" - } - ], - "timestamp": 1515625200, - "isPublished": true - }, - { - "version": "0.3.0", - "changes": [ - { - "note": "Expose WebSocketOrderbookChannel and associated types to public interface", - "pr": "251" - }, - { - "note": "Remove tokenA and tokenB fields from OrdersRequest", - "pr": "256" - } - ], - "timestamp": 1512687600, - "isPublished": true - }, - { - "version": "0.2.0", - "changes": [ - { - "note": "Add SignedOrder and TokenTradeInfo to the public interface" - }, - { - "note": "Add ECSignature and Order to the public interface" - }, - { - "note": "Remove dependency on 0x.js" - } - ], - "timestamp": 1511910000, - "isPublished": true - }, - { - "version": "0.1.0", - "changes": [ - { - "note": "Provide a HttpClient class for interacting with standard relayer api compliant HTTP urls" - } - ], - "timestamp": 1511305200, - "isPublished": true - } -] \ No newline at end of file diff --git a/packages/deployer/CHANGELOG.json b/packages/deployer/CHANGELOG.json deleted file mode 100644 index b3cd53b7e..000000000 --- a/packages/deployer/CHANGELOG.json +++ /dev/null @@ -1,94 +0,0 @@ -[ - { - "version": "0.3.1", - "changes": [ - { - "note": "Add TS types for `yargs`" - } - ], - "timestamp": 1521327600, - "isPublished": true - }, - { - "version": "0.3.0", - "changes": [ - { - "note": "Add support for Solidity 0.4.20 and 0.4.21" - }, - { - "note": "Replace `jsonrpcPort` config with `jsonrpcUrl`", - "pr": "426" - }, - { - "note": "Replace `jsonrpc-port` CLI option with `jsonrpc-url`", - "pr": "426" - }, - { - "note": "Export the `Compiler`", - "pr": "426" - }, - { - "note": "Load solc from remote source instead of having it locally", - "pr": "426" - }, - { - "note": "Add `bytecode`, `runtime_bytecode`, `source_map`, `source_map_runtime` and `sources` fields to artifacts", - "pr": "426" - }, - { - "note": "Remove 0x-specific `migrate` command", - "pr": "426" - }, - { - "note": "Allow deployer to accept a provider instead of port and host. This makes it possible to run it with in-process ganache-core", - "pr": "426" - }, - { - "note": "Consolidate all `console.log` calls into `logUtils` in the `@0xproject/utils` package", - "pr": "452" - }, - { - "note": "Add `#!/usr/bin/env node` pragma above `cli.ts` script to fix command-line error." - } - ], - "timestamp": 1521327600, - "isPublished": true - }, - { - "version": "0.2.0", - "changes": [ - { - "note": "Check dependencies when determining if contracts should be recompiled", - "pr": "408" - }, - { - "note": "Improve an error message for when deployer is supplied with an incorrect number of constructor arguments", - "pr": "419" - } - ], - "timestamp": 1520118000, - "isPublished": true - }, - { - "version": "0.1.0", - "changes": [ - { - "note": "Add the ability to pass in specific contracts to compile in CLI", - "pr": "400" - } - ], - "timestamp": 1518735600, - "isPublished": true - }, - { - "version": "0.0.8", - "changes": [ - { - "note": "Fix publishing issue where .npmignore was not properly excluding undesired content", - "pr": "389" - } - ], - "timestamp": 1518130800, - "isPublished": true - } -] \ No newline at end of file diff --git a/packages/dev-utils/CHANGELOG.json b/packages/dev-utils/CHANGELOG.json deleted file mode 100644 index f59439f3d..000000000 --- a/packages/dev-utils/CHANGELOG.json +++ /dev/null @@ -1,67 +0,0 @@ -[ - { - "version": "0.3.1", - "changes": [ - { - "note": "Reduce npm package size by adding an `.npmignore` file." - }, - { - "note": "Move `@0xproject/web3_wrapper` to dependencies from devDependencies." - } - ], - "timestamp": 1521327600, - "isPublished": true - }, - { - "version": "0.3.0", - "changes": [ - { - "note": "Add coverage subprovider if SOLIDITY_COVERAGE env variable is true", - "pr": "426" - }, - { - "note": "Refactor `BlockchainLifecycle` to work with in-process ganache", - "pr": "426" - }, - { - "note": "Remove `RPC` class and move it's logic to `Web3Wrapper`", - "pr": "426" - } - ], - "timestamp": 1521327600, - "isPublished": true - }, - { - "version": "0.2.0", - "changes": [ - { - "note": "Remove subproviders", - "pr": "392" - } - ], - "timestamp": 1518735600, - "isPublished": true - }, - { - "version": "0.0.12", - "changes": [ - { - "note": "Fix publishing issue where .npmignore was not properly excluding undesired content", - "pr": "389" - } - ], - "timestamp": 1518130800, - "isPublished": true - }, - { - "version": "0.0.11", - "changes": [ - { - "note": "Updated `types-ethereumjs-util` dev dependency", - "pr": "352" - } - ], - "timestamp": 1517958000, - "isPublished": true - } -] \ No newline at end of file diff --git a/packages/json-schemas/CHANGELOG.json b/packages/json-schemas/CHANGELOG.json deleted file mode 100644 index 3c78543e9..000000000 --- a/packages/json-schemas/CHANGELOG.json +++ /dev/null @@ -1,34 +0,0 @@ -[ - { - "version": "0.7.13", - "changes": [ - { - "note": " Fix publishing issue where .npmignore was not properly excluding undesired content", - "pr": "389" - } - ], - "timestamp": 1518130800, - "isPublished": true - }, - { - "version": "0.7.0", - "changes": [ - { - "note": "Rename `subscriptionOptsSchema` to `blockRangeSchema`", - "pr": "272" - } - ], - "timestamp": 1513724400, - "isPublished": true - }, - { - "version": "0.6.7", - "changes": [ - { - "note": "Re-publish JSON-schema previously published under NPM package 0x-json-schemas" - } - ], - "timestamp": 1510614000, - "isPublished": true - } -] \ No newline at end of file diff --git a/packages/monorepo-scripts/CHANGELOG.json b/packages/monorepo-scripts/CHANGELOG.json deleted file mode 100644 index a8418d03f..000000000 --- a/packages/monorepo-scripts/CHANGELOG.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "version": "0.1.13", - "changes": [ - { - "note": "Add postpublish utils" - } - ], - "timestamp": 1521327600, - "isPublished": true - } -] \ No newline at end of file diff --git a/packages/react-docs/CHANGELOG.json b/packages/react-docs/CHANGELOG.json deleted file mode 100644 index 9bd78e6df..000000000 --- a/packages/react-docs/CHANGELOG.json +++ /dev/null @@ -1,47 +0,0 @@ -[ - { - "version": "0.0.4", - "changes": [ - { - "note": "Handle `reflection` type rendering so that anonymous function type declarations render properly", - "pr": "465" - }, - { - "note": "Rename `MethodSignature` to `Signature` and change it's props so that it can be used to render method and function signatures.", - "pr": "465" - }, - { - "note": "Rename `MethodBlock` to `SignatureBlock` since it is not used to render method and function signature blocks.", - "pr": "465" - }, - { - "note": "Add support for documenting exported functions.", - "pr": "465" - } - ] - }, - { - "version": "0.0.3", - "changes": [ - { - "note": "Move TS typings from devDependencies to dependencies since they are needed by the package user." - } - ], - "timestamp": 1521327600, - "isPublished": true - }, - { - "version": "0.0.2", - "changes": [ - { - "note": "Move example out into a separate sub-package" - }, - { - "note": "Consolidate all `console.log` calls into `logUtils` in the `@0xproject/utils` package", - "pr": "452" - } - ], - "timestamp": 1521327600, - "isPublished": true - } -] \ No newline at end of file diff --git a/packages/react-shared/CHANGELOG.json b/packages/react-shared/CHANGELOG.json deleted file mode 100644 index 9f16c6f21..000000000 --- a/packages/react-shared/CHANGELOG.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "version": "0.1.0", - "changes": [ - { - "note": "Added new colors", - "pr": "468" - }, - { - "note": "Fix section and menuItem text display to replace dashes with spaces." - } - ] - } -] \ No newline at end of file diff --git a/packages/sol-cov/CHANGELOG.json b/packages/sol-cov/CHANGELOG.json deleted file mode 100644 index 0637a088a..000000000 --- a/packages/sol-cov/CHANGELOG.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/packages/sra-report/CHANGELOG.json b/packages/sra-report/CHANGELOG.json deleted file mode 100644 index ee57bcad3..000000000 --- a/packages/sra-report/CHANGELOG.json +++ /dev/null @@ -1,28 +0,0 @@ -[ - { - "version": "0.0.3", - "changes": [ - { - "note": "Added postman collection unit tests", - "pr": "451" - } - ] - }, - { - "version": "0.0.2", - "changes": [ - { - "note": "Consolidate all `console.log` calls into `logUtils` in the `@0xproject/utils` package", - "pr": "452" - } - ], - "timestamp": 1521327600, - "isPublished": true - }, - { - "version": "0.0.1", - "changes": [], - "timestamp": 1520463600, - "isPublished": true - } -] \ No newline at end of file diff --git a/packages/subproviders/CHANGELOG.json b/packages/subproviders/CHANGELOG.json deleted file mode 100644 index cfe44e266..000000000 --- a/packages/subproviders/CHANGELOG.json +++ /dev/null @@ -1,132 +0,0 @@ -[ - { - "version": "0.8.1", - "changes": [ - { - "note": "Introduce `JSONRPCRequestPayloadWithMethod` type", - "pr": "465" - }, - { - "note": "Export `ErrorCallback` type.", - "pr": "465" - } - ] - }, - { - "version": "0.8.0", - "changes": [ - { - "note": "Export `GanacheSubprovider` and `Subprovider`", - "pr": "426" - }, - { - "note": "Make all subproviders to derive from `Subprovider`", - "pr": "426" - }, - { - "note": "Add types for `NextCallback`, `OnNextCompleted`", - "pr": "426" - }, - { - "note": "Ignore `ganache-core` dependency when using package in a browser environment." - } - ], - "timestamp": 1521327600, - "isPublished": true - }, - { - "version": "0.7.0", - "changes": [ - { - "note": "Updated legerco packages. Removed node-hid package as a dependency and make it an optional dependency. It is still used in integration tests but is causing problems for users on Linux distros.", - "pr": "437" - } - ], - "timestamp": 1520463600, - "isPublished": true - }, - { - "version": "0.6.0", - "changes": [ - { - "note": "Move web3 types from being a devDep to a dep since one cannot use this package without it", - "pr": "429" - }, - { - "note": "Add `numberOfAccounts` param to `LedgerSubprovider` method `getAccountsAsync`", - "pr": "432" - } - ], - "timestamp": 1520118000, - "isPublished": true - }, - { - "version": "0.5.0", - "changes": [ - { - "note": "Add EmptyWalletSubprovider and FakeGasEstimateSubprovider", - "pr": "392" - } - ], - "timestamp": 1518735600, - "isPublished": true - }, - { - "version": "0.4.1", - "changes": [ - { - "note": "Fix publishing issue where .npmignore was not properly excluding undesired content", - "pr": "389" - } - ], - "timestamp": 1518130800, - "isPublished": true - }, - { - "version": "0.4.0", - "changes": [ - { - "note": "Added NonceTrackerSubprovider", - "pr": "355" - }, - { - "note": "InjectedWeb3Subprovider accepts a Provider in the constructor, previously it was a Web3 object", - "pr": "363" - } - ], - "timestamp": 1517958000, - "isPublished": true - }, - { - "version": "0.3.6", - "changes": [ - { - "note": "Return a transaction hash from `_sendTransactionAsync`", - "pr": "303" - } - ], - "timestamp": 1517094000, - "isPublished": true - }, - { - "version": "0.3.0", - "changes": [ - { - "note": "Allow LedgerSubprovider to handle `eth_sign` in addition to `personal_sign` RPC requests" - } - ], - "timestamp": 1514415600, - "isPublished": true - }, - { - "version": "0.2.0", - "changes": [ - { - "note": "Improve the performance of address fetching", - "pr": "271" - } - ], - "timestamp": 1513724400, - "isPublished": true - } -] \ No newline at end of file diff --git a/packages/tslint-config/CHANGELOG.json b/packages/tslint-config/CHANGELOG.json deleted file mode 100644 index 6270b9b9d..000000000 --- a/packages/tslint-config/CHANGELOG.json +++ /dev/null @@ -1,71 +0,0 @@ -[ - { - "version": "0.4.9", - "changes": [ - { - "note": "Move devDeps to deps to fix missed dependency issue in published package." - } - ], - "timestamp": 1518130800, - "isPublished": true - }, - { - "version": "0.4.8", - "changes": [ - { - "note": "Fix publish issue where custom TSLint rules were not being included", - "pr": "389" - } - ], - "timestamp": 1518130800, - "isPublished": true - }, - { - "version": "0.4.7", - "changes": [ - { - "note": "Modified custom 'underscore-privates' rule, changing it to 'underscore-private-and-protected' requiring underscores to be prepended to both private and protected variable names", - "pr": "354" - } - ], - "timestamp": 1517958000, - "isPublished": true - }, - { - "version": "0.4.0", - "changes": [ - { - "note": "Added custom 'underscore-privates' rule, requiring underscores to be prepended to private variable names" - }, - { - "note": "Because our tools can be used in both a TS and JS environment, we want to make the private methods of any public facing interface show up at the bottom of auto-complete lists. Additionally, we wanted to remain consistent with respect to our usage of underscores in order to enforce this rule with a linter rule, rather then manual code reviews." - } - ], - "timestamp": 1514415600, - "isPublished": true - }, - { - "version": "0.3.0", - "changes": [ - { - "note": "Added rules for unused imports, variables and Async suffixes", - "pr": "265" - } - ], - "timestamp": 1513724400, - "isPublished": true - }, - { - "version": "0.1.0", - "changes": [ - { - "note": "Re-published TsLintConfig previously published under NPM package `tslint-config-0xproject`" - }, - { - "note": "Updated to TSLint v5.8.0, requiring several rule additions to keep our conventions aligned." - } - ], - "timestamp": 1510614000, - "isPublished": true - } -] \ No newline at end of file diff --git a/packages/types/CHANGELOG.json b/packages/types/CHANGELOG.json deleted file mode 100644 index d3ab3dfd0..000000000 --- a/packages/types/CHANGELOG.json +++ /dev/null @@ -1,68 +0,0 @@ -[ - { - "version": "0.4.0", - "changes": [ - { - "note": "Remove `JSONRPCPayload`", - "pr": "426" - }, - { - "note": "Consolidate `Order`, `SignedOrder`, and `ECSignature` into the `@0xproject/types` package", - "pr": "456" - } - ], - "timestamp": 1521327600, - "isPublished": true - }, - { - "version": "0.3.1", - "changes": [ - { - "note": "Added `RawLogEntry` type." - } - ], - "timestamp": 1520463600, - "isPublished": true - }, - { - "version": "0.3.0", - "changes": [ - { - "note": "Add `data` to `TxData`", - "pr": "413" - }, - { - "note": "Add `number` as an option to `ContractEventArg`", - "pr": "413" - }, - { - "note": "Move web3 types from devDep to dep since required when using this package", - "pr": "429" - } - ], - "timestamp": 1520118000, - "isPublished": true - }, - { - "version": "0.2.1", - "changes": [ - { - "note": "Fix publishing issue where .npmignore was not properly excluding undesired content", - "pr": "389" - } - ], - "timestamp": 1518130800, - "isPublished": true - }, - { - "version": "0.2.0", - "changes": [ - { - "note": "Added BlockLiteralParam and BlockParam, refactored out of 0x.js types.", - "pr": "355" - } - ], - "timestamp": 1517958000, - "isPublished": true - } -] \ No newline at end of file diff --git a/packages/typescript-typings/CHANGELOG.json b/packages/typescript-typings/CHANGELOG.json deleted file mode 100644 index 1bb6b752c..000000000 --- a/packages/typescript-typings/CHANGELOG.json +++ /dev/null @@ -1,6 +0,0 @@ -[ - { - "version": "0.0.2", - "changes": [] - } -] \ No newline at end of file diff --git a/packages/utils/CHANGELOG.json b/packages/utils/CHANGELOG.json deleted file mode 100644 index 8dc1973be..000000000 --- a/packages/utils/CHANGELOG.json +++ /dev/null @@ -1,75 +0,0 @@ -[ - { - "version": "0.4.3", - "changes": [ - { - "note": "Add `@types/node` to dependencies since `intervalUtils` has the `NodeJS` type as part of its public interface." - } - ], - "timestamp": 1521327600, - "isPublished": true - }, - { - "version": "0.4.2", - "changes": [ - { - "note": "Consolidate all `console.log` calls into `logUtils` in the `@0xproject/utils` package", - "pr": "452" - } - ], - "timestamp": 1521327600, - "isPublished": true - }, - { - "version": "0.4.0", - "changes": [ - { - "note": "Use `ethers-contracts` as a backend to decode event args", - "pr": "413" - }, - { - "note": "Move web3 types from devDep to dep since required when using this package", - "pr": "429" - } - ], - "timestamp": 1520118000, - "isPublished": true - }, - { - "version": "0.3.2", - "changes": [ - { - "note": "Fix publishing issue where .npmignore was not properly excluding undesired content", - "pr": "389" - } - ], - "timestamp": 1518130800, - "isPublished": true - }, - { - "version": "0.3.0", - "changes": [ - { - "note": "Fix a bug related to event signature collisions (argument indexes aren't included in event signatures) in the abi_decoder. The decoder used to throw on unknown events with identical signatures as a known event (except indexes).", - "pr": "366" - } - ], - "timestamp": 1517785200, - "isPublished": true - }, - { - "version": "0.2.0", - "changes": [ - { - "note": "Add `onError` parameter to `intervalUtils.setAsyncExcludingInterval`", - "pr": "312" - }, - { - "note": "Add `intervalUtils.setInterval`", - "pr": "312" - } - ], - "timestamp": 1516143600, - "isPublished": true - } -] \ No newline at end of file diff --git a/packages/web3-wrapper/CHANGELOG.json b/packages/web3-wrapper/CHANGELOG.json deleted file mode 100644 index ca3df6d51..000000000 --- a/packages/web3-wrapper/CHANGELOG.json +++ /dev/null @@ -1,64 +0,0 @@ -[ - { - "version": "0.4.0", - "changes": [ - { - "note": "Rename `signTransactionAsync` to `signMessageAsync` for clarity", - "pr": "465" - } - ] - }, - { - "version": "0.3.0", - "changes": [ - { - "note": "Add `web3Wrapper.takeSnapshotAsync`, `web3Wrapper.revertSnapshotAsync`, `web3Wrapper.mineBlockAsync`, `web3Wrapper.increaseTimeAsync`", - "pr": "426" - }, - { - "note": "Add `web3Wrapper.isZeroExWeb3Wrapper` for runtime instanceOf checks", - "pr": "426" - }, - { - "note": "Add a `getProvider` method", - "pr": "444" - } - ], - "timestamp": 1521327600, - "isPublished": true - }, - { - "version": "0.2.0", - "changes": [ - { - "note": "Ensure all returned user addresses are lowercase", - "pr": "373" - }, - { - "note": "Add `web3Wrapper.callAsync`", - "pr": "413" - }, - { - "note": "Make `web3Wrapper.estimateGas` accept whole `txData` instead of `data`", - "pr": "413" - }, - { - "note": "Remove `web3Wrapper.getContractInstance`", - "pr": "413" - } - ], - "timestamp": 1520118000, - "isPublished": true - }, - { - "version": "0.1.12", - "changes": [ - { - "note": "Fix publishing issue where .npmignore was not properly excluding undesired content", - "pr": "389" - } - ], - "timestamp": 1518130800, - "isPublished": true - } -] \ No newline at end of file -- cgit From 323826111ae8a3cc71a147faf05de5db2c195d1e Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 30 Mar 2018 15:48:54 +0200 Subject: Remove CHANGELOG from website since it's a public package --- packages/website/CHANGELOG.md | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 packages/website/CHANGELOG.md diff --git a/packages/website/CHANGELOG.md b/packages/website/CHANGELOG.md deleted file mode 100644 index 642b972a2..000000000 --- a/packages/website/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -# CHANGELOG - -## v0.0.1 - _February 16, 2018_ - - * Re-designed wiki + doc page template (#405) -- cgit From 33ec9fdf47de4d8ab9d8ce43adedf4615dece4d9 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 30 Mar 2018 15:49:09 +0200 Subject: Fixes for clarity --- packages/monorepo-scripts/src/publish.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts index 905fee196..e2c0edff8 100644 --- a/packages/monorepo-scripts/src/publish.ts +++ b/packages/monorepo-scripts/src/publish.ts @@ -105,7 +105,7 @@ const semverNameToIndex: { [semver: string]: number } = { }); async function lernaPublishAsync(packageToVersionChange: { [name: string]: string }) { - // HACK: Lerna publish does not provide a way to specify multiple package versions as + // HACK: Lerna publish does not provide a way to specify multiple package versions via // flags so instead we need to interact with their interactive prompt interface. const child = spawn('lerna', ['publish', '--registry=https://registry.npmjs.org/'], { cwd: constants.monorepoRootPath, @@ -121,7 +121,8 @@ async function lernaPublishAsync(packageToVersionChange: { [name: string]: strin if (isPrivatePackage) { versionChange = 'patch'; // Always patch updates to private packages. } - child.stdin.write(`${semverNameToIndex[versionChange]}\n`); + const semVerIndex = semverNameToIndex[versionChange]; + child.stdin.write(`${semVerIndex}\n`); } const isFinalPrompt = _.includes(output, 'Are you sure you want to publish the above changes?'); if (isFinalPrompt && !IS_DRY_RUN) { -- cgit From bf52ce7e725224de23c2a5318b8224cc92e5188a Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 2 Apr 2018 02:40:48 +0900 Subject: Add temp comment, clean up code --- .../monorepo-scripts/src/convert_changelogs.ts | 29 ++++++++++++++++------ 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/packages/monorepo-scripts/src/convert_changelogs.ts b/packages/monorepo-scripts/src/convert_changelogs.ts index 76ce50ced..7ba4c544e 100644 --- a/packages/monorepo-scripts/src/convert_changelogs.ts +++ b/packages/monorepo-scripts/src/convert_changelogs.ts @@ -1,4 +1,9 @@ #!/usr/bin/env node +/** + * TEMPORARY SCRIPT + * This script exists to migrate the legacy CHANGELOG.md to the canonical CHANGELOG.md + * TODO: Remove after migration is successful and committed. + */ import * as fs from 'fs'; import lernaGetPackages = require('lerna-get-packages'); @@ -6,13 +11,14 @@ import * as _ from 'lodash'; import * as moment from 'moment'; import * as path from 'path'; +import { constants } from './constants'; import { Changelog, Changes, UpdatedPackage } from './types'; import { utils } from './utils'; -const MONOREPO_ROOT_PATH = path.join(__dirname, '../../..'); +const HEADER_PRAGMA = '##'; (async () => { - const allLernaPackages = lernaGetPackages(MONOREPO_ROOT_PATH); + const allLernaPackages = lernaGetPackages(constants.monorepoRootPath); const publicLernaPackages = _.filter(allLernaPackages, pkg => !pkg.package.private); _.each(publicLernaPackages, lernaPackage => { const changelogMdIfExists = getChangelogMdIfExists(lernaPackage.package.name, lernaPackage.location); @@ -20,14 +26,20 @@ const MONOREPO_ROOT_PATH = path.join(__dirname, '../../..'); throw new Error(`${lernaPackage.package.name} should have CHANGELOG.md b/c it's public. Add one.`); } - const lines = (changelogMdIfExists as any).split('\n'); + const lines = (changelogMdIfExists as string).split('\n'); const changelogs: Changelog[] = []; let changelog: Changelog = { version: '', changes: [], }; + /** + * Example MD entry: + * ## v0.3.1 - _March 18, 2018_ + * + * * Add TS types for `yargs` (#400) + */ for (const line of lines) { - if (_.startsWith(line, '## ')) { + if (_.startsWith(line, `${HEADER_PRAGMA} `)) { let version = line.substr(4).split(' - ')[0]; if (version === '0.x.x') { version = utils.getNextPatchVersion(lernaPackage.package.version); @@ -47,7 +59,7 @@ const MONOREPO_ROOT_PATH = path.join(__dirname, '../../..'); if (!_.includes(dateStr, 'TBD')) { changelog.isPublished = true; } - (changelogs as any).push(changelog); + changelogs.push(changelog); } else if (_.includes(line, '* ')) { const note = line.split('* ')[1].split(' (#')[0]; const prChunk = line.split(' (#')[1]; @@ -55,10 +67,12 @@ const MONOREPO_ROOT_PATH = path.join(__dirname, '../../..'); if (!_.isUndefined(prChunk)) { pr = prChunk.split(')')[0]; } - const changes = { + const changes: Changes = { note, - pr, }; + if (!_.isUndefined(pr)) { + changes.pr = _.parseInt(pr); + } changelog.changes.push(changes); } } @@ -77,7 +91,6 @@ function getChangelogMdIfExists(packageName: string, location: string): string | changelogMd = fs.readFileSync(changelogPath, 'utf-8'); return changelogMd; } catch (err) { - // If none exists, create new, empty one. return undefined; } } -- cgit From 0e33f45f3dbf7934692e3baa3daa90ddab0c184f Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 2 Apr 2018 04:10:18 +0900 Subject: Improve naming --- packages/monorepo-scripts/src/publish.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts index e2c0edff8..1821dad28 100644 --- a/packages/monorepo-scripts/src/publish.ts +++ b/packages/monorepo-scripts/src/publish.ts @@ -27,14 +27,14 @@ const semverNameToIndex: { [semver: string]: number } = { const updatedPackageNames = _.map(updatedPublicPackages, pkg => pkg.name); const allLernaPackages = lernaGetPackages(constants.monorepoRootPath); - const relevantLernaPackages = _.filter(allLernaPackages, pkg => { + const updatedPublicLernaPackages = _.filter(allLernaPackages, pkg => { return _.includes(updatedPackageNames, pkg.package.name); }); - const relevantPackageNames = _.map(relevantLernaPackages, pkg => pkg.package.name); + const relevantPackageNames = _.map(updatedPublicLernaPackages, pkg => pkg.package.name); utils.log(`Will update CHANGELOGs and publish: \n${relevantPackageNames.join('\n')}\n`); const packageToVersionChange: { [name: string]: string } = {}; - _.each(relevantLernaPackages, lernaPackage => { + _.each(updatedPublicLernaPackages, lernaPackage => { const packageName = lernaPackage.package.name; const changelogJSONPath = path.join(lernaPackage.location, 'CHANGELOG.json'); const changelogJSON = getChangelogJSONOrCreateIfMissing(lernaPackage.package.name, changelogJSONPath); -- cgit From d187a31e3833f21c86da070bceb858813e4848e3 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 2 Apr 2018 05:10:27 +0900 Subject: Make dry-run configurable from top-level package.json --- package.json | 2 +- packages/monorepo-scripts/src/publish.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 31b669bc7..2b1f04802 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "lerna:run": "lerna run", "lerna:rebuild": "lerna run clean; lerna run build;", "lerna:publish": - "yarn install; yarn lerna:rebuild; node ./packages/monorepo-scripts/lib/publish.js" + "yarn install; yarn lerna:rebuild; IS_DRY_RUN=false node ./packages/monorepo-scripts/lib/publish.js" }, "config": { "mnemonic": "concert load couple harbor equip island argue ramp clarify fence smart topic" diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts index 1821dad28..2f18f2a9c 100644 --- a/packages/monorepo-scripts/src/publish.ts +++ b/packages/monorepo-scripts/src/publish.ts @@ -13,7 +13,7 @@ import { constants } from './constants'; import { Changelog, Changes, SemVerIndex, UpdatedPackage } from './types'; import { utils } from './utils'; -const IS_DRY_RUN = false; +const IS_DRY_RUN = process.env.IS_DRY_RUN === 'false'; const TODAYS_TIMESTAMP = moment().unix(); const LERNA_EXECUTABLE = './node_modules/lerna/bin/lerna.js'; const semverNameToIndex: { [semver: string]: number } = { -- cgit From 688f8615ffb817b6bead7d3ab18d355c484d812a Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 2 Apr 2018 05:12:03 +0900 Subject: Fix TSLint error --- packages/monorepo-scripts/src/convert_changelogs.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/monorepo-scripts/src/convert_changelogs.ts b/packages/monorepo-scripts/src/convert_changelogs.ts index 7ba4c544e..c62cf844b 100644 --- a/packages/monorepo-scripts/src/convert_changelogs.ts +++ b/packages/monorepo-scripts/src/convert_changelogs.ts @@ -26,7 +26,7 @@ const HEADER_PRAGMA = '##'; throw new Error(`${lernaPackage.package.name} should have CHANGELOG.md b/c it's public. Add one.`); } - const lines = (changelogMdIfExists as string).split('\n'); + const lines = changelogMdIfExists.split('\n'); const changelogs: Changelog[] = []; let changelog: Changelog = { version: '', -- cgit From fab88ea2ccf29f7e00c8f1f469200a72d0151bdd Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 2 Apr 2018 08:44:27 +0900 Subject: Get rid of ; in top-level package.json --- package.json | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 2b1f04802..e1c876bd8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,9 @@ { "private": true, "name": "0x-monorepo", - "workspaces": ["packages/*"], + "workspaces": [ + "packages/*" + ], "scripts": { "dev": "lerna run --parallel build:watch", "testrpc": "testrpc -p 8545 --networkId 50 -m \"${npm_package_config_mnemonic}\"", @@ -9,10 +11,15 @@ "prettier:ci": "prettier --list-different '**/*.{ts,tsx,json,md}' --config .prettierrc", "report_coverage": "lcov-result-merger 'packages/*/coverage/lcov.info' | coveralls", "test:installation": "node ./packages/monorepo-scripts/lib/test_installation.js", + "lerna:install": "yarn install", "lerna:run": "lerna run", - "lerna:rebuild": "lerna run clean; lerna run build;", - "lerna:publish": - "yarn install; yarn lerna:rebuild; IS_DRY_RUN=false node ./packages/monorepo-scripts/lib/publish.js" + "lerna:clean": "lerna run clean", + "lerna:build": "lerna run build", + "lerna:rebuild": "run-s lerna:clean lerna:build", + "lerna:publish": "run-s lerna:install lerna:rebuild script:publish", + "lerna:publish:dry": "run-s lerna:install lerna:rebuild script:publish:dry", + "script:publish": "node ./packages/monorepo-scripts/lib/publish.js", + "script:publish:dry": "IS_DRY_RUN=false yarn script:publish" }, "config": { "mnemonic": "concert load couple harbor equip island argue ramp clarify fence smart topic" @@ -23,6 +30,7 @@ "ethereumjs-testrpc": "^6.0.3", "lcov-result-merger": "^2.0.0", "lerna": "^2.5.1", + "npm-run-all": "^4.1.2", "prettier": "^1.11.1" } } -- cgit From cd23f220a0a3ebd79667a169923284102509400c Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 2 Apr 2018 08:51:10 +0900 Subject: Remove semi-colons from monorepo-scripts package.json --- packages/monorepo-scripts/README.md | 2 +- packages/monorepo-scripts/package.json | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/monorepo-scripts/README.md b/packages/monorepo-scripts/README.md index ea1d43bd5..dbdfdf135 100644 --- a/packages/monorepo-scripts/README.md +++ b/packages/monorepo-scripts/README.md @@ -9,7 +9,7 @@ This repository contains a few helpful scripts for working with this mono repo. In order to reduce the size of this repo, we try and use the same versions of dependencies between packages. To make it easier to discover version discrepancies between packages, you can run: ```bash -yarn deps_versions +yarn scripts:deps_versions ``` This will list out any dependencies that differ in versions between packages. diff --git a/packages/monorepo-scripts/package.json b/packages/monorepo-scripts/package.json index 7c87199fc..3cef65b19 100644 --- a/packages/monorepo-scripts/package.json +++ b/packages/monorepo-scripts/package.json @@ -6,12 +6,14 @@ "types": "lib/index.d.ts", "scripts": { "build:watch": "tsc -w", - "deps_versions": "node ./lib/deps_versions.js", - "publish": "yarn build; node ./lib/publish.js", - "convert_changelogs": "yarn build; node ./lib/convert_changelogs.js", "lint": "tslint --project . 'src/**/*.ts'", "clean": "shx rm -rf lib", - "build": "tsc" + "build": "tsc", + "publish": "run-s build script:publish", + "convert_changelogs": "run-s build script:convert_changelogs", + "script:deps_versions": "node ./lib/deps_versions.js", + "script:publish": "node ./lib/publish.js", + "script:convert_changelogs": "node ./lib/convert_changelogs.js" }, "repository": { "type": "git", @@ -30,6 +32,7 @@ "@types/node": "^8.0.53", "@types/rimraf": "^2.0.2", "lerna-get-packages": "^1.0.0", + "npm-run-all": "^4.1.2", "shx": "^0.2.2", "tslint": "5.8.0", "typescript": "2.7.1" -- cgit From 2a6a71ea6cd89d39142f51530d06e80ffc44e722 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 2 Apr 2018 15:49:48 +0900 Subject: Add prettier run on generated CHANGELOG.json and fix scripts --- package.json | 2 +- packages/monorepo-scripts/package.json | 4 ++-- packages/monorepo-scripts/src/convert_changelogs.ts | 13 +++++++++---- packages/monorepo-scripts/src/publish.ts | 15 +++++++++------ 4 files changed, 21 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index e1c876bd8..b3b3e3bcc 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "lerna:publish": "run-s lerna:install lerna:rebuild script:publish", "lerna:publish:dry": "run-s lerna:install lerna:rebuild script:publish:dry", "script:publish": "node ./packages/monorepo-scripts/lib/publish.js", - "script:publish:dry": "IS_DRY_RUN=false yarn script:publish" + "script:publish:dry": "IS_DRY_RUN=true yarn script:publish" }, "config": { "mnemonic": "concert load couple harbor equip island argue ramp clarify fence smart topic" diff --git a/packages/monorepo-scripts/package.json b/packages/monorepo-scripts/package.json index 3cef65b19..0ce7c1339 100644 --- a/packages/monorepo-scripts/package.json +++ b/packages/monorepo-scripts/package.json @@ -9,10 +9,10 @@ "lint": "tslint --project . 'src/**/*.ts'", "clean": "shx rm -rf lib", "build": "tsc", - "publish": "run-s build script:publish", + "test:publish": "run-s build script:publish", "convert_changelogs": "run-s build script:convert_changelogs", "script:deps_versions": "node ./lib/deps_versions.js", - "script:publish": "node ./lib/publish.js", + "script:publish": "IS_DRY_RUN=true node ./lib/publish.js", "script:convert_changelogs": "node ./lib/convert_changelogs.js" }, "repository": { diff --git a/packages/monorepo-scripts/src/convert_changelogs.ts b/packages/monorepo-scripts/src/convert_changelogs.ts index c62cf844b..f4c4d51a2 100644 --- a/packages/monorepo-scripts/src/convert_changelogs.ts +++ b/packages/monorepo-scripts/src/convert_changelogs.ts @@ -10,6 +10,7 @@ import lernaGetPackages = require('lerna-get-packages'); import * as _ from 'lodash'; import * as moment from 'moment'; import * as path from 'path'; +import { exec as execAsync } from 'promisify-child-process'; import { constants } from './constants'; import { Changelog, Changes, UpdatedPackage } from './types'; @@ -20,7 +21,7 @@ const HEADER_PRAGMA = '##'; (async () => { const allLernaPackages = lernaGetPackages(constants.monorepoRootPath); const publicLernaPackages = _.filter(allLernaPackages, pkg => !pkg.package.private); - _.each(publicLernaPackages, lernaPackage => { + for (const lernaPackage of publicLernaPackages) { const changelogMdIfExists = getChangelogMdIfExists(lernaPackage.package.name, lernaPackage.location); if (_.isUndefined(changelogMdIfExists)) { throw new Error(`${lernaPackage.package.name} should have CHANGELOG.md b/c it's public. Add one.`); @@ -76,9 +77,13 @@ const HEADER_PRAGMA = '##'; changelog.changes.push(changes); } } - const changelogJson = JSON.stringify(changelogs, null, '\t'); - fs.writeFileSync(`${lernaPackage.location}/CHANGELOG.json`, changelogJson); - }); + const changelogJson = JSON.stringify(changelogs); + const changelogJsonPath = `${lernaPackage.location}/CHANGELOG.json`; + fs.writeFileSync(changelogJsonPath, changelogJson); + await execAsync(`prettier --write ${changelogJsonPath} --config .prettierrc`, { + cwd: constants.monorepoRootPath, + }); + } })().catch(err => { utils.log(err.stdout); process.exit(1); diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts index 2f18f2a9c..2263e2f8c 100644 --- a/packages/monorepo-scripts/src/publish.ts +++ b/packages/monorepo-scripts/src/publish.ts @@ -13,7 +13,7 @@ import { constants } from './constants'; import { Changelog, Changes, SemVerIndex, UpdatedPackage } from './types'; import { utils } from './utils'; -const IS_DRY_RUN = process.env.IS_DRY_RUN === 'false'; +const IS_DRY_RUN = process.env.IS_DRY_RUN === 'true'; const TODAYS_TIMESTAMP = moment().unix(); const LERNA_EXECUTABLE = './node_modules/lerna/bin/lerna.js'; const semverNameToIndex: { [semver: string]: number } = { @@ -30,11 +30,11 @@ const semverNameToIndex: { [semver: string]: number } = { const updatedPublicLernaPackages = _.filter(allLernaPackages, pkg => { return _.includes(updatedPackageNames, pkg.package.name); }); - const relevantPackageNames = _.map(updatedPublicLernaPackages, pkg => pkg.package.name); - utils.log(`Will update CHANGELOGs and publish: \n${relevantPackageNames.join('\n')}\n`); + const updatedPublicLernaPackageNames = _.map(updatedPublicLernaPackages, pkg => pkg.package.name); + utils.log(`Will update CHANGELOGs and publish: \n${updatedPublicLernaPackageNames.join('\n')}\n`); const packageToVersionChange: { [name: string]: string } = {}; - _.each(updatedPublicLernaPackages, lernaPackage => { + for (const lernaPackage of updatedPublicLernaPackages) { const packageName = lernaPackage.package.name; const changelogJSONPath = path.join(lernaPackage.location, 'CHANGELOG.json'); const changelogJSON = getChangelogJSONOrCreateIfMissing(lernaPackage.package.name, changelogJSONPath); @@ -77,14 +77,17 @@ const semverNameToIndex: { [semver: string]: number } = { } // Save updated CHANGELOG.json - fs.writeFileSync(changelogJSONPath, JSON.stringify(changelogs, null, '\t')); + fs.writeFileSync(changelogJSONPath, JSON.stringify(changelogs)); + await execAsync(`prettier --write ${changelogJSONPath} --config .prettierrc`, { + cwd: constants.monorepoRootPath, + }); utils.log(`${packageName}: Updated CHANGELOG.json`); // Generate updated CHANGELOG.md const changelogMd = generateChangelogMd(changelogs); const changelogMdPath = path.join(lernaPackage.location, 'CHANGELOG.md'); fs.writeFileSync(changelogMdPath, changelogMd); utils.log(`${packageName}: Updated CHANGELOG.md`); - }); + } if (!IS_DRY_RUN) { await execAsync(`git add . --all`, { cwd: constants.monorepoRootPath }); -- cgit From 3f230a8fdbca3728a4d6b1677d776b8e0dbbae6a Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 2 Apr 2018 15:53:31 +0900 Subject: Move prettify command to utils and also call it on CHANGELOG.md --- packages/monorepo-scripts/src/convert_changelogs.ts | 10 ++++------ packages/monorepo-scripts/src/publish.ts | 5 ++--- packages/monorepo-scripts/src/utils.ts | 6 ++++++ 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/packages/monorepo-scripts/src/convert_changelogs.ts b/packages/monorepo-scripts/src/convert_changelogs.ts index f4c4d51a2..71383ee7c 100644 --- a/packages/monorepo-scripts/src/convert_changelogs.ts +++ b/packages/monorepo-scripts/src/convert_changelogs.ts @@ -77,12 +77,10 @@ const HEADER_PRAGMA = '##'; changelog.changes.push(changes); } } - const changelogJson = JSON.stringify(changelogs); - const changelogJsonPath = `${lernaPackage.location}/CHANGELOG.json`; - fs.writeFileSync(changelogJsonPath, changelogJson); - await execAsync(`prettier --write ${changelogJsonPath} --config .prettierrc`, { - cwd: constants.monorepoRootPath, - }); + const changelogJSONPath = JSON.stringify(changelogs); + const changelogJSONPathPath = `${lernaPackage.location}/CHANGELOG.json`; + fs.writeFileSync(changelogJSONPathPath, changelogJSONPath); + await utils.prettifyAsync(changelogJSONPath, constants.monorepoRootPath); } })().catch(err => { utils.log(err.stdout); diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts index 2263e2f8c..30e5bd0e1 100644 --- a/packages/monorepo-scripts/src/publish.ts +++ b/packages/monorepo-scripts/src/publish.ts @@ -78,14 +78,13 @@ const semverNameToIndex: { [semver: string]: number } = { // Save updated CHANGELOG.json fs.writeFileSync(changelogJSONPath, JSON.stringify(changelogs)); - await execAsync(`prettier --write ${changelogJSONPath} --config .prettierrc`, { - cwd: constants.monorepoRootPath, - }); + await utils.prettifyAsync(changelogJSONPath, constants.monorepoRootPath); utils.log(`${packageName}: Updated CHANGELOG.json`); // Generate updated CHANGELOG.md const changelogMd = generateChangelogMd(changelogs); const changelogMdPath = path.join(lernaPackage.location, 'CHANGELOG.md'); fs.writeFileSync(changelogMdPath, changelogMd); + await utils.prettifyAsync(changelogMdPath, constants.monorepoRootPath); utils.log(`${packageName}: Updated CHANGELOG.md`); } diff --git a/packages/monorepo-scripts/src/utils.ts b/packages/monorepo-scripts/src/utils.ts index 73f6260d3..9aa37e272 100644 --- a/packages/monorepo-scripts/src/utils.ts +++ b/packages/monorepo-scripts/src/utils.ts @@ -1,4 +1,5 @@ import * as _ from 'lodash'; +import { exec as execAsync, spawn } from 'promisify-child-process'; export const utils = { log(...args: any[]): void { @@ -11,4 +12,9 @@ export const utils = { const newPatchVersion = `${versionSegments[0]}.${versionSegments[1]}.${newPatch}`; return newPatchVersion; }, + async prettifyAsync(filePath: string, cwd: string) { + await execAsync(`prettier --write ${filePath} --config .prettierrc`, { + cwd, + }); + }, }; -- cgit From 01c6fd92e8ebc93d333278a356a4a0fac26b58c2 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 2 Apr 2018 16:06:36 +0900 Subject: Update moment, no longer need separate moment types --- packages/monorepo-scripts/package.json | 3 +-- packages/website/package.json | 3 +-- yarn.lock | 12 +----------- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/packages/monorepo-scripts/package.json b/packages/monorepo-scripts/package.json index 0ce7c1339..ed263d5cb 100644 --- a/packages/monorepo-scripts/package.json +++ b/packages/monorepo-scripts/package.json @@ -28,7 +28,6 @@ "devDependencies": { "@0xproject/tslint-config": "0.4.8", "@types/glob": "^5.0.33", - "@types/moment": "2.13.0", "@types/node": "^8.0.53", "@types/rimraf": "^2.0.2", "lerna-get-packages": "^1.0.0", @@ -43,7 +42,7 @@ "es6-promisify": "^5.0.0", "glob": "^7.1.2", "lodash": "^4.17.4", - "moment": "2.13.0", + "moment": "2.21.0", "promisify-child-process": "^1.0.5", "publish-release": "0xproject/publish-release", "rimraf": "^2.6.2", diff --git a/packages/website/package.json b/packages/website/package.json index b62b294df..27f76cff4 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -38,7 +38,7 @@ "less": "^2.7.2", "lodash": "^4.17.4", "material-ui": "^0.17.1", - "moment": "2.13.0", + "moment": "2.21.0", "query-string": "^5.0.1", "react": "15.6.1", "react-copy-to-clipboard": "^4.2.3", @@ -73,7 +73,6 @@ "@types/jsonschema": "^1.1.1", "@types/lodash": "4.14.104", "@types/material-ui": "0.18.0", - "@types/moment": "2.13.0", "@types/node": "^8.0.53", "@types/query-string": "^5.0.1", "@types/react": "^16.0.34", diff --git a/yarn.lock b/yarn.lock index 9f1cf1e87..862ea09b2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -212,12 +212,6 @@ version "2.2.48" resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-2.2.48.tgz#3523b126a0b049482e1c3c11877460f76622ffab" -"@types/moment@2.13.0": - version "2.13.0" - resolved "https://registry.yarnpkg.com/@types/moment/-/moment-2.13.0.tgz#604ebd189bc3bc34a1548689404e61a2a4aac896" - dependencies: - moment "*" - "@types/nock@^9.1.2": version "9.1.2" resolved "https://registry.yarnpkg.com/@types/nock/-/nock-9.1.2.tgz#0515b27e3f6bbc11834d22508ad02e2921dd376a" @@ -7627,14 +7621,10 @@ modify-values@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" -moment@*, moment@^2.6.0: +moment@2.21.0, moment@^2.6.0: version "2.21.0" resolved "https://registry.yarnpkg.com/moment/-/moment-2.21.0.tgz#2a114b51d2a6ec9e6d83cf803f838a878d8a023a" -moment@2.13.0: - version "2.13.0" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.13.0.tgz#24162d99521e6d40f99ae6939e806d2139eaac52" - mout@^0.11.0: version "0.11.1" resolved "https://registry.yarnpkg.com/mout/-/mout-0.11.1.tgz#ba3611df5f0e5b1ffbfd01166b8f02d1f5fa2b99" -- cgit From 76c5945017c945122c3e72bc7dcdf5dd048b4a22 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 2 Apr 2018 16:40:02 +0900 Subject: Default to 4sp --- packages/monorepo-scripts/src/convert_changelogs.ts | 2 +- packages/monorepo-scripts/src/publish.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/monorepo-scripts/src/convert_changelogs.ts b/packages/monorepo-scripts/src/convert_changelogs.ts index 71383ee7c..c75abfc44 100644 --- a/packages/monorepo-scripts/src/convert_changelogs.ts +++ b/packages/monorepo-scripts/src/convert_changelogs.ts @@ -77,7 +77,7 @@ const HEADER_PRAGMA = '##'; changelog.changes.push(changes); } } - const changelogJSONPath = JSON.stringify(changelogs); + const changelogJSONPath = JSON.stringify(changelogs, null, 4); const changelogJSONPathPath = `${lernaPackage.location}/CHANGELOG.json`; fs.writeFileSync(changelogJSONPathPath, changelogJSONPath); await utils.prettifyAsync(changelogJSONPath, constants.monorepoRootPath); diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts index 30e5bd0e1..240158c77 100644 --- a/packages/monorepo-scripts/src/publish.ts +++ b/packages/monorepo-scripts/src/publish.ts @@ -77,7 +77,7 @@ const semverNameToIndex: { [semver: string]: number } = { } // Save updated CHANGELOG.json - fs.writeFileSync(changelogJSONPath, JSON.stringify(changelogs)); + fs.writeFileSync(changelogJSONPath, JSON.stringify(changelogs, null, 4)); await utils.prettifyAsync(changelogJSONPath, constants.monorepoRootPath); utils.log(`${packageName}: Updated CHANGELOG.json`); // Generate updated CHANGELOG.md @@ -162,7 +162,7 @@ function getChangelogJSONOrCreateIfMissing(packageName: string, changelogPath: s return changelogJSON; } catch (err) { // If none exists, create new, empty one. - const emptyChangelogJSON = JSON.stringify([]); + const emptyChangelogJSON = JSON.stringify([], null, 4); fs.writeFileSync(changelogPath, emptyChangelogJSON); return emptyChangelogJSON; } -- cgit From 723276ae3fe460ebb89b9b0948c3423e021e2cf9 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 2 Apr 2018 16:56:14 +0900 Subject: Fix hasty find/replace --- packages/monorepo-scripts/src/convert_changelogs.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/monorepo-scripts/src/convert_changelogs.ts b/packages/monorepo-scripts/src/convert_changelogs.ts index c75abfc44..b5be14ed8 100644 --- a/packages/monorepo-scripts/src/convert_changelogs.ts +++ b/packages/monorepo-scripts/src/convert_changelogs.ts @@ -77,9 +77,9 @@ const HEADER_PRAGMA = '##'; changelog.changes.push(changes); } } - const changelogJSONPath = JSON.stringify(changelogs, null, 4); - const changelogJSONPathPath = `${lernaPackage.location}/CHANGELOG.json`; - fs.writeFileSync(changelogJSONPathPath, changelogJSONPath); + const changelogJSON = JSON.stringify(changelogs, null, 4); + const changelogJSONPath = `${lernaPackage.location}/CHANGELOG.json`; + fs.writeFileSync(changelogJSONPath, changelogJSON); await utils.prettifyAsync(changelogJSONPath, constants.monorepoRootPath); } })().catch(err => { -- cgit