You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Michal Mocny <mm...@google.com> on 2015/04/20 23:00:55 UTC

Scoped package names for npm?

https://docs.npmjs.com/getting-started/scoped-packages

Should we be @cordova/plugin-device instead of cordova-plugin-device?

-Michal

Re: Scoped package names for npm?

Posted by Brian LeRoux <b...@brian.io>.
the npm team has granted us the cordova org/scope when/if we're ready for
it.

On Tue, Apr 21, 2015 at 8:37 AM, Michal Mocny <mm...@chromium.org> wrote:

> Okay fair enough.  I was hoping that with the lack of tools release to
> stable, we can rename without affecting end users *right now*, but not
> *soon*.
>
> If we never want to use scopes, fair enough.  If we ever do, it will only
> get more difficult.
>
> -Michal
>
> On Tue, Apr 21, 2015 at 11:04 AM, Andrew Grieve <ag...@chromium.org>
> wrote:
>
> > Given the state of some of our plugins, dropping the distinguishing
> > namespace might be a good thing :P
> >
> > On Tue, Apr 21, 2015 at 8:45 AM, Horn, Julian C <julian.c.horn@intel.com
> >
> > wrote:
> >
> > > I am also against another rename.  These name changes are very costly
> and
> > > disruptive.
> > >
> > > There is code in several places that assumes that you can enumerate the
> > > plugins selected by a project by enumerating the subdirectories of
> > plugins.
> > > If you allow a plugin root folder to be more than a single directory,
> > > like "@cordova/plugin-device" then you break that code.
> > >
> > > Also, please remember that when you rename a plugins, you require
> people
> > > to update every <dependency> tag that refers to that plugin, unless you
> > > want to rely on the rename machinery forever.
> > >
> > >     Julian
> > >
> > > -----Original Message-----
> > > From: Steven Gill [mailto:stevengill97@gmail.com]
> > > Sent: Monday, April 20, 2015 9:42 PM
> > > To: dev@cordova.apache.org
> > > Subject: Re: Scoped package names for npm?
> > >
> > > I also like scoped packages but am against another rename. Haha.
> > >
> > > I know organizations are coming soon so we will be able to create the
> > > Cordova organization and I believe scope packages that way. Add PMC
> > members
> > > to the organization to be able to publish instead of relying on a
> Cordova
> > > npm user account.
> > >
> > > Lets wait and see how it goes.
> > > On Apr 20, 2015 2:29 PM, "Jesse" <pu...@gmail.com> wrote:
> > >
> > > > re: the scoped package id, I like it, but not sure we want to change
> > > > them again ... and how much of our existing world will it break. Can
> > > > we install an '@' id currently on all platforms? It will result in a
> > > > www/plugins/@cordova/plugin-device/ folder right now, won't it?
> > > >
> > > > re: other questions
> > > > Personally, I would rather see only committers able to publish to our
> > > > scope (assuming we go that way), just like we wanted to prevent non
> > > > committers from using org.apache.cordova namespace.
> > > >
> > > > I considered 'cordova plugin add device' awhile back, I was going to
> > > > do it directly in plugman, but I decided against it. Currently it
> > > > would mean a 3rd attempt to find the plugin over http; 1) cpr, 2)
> npm,
> > > > 3)munge name and go back to npm By this time, I think I would just
> ask
> > > > the user what they really want.
> > > > We could also do this via cordova-registry-mapper aliases.
> > > >
> > > >
> > > >
> > > > @purplecabbage
> > > > risingj.com
> > > >
> > > > On Mon, Apr 20, 2015 at 2:13 PM, Parashuram N (MS OPEN TECH) <
> > > > panarasi@microsoft.com> wrote:
> > > >
> > > > > Scopes are like namespaces. In the reverse domain name world,
> > > > > org.apache.cordova was considered a namespace, right ?
> > > > >
> > > > > We did not want non core packages to publish to that namespace, so
> > > > > does the same argument apply ?
> > > > >
> > > > > Alternatively, we can think of scope as packages that apply to a
> > > > > particular environment - for example, all cordova packages would be
> > > > > @cordova scope.
> > > > >
> > > > > -----Original Message-----
> > > > > From: Michal Mocny [mailto:mmocny@google.com]
> > > > > Sent: Monday, April 20, 2015 2:03 PM
> > > > > To: dev
> > > > > Subject: Re: Scoped package names for npm?
> > > > >
> > > > > Other questions to answer:
> > > > > - Can 3rd-parties publish to this scope?
> > > > >   - Do we want them to?
> > > > > - Do we want to default to @cordova scope if none is provided, such
> > > > > that you could do `cordova plugin add device`?
> > > > >
> > > > > -Michal
> > > > >
> > > > >
> > > > > On Mon, Apr 20, 2015 at 5:00 PM, Michal Mocny <mm...@google.com>
> > > wrote:
> > > > >
> > > > > > https://docs.npmjs.com/getting-started/scoped-packages
> > > > > >
> > > > > > Should we be @cordova/plugin-device instead of
> > cordova-plugin-device?
> > > > > >
> > > > > > -Michal
> > > > > >
> > > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> > > For additional commands, e-mail: dev-help@cordova.apache.org
> > >
> > >
> >
>

