Skip to content

resolve: make signature reflect impurity#4

Closed
cstrahan wants to merge 1 commit intopurescript-node:masterfrom
cstrahan:resolve-fix
Closed

resolve: make signature reflect impurity#4
cstrahan wants to merge 1 commit intopurescript-node:masterfrom
cstrahan:resolve-fix

Conversation

@cstrahan
Copy link

resolve will return different results depending on the current
working directory, so this should be captured in the type signature.

Also, simplify the arguments: zero arguments is the same as giving "."
as the only argument, so from and to can be collapsed into one
argument.

resolve will return different results depending on the current
working directory, so this should be captured in the type signature.

Also, simplify the arguments: zero arguments is the same as giving "."
as the only argument, so `from` and `to` can be collapsed into one
argument.
@hdgarrood
Copy link
Member

👍 I will merge this manually.

@hdgarrood
Copy link
Member

Actually, on second thoughts, I'm not convinced about collapsing from and to into one argument. In particular, it departs from how the node api is documented, so the node api docs are no longer as useful for understanding this. I also think it's a probably good thing that you have to pass at least one FilePath in; Path.resolve [] giving you the current directory seems a bit strange to me, and it's probably better to use Process.cwd for that.

@garyb garyb mentioned this pull request May 27, 2018
@garyb garyb closed this in #14 May 27, 2018
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

Successfully merging this pull request may close these issues.

2 participants