Skip to content
This repository was archived by the owner on Oct 26, 2018. It is now read-only.

updated example app to use middleware #142

Merged
merged 2 commits into from
Dec 31, 2015

Conversation

tomatau
Copy link
Contributor

@tomatau tomatau commented Dec 28, 2015

This branches off #141 to update the example app

@jlongster
Copy link
Member

Thanks!

jlongster added a commit that referenced this pull request Dec 31, 2015
updated example app to use middleware
@jlongster jlongster merged commit 4032212 into reactjs:middleware Dec 31, 2015
@tomatau tomatau deleted the middleware branch December 31, 2015 07:25
@tomatau
Copy link
Contributor Author

tomatau commented Dec 31, 2015

could you put this on npm with a @next tag or something please?

@timdorr
Copy link
Member

timdorr commented Dec 31, 2015

BTW, this merged into the middleware branch, not master. I'll fix that up now.

@jlongster
Copy link
Member

Oh, thanks @timdorr! Did it last night right before I my laptop died so I didn't notice. @tomatau what do you mean on npm? The example app? How does putting the example app on npm help?

@tomatau
Copy link
Contributor Author

tomatau commented Dec 31, 2015

@jlongster Apologies, I was referring to the middleware branch f15c977 that was merged, it still hasn't undergone a version bump right?

@jlongster
Copy link
Member

Not yet, it's too new to do a version bump. We should let it sit on master for at least a few days to make sure nothing is seriously broken. We also need to update docs, etc

@kimjoar
Copy link
Collaborator

kimjoar commented Dec 31, 2015

@jlongster Could maybe use dist-tag for this. That way it's easier for people to test the latest code. Blog post on it: https://medium.com/greenkeeper-blog/one-simple-trick-for-javascript-package-maintainers-to-avoid-breaking-their-user-s-software-and-to-6edf06dc5617

(Never tried this myself, though)

@tomatau
Copy link
Contributor Author

tomatau commented Jan 1, 2016

with a @next tag

Yep with a dist-tag. So we can try it without having to build it for each project

@jlongster
Copy link
Member

I can do that. I'm really scared I'm going to accidentally publish 2.0.0 though!

I did this:

  • Changed the version in package.json to 2.0.0
  • Ran npm dist-tag add [email protected] next

It seemed to work... now do I run npm publish --tag=next? The dist-tag seemed odd because I had to pass it the package name and I can't tell how it's correlating the current files in the project to 2.0.0.

@kimjoar
Copy link
Collaborator

kimjoar commented Jan 1, 2016

The docs for dist-tag are really bad :/ But the video in the blog post demystifies how it works. And yep, what you've done looks correct, so npm publish --tag=next should publish it correctly.

@kimjoar
Copy link
Collaborator

kimjoar commented Jan 1, 2016

As far as I can tell, you don't actually need to run npm dist-tag add [email protected] next for next, but only when updating the latest tag to 2.0.0 later.

@jlongster
Copy link
Member

As far as I know latest means the actual published version. Meaning anyone who runs npm install redux-simple-router is going to get 2.0.0. I thought the point of this was to release it under a tag that people could manually install.

@kimjoar
Copy link
Collaborator

kimjoar commented Jan 1, 2016

Yep, that's what I meant by "later" (i.e. when 2.0.0 is ready to be moved from next to latest).

But either way, to be entirely sure (given the bad docs), this should do it:

npm dist-tag add [email protected] next
npm publish --tag=next

@tomatau
Copy link
Contributor Author

tomatau commented Jan 1, 2016

@jlongster I think something didn't work

$ npm info redux-simple-router

{ name: 'redux-simple-router',
  description: 'Ruthlessly simple bindings to keep react-router and redux in sync',
  'dist-tags': { latest: '1.0.2', next: '2.0.0' },
  versions:
   [ '0.0.6',
     '0.0.7',
     '0.0.8',
     '0.0.9',
     '0.0.10',
     '1.0.0',
     '1.0.1',
     '1.0.2' ],
$ npm install redux-simple-router@next

npm ERR! No compatible version found: redux-simple-router@next
npm ERR! Valid install targets:
npm ERR! ["1.0.2","1.0.1","1.0.0","0.0.10","0.0.9","0.0.8","0.0.7","0.0.6"]
npm ERR!

Same for npm i [email protected]

You definitely need to run npm publish --tag=next, the dist-tag add I think, as kjbekkelund says, is just for updated existing tags on a version.

@jlongster
Copy link
Member

@revgum Assume master will always have breaking changes. I don't know why you would expect otherwise. You don't want syncHistory if you are using the latest version from npm; just use it the old way.

It seems like people are happy with this new version, so we should release 2.0.0 soon. I was off work last week so I didn't finish publishing the next tag, sorry. I'll try to do that now, and soon we'll get 2.0.0 out.

@jlongster
Copy link
Member

Ok, I got npm install redux-simple-router@next working. It will install 2.0.0 now.

@tomatau
Copy link
Contributor Author

tomatau commented Jan 5, 2016

thanks :)

@revgum
Copy link

revgum commented Jan 6, 2016

Cool! Thanks! I'm totally into what you've built, greatly appreciated!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants