Gotcha. I’m now thoroughly convinced that shipping node_modules directly is the
100% way to go. I guess having out of date dependencies is just an unavoidable
side effect of shipping software as-is. We’ll just have to be diligent in
updating cordova-common in platforms quickly enough to unblock
Sorry for being late to the party.
+1 to conclusion
But leaving 2 cents
- Using "npm install" or "npm link" is a development time (i.e. cordova
contributors) only, When a product is shipped we should not rely on using
this process to satisfy dependencies
- The way dependencies are manage in
They are safe to copy.
However, I don't see why anyone would have run npm link in the template
folder of a platform, or why anyone would need to.
We should probably just document that if you do this, it will break.
Can anyone think of a reason why they would 'need' to npm link those
modules?
Right now there is a difference between the cordova-common that’s in master,
the cordova-common that’s released on NPM, and the cordova-common that comes
with a platform. If we’re fine with these differences, then there isn’t really
an issue. Are we fine with them?
Kindly,
Dmitry
> On Oct 28,
This use case does mostly affect Cordova contributors. Usually the platforms
will come packaged, you’re right. The discussion of packaged-vs-installed is
separate, but just as a nod to it: I don’t see a reason we can’t just
automatically call “npm install” in platforms/ios/cordova. Copying over
Follow-up: the reason we link them is so that we test master with master at all
times. As of right now, that workflow breaks because my version of "npm link”
makes relative links.
Kindly,
Dmitry
> On Oct 28, 2015, at 1:28 PM, Jesse wrote:
>
> They are safe to copy.
>
It is completely likely, and maybe even expected that the specific version
of cordova-common that sits in any particular platform template can be
different than what is used by cordova-lib.
They may even be different amongst platforms in a single project.
As long as the lib->platform api is
Is it possible to do “npm install” in those directories instead? Or to adjust
the path so that require() works with the original node_modules directory?
Kindly,
Dmitry
> On Oct 27, 2015, at 10:31 PM, Steven Gill wrote:
>
> I don't think we thought of symlinks in this
Currently, those modules ship with the platform. Example, cordova-ios will
have all necessary modules bundled in. When you create a cordova project
and add a platform, it takes those modules and moves them into your newly
created cordova project. To have the cordova project run `npm install` and
> trust that each platform will be updated
> with a newer cordova-common when it makes sense
That sounds reasonable to me. I’m removing the link step for cordova-common in
platforms.
Last question: the cordova-common used by cordova-lib should still be linked,
yes?
Kindly,
Dmitry
> On Oct
Yes, I believe the cordova-lib case should be linked, and definitely this
is where a relative link makes sense, since it's all in the same repo.
@purplecabbage
risingj.com
On Wed, Oct 28, 2015 at 5:28 PM, Dmitry Blotsky
wrote:
> > trust that each platform will be
+1 nice conclusion.
On Wed, Oct 28, 2015 at 5:30 PM, Jesse wrote:
> Yes, I believe the cordova-lib case should be linked, and definitely this
> is where a relative link makes sense, since it's all in the same repo.
>
>
> @purplecabbage
> risingj.com
>
> On Wed, Oct 28,
Ping. Anyone have any information on this? Is it safe to "cp -r” a node_modules
directory?
Kindly,
Dmitry
> On Oct 26, 2015, at 3:06 PM, Dmitry Blotsky wrote:
>
> Hey folks,
>
> I’ve come across a bug with symlinks and platform installation recently. The
> point of
I don't think we thought of symlinks in this usecase. Probably worth adding
in code that checks for symlinks before the copy. I don't see us removing
this copy as the cordova scripts (build, run, install, etc) require those
modules.
On Tue, Oct 27, 2015 at 9:24 PM, Dmitry Blotsky
Hey folks,
I’ve come across a bug with symlinks and platform installation recently. The
point of interest is this line:
https://github.com/apache/cordova-ios/blob/4039aeb6f87c6803df5814b8cdefb8c2058504a0/bin/lib/create.js#L93.
Is copying node_modules a safe operation? In my case there was a
15 matches
Mail list logo