Re: Scoped package names for npm?

Posted by Michal Mocny <mm...@chromium.org>.
Okay fair enough.  I was hoping that with the lack of tools release to
stable, we can rename without affecting end users *right now*, but not
*soon*.

If we never want to use scopes, fair enough.  If we ever do, it will only
get more difficult.

-Michal

On Tue, Apr 21, 2015 at 11:04 AM, Andrew Grieve <ag...@chromium.org>
wrote:

> Given the state of some of our plugins, dropping the distinguishing
> namespace might be a good thing :P
>
> On Tue, Apr 21, 2015 at 8:45 AM, Horn, Julian C <ju...@intel.com>
> wrote:
>
> > I am also against another rename.  These name changes are very costly and
> > disruptive.
> >
> > There is code in several places that assumes that you can enumerate the
> > plugins selected by a project by enumerating the subdirectories of
> plugins.
> > If you allow a plugin root folder to be more than a single directory,
> > like "@cordova/plugin-device" then you break that code.
> >
> > Also, please remember that when you rename a plugins, you require people
> > to update every <dependency> tag that refers to that plugin, unless you
> > want to rely on the rename machinery forever.
> >
> >     Julian
> >
> > -----Original Message-----
> > From: Steven Gill [mailto:stevengill97@gmail.com]
> > Sent: Monday, April 20, 2015 9:42 PM
> > To: dev@cordova.apache.org
> > Subject: Re: Scoped package names for npm?
> >
> > I also like scoped packages but am against another rename. Haha.
> >
> > I know organizations are coming soon so we will be able to create the
> > Cordova organization and I believe scope packages that way. Add PMC
> members
> > to the organization to be able to publish instead of relying on a Cordova
> > npm user account.
> >
> > Lets wait and see how it goes.
> > On Apr 20, 2015 2:29 PM, "Jesse" <pu...@gmail.com> wrote:
> >
> > > re: the scoped package id, I like it, but not sure we want to change
> > > them again ... and how much of our existing world will it break. Can
> > > we install an '@' id currently on all platforms? It will result in a
> > > www/plugins/@cordova/plugin-device/ folder right now, won't it?
> > >
> > > re: other questions
> > > Personally, I would rather see only committers able to publish to our
> > > scope (assuming we go that way), just like we wanted to prevent non
> > > committers from using org.apache.cordova namespace.
> > >
> > > I considered 'cordova plugin add device' awhile back, I was going to
> > > do it directly in plugman, but I decided against it. Currently it
> > > would mean a 3rd attempt to find the plugin over http; 1) cpr, 2) npm,
> > > 3)munge name and go back to npm By this time, I think I would just ask
> > > the user what they really want.
> > > We could also do this via cordova-registry-mapper aliases.
> > >
> > >
> > >
> > > @purplecabbage
> > > risingj.com
> > >
> > > On Mon, Apr 20, 2015 at 2:13 PM, Parashuram N (MS OPEN TECH) <
> > > panarasi@microsoft.com> wrote:
> > >
> > > > Scopes are like namespaces. In the reverse domain name world,
> > > > org.apache.cordova was considered a namespace, right ?
> > > >
> > > > We did not want non core packages to publish to that namespace, so
> > > > does the same argument apply ?
> > > >
> > > > Alternatively, we can think of scope as packages that apply to a
> > > > particular environment - for example, all cordova packages would be
> > > > @cordova scope.
> > > >
> > > > -----Original Message-----
> > > > From: Michal Mocny [mailto:mmocny@google.com]
> > > > Sent: Monday, April 20, 2015 2:03 PM
> > > > To: dev
> > > > Subject: Re: Scoped package names for npm?
> > > >
> > > > Other questions to answer:
> > > > - Can 3rd-parties publish to this scope?
> > > >   - Do we want them to?
> > > > - Do we want to default to @cordova scope if none is provided, such
> > > > that you could do `cordova plugin add device`?
> > > >
> > > > -Michal
> > > >
> > > >
> > > > On Mon, Apr 20, 2015 at 5:00 PM, Michal Mocny <mm...@google.com>
> > wrote:
> > > >
> > > > > https://docs.npmjs.com/getting-started/scoped-packages
> > > > >
> > > > > Should we be @cordova/plugin-device instead of
> cordova-plugin-device?
> > > > >
> > > > > -Michal
> > > > >
> > > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> > For additional commands, e-mail: dev-help@cordova.apache.org
> >
> >
>

