What are the Meteor "core modules"?


#1

I am working on an app that needs to know what the Meteor “core modules” are. By “core module”, I believe I mean those modules that are available to be "import"ed or "require"d regardless of what is in .meteor/packages or package.json.

In a Node environment, the “core modules” are built-in and visible in node/lib. I’m presuming that that list is still accurate for npm packages built with Meteor and that Meteor does not in some way add to it. Can anyone state definitively that that is true?

In a Meteor server environment, the Node core modules are available plus some Meteor ones. Is there a comprehensive list somewhere?

In a browser client, some of the Node core modules appear to be available to Meteor modules (console.log() for example) through browserify and other stubs. Again, there are also Meteor modules that are available and they differ a bit from the server side. Is there a comprehensive list somewhere of exactly what modules are available in the browser?

The same question would apply for cordova too I’d guess. I’ve not targeted an app environment yet, but the application I’m working with will have to support that.

And, BTW, is there an application that can analyze an npm package and determine whether it has a chance of running in the browser when built with Meteor? I’ve encountered some hard to find incompatibilities that didn’t surface until late in the game.


#2

I doubt there’ll be anything concrete outside of meteor-base. You may want to do some experimenting


#3

That is where I’m heading. Every clue I find seems to be in source.

It seems really odd for a system not to clearly document the built-ins that can be called in each of its environments.

For example, I know that there is a meteor-node-stubs package that I would consider part of “core” meteor now that implements some Node capabilities in the browser, but not exactly which Node calls are effectively stubbed and what the limitations are. Nor do I know whether including that in the npm packages allows imports of those things in Meteor modules to work too (I suspect it does). These things seem fundamental.