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

Publish version 1.0.4 to NPM #423

Closed
ddgromit opened this issue Jun 21, 2015 · 38 comments
Closed

Publish version 1.0.4 to NPM #423

ddgromit opened this issue Jun 21, 2015 · 38 comments

Comments

@ddgromit
Copy link

I'm replacing sprockets with webpack in my app and need to install this as a package. The currently published version is 1.0.2 (which works) but I'd love to be able to get the latest version. Could we get 1.0.4 published to npm?

@rafaelfranca
Copy link
Member

I'm sorry but we don't support npm and we don't want to support. Wasn't the Rails team that published the package there so it would be great if you ask to who did it

@ddgromit
Copy link
Author

No problem, makes sense. /cc @callumacrae

@callumacrae
Copy link

Sorry about that, the developers of jquery-ujs are too lazy to support npm.

For reference, my shell history for the last thirty seconds:

j jquery-ujs
git fetch upstream
git rebase upstream/master
vim package.json # updating version number
git commit -am '1.0.4'
git push --follow-tags origin master
npm publish

Literally thirty seconds. You wouldn't even have to do the first three steps.

Come on, guys. I don't want to do this.

@jbhatab
Copy link

jbhatab commented Aug 28, 2015

@rafaelfranca Is there anyway we can make this happen? We are working on a react webpack project within rails, https://github.com/shakacode/react_rails_server_rendering, and we need this on npm to keep all the assets in one place while still being able to leverage turbolinks.

I understand your reasoning though for why you haven't supported up until now.

@justin808
Copy link
Contributor