Re: Scoped package names for npm?

Posted by Andrew Grieve <ag...@chromium.org>.
Given the state of some of our plugins, dropping the distinguishing
namespace might be a good thing :P

On Tue, Apr 21, 2015 at 8:45 AM, Horn, Julian C <ju...@intel.com>
wrote:

> I am also against another rename.  These name changes are very costly and
> disruptive.
>
> There is code in several places that assumes that you can enumerate the
> plugins selected by a project by enumerating the subdirectories of plugins.
> If you allow a plugin root folder to be more than a single directory,
> like "@cordova/plugin-device" then you break that code.
>
> Also, please remember that when you rename a plugins, you require people
> to update every <dependency> tag that refers to that plugin, unless you
> want to rely on the rename machinery forever.
>
>     Julian
>
> -----Original Message-----
> From: Steven Gill [mailto:stevengill97@gmail.com]
> Sent: Monday, April 20, 2015 9:42 PM
> To: dev@cordova.apache.org
> Subject: Re: Scoped package names for npm?
>
> I also like scoped packages but am against another rename. Haha.
>
> I know organizations are coming soon so we will be able to create the
> Cordova organization and I believe scope packages that way. Add PMC members
> to the organization to be able to publish instead of relying on a Cordova
> npm user account.
>
> Lets wait and see how it goes.
> On Apr 20, 2015 2:29 PM, "Jesse" <pu...@gmail.com> wrote:
>
> > re: the scoped package id, I like it, but not sure we want to change
> > them again ... and how much of our existing world will it break. Can
> > we install an '@' id currently on all platforms? It will result in a
> > www/plugins/@cordova/plugin-device/ folder right now, won't it?
> >
> > re: other questions
> > Personally, I would rather see only committers able to publish to our
> > scope (assuming we go that way), just like we wanted to prevent non
> > committers from using org.apache.cordova namespace.
> >
> > I considered 'cordova plugin add device' awhile back, I was going to
> > do it directly in plugman, but I decided against it. Currently it
> > would mean a 3rd attempt to find the plugin over http; 1) cpr, 2) npm,
> > 3)munge name and go back to npm By this time, I think I would just ask
> > the user what they really want.
> > We could also do this via cordova-registry-mapper aliases.
> >
> >
> >
> > @purplecabbage
> > risingj.com
> >
> > On Mon, Apr 20, 2015 at 2:13 PM, Parashuram N (MS OPEN TECH) <
> > panarasi@microsoft.com> wrote:
> >
> > > Scopes are like namespaces. In the reverse domain name world,
> > > org.apache.cordova was considered a namespace, right ?
> > >
> > > We did not want non core packages to publish to that namespace, so
> > > does the same argument apply ?
> > >
> > > Alternatively, we can think of scope as packages that apply to a
> > > particular environment - for example, all cordova packages would be
> > > @cordova scope.
> > >
> > > -----Original Message-----
> > > From: Michal Mocny [mailto:mmocny@google.com]
> > > Sent: Monday, April 20, 2015 2:03 PM
> > > To: dev
> > > Subject: Re: Scoped package names for npm?
> > >
> > > Other questions to answer:
> > > - Can 3rd-parties publish to this scope?
> > >   - Do we want them to?
> > > - Do we want to default to @cordova scope if none is provided, such
> > > that you could do `cordova plugin add device`?
> > >
> > > -Michal
> > >
> > >
> > > On Mon, Apr 20, 2015 at 5:00 PM, Michal Mocny <mm...@google.com>
> wrote:
> > >
> > > > https://docs.npmjs.com/getting-started/scoped-packages
> > > >
> > > > Should we be @cordova/plugin-device instead of cordova-plugin-device?
> > > >
> > > > -Michal
> > > >
> > >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> For additional commands, e-mail: dev-help@cordova.apache.org
>
>

