Skip to content

Commit

Permalink
Fix web3x-codegen path resolution bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
xf00f committed Jun 23, 2019
1 parent d79266d commit 8b7f519
Show file tree
Hide file tree
Showing 10 changed files with 96 additions and 653 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

All notable changes to this project will be documented in this file.

## [4.0.0] - 2019-05-22
## [4.0.1] - 2019-06-23

- Fix `web3x-codegen` path resolution bug.

## [4.0.0] - 2019-06-23

- Major project restructure.
- `web3x-codegen` is its own package.
Expand Down Expand Up @@ -159,6 +163,7 @@ All notable changes to this project will be documented in this file.

- Initial release of Typescript port from web3.js.

[4.0.1]: https://github.com/xf00f/web3x/compare/v4.0.0...v4.0.1
[4.0.0]: https://github.com/xf00f/web3x/compare/v3.0.11...v4.0.0
[3.0.11]: https://github.com/xf00f/web3x/compare/v3.0.10...v3.0.11
[3.0.10]: https://github.com/xf00f/web3x/compare/v3.0.9...v3.0.10
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"4.0.0"
"4.0.1"
2 changes: 1 addition & 1 deletion web3x-codegen/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "web3x-codegen",
"version": "4.0.0",
"version": "4.0.1",
"license": "MIT",
"description": "Contract interface code generator for web3x.",
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions web3x-codegen/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,8 @@ export async function makeAndWriteFiles(
}

export function getWeb3xPath() {
const pkg = JSON.parse(fs.readFileSync(__dirname + '/../package.json').toString());
return pkg.name;
const pkg = JSON.parse(fs.readFileSync('package.json').toString());
return { ...pkg.dependencies, ...pkg.devDependencies }['web3x-es'] ? 'web3x-es' : 'web3x';
}

async function main() {
Expand Down
3 changes: 2 additions & 1 deletion web3x-node-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"devDependencies": {
"@types/jest": "^23.3.12",
"jest": "^23.6.0",
"nodemon": "^1.18.5"
"nodemon": "^1.18.5",
"web3x-codegen": "^4.0.0"
}
}
355 changes: 31 additions & 324 deletions web3x-node-example/yarn.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions web3x-webpack-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"tslint": "^5.11.0",
"tslint-config-prettier": "^1.15.0",
"typescript": "^2.9.1",
"web3x-codegen": "^4.0.0",
"web3x-es": "^4.0.0",
"webpack": "^4.16.0",
"webpack-cli": "^3.0.8",
Expand Down
7 changes: 0 additions & 7 deletions web3x-webpack-example/src/contracts/DaiContract.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
/*
Copyright (c) 2019 xf00f
This file is part of web3x and is released under the MIT License.
https://opensource.org/licenses/MIT
*/

import BN from "bn.js";
import { Address } from "web3x-es/address";
import { EventLog, TransactionReceipt } from "web3x-es/formatters";
Expand Down
7 changes: 0 additions & 7 deletions web3x-webpack-example/src/contracts/DaiContractAbi.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
/*
Copyright (c) 2019 xf00f
This file is part of web3x and is released under the MIT License.
https://opensource.org/licenses/MIT
*/

import { ContractAbi} from 'web3x-es/contract';
export default new ContractAbi([
{
Expand Down
Loading

0 comments on commit 8b7f519

Please sign in to comment.