(I don't see this reply on github :-()


On Sat, Dec 7, 2013 at 10:29 AM, Erik Arvidsson <notifications@github.com>wrote:

> ...
>


> Can we also add this test?
>
> assert.equal(System.normalize('a/b/../c'),'a/b/../c');assert.equal(System.normalize('a/b/../c', refererName),'a/b/../c');
>
> These are not relative so should be passed through as is.
>
> assert.equal(System.normalize('a/../b', refererName),'./dir/b');
>
> I don't see how this part of the proposal can survive. The two primary use
cases are browser URLs and file system names. In both cases 'a/b/../c'
means 'a/c'. So if I have a project and in one part of the project I use
'a/b/../c' and another 'a/c', the only component of my system distinguishes
them is System.normalize. That will be bad.

> If we use removeDotSegments then this ends up being relative even though
> Jason's proposal does not allow '..' except at the beginning. We could
> throw on this if we wanted to?
>
IMO these have to throw or they have to canonicalize. If I can write
'a/b/../c' then its normal form has to be 'a/c' not 'a/b/../c'.

Is there any path into System.normalize() where devs can compute the name,
eg
  import {foo} from amaze+confound;
? Maybe via dynamic load? If yes, then IMO the /../ has to be legal. Else
throw is ok.