Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate file paths edge-case #2 #10

Closed
jasonkuhrt opened this issue Nov 8, 2014 · 4 comments
Closed

Duplicate file paths edge-case #2 #10

jasonkuhrt opened this issue Nov 8, 2014 · 4 comments

Comments

@jasonkuhrt
Copy link
Contributor

@matthewmueller This is currently impossible to catch:

.a { background-image: url('z.png'); }
.b { background-image: url("../fixtures/z.png"); }

The reason it is impossible to catch is that we don't have any information about the path of the str coming in here: https://github.com/MatthewMueller/file-deps/blob/master/lib/css.js#L33

What I would like to suggest/brain-storm is a minimal API change that would provide the path of given str so that we can rule out dupes more robustly.

@jasonkuhrt
Copy link
Contributor Author

@matthewmueller Once we sort this out I will update duo but first want to fix this issue. I can provide you with a failing test if that helps clarify the issue here. Let me know... : )

@jasonkuhrt
Copy link
Contributor Author

Hey I started working on this. A few things I'd like to run by you:

Same:

// @root /
'/b.foo'   // -> /b.foo
'b.foo'    // -> /b.foo
'./b.foo'    // -> /b.foo

Different:

// @root /a/b
'/c.foo'    // -> /c.foo
'c.foo'     // -> /a/c.foo

Error?

// @root /
'../b.foo'   // -> ?

same:

Two specific questions:

@dominicbarnes
Copy link

For the same reasons as my comment on #12, this change should not be implemented. This normalization should be handled outside of file-deps.

@jasonkuhrt
Copy link
Contributor Author

Hey. I'm no longer active on these projects so feel free to close etc. Take care!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants