Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/exact version dependencies #1130

Merged
merged 8 commits into from Nov 14, 2017
Merged

Feature/exact version dependencies #1130

merged 8 commits into from Nov 14, 2017

Conversation

dacarley
Copy link
Contributor

No description provided.

…encies to exact released versions on all the web3-* packages.
Fixed the `gulp version` task so that it updates all the necessary files, including `.versions`
Changed the `release` npm script to update all versions (via lerna), *then* rebuild the dist files, then do the full `lerna publish` step.
@coveralls
Copy link

coveralls commented Oct 23, 2017

Coverage Status

Coverage remained the same at 85.538% when pulling 4c89f47 on blitzpredict:feature/exactVersionDependencies into 78bdf99 on ethereum:1.0.

Copy link
Contributor

@frozeman frozeman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, except the release part. Please do these changes, and simply adding - - exact should be enough.

gulpfile.js Outdated
'./package.json',
'./bower.json',
'./package.js',
'./.versions'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be generated by meteor and can’t be modified directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

package.json Outdated
@@ -12,7 +12,7 @@
"postinstall": "lerna bootstrap",
"build": "gulp",
"build-all": "gulp all",
"release": "lerna bootstrap; gulp; lerna publish --skip-git; gulp version;",
"release": "lerna bootstrap; lerna publish --yes --cd-version prerelease --exact --skip-npm --skip-git; gulp version; gulp; git checkout lerna.json; lerna publish --cd-version prerelease --exact --skip-git",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one I don’t understand.if you call publish twice it will increase by two versions. Seems the only thing you had todo is add —exact
We can’t hardcode prelrelease, as in the future I will also release other versions.
For what is the git checkout lerna.json?
This needs to be simplified, currently it will probably create more issues than it solves.

Copy link
Contributor Author

@dacarley dacarley Oct 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, now I'm confused as well. I added the complexity as a way to work around an issue I was seeing where the built web3.min.js contained out-of-date version numbers for some packages. The addition of --skip-npm and the git checkout lerna.json ensured that two versions weren't published, and that the final version number change was only a single increment.

I've reverted to the simpler command-line with just the addition of --exact, and I can't reproduce the issue I had earlier, so I'll commit the simpler line.

gulpfile.js Outdated
var version = lernaJSON.version;
var jsonPattern = /\"version\"\: \"[\.0-9\-a-z]*\"/;
var jsPattern = /version\: \'[\.0-9\-a-z]*\'/;
var meteorPattern = /ethereum:web3@[\.0-9\-a-z]*/;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This we also can remove, as we can’t modify the versions Json, this will be done by meteor publish.

Currently this is a manual thing,as meteor doesn’t allow to exclude certain folders, I have to manually copy them out to publish a release.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, removed.

@coveralls
Copy link

coveralls commented Oct 24, 2017

Coverage Status

Coverage remained the same at 85.566% when pulling fb3bcae on blitzpredict:feature/exactVersionDependencies into edd801b on ethereum:1.0.

@coveralls
Copy link

coveralls commented Oct 26, 2017

Coverage Status

Coverage remained the same at 85.566% when pulling b69b7dc on blitzpredict:feature/exactVersionDependencies into edd801b on ethereum:1.0.

@@ -12,7 +12,7 @@
"postinstall": "lerna bootstrap",
"build": "gulp",
"build-all": "gulp all",
"release": "lerna bootstrap; gulp; lerna publish --skip-git; gulp version;",
"release": "lerna bootstrap; lerna publish; gulp version; gulp",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, but now we basically publish before we change the version globally? and the --exact is missing, which is quite essential.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the changes in lerna.json.

@coveralls
Copy link

coveralls commented Nov 14, 2017

Coverage Status

Coverage remained the same at 85.566% when pulling 8dcc83c on blitzpredict:feature/exactVersionDependencies into 7146d1e on ethereum:1.0.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 85.566% when pulling a60a3f5 on blitzpredict:feature/exactVersionDependencies into 7146d1e on ethereum:1.0.

1 similar comment
@coveralls
Copy link

coveralls commented Nov 14, 2017

Coverage Status

Coverage remained the same at 85.566% when pulling a60a3f5 on blitzpredict:feature/exactVersionDependencies into 7146d1e on ethereum:1.0.

@frozeman frozeman merged commit eda3f5e into web3:1.0 Nov 14, 2017
@dacarley dacarley deleted the feature/exactVersionDependencies branch November 14, 2017 23:17
nachomazzara pushed a commit to nachomazzara/web3.js that referenced this pull request Jun 4, 2020
* Specify the "--exact" flag when running `lerna publish` to pin dependencies to exact released versions on all the web3-* packages.

* Fixed package versioning.
Fixed the `gulp version` task so that it updates all the necessary files, including `.versions`
Changed the `release` npm script to update all versions (via lerna), *then* rebuild the dist files, then do the full `lerna publish` step.

* Simplified the `npm run release` script, removed version update of meteor files.

* Discovered a more global way of ensuring that lerna always publishes with exact versions.

* Fixed blocking test in eth.sendTransaction.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants