#246 NodeJS Packaging Guidelines
Closed: Fixed None Opened 11 years ago by toshio.

https://fedoraproject.org/wiki/PackagingDrafts:Node.js

Guidelines for packaging javascript for nodejs.


Nodejs packaging guidelines pass (+1: 6, 0: 0, -1: 0)

  • Note that a FESCo multilib exemption is needed. (Also passed at today's fesco meeting)
  • There is likely to be an update soon that adds an improved fixdeps strategy.

Added to the wiki https://fedoraproject.org/wiki/Packaging:Node.js

and linked to from the Packaging:Guidelines page.

Ready to be announced.

Note for sgallagh or patches -- meeting notes are here if you want to see why any of the changes were made: http://meetbot.fedoraproject.org/fedora-meeting-1/2013-01-30/fedora-meeting-1.2013-01-30-17.09.log.html

In particular, removing fixdeps was only because the strategy is going to change. We do like the concept of a script to help fix up the deps and generate a patch. We just didn't want to document something that's going to be changing so soon.

A couple of minor nits:

  • The macros section still says they live in the ''nodejs'' package, but I thought the consesus was to move them to ''nodejs-devel''.

  • There is an unclosed code tag in the second paragraph of the Installing Modules section.

I'll try and get %nodejs_fixdep's replacement done soon.

Thanks!

Fixed! Thanks for looking it over.

Guys, I consider the guidelines incomplete (wrong).

It appears that every JavaScript package is Node.js package, which is plainly wrong. In contrary, every Node.js package is JavaScript package and Node.js is just subset of JavaScript.

The guidelines do not address the issue I raised in coffee-script review [1] and it was previously touched on packaging ML as well. Even though some JavaScript file contains #!/usr/bin/node shebang, it does not make from that package node.js package. Such JavaScript can be executed by other means than just node.js, such as using rubygem-execjs. I would find it rather unfortunate that every JavaScript would have dependency on Node.js

Although [2] might solve my concerns, I consider it rather nonsystematic and moreover, this case is not covered in the node.js guidelines.

Could you please sort out these concerns? Thank you.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=732216#c8
[2] https://bugzilla.redhat.com/show_bug.cgi?id=732216#c9

It didn't take long to have another package review which suffers the same issues as coffee-script:

https://bugzilla.redhat.com/show_bug.cgi?id=894725

And there might be more.

Replying to [comment:5 vondruch]:

Guys, I consider the guidelines incomplete (wrong).

It appears that every JavaScript package is Node.js package, which is plainly wrong. In contrary, every Node.js package is JavaScript package and Node.js is just subset of JavaScript.

Node.js is a '''superset''' of !JavaScript. It provides a [http://nodejs.org/api/ set of APIs] that aren't available elsewhere. (Similarly, most browsers provide [https://developer.mozilla.org/en-US/docs/DOM an API] you can't use in node without a special module.)

The guidelines do not address the issue I raised in coffee-script review [1] and it was previously touched on packaging ML as well. Even though some JavaScript file contains #!/usr/bin/node shebang, it does not make from that package node.js package. Such JavaScript can be executed by other means than just node.js, such as using rubygem-execjs. I would find it rather unfortunate that every JavaScript would have dependency on Node.js

rubygem-execjs does not appear to ship something that shebang line could be changed to. It's also unclear if it supports any of the aforementioned Node.js API calls, such as require().

Although [2] might solve my concerns, I consider it rather nonsystematic and moreover, this case is not covered in the node.js guidelines.

These packages are special in that they are specifically written to work without node. (See the ''Exported Modules'' section of the [http://lisperator.net/uglifyjs/ uglify-js documentation] for an example of the special care needed to make this happen.) Such packages should certainly provide ways to use the module both from within Node.js and from other !JavaScript runtimes.

To do this right we'd need solid !JavaScript guidelines, of which [https://fedoraproject.org/wiki/JavaScript_libraries_packaging_guideline_draft there seems to exist a draft]. If someone wants to run with that and provide me with the best way to make these subpackages, I'm all for it. I'd then be more comfortable mentioning strategies for handling this situation in the Node.js guidelines.

The issues raised on the reopening of this ticket aren't really applicable to the node.js guidelines. If you (or anyone) wants to come up with a draft for handling server-side Javascript, please feel free to do so (in a new ticket).

Login to comment on this ticket.

Metadata