Skip to content

Allow cwd and localDir options to be URLs#492

Merged
sindresorhus merged 6 commits intomainfrom
feat/cwd-url
Feb 12, 2022
Merged

Allow cwd and localDir options to be URLs#492
sindresorhus merged 6 commits intomainfrom
feat/cwd-url

Conversation

@ehmicky
Copy link
Copy Markdown
Collaborator

@ehmicky ehmicky commented Feb 10, 2022

Fixes #491

This allows the cwd and localDir options to be URLs with the file: scheme.

This is not available in Node.js 12. We could potentially use fileURLToPath() to convert it in Node.js 12. However, Node.js 12 support is ending in a little more than 2 months. Also, it would require detecting the Node.js version, which might add semver as a production dependency. Overall, it does not seem to be worth it, but please let me know if you think otherwise.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cwd as a file: URL does not work

2 participants