Side navigation
#13119 closed bug (fixed)
Opened December 26, 2012 06:21PM UTC
Closed January 23, 2014 04:06PM UTC
Last modified February 12, 2014 11:07PM UTC
Make jQuery releases available via npm
Reported by: | rwaldron | Owned by: | timmywil |
---|---|---|---|
Priority: | high | Milestone: | 2.1 |
Component: | build | Version: | 2.0.3 |
Keywords: | Cc: | isaacs | |
Blocked by: | Blocking: |
Description
Recently, Domenic Denicola expressed a need for npm to offer "just jQuery", this due to all the existing jQuery-related packages are jQuery plus something else, which is useless if you want to use npm for client libs as well (which is a valuable use case)
Isaac Schlueter has reached out to the "jquery" and "jQuery" package owners to see if any are willing to give us the name to release jQuery on npm.
TODO:
1. Update window.jQuery = window.$ = jQuery;
to conditionally export to module.exports
or window
as needed.
2. Change the reference to window
(in #1) to a safe global object reference.
3. Update jQuery Core Release Management to include an npm publish
Attachments (0)
Change History (24)
Changed December 26, 2012 06:22PM UTC by comment:1
owner: | → rwaldron |
---|---|
status: | new → assigned |
Changed December 26, 2012 06:31PM UTC by comment:2
cc: | → isaacs |
---|---|
milestone: | None → 1.9 |
PR submitted by Isaac Schlueter https://github.com/jquery/jquery/pull/1103
Changed December 26, 2012 08:25PM UTC by comment:3
Agreed on the utility. We need some unit tests or other insurance against inadvertent regressions.
Changed December 26, 2012 10:10PM UTC by comment:4
The current PR will break if there is some other object called module with an exports property. This gist illustrates a bulletproof "node detector": https://gist.github.com/3906504
Changed December 28, 2012 01:34AM UTC by comment:5
component: | unfiled → build |
---|---|
milestone: | 1.9 → 2.0 |
priority: | undecided → high |
Changed December 28, 2012 04:45AM UTC by comment:6
Is there a good reason to not expose jQuery/$ as a global when an AMD loader is present like the current PR does? That's a breaking change FWIW.
For comparison, other AMD compatible utilities like Lodash, Hogan.js, and the Backbone/Underscore AMD versions maintained by jrburke still create a global even in the presence of an AMD loader.
Changed January 04, 2013 03:36AM UTC by comment:7
Replying to [comment:4 rwaldron]:
The current PR will break if there is some other object called module with an exports property. This gist illustrates a bulletproof "node detector": https://gist.github.com/3906504
Wouldn't this also apply if 'define' is previously defined ? Given that both AMD and CommonJS export type (including nodejs' quirky one) are well defined standards, it seems fair to support both equally and to require other other coding paradigms to stay clear of those standard, doesn't it ?
Regarding the node detector, while it might be a nice solution it does look a little hacky and too node.js specific. What about other commonjs like implementations ?
Changed January 06, 2013 11:42PM UTC by comment:8
@rwaldron, did you plan on getting this done by 2.0?
Changed April 02, 2013 10:55PM UTC by comment:9
What's the current status of work on this feature?
Changed April 02, 2013 10:59PM UTC by comment:10
@m_gol the current status is that I'm working on it...
Changed April 10, 2013 01:08AM UTC by comment:11
Changed April 29, 2013 03:16PM UTC by comment:12
milestone: | 2.0 → 2.next |
---|
Changed September 07, 2013 05:11PM UTC by comment:13
milestone: | 2.next → 1.11/2.1 |
---|
It was decided we want that for jQuery 2.1.
Changed September 16, 2013 09:01PM UTC by comment:14
milestone: | 1.11/2.1 → 2.1 |
---|
Changed October 30, 2013 06:16PM UTC by comment:15
Changed November 10, 2013 02:40PM UTC by comment:16
I guess it should be re-assigned to timmywil, right?
Changed November 10, 2013 02:45PM UTC by comment:17
Should we unpublish https://npmjs.org/package/jQuery? It introduces additional noise and confuses users.
What do you think, isaacs?
Changed November 15, 2013 04:45PM UTC by comment:18
jQuery 2.1.0-beta2 has been published to npm. \\o/
Please, test & report issues with the package, if any.
Changed November 15, 2013 10:22PM UTC by comment:19
owner: | rwaldron → timmywil |
---|
Assigning to myself as a reminder to follow up concerning the "jQuery" repo.
Changed January 17, 2014 11:57AM UTC by comment:20
any news?
Changed January 17, 2014 12:03PM UTC by comment:21
Replying to [comment:20 anonymous]:
any news?
This is done: https://npmjs.org/package/jquery
Please, test if you're interested so that we can see if everything is OK *before* releasing the final version.
Changed January 23, 2014 04:06PM UTC by comment:22
blockedby: | 14451 |
---|---|
resolution: | → fixed |
status: | assigned → closed |
version: | git → 2.0.3 |
Closing as no more work need be done to ensure the final release goes on NPM.
Changed February 12, 2014 10:47PM UTC by comment:23
The packaged version does not work in the browser. I receive the following error:
ReferenceError: module is not defined
module.exports = create('undefined' === typeof window ? undefined : window);
My expectation: jquery installed via npm should be easy to reference from a web page.
A UMD wrapper might be a technically sound way of solving this.
Changed February 12, 2014 11:07PM UTC by comment:24
Replying to [comment:23 christoph.burgmer@…]:
The packaged version does not work in the browser. I receive the following error: ReferenceError: module is not defined module.exports = create('undefined' === typeof window ? undefined : window); My expectation: jquery installed via npm should be easy to reference from a web page.
We need more information about the problem, that doesn't say much... Specifically: how are you installing jQuery, how do you include it in a web page, how do you refer to it, what tools do you use to manage jQuery etc.