RE: Scoped package names for npm?

Posted by "Horn, Julian C" <ju...@intel.com>.
I am also against another rename.  These name changes are very costly and disruptive.

There is code in several places that assumes that you can enumerate the
plugins selected by a project by enumerating the subdirectories of plugins.
If you allow a plugin root folder to be more than a single directory,
like "@cordova/plugin-device" then you break that code.

Also, please remember that when you rename a plugins, you require people
to update every <dependency> tag that refers to that plugin, unless you
want to rely on the rename machinery forever.

    Julian

-----Original Message-----
From: Steven Gill [mailto:stevengill97@gmail.com] 
Sent: Monday, April 20, 2015 9:42 PM
To: dev@cordova.apache.org
Subject: Re: Scoped package names for npm?

I also like scoped packages but am against another rename. Haha.

I know organizations are coming soon so we will be able to create the Cordova organization and I believe scope packages that way. Add PMC members to the organization to be able to publish instead of relying on a Cordova npm user account.

Lets wait and see how it goes.
On Apr 20, 2015 2:29 PM, "Jesse" <pu...@gmail.com> wrote:

> re: the scoped package id, I like it, but not sure we want to change 
> them again ... and how much of our existing world will it break. Can 
> we install an '@' id currently on all platforms? It will result in a 
> www/plugins/@cordova/plugin-device/ folder right now, won't it?
>
> re: other questions
> Personally, I would rather see only committers able to publish to our 
> scope (assuming we go that way), just like we wanted to prevent non 
> committers from using org.apache.cordova namespace.
>
> I considered 'cordova plugin add device' awhile back, I was going to 
> do it directly in plugman, but I decided against it. Currently it 
> would mean a 3rd attempt to find the plugin over http; 1) cpr, 2) npm, 
> 3)munge name and go back to npm By this time, I think I would just ask 
> the user what they really want.
> We could also do this via cordova-registry-mapper aliases.
>
>
>
> @purplecabbage
> risingj.com
>
> On Mon, Apr 20, 2015 at 2:13 PM, Parashuram N (MS OPEN TECH) < 
> panarasi@microsoft.com> wrote:
>
> > Scopes are like namespaces. In the reverse domain name world, 
> > org.apache.cordova was considered a namespace, right ?
> >
> > We did not want non core packages to publish to that namespace, so 
> > does the same argument apply ?
> >
> > Alternatively, we can think of scope as packages that apply to a 
> > particular environment - for example, all cordova packages would be 
> > @cordova scope.
> >
> > -----Original Message-----
> > From: Michal Mocny [mailto:mmocny@google.com]
> > Sent: Monday, April 20, 2015 2:03 PM
> > To: dev
> > Subject: Re: Scoped package names for npm?
> >
> > Other questions to answer:
> > - Can 3rd-parties publish to this scope?
> >   - Do we want them to?
> > - Do we want to default to @cordova scope if none is provided, such 
> > that you could do `cordova plugin add device`?
> >
> > -Michal
> >
> >
> > On Mon, Apr 20, 2015 at 5:00 PM, Michal Mocny <mm...@google.com> wrote:
> >
> > > https://docs.npmjs.com/getting-started/scoped-packages
> > >
> > > Should we be @cordova/plugin-device instead of cordova-plugin-device?
> > >
> > > -Michal
> > >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Re: Scoped package names for npm?

