Message from discussion
support for repos other than GitHub
Received: by 10.42.120.196 with SMTP id g4mr311732icr.13.1346951903361;
Thu, 06 Sep 2012 10:18:23 -0700 (PDT)
X-BeenThere: componentjs@googlegroups.com
Received: by 10.231.3.207 with SMTP id 15ls2318758ibo.2.gmail; Thu, 06 Sep
2012 10:18:22 -0700 (PDT)
Received: by 10.42.115.129 with SMTP id k1mr1285245icq.28.1346951902971;
Thu, 06 Sep 2012 10:18:22 -0700 (PDT)
Received: by 10.42.115.129 with SMTP id k1mr1285244icq.28.1346951902953;
Thu, 06 Sep 2012 10:18:22 -0700 (PDT)
Return-Path: <tjholoway...@gmail.com>
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172])
by gmr-mx.google.com with ESMTPS id dd6si1000623igc.0.2012.09.06.10.18.22
(version=TLSv1/SSLv3 cipher=OTHER);
Thu, 06 Sep 2012 10:18:22 -0700 (PDT)
Received-SPF: pass (google.com: domain of tjholoway...@gmail.com designates 209.85.210.172 as permitted sender) client-ip=209.85.210.172;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of tjholoway...@gmail.com designates 209.85.210.172 as permitted sender) smtp.mail=tjholoway...@gmail.com; dkim=pass header...@gmail.com
Received: by iabz21 with SMTP id z21so2556095iab.31
for <componentjs@googlegroups.com>; Thu, 06 Sep 2012 10:18:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:sender:in-reply-to:references:date
:x-google-sender-auth:message-id:subject:from:to:content-type;
bh=mgN0kqnpjjG8oooZj8gPbYeUrj6jtWBcNcHhNuMhdrI=;
b=oJEbwjr/YZJGAugab9faCzLYLgOjEkMDUTy6tlYxolfN2oTEIeX1abG9WHHyVQFptW
VM1cZOrsoCTdAbHxKzQ6YKWjE79eOE0vmv9dX2zO2vSf+ovNI6MlgLIhwzSGjaEs/w0y
WOtbNLKe/6/vkI8JXAYm6WHBYDiDuz5HiLBCMkj4Huz+ot+p5YJ2PcCso5Wxm2tIXszZ
zcDENXxSCYt6UIKGKEbrvhMidZn6vB+WnjdJ5wKfsXbZBAHl5IEiYkDvTn1Fw3DZk4y1
viMgEgRLKySr3X9M+Zzv9imDNpbhd7y/bOGI8HinmJ6mvC9q7QTMWNP1wNLywIDRk8B7
hy9A==
MIME-Version: 1.0
Received: by 10.50.159.201 with SMTP id xe9mr4130680igb.63.1346951902711; Thu,
06 Sep 2012 10:18:22 -0700 (PDT)
Sender: tjholoway...@gmail.com
Received: by 10.64.32.168 with HTTP; Thu, 6 Sep 2012 10:18:22 -0700 (PDT)
In-Reply-To: <CACAoQH0ZVMKh5J04X1XG0bKZzNQdnGcFFJ25YFCtptiAUtf...@mail.gmail.com>
References: <e6cd5093-bfa1-462f-ae85-59783cc74ff7@googlegroups.com>
<CAO5niE3eSnEd6BXx-QdSgcsBfRP1WZTHRGq5tGwHNMc81NZ...@mail.gmail.com>
<CACAoQH0ZVMKh5J04X1XG0bKZzNQdnGcFFJ25YFCtptiAUtf...@mail.gmail.com>
Date: Thu, 6 Sep 2012 10:18:22 -0700
Message-ID: <CAO5niE3y4PKog1TnNA1s6D8kV_oBm8mZBYogfBBVZwRph+7...@mail.gmail.com>
Subject: Re: support for repos other than GitHub
From: "vision media [ Tj Holowaychuk ]" <t...@vision-media.ca>
To: componentjs@googlegroups.com
Content-Type: multipart/alternative; boundary=14dae93405b3b0d38c04c90badbc
--14dae93405b3b0d38c04c90badbc
Content-Type: text/plain; charset=ISO-8859-1
I like the idea of stating the registries in the main component.json rather
than some ~/, I'll add that to the issue.
I don't think though that we really need to "map" to these registries, it's
pretty east to have an app (
https://github.com/component/server/blob/master/app.js) that serves up
`/:user/:proj/:version` etc like github
On Thu, Sep 6, 2012 at 10:05 AM, Patrick Mueller <pmue...@gmail.com> wrote:
> On Thu, Sep 6, 2012 at 12:38 PM, vision media [ Tj Holowaychuk ] <
> t...@vision-media.ca> wrote:
>
>> IMO a decent way to go about it would justbe to specify that you have a
>> dep of "foo/bar" you set up in ~/.component.json config that you want to
>> check an internal "registry" first, so even regular deps like
>> "component/tip" *could* resolve to your private fork if you liked, without
>> change. To me this is cleaner than explicitly specifying entire repo urls
>
>
> I'd really like to indicate on the component dependency name, or value,
> the repo that should be accessed to retrieve the dependency. I already
> know which components I want to get from which registry, and I don't really
> want to "accidently" pick up a dependency from the wrong repo.
> Alternatively, a separate key in the component.json that mapped component
> names to registries:
>
> {
> "component-registries": {
> "foo/bar": "some://url/here/?version=:version"
> },
> "dependencies": {
> "foo/bar": "*"
> },
> }
>
> Default registry being GitHub.
>
> That would solve the issue of "mapping" some foreign component into the
> "component name space" (ie, :user-:repo) as well.
>
> This could be in a separate side file in your project, I suppose, but that
> seems like overkill and the information is now shared across files, when
> it's nice to have all this info in one single place. "component install"
> would be groping around for this separate file all the time.
>
> I like the idea of being able to have a component.json being fully
> self-describable, in terms of where to get it's dependencies from. There
> may be some magic "dependency url resolver" which "obtains" components
> somehow, which you have to have installed in your project in order for the
> URL in the component.json to make sense.
>
> The problem with the current npm story in this regard is that you can only
> ever point to one repo - the default npmjs.org, or overridable via
> command-line/env-var. This is problematic to get set up correctly for
> users. Asking developers to "hand-install" (if it can't be automated) a
> foreign component resolver is much less of a problem. Do it once, you're
> done, and you can keep this hand-installed resolver IN your
> development-time project's SCM. No command-line/env-var madness. No
> wondering WHICH repo you got a dependency from (in the case of a
> list/hierarchy of repos).
>
> --
> Patrick Mueller
> http://muellerware.org
>
> --
> You received this message because you are subscribed to the Google Groups
> "component" group.
> To unsubscribe from this group, send email to
> componentjs+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
--14dae93405b3b0d38c04c90badbc
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
I like the idea of stating the registries in the main component.json rather=
than some ~/, I'll add that to the issue.<div><br></div><div>I don'=
;t think though that we really need to "map" to these registries,=
it's pretty east to have an app (<a href=3D"https://github.com/compone=
nt/server/blob/master/app.js">https://github.com/component/server/blob/mast=
er/app.js</a>) that serves up `/:user/:proj/:version` etc like github<br>
<br><div class=3D"gmail_quote">On Thu, Sep 6, 2012 at 10:05 AM, Patrick Mue=
ller <span dir=3D"ltr"><<a href=3D"mailto:pmue...@gmail.com" target=3D"_=
blank">pmue...@gmail.com</a>></span> wrote:<br><blockquote class=3D"gmai=
l_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left=
:1ex">
<div class=3D"gmail_quote"><div class=3D"im">On Thu, Sep 6, 2012 at 12:38 P=
M, vision media [ Tj Holowaychuk ] <span dir=3D"ltr"><<a href=3D"mailto:=
t...@vision-media.ca" target=3D"_blank">t...@vision-media.ca</a>></span> wro=
te:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
IMO a decent way to go about it would justbe to specify that you have a dep=
of "foo/bar" you set up in ~/.component.json config that you wan=
t to check an internal "registry" first, so even regular deps lik=
e "component/tip" *could* resolve to your private fork if you lik=
ed, without change. To me this is cleaner than explicitly specifying entire=
repo urls=A0</blockquote>
<div><br></div></div><div>I'd really like to indicate on the component =
dependency name, or value, the repo that should be accessed to retrieve the=
dependency. =A0I already know which components I want to get from which re=
gistry, and I don't really want to "accidently" pick up a dep=
endency from the wrong repo. =A0Alternatively, a separate key in the compon=
ent.json that mapped component names to registries:</div>
<div><br></div><div>=A0 =A0 {</div><div>=A0 =A0 =A0 =A0 "component-reg=
istries": {</div><div>=A0 =A0 =A0 =A0 =A0 =A0 "foo/bar": &qu=
ot;some://url/here/?version=3D:version"</div><div>=A0 =A0 =A0 =A0 },</=
div><div><div>=A0 =A0 =A0 =A0 "dependencies": {</div>
<div>=A0 =A0 =A0 =A0 =A0 =A0 "foo/bar": "*"</div><div>=
=A0 =A0 =A0 =A0 },</div></div><div>=A0 =A0 }</div><div><br></div><div>Defau=
lt registry being GitHub.</div><div><br></div><div>That would solve the iss=
ue of "mapping" some foreign component into the "component n=
ame space" (ie, :user-:repo) as well.</div>
<div><br></div><div>This could be in a separate side file in your project, =
I suppose, but that seems like overkill and the information is now shared a=
cross files, when it's nice to have all this info in one single place. =
"component install" would be groping around for this separate fil=
e all the time.</div>
<div><br></div><div>I like the idea of being able to have a component.json =
being fully self-describable, in terms of where to get it's dependencie=
s from. =A0There may be some magic "dependency url resolver" whic=
h "obtains" components somehow, which you have to have installed =
in your project in order for the URL in the component.json to make sense. =
=A0</div>
<div><br></div><div>The problem with the current npm story in this regard i=
s that you can only ever point to one repo - the default <a href=3D"http://=
npmjs.org" target=3D"_blank">npmjs.org</a>, or overridable via command-line=
/env-var. =A0This is problematic to get set up correctly for users. =A0Aski=
ng developers to "hand-install" (if it can't be automated) a =
foreign component resolver is much less of a problem. =A0Do it once, you=
9;re done, and you can keep this hand-installed resolver IN your developmen=
t-time project's SCM. =A0No command-line/env-var madness. =A0No wonderi=
ng WHICH repo you got a dependency from (in the case of a list/hierarchy of=
repos).</div>
<span class=3D"HOEnZb"><font color=3D"#888888">
<div><br></div></font></span></div><span class=3D"HOEnZb"><font color=3D"#8=
88888">-- <br>Patrick Mueller<br><a href=3D"http://muellerware.org" target=
=3D"_blank">http://muellerware.org</a></font></span><div class=3D"HOEnZb"><=
div class=3D"h5">
<br>
<p></p>
-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;component" group.<br>
To unsubscribe from this group, send email to <a href=3D"mailto:componentjs=
%2Bunsubscribe@googlegroups.com" target=3D"_blank">componentjs+unsubscribe@=
googlegroups.com</a>.<br>
For more options, visit <a href=3D"https://groups.google.com/groups/opt_out=
" target=3D"_blank">https://groups.google.com/groups/opt_out</a>.<br>
=A0<br>
=A0<br>
</div></div></blockquote></div><br></div>
--14dae93405b3b0d38c04c90badbc--