-
Notifications
You must be signed in to change notification settings - Fork 5.2k
meteor is now on npm #516
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
meteor is now on npm #516
Conversation
+1 |
1 similar comment
+1 |
I still prefer using meteorite. |
+1 |
@substack, thanks, this is awesome and could be the start of something beautiful. We discussed this a bit in person last night. We're excited to see Meteor on npm, but similar to the Windows port (win.meteor.com) there's a lot of work to do here before we can call this an officially supported distribution of Meteor. The main items are:
Realistically, there's a lot of work here, much of which is QA and ongoing support commitment rather than code. The core team won't be able to take this on in the short term. But we are happy to help as we can with an unofficial distribution, and maybe it the future we will be able to bring this in-house. I'm very interested in continuing to find ways that Meteor and npm can work more closely together, both in this and other ways. |
You shouldn't need to understand how users will find out about new versions, distributions and package managers will take care of that. At best you can notify the user through executing
The solution here is simple, On Windows, installing and updating becomes as easy as installing a new MSI file or perhaps even just calling Hacks like #474 or bundling along binaries (Node.js / MongDB / ...) through a bundle aren't needed, package managers can do that for you; on Gentoo I already place Meteor in /opt/meteor and symlink /usr/bin/meteor to /opt/meteor/meteor, next on I'm going to patch everything that comes bundled with Meteor away since that only results in installing files the user might already have. Hardcoding the Node.js version is yet another hack, this could as well be a range of supported Node.js versions instead, perfectly expressible in many of the dependency specifications out there. |
Continuing from previous message.
Just do NPM, no need for any reimplement the system and no need for using external solutions like Atmosphere that don't work out cross-platform simply because they fail in the same way as
No, you as the upstream package developer should and cannot decide which version of Node.js users have as stable; you somewhat have control over this in NPM and MSI, but that's where it stops. For instance, on the package manager Portage (where Gentoo is based on it) takes a month without bugs for a package to be stabilized and get out of the test keyword.
No, this ain't your task, this is the task of the package maintainers at the individual platforms to check out. They will report to you with any bugs that happen; therefore you shouldn't need to test on Gentoo, people (like me) will do that for you. No commitment involved here. Package managers for the individual distribution should come first in the installation instructions for this to work, then the MSI installer for Windows user, then the NPM instructions and then the manual instructions. You should put in front those things where a lot of involvement by your users happens to ensure it is "really stable", not those things where you have direct control over what code runs on your clients. What if you release 0.5.3 tomorrow and break the computers of most of the |
+1 Hoping to see Meteor embrace the platforms and package managers it will eventually run on, instead of hacking together a one-shot installer and updater that requires a weird architecture and unnecessary workarounds. |
I'm interested in the debate. It seems that you've made very good points here @TomWij –– yet, I'm not qualified enough in the However, there must also be a host of good reasons why Meteor would create their own package management? Can you imagine what they might be @TomWij? Is there some written literature somewhere to support the design case? |
Well, they're doing it for the Meteor packages, although it still makes some sense for them to do so I'd rather also not see them do it. But it wouldn't hurt Meteor as much as not working towards embracing distributions and package managers in general.
Not that I know of, maybe... Make It Work, Make It Right, Make It Fast. ~ Kent Beck It works now, can we make it right? |
Right! |
Upon further browsing... this seemed appropriate:
from: http://c2.com/cgi/wiki?ExtremeProgrammingExplainedEmbraceChange |
For the people confused around the reasons why Meteor doesn't use npm, I've written about this here: |
How can we be confused when there has been no reasoning? And who are you to tell us reasons that aren't from Meteor DG?
Why not here in this issue?
You are writing pure non-sense since Meteor is a node framework; assuming that it is illegible just because it serves JS to a client is a weird thing to do, since a lot of Node.js frameworks do such thing.
Why would it need to take the browser into account? You are creating problems where there are none. |
Whoa! I sense some hostility here. Just trying to add to the discussion - it was not my intention to offend. Just to clarify: I'm not one of the Meteor devs, just a guy observing the framework. Anyway, here is a clarification of my "pure non-sense" (Real human here, reading your words, by the way :)) One of the very cool things about Meteor is that you don't have to care so much whether you're executing on the server or client. The server and client API is the same. Of course you are aware of it, but it's not as in-your-face as when you're building something with Ruby on Rails, for instance, where almost every single client-server interaction requires extra thinking. NPM modules are built assuming execution on a server in node, because that is almost always the place where npm modules are executed. They are rarely tested for browser execution. Meteor Smart Packages, on the other hand, is aware of when it is executing in the browser or server, and is also aware of, and makes use of, the Meteor framework. Thus, it can make use of I/O when it has access to it, and make use of browser functionality when it has it. It can also hook into Meteor itself. An example of such a package is accounts-instagram. It would just not be possible to build a one-line install for a package like that with npm, it requires a more powerful solution. So, if Meteor were to embrace npm, it would have to be in addition to it's own Smart Packages, unless they significantly scale down what Packages can do. But even if one thinks that using two package managers for the framework is a good idea, it would still be suboptimal when you use npm modules. While many npm modules would, of course, work fine, it would be an unpredictable experience for the developer - You would not be able to simply require any npm module, because there is a high chance that a module makes use of native node functionality, or other stuff not widely available in browsers (such as Array.forEach, for instance, which breaks in IE 8). I personally think it feels icky. |
The main problem I have with meteor packages is the "everything is everywhere" mentality. Maybe it's just me, but having packages just dump things into my global scope makes me nervous. |
The everything is everywhere mentality is part of the core meteor design. The issue with node.js packages is that they're server side only vs everywhere with meteor, then you can override access to certain functions on the server side so that the client cannot execute functions unrestricted, or appends parameters so that all functions have restricted scope (i.e. db update functions that are exposed in the client can add a scope limit server-side to update only entries that are authored by that user). |
I've been grooving on Meteor for awhile, and am getting close to releasing To that extent, the meteor.js package system has been a welcome relief. I That's not to say there isn't a role for including meteor in the npm On Mon, Dec 17, 2012 at 3:28 PM, Andrei Oprisan notifications@github.comwrote:
|
@mpj: Your first comment had a But no, I'm just playing devil's advocate since you didn't think this through enough; you don't add to a discussion if you don't back up the statements you make, that's why they don't make much sense to me. No need for offence, but also no need to force subjective opinions as facts (see the I'll elaborate why I think that both your comments don't make much sense to me, so you see my point of view:
Meteor runs on the server, Meteor smart packages run the server, they sent some code and assets to the client; perfect fit for npm since node modules can do the same.
Actually, there is quite some testing done in Meteor, ran through several browsers; testing is irrelevant wrt integration with npm.
It is not the smart package that deals with this; a smart package is like a node module, containing code to be ran on the server and some extra data that the server might send along to the client; this is a perfect fit for npm since node modules can the same.
Can you elaborate why?
Can you elaborate why? As shown npm is a drop in replacement where Meteor has to be slightly adjusted to use the npm directories and style instead.
Can you elaborate why? I don't see how npm would take away features of smart packages.
Can you elaborate why?
You don't have to require "any" npm module, you can just lock it down to requiring modules that start with Developers are actually already doing this at the moment, as they were learned to do that; so it would be a very Meteor-ish approach. I'm heavily defending this because the current and upcoming approach, as well as the Meteorite approach are not the right approaches. I personally feels this is much better than any other solution you could come up with, re-use your environment instead of making alternatives that will never be as good. For elaboration on both these last two sentences, you can see my first two comments to this issue. Sorry if you have felt offended, I'm just want to discuss towards a better Meteor; have a nice day! :) |
Commenting to others:
@mintplant: They don't have to land in the global scope, installing packages "per Meteor application" can be done.
@awatson1978: Why would it not offer that kind of focus? You would still be using the same command and approach; so as a result, there is no difference in productivity. |
@TomWij 👍 |
@awatson1978 https://github.com/awatson1978: Why would it not offer that Because the focus is a direct result from a reduced set of options. Every There's a value assumption that you're working with which basically equates But not everybody is using that same value assumption. Others of us value As I said before, this isn't to say that meteor shouldn't be in NPM. I On Mon, Dec 17, 2012 at 5:13 PM, Tom Wijsman notifications@github.comwrote:
|
Actually, I spoke too soon, since I haven't seen the npm implementation. On Mon, Dec 17, 2012 at 5:25 PM, Abigail Watson awatson1978@gmail.comwrote:
|
@awatson1978: What do you mean by "subset installation modules"? If it means dependencies, then yes, support for dependencies is present. If you mean installing modules into a Meteor application instead of globally, then yes, support for installing locally is present. If you mean something else, then please elaborate. I think NPM has all the features that Meteor needs as I can't come up with one that is missing; and indeed, if you haven't gone through what it can do it's worth checking it out. |
I think I know what you mean, in Portage on Gentoo Linux these are called "blocked packages" to enforce you down certain "patterns" (which fits the word "paternalism"). I think you could implement checks as part of a preinit script to achieve such thing; although, keeping a naming schema and having Meteor only use npm packages within the naming schema is a much better aproach to achieve this. For the same reason |
I think if the folks maintaining the npm packages can be diligent about On Mon, Dec 17, 2012 at 6:32 PM, Tom Wijsman notifications@github.comwrote:
|
Using a meteor- prefix seems a bit hacky. How would a package-as-npm-module define what version of Meteor it requires? That seems like a pretty fundamental requirement for any package management for Meteor. |
I've been writing modules that work in the server and in node for a while now.
True enough! I think the answer to this problem is not so much to have a manually curated set of "known working" packages, but an automated system for verifying that packages will work in both server and browser environments. It just so happens that I've built a tool with @pkrumins that does exactly this: http://ci.testling.com For modules on npm that work in browsers, like falafel: testling-ci runs the browser tests on every commit and generates badges to show browser compatibility: testling-ci uses browserify to compile tests that use the "files" parameter but there is a "scripts" parameter that works if you've got non-commonjs modules or a custom kind of build output. Perhaps instead of package curation, packages could just pass a test suite that would encompass both browser and server tests? This approach would be useful whether or not meteor packages live on npm although I am in favor of authors publishing their meteor packages to npm too. |
Well, NPM does support dependency resolution; that much I'm familiar with. With the proposed NPM system, one would need to do something like 'npm On Tue, Dec 18, 2012 at 8:38 AM, Mattias Petter Johansson <
|
@mpj: It's just one way to do categorization, a totally different and less hacky approach is if Meteor hosts its own npm repository; which is not that hard to do: http://clock.co.uk/tech-blogs/how-to-create-a-private-npmjs-repository
@mpj: It's as easy as making Meteor a dependency of the npm module.
@awatson1978: Well, you could just let the
@awatson1978: It would be clear to people what smart packages are and that they are meteor specific, so that shouldn't really form a problem unless one really intends to hide this train of thoughts. This problem would not exist when npm hosts its own private repository, see above. |
Oh, npm handles circular dependencies? I did not know that. |
What circular dependency are you even talking about? |
Two-way is probably a better way to describe it. Meteor itself is, to a very large extent, built on top of smart packages, which in turn depends on Meteor. I.e. it's a two-way relationship. The parent relies on having children of a certain version, and those only work if the parent is a certain version. |
Yes, it doesn't involve a third. So the best way would be to just test whether two-way dependencies introduce a problem. I honestly don't think so and if it would we could drop the dependency from Meteor on the smart packages and have Meteor come with them as a default (or refuse to run without certain run-time dependencies present). |
do smart packages need meteor code or rather other smart packages? node loads modules lazily, so circular dependencies usually aren't a problem |
Yes, a lot what Meteor provides (and isn't a |
Was something decided related to this discussion? I strongly support using existing standards (@TomWij 's view). However, in the end it might make sense to manage Meteor packages on a new level? In the way that it makes sense that npm is one level below, for instance, apt or yum. They are indeed useless for other node projects and have a shared installation logic. In this light, Meteor itself should definitely be installable through npm. |
So, in the past month, I've come up with probably a dozen Smart Packages that I'm planning on building and releasing into the Meteor/Meteorite package manager. They include: fonts-pictographic I'm thinking of creating these Meteor Smart Packages, because I do a lot of prototyping of applications. And I'm constantly doing things like building out a basic application scaffolds, but sometimes I want headers and footers and interactive graphing, and other times I just want to simply prototype how gestures might work with a carousel interactive. I want to be able to do a simple meteor add ui-scaffold and wind up with a workable linear regression application, using data from a Mongo datastore. That would rock. Might not be nirvana, but it would be close to it. Moreover, once boiler plate application code is verified and written, it can be encapsulated and packaged into a Smart Package, which also removes it from the active development space, keeping the code that a developer has to manage clean and concise. Meteor Smart Packages offer a way to do that, at the application level (rather than the operating system level). But would it make sense to add those packages to NPM? At the very least, they'd all need to be renamed to something like the following: meteor-fonts-pictographic And I'm not sure how much it adds to Node.js to have packages specifying the styling of headers and footers and icon packs. And lastly, if using standards is so great, why use NPM at all? By this logic, shouldn't the Node.js folks be porting their code to Apt and Yum? |
If this is in response to my questions: did you read what I wrote? :) As an answer to your question at the end: The end result would be:
I rest my case if npm is not reusable. |
Not necessarily, because a separate npm repository can be made and packages can be installed to a separate non-global node_modules folder.
They don't necessarily need to specify that as far as I can see, not sure how this is relevant.
Because npm puts the maintenance of a package in the hands of the people.
No, this would require people to become maintainers / developers for Aptitude, Yum, Portage and so on... npm is this regard centralizes it to one repository instead of many distribution repositories, smart packages can then be installed on any distribution that supports npm instead of those that support the smart packages. Smart packages can also easily be added to npm without having to deal with becoming a maintainer / developer, or the use of vendor-specific patching. Wrt smart packages; this is not about getting smart packages into the main npm repository, this is about not reinventing the wheel by re-using npm. If they do want to reinvent the wheel and write their own non-npm based repository and package manager, they can go ahead and do that; although it can be considered a waste of time better spent on other features. Unless they have a very good reason not to use npm and thus roll their own... |
@avital has been working hard on a new package system, and will be posting more about it soon! It will have npm support :) Some considerations in package system design:
If you think about it, if we tried to build all of the above on top of npm, it would be npm in name only. Even if Meteor packages were in npm, you wouldn't use the npm tool to find or install packages (you'd use a wrapper that implemented the 'release snapshots', 'curation', 'repeatability' considerations), nor could you drop them directly into existing npm applications (per 'client vs server' and 'asset bundling'). What's really missing is the ability to use npm packages from Meteor packages, because since npm's functionality is a subset of Meteor's packages, including an npm package into the server side of your Meteor app can be as easy as calling It would also be highly desirable to figure out how to use certain Meteor packages outside of Meteor. The two obvious cases right now are using |
@substack: Before we can merge your pull request, you'll need to sign the Meteor Contributor Agreement: https://contribute.meteor.com/ |
+1 I think Meteor should integrate better some emerging "JS standard" technlogies like NPM, Grunt, Bower ( RequireJS ), because many frontend js libs like jquery, bootstrap,.. are already providing this kind of support mainstream. |
@substack: Please do not create pull requests based on the |
Hey @substack, any chance to revive this project? I've been leading efforts to get the maintainers of popular libraries to add support for meteor directly, and the #1 complaint from d3 and Moment was that Meteor required them to curl |
…g-2.13.1 Update validate-commit-msg to the latest version 🚀
This pull request is to inform you that meteor is now on npm. This is beneficial for a number of reasons, but particularly that applications can now depend on a specific version of meteor in their package.json files directly which is not something that the
curl ... | sh
thing is at all good at.If you would like to take over this package in order to push updates I will gladly transfer ownership on npm.