Posted by Steven Gill <st...@gmail.com>.
I also like scoped packages but am against another rename. Haha.

I know organizations are coming soon so we will be able to create the
Cordova organization and I believe scope packages that way. Add PMC members
to the organization to be able to publish instead of relying on a Cordova
npm user account.

Lets wait and see how it goes.
On Apr 20, 2015 2:29 PM, "Jesse" <pu...@gmail.com> wrote:

> re: the scoped package id, I like it, but not sure we want to change them
> again ... and how much of our existing world will it break. Can we install
> an '@' id currently on all platforms? It will result in a
> www/plugins/@cordova/plugin-device/ folder right now, won't it?
>
> re: other questions
> Personally, I would rather see only committers able to publish to our scope
> (assuming we go that way), just like we wanted to prevent non committers
> from using org.apache.cordova namespace.
>
> I considered 'cordova plugin add device' awhile back, I was going to do it
> directly in plugman, but I decided against it. Currently it would mean a
> 3rd attempt to find the plugin over http; 1) cpr, 2) npm, 3)munge name and
> go back to npm
> By this time, I think I would just ask the user what they really want.
> We could also do this via cordova-registry-mapper aliases.
>
>
>
> @purplecabbage
> risingj.com
>
> On Mon, Apr 20, 2015 at 2:13 PM, Parashuram N (MS OPEN TECH) <
> panarasi@microsoft.com> wrote:
>
> > Scopes are like namespaces. In the reverse domain name world,
> > org.apache.cordova was considered a namespace, right ?
> >
> > We did not want non core packages to publish to that namespace, so does
> > the same argument apply ?
> >
> > Alternatively, we can think of scope as packages that apply to a
> > particular environment - for example, all cordova packages would be
> > @cordova scope.
> >
> > -----Original Message-----
> > From: Michal Mocny [mailto:mmocny@google.com]
> > Sent: Monday, April 20, 2015 2:03 PM
> > To: dev
> > Subject: Re: Scoped package names for npm?
> >
> > Other questions to answer:
> > - Can 3rd-parties publish to this scope?
> >   - Do we want them to?
> > - Do we want to default to @cordova scope if none is provided, such that
> > you could do `cordova plugin add device`?
> >
> > -Michal
> >
> >
> > On Mon, Apr 20, 2015 at 5:00 PM, Michal Mocny <mm...@google.com> wrote:
> >
> > > https://docs.npmjs.com/getting-started/scoped-packages
> > >
> > > Should we be @cordova/plugin-device instead of cordova-plugin-device?
> > >
> > > -Michal
> > >
> >
>

Re: Scoped package names for npm?

Posted by Jesse <pu...@gmail.com>.
re: the scoped package id, I like it, but not sure we want to change them
again ... and how much of our existing world will it break. Can we install
an '@' id currently on all platforms? It will result in a
www/plugins/@cordova/plugin-device/ folder right now, won't it?

re: other questions
Personally, I would rather see only committers able to publish to our scope
(assuming we go that way), just like we wanted to prevent non committers
from using org.apache.cordova namespace.

I considered 'cordova plugin add device' awhile back, I was going to do it
directly in plugman, but I decided against it. Currently it would mean a
3rd attempt to find the plugin over http; 1) cpr, 2) npm, 3)munge name and
go back to npm
By this time, I think I would just ask the user what they really want.
We could also do this via cordova-registry-mapper aliases.



@purplecabbage
risingj.com

On Mon, Apr 20, 2015 at 2:13 PM, Parashuram N (MS OPEN TECH) <
panarasi@microsoft.com> wrote:

