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

Remote paths #127

Open
bezoerb opened this issue Feb 28, 2017 · 4 comments
Open

Remote paths #127

bezoerb opened this issue Feb 28, 2017 · 4 comments

Comments

@bezoerb
Copy link

bezoerb commented Feb 28, 2017

First I would like to thank you for your work on this module.
Version 2 brought some internal changes which prevent the use of vinyl for remote objects.
Prior to v2 it was possible to store an url as path. The use of path.normalize introduced in v2 breaks this "feature" ;)
Is this the intended behaviour or would you accept a PR to "fix" this?

@yocontra
Copy link
Member

Yeah, that was a mistake! Vinyl should absolutely support any kind of URL/path - A PR w/ some tests to prevent this in the future would be great

@phated
Copy link
Member

phated commented Feb 28, 2017

This is a hard problem to solve because we need to normalize filesystem paths. There needs to be a module created that determines if a path is fs or remote.

bezoerb added a commit to bezoerb/vinyl that referenced this issue Mar 1, 2017
@bezoerb
Copy link
Author

bezoerb commented Mar 1, 2017

PR submitted: #128

@phated
Copy link
Member

phated commented Mar 6, 2017

Copying my comment from #128 PR:

I actually believe this problem can and should be solved by my idea of an Enhanced Stat Object (#105). Usage would look something like:

var file = new Vinyl({
  path: 'http://google.com',
  stat: {
    isRemote: true
  }
})

The isRemote flag in the Enhanced Stat Object would indicate that a Vinyl resource is being constructed with a remote path and would disable normalization (or do URL normalization). Also, Enhanced Stat Objects would allow for property changes and track history, a non-remote file could be converted to a remote file and users would know where it happened in a pipeline.

@phated phated added this to the Future milestone Mar 6, 2017
@phated phated added this to Nice to Have in v4 Mar 8, 2017
@phated phated removed this from Nice to Have in v4 Apr 23, 2020
@phated phated added this to To do in v5 Apr 23, 2020
@phated phated removed this from the Future milestone Apr 28, 2020
@phated phated moved this from To do to Nice to Have in v5 Oct 21, 2020
@phated phated removed this from Nice to Have in v5 Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

3 participants