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

portRange option requires port and ports to be set to null #15

Closed
Niek opened this issue Apr 22, 2022 · 3 comments
Closed

portRange option requires port and ports to be set to null #15

Niek opened this issue Apr 22, 2022 · 3 comments

Comments

@Niek
Copy link

Niek commented Apr 22, 2022

The only way to get portRange working is like this:

await getPort({ port: null, ports: [], portRange: [23000, 24000] })

This is not very intuitive - if portRange is set the other options should be ignored I think.

@pi0
Copy link
Member

pi0 commented Apr 22, 2022

Thanks for the feedback. Hmm i agree specially when user only provides one of this options, others can be automatically disabled. But I would expect to allow { port: X, ports: [Y, Z] } and all 3 being checked. I think we just have to disable defaults when either of this options is provided. What do you think?

@Niek
Copy link
Author

Niek commented Apr 22, 2022

Yes, that seems sensible to me - only use the defaults when neither of these are set.

@pi0 pi0 closed this as completed in 00366ae Nov 14, 2022
@pi0
Copy link
Member

pi0 commented Nov 14, 2022

In next major version, when port is provided alternative range will be desabled.

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