Skip to content

Conversation

jordanstephens
Copy link
Contributor

Upgrading react-source to 0.12.2

Tests were failing when expecting a single quoted string in transformed JSX. It looks like this can be traced back to facebook/react@eddbb0c, so I'm updating the expectation to a double-quoted string—see 71a01bc.

@rmosolgo
Copy link
Member

rmosolgo commented Jan 5, 2015

I thought leaving out the minor version was be design -- it installs the latest minor version by default, right?

@jordanstephens
Copy link
Contributor Author

@rmosolgo Right now if I install react-rails, I get react-source 0.12.1, even though 0.12.2 is released.

~ % gem install react-rails
Fetching: react-source-0.12.1.gem (100%)
Successfully installed react-source-0.12.1
Successfully installed react-rails-0.12.1.0
2 gems installed

If the desired behavior is to automatically use the latest patch version, we should use

s.add_dependency 'react-source', '~> 0.12'

instead of

s.add_dependency 'react-source', '0.12'

I'll amend this PR if that's what we're after. I wasn't sure if we were intentionally delaying that update or not.

@zpao
Copy link
Member

zpao commented Jan 5, 2015

gem install react-rails uses the 0.12.x.y release, which does specify patch versions. Only the stable releases have been published. master however is more fluid and uses the latest instead of locking because we don't really have version numbers there. If you did this against the 0.12 branch (https://github.com/reactjs/react-rails/tree/0.12) then I would go ahead and merge this in but we probably shouldn't do this for master.

Want to do this against the other branch and then I'll publish the v0.12.2.0 gem.

@jordanstephens
Copy link
Contributor Author

Thanks @zpao, I'll open a new PR on the 0.12 branch.

Before I close this, I'm still a little bit confused:

master however is more fluid and uses the latest instead of locking

I believe the current dependency definition on master is locked (on 0.12.0):

s.add_dependency 'react-source', '0.12'

I just double checked the version in my Gemfile.lock after bundling from master and I am indeed seeing react-source (0.12.0).

Don't we want to use the following on master instead?

s.add_dependency 'react-source', '~> 0.12'

Thanks again!

@zpao
Copy link
Member

zpao commented Jan 6, 2015

Yea, I was actually going to ask. I think you're right that we want the ~>. I think that's safe to go ahead and do.

@jordanstephens
Copy link
Contributor Author

Just rebased this branch to include the ~>.

Thanks @zpao!

@rmosolgo
Copy link
Member

rmosolgo commented Jan 6, 2015

Nice!

rmosolgo pushed a commit that referenced this pull request Jan 6, 2015
Upgrade react-source to 0.12.2
@rmosolgo rmosolgo merged commit 201edce into reactjs:master Jan 6, 2015
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