Skip to content

Prepare for npm publish #99

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

Closed

Conversation

wbinnssmith
Copy link
Contributor

This:

  • Adds a main field to the package.json pointing to the generated dist copy of jquery-migrate.
  • Adds an npm prepublish step to run grunt before publishing to npm.
  • Moves the jquery dependency to devDependencies. jQuery is never directly required by the code, and is implicitly assumed to exist (see backbone's package.json discussion for more info)

This is deliberately unopinionated about CommonJS. I'd like to solve that issue in a separate pull request, but at least now jquery-migrate can be used with npm and either a script tag or a jQuery in the global scope. I'd like to implement something similar to jQuery's wrapper, but we should decide what the API should look like. For example, it could remain the same (ie require('jquery-migrate')) and bring jquery in as a formal dependency and patch that, but npm's file tree is not flat for the time being (this is going to change in 3.x), and we might end up patching a different jQuery than the user was expecting.

An alternate API would be to use require('jquery-migrate')(jQuery), passing in a reference to the desired jQuery to patch into a factory function. This would clear up the above issue but makes CommonJS somewhat more of a special case. Then there's the handling of a lack of a window object that jQuery handles, and there's a question of whether we should handle that too.

I imagine jQuery plugins face these same issues, so I'd love to hear if you have any experience or thoughts on this.

Thanks!

@wbinnssmith wbinnssmith force-pushed the wbinnssmith/package-json branch 3 times, most recently from b2ed7b3 to fea4779 Compare March 26, 2015 06:38
@dmethvin
Copy link
Member

Hey @wbinnssmith the PR is failing CI, it doesn't look like you signed the CLA yet.

@wbinnssmith
Copy link
Contributor Author

I actually did submit the form. Is it handled manually or should I see an
update immediately after signing?

On Fri, Mar 27, 2015, 12:01 PM Dave Methvin notifications@github.com
wrote:

Hey @wbinnssmith https://github.com/wbinnssmith the PR is failing CI
http://contribute.jquery.org/CLA/status/?repo=jquery-migrate&sha=fea477917080e6127ba55bc0c9e4b7a0fd1d71bb,
it doesn't look like you signed the CLA yet.


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

@arthurvr
Copy link
Member

You signed it, I just confirmed that. Thanks! The bot only runs on a push, it will hopefully be okay next time you push to your branch.

@wbinnssmith wbinnssmith force-pushed the wbinnssmith/package-json branch from fea4779 to 07257c4 Compare March 27, 2015 19:45
@wbinnssmith
Copy link
Contributor Author

Just pushed again and all looks good 😄

On Fri, Mar 27, 2015, 12:17 PM Arthur Verschaeve notifications@github.com
wrote:

You signed it, I just confirmed that. Thanks! The bot only runs on a push,
it will hopefully be okay next time you push to your branch.


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

@wbinnssmith
Copy link
Contributor Author

Let me know if there's anything I can do to help out. Would love to see
this on npm.

On Fri, Mar 27, 2015, 12:46 PM Will Binns-Smith wbinnssmith@gmail.com
wrote:

Just pushed again and all looks good 😄

On Fri, Mar 27, 2015, 12:17 PM Arthur Verschaeve notifications@github.com
wrote:

You signed it, I just confirmed that. Thanks! The bot only runs on a
push, it will hopefully be okay next time you push to your branch.


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

@dmethvin dmethvin closed this in d9edf5a Apr 6, 2015
@wbinnssmith
Copy link
Contributor Author

Thanks! Would you mind running a quick npm publish to get this onto the
registry?

On Monday, April 6, 2015, Dave Methvin notifications@github.com wrote:

Closed #99 #99 via d9edf5a
d9edf5a
.


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

@dmethvin
Copy link
Member

dmethvin commented Apr 8, 2015

I'm not sure it's ready to release, there was a Testswarm failure I need to check into and also I wasn't planning on publishing a new release until jQuery 3.0.0 shipped. So it might be better to cherry-pick this into the last release and publish that.

wbinnssmith added a commit to wbinnssmith/jquery-migrate that referenced this pull request Oct 6, 2015
wbinnssmith added a commit to wbinnssmith/jquery-migrate that referenced this pull request Oct 6, 2015
@wbinnssmith
Copy link
Contributor Author

I just published the latest stable version of jquery-migrate (1.2.1), with this fix backported, to npm and added you as an owner.

@dmethvin
Copy link
Member

Wow, sorry, I just saw your notification! Actually, that is fine with me, thanks!

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.

4 participants