> Scopes are like namespaces. In the reverse domain name world,
> org.apache.cordova was considered a namespace, right ?
>
> We did not want non core packages to publish to that namespace, so does
> the same argument apply ?
>
> Alternatively, we can think of scope as packages that apply to a
> particular environment - for example, all cordova packages would be
> @cordova scope.
>
> -----Original Message-----
> From: Michal Mocny [mailto:mmocny@google.com]
> Sent: Monday, April 20, 2015 2:03 PM
> To: dev
> Subject: Re: Scoped package names for npm?
>
> Other questions to answer:
> - Can 3rd-parties publish to this scope?
>   - Do we want them to?
> - Do we want to default to @cordova scope if none is provided, such that
> you could do `cordova plugin add device`?
>
> -Michal
>
>
> On Mon, Apr 20, 2015 at 5:00 PM, Michal Mocny <mm...@google.com> wrote:
>
> > https://docs.npmjs.com/getting-started/scoped-packages
> >
> > Should we be @cordova/plugin-device instead of cordova-plugin-device?
> >
> > -Michal
> >
>

RE: Scoped package names for npm?

Posted by Murat Sutunc <mu...@microsoft.com>.
From what I read so far, scopes are like namespaces for npm modules. So each npm user has their own scope. In our case we'll have one cordova user who will have modules like:
..
@cordova/platform-ios
@cordova/plugin-camera
..

Unless you're the user cordova (or a collaborator), you can't publish new modules. In this case all our modules will be under cordova and 3rd party modules have to be under some other namespace (if they choose to use any).

-----Original Message-----
From: Parashuram N (MS OPEN TECH) [mailto:panarasi@microsoft.com] 
Sent: Monday, April 20, 2015 2:13 PM
To: dev@cordova.apache.org
Subject: RE: Scoped package names for npm?

Scopes are like namespaces. In the reverse domain name world, org.apache.cordova was considered a namespace, right ?

We did not want non core packages to publish to that namespace, so does the same argument apply ? 

Alternatively, we can think of scope as packages that apply to a particular environment - for example, all cordova packages would be @cordova scope. 

-----Original Message-----
From: Michal Mocny [mailto:mmocny@google.com] 
Sent: Monday, April 20, 2015 2:03 PM
To: dev
Subject: Re: Scoped package names for npm?

Other questions to answer:
- Can 3rd-parties publish to this scope?
  - Do we want them to?
- Do we want to default to @cordova scope if none is provided, such that you could do `cordova plugin add device`?

-Michal


On Mon, Apr 20, 2015 at 5:00 PM, Michal Mocny <mm...@google.com> wrote:

> https://docs.npmjs.com/getting-started/scoped-packages
>
> Should we be @cordova/plugin-device instead of cordova-plugin-device?
>
> -Michal
>

RE: Scoped package names for npm?

Posted by "Parashuram N (MS OPEN TECH)" <pa...@microsoft.com>.
Scopes are like namespaces. In the reverse domain name world, org.apache.cordova was considered a namespace, right ?

We did not want non core packages to publish to that namespace, so does the same argument apply ? 

Alternatively, we can think of scope as packages that apply to a particular environment - for example, all cordova packages would be @cordova scope. 

-----Original Message-----
From: Michal Mocny [mailto:mmocny@google.com] 
Sent: Monday, April 20, 2015 2:03 PM
To: dev
Subject: Re: Scoped package names for npm?

Other questions to answer:
- Can 3rd-parties publish to this scope?
  - Do we want them to?
- Do we want to default to @cordova scope if none is provided, such that you could do `cordova plugin add device`?

-Michal


On Mon, Apr 20, 2015 at 5:00 PM, Michal Mocny <mm...@google.com> wrote:

> https://docs.npmjs.com/getting-started/scoped-packages
>
> Should we be @cordova/plugin-device instead of cordova-plugin-device?
>
> -Michal
>

Re: Scoped package names for npm?

Posted by Michal Mocny <mm...@google.com>.
Other questions to answer:
- Can 3rd-parties publish to this scope?
  - Do we want them to?
- Do we want to default to @cordova scope if none is provided, such that
you could do `cordova plugin add device`?

-Michal


On Mon, Apr 20, 2015 at 5:00 PM, Michal Mocny <mm...@google.com> wrote:

> https://docs.npmjs.com/getting-started/scoped-packages
>
> Should we be @cordova/plugin-device instead of cordova-plugin-device?
>
> -Michal
>