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

How to handle paths outside of package.json's directory #5

Open
mk-pmb opened this issue Jul 18, 2016 · 0 comments
Open

How to handle paths outside of package.json's directory #5

mk-pmb opened this issue Jul 18, 2016 · 0 comments

Comments

@mk-pmb
Copy link

mk-pmb commented Jul 18, 2016

  "browser": {
    "./../../limits.json": "./overrides/limits.json",
    "/etc/users.json": "./override/etc_users.json"
  }

The first one even complies with the wishful thinking that

All paths for browser fields are relative to the package.json file location

I can make up a dozen of cases where it would be really useful if some bundlers accept above config, but nevertheless I propose that:

Bundlers MUST ignore overrides that:

  • would apply to parent directories of the package.json that sets them (nope, that could leak information about file system structure)
  • contain upwards path components, e.g. ...
  • contain absolute or network paths, e.g. start with a slash (linux/win), backslash (win), drive letter (win), UNC path (win)
  • contain characters below U+0020

You might wish to include even more Unicode ranges, but they'd probably be in a region where we'd have to care about the differemces between UTF-8 and UCS-2.

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

1 participant