@callumacrae My team needs this (https://github.com/shakacode/). If you can transfer the npm to us, we'll maintain this. @rafaelfranca We're happy to help. I just wrote about the options here: http://forum.railsonmaui.com/t/considerations-for-jquery-with-rails-and-webpack/344

@callumacrae
Copy link

Sure! What's your npm username?

Note that I've been pushing from my fork, which includes the package.json from #380: https://github.com/callumacrae/jquery-ujs

@justin808
Copy link
Contributor

@callumacrae I just setup username "shakacode". We'll probably setup a fork off of your fork. Thanks so much. Please see the comment I posted to #380.

@callumacrae
Copy link

I've added you:

❯ npm owner ls jquery-ujs
callumacrae <callum@macr.ae>
shakacode <justin@shakacode.com>

@justin808
Copy link
Contributor

Thanks. Any need right now to publish a new version? Any way to get notified of when I need to do so?

@callumacrae
Copy link

1.1.0 was released the other day which needs publishing to npm. There isn't really any easy way to get notifications short of watching this repo, which could be noisy.

@justin808
Copy link
Contributor

Version 1.1.0 is published: https://www.npmjs.com/package/jquery-ujs. Note, after publishing, I tried to change the readme. Sadly, you have to change the version number to update the readme. Thus the version on npm right now is 1.1.0-1. In the future, we'll keep the version number the same as this project. In case I ever miss publishing an update, feel free to message me justin@shakacode.com.

I documented this here, copied below:

This pull request has the changes:

https://github.com/shakacode/react-webpack-rails-tutorial/pull/88/files

To summarize:

  1. Remove jquery-rails from your Rails Gemfile.
  2. Add jquery, jquery-ujs to your list of entry points, in your webpack config, like this.
  3. Expose jQuery and $ in your webpack config like this.
  4. Edit your application.js so that your generated/client-bundle from Webpack comes before other libraries that depend on jQuery, such as bootstrap-sprockets, as shown here.
  5. Be sure to run bundle and npm install and npm shrinkwrap, committing the updates to your Gemfile.lock and npm-shrinwrap.json.

BOOM! No more gemified jquery-ujs and jquery, and just one place to track dependency versions of your JavaScript!

@justin808
Copy link
Contributor

@callumacrae Looks like we need to update to 1.2.0.

@rafaelfranca How can @callumacrae and I be notified when you release new versions?

FWIW, we had 21,000 downloads last month: https://www.npmjs.com/package/jquery-ujs

@callumacrae
Copy link

Woah, that's actually a pretty serious number of downloads.

I've published 1.2.0. I pulled from the shakacode fork, merged in master from this repo, and then updated the package.json. I've pushed to my fork because I don't have push access to the shakacode fork: https://github.com/callumacrae/jquery-ujs

Note to jquery-ujs maintainers: you could have done this by running just npm version 1.2.0 && npm publish, which would also have handled the git tag for you. I'm amazed you're letting non-maintainers maintain what now seems to be a pretty serious distribution channel!

CedricLor added a commit to CedricLor/art_des_nations that referenced this issue Jan 29, 2016
@justin808
Copy link
Contributor

Turbolinks is going on npm:
turbolinks/turbolinks-classic#658

2016-02-03_10-03-53

@rafaelfranca
Copy link
Member

Cool!

@justin808
Copy link
Contributor

@rafaelfranca, @callumacrae and I would love to hand over the keys to the npmjs. 😉 for jquery-ujs.

@justin808
Copy link
Contributor

@sstephenson told me that he's too busy to take this one on.

@rafaelfranca
Copy link
Member

same here

@justin808
Copy link
Contributor

@rafaelfranca can you please notify either me or @callumacrae when you push a new release. We'd like to promptly update after you release.

@rafaelfranca
Copy link
Member

#380 (comment)

I'm happy to support alternative workflow, but this workflow should not require any more work from us.

notifying is still more work for us. I think you can use IFTTT https://ifttt.com/recipes/221968-email-me-when-a-github-repo-has-a-new-release

@justin808
Copy link
Contributor

@rafaelfranca do you have a release script? Maybe that's something we can put in a PR, and then you just run the script.

We have one worked out for React on Rails: https://github.com/shakacode/react_on_rails/blob/master/rakelib%2Frelease.rake

We can leverage that work.

rake release[1.3.0]

and that will publish both to NPM and RubyGems

@rafaelfranca
Copy link
Member

That doesn't work. To release to RubyGems is a completely different project. Again, I don't want to maintain something that is not officially supported. I agree with turbolinks being published with npm because it can be used in any web project but jquery-ujs is a Rails project.

@justin808
Copy link
Contributor

@rafaelfranca How do you currently publish? If we wrote you a single command to run that publishes to both rubygems and npm, would that be more work?

CC: @callumacrae

@rafaelfranca
Copy link
Member

Really sorry but I don't want to do this. I already gave all my reasons and
you keep trying to get me doing something that I don't want. I don't have
anything to add to this discussion.

On Fri, Feb 5, 2016, 04:07 Justin Gordon notifications@github.com wrote:

@rafaelfranca https://github.com/rafaelfranca How do you currently
publish? If we wrote you a single command to run that publishes to both
rubygems and npm, would that be more work?

CC: @callumacrae https://github.com/callumacrae


Reply to this email directly or view it on GitHub
#423 (comment).

@callumacrae
Copy link

Comparing the stats on RubyGems and npm, about 10% of jquery-ujs downloads come from from npm.

You care so little about this project that you're willing to let a third party with no vested interest in the project maintain a major release stream to save two seconds typing? That's nuts.

How long are you going to wait? 20%? 50%? 80%? There's a reason we keep bringing it up. npm is growing as a release stream for jquery-ujs, and we don't want the responsibility of maintaining it.

@rafaelfranca
Copy link
Member

I'll say this again. I don't use and I don't plan to use npm. I don't want to maintain something that I don't use and I think have rights to do so. This is open source project, I'm not your employee. If you don't want to responsibility of maintaining it, neither do I. If one day I start to use npm I'll try to maintain it but it is not the case yet.

I care about this project for the Ruby on Rails perspective and usage and that is all. I'll continue to work in this project and fix other people problems with their usage with the Ruby on Rails blesed workflow because that is what I want to do.

@pixeltrix
Copy link

@callumacrae given that yesterday was Time to Talk Day in the UK and the acknowledged problems with mental health in the wider programming community please refrain from using language like 'insane' when describing the actions of another person within the community as it's against our code of conduct.

I'm sure you meant nothing by the comment but please keep discussions civil and respectful.

@justin808
Copy link
Contributor

It's worth noting that this project supports bower.

If you google "npm vs. bower":
https://www.google.com/search?q=bower+vs+npm&gws_rd=ssl

It's pretty clear that NPM has won.

https://www.quora.com/Why-use-Bower-when-there-is-npm

Another example is that @dhh and @sstephenson will put put turbolinks on npm.

In any case, @callumacrae and my team at @shakacode (http://www.shakacode.com/) are more than happy to keep supporting jquery-ujs on npm.

@dhh
Copy link
Member

dhh commented Feb 8, 2016

Justin, I'm happy to see all the Rails JS on NPM. Our bottleneck has been having someone to do the work. If you and your team wants to do it, then by all means! Let's make it happen.

On Feb 6, 2016, at 11:14, Justin Gordon notifications@github.com wrote:

It's worth noting that this project supports bower.

If you google "npm vs. bower":
https://www.google.com/search?q=bower+vs+npm&gws_rd=ssl

It's pretty clear that NPM has won.

https://www.quora.com/Why-use-Bower-when-there-is-npm

Another example is that @dhh and @sstephenson will put put turbolinks on npm.

In any case, @callumacrae and my team at @shakacode (http://www.shakacode.com/) are more than happy to keep supporting jquery-ujs on npm.


Reply to this email directly or view it on GitHub.

@justin808
Copy link
Contributor

@dhh Any way that we can have all releases come from the same repo? There's a very number of tiny changes to make to this repo to make it happen. We could also add a single release script to have just one command to update both RubyGems and NPM. In any case, I'm happy to help out where I can. Incidentally, we're getting great positive feedback on using webpack to package up npm JS for use in Rails on https://github.com/shakacode/react_on_rails. I go cover the objectives here: https://medium.com/@railsonmaui/the-react-on-rails-doctrine-3c59a778c724#.gs653wcfk.

@dhh
Copy link
Member

dhh commented Feb 9, 2016

Justin, I'd prefer not to make the NPM push yet another thing that Rails
core has to take care of. There are always things to debug and tweak. We
should have someone from the community who actually uses NPM deal with it.
So if you're interested in pursuing this, I'd suggest setting up a workflow
where you can push this yourself when a new release happens.

We're talking about dropping jquery-ujs in future versions anyway and go
with vanilla JS without a library for the simple functionality we need.

On Mon, Feb 8, 2016 at 11:05 PM, Justin Gordon notifications@github.com
wrote:

@dhh https://github.com/dhh Any way that we can have all releases come
from the same repo? There's a very number of tiny changes to make to this
repo to make it happen. We could also add a single release script to have
just one command to update both RubyGems and NPM. In any case, I'm happy to
help out where I can. Incidentally, we're getting great positive feedback
on using webpack to package up npm JS for use in Rails on
https://github.com/shakacode/react_on_rails. I go cover the objectives
here:
https://medium.com/@railsonmaui/the-react-on-rails-doctrine-3c59a778c724#.gs653wcfk
.


Reply to this email directly or view it on GitHub
#423 (comment).

@callumacrae
Copy link

@dhh: Ooh, that sounds interesting. Is that discussion happening publicly? It's something I'd be interested in contributing to (not using jQuery is kind of my thing).

@dhh
Copy link
Member

dhh commented Feb 9, 2016

Callum, so far it's just a thought. Vanilla JS has improved enough that the
jquery shimming isn't needed. If you want to take the lead on this, please
do!

On Tue, Feb 9, 2016 at 12:57 PM, Callum Macrae notifications@github.com
wrote:

@dhh https://github.com/dhh: Ooh, that sounds interesting. Is that
discussion happening publicly? It's something I'd be interested in
contributing to (not using jQuery is kind of my thing
http://macr.ae/talks/how-to-not-use-jquery.html).


Reply to this email directly or view it on GitHub
#423 (comment).

@rzane
Copy link

rzane commented Mar 26, 2016

Seems like someone has already taken on the challenge of a vanilla UJS. It's also on NPM.

https://github.com/hauleth/vanilla-ujs

@rafaelfranca
Copy link
Member

@justin808 @callumacrae can you give me access to the npm package? I'll make it officially part of the release process. We have the actioncable precedent and we are using npm internally in Shopify too, so the situation changed.

@justin808
Copy link
Contributor

@rafaelfranca Done for the github repo. I need an ID on npmjs.com.

@rafaelfranca
Copy link
Member

my id on npmjs.com is rafaelfranca

@rafaelfranca
Copy link
Member

rafaelfranca commented Aug 3, 2016

Awesome. Thank you!

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

No branches or pull requests

8 participants