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

fix: make w3 up --no-wrap work as advertised. #160

Merged
merged 3 commits into from
Jan 17, 2024
Merged

fix: make w3 up --no-wrap work as advertised. #160

merged 3 commits into from
Jan 17, 2024

Conversation

olizilla
Copy link
Contributor

@olizilla olizilla commented Jan 17, 2024

Fix and test handling of --wrap option to w3 up

flag result
undefined wrap: true
--wrap wrap: true
--wrap true wrap: true
--wrap=true wrap: true
--wrap false wrap: false
--wrap=false wrap: false
--no-wrap wrap: false

Also normalises the behaviour of other boolean flags to w3 up so we can set them like w3 up --hidden=${{input.hidden}} in scripts, where it would be fiddly to optionally include a flag. see: https://github.com/web3-storage/add-to-web3/pull/89/files#diff-1243c5424efaaa19bd8e813c5e6f6da46316e63761421b3e5f5c8ced9a36e6b6R51

License: MIT

Fix and test handling of wrap option to w3 up.

| flag         | result      |
|--------------|-------------|
| undefined    | wrap: true  |
| --wrap       | wrap: true  |
| --wrap true  | wrap: true  |
| --wrap=true  | wrap: true  |
| --wrap false | wrap: false |
| --wrap=false | wrap: false |
| --no-wrap    | wrap: false |

License: MIT
Signed-off-by: Oli Evans <[email protected]>
@olizilla
Copy link
Contributor Author

not sure what happend in #153 but I promise this makes it work more intuitively.

test/bin.spec.js Outdated Show resolved Hide resolved
Copy link
Member

@alanshaw alanshaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, I was wrestling with switching it over to --wrap.

test/bin.spec.js Outdated Show resolved Hide resolved
test/bin.spec.js Outdated Show resolved Hide resolved
License: MIT
Signed-off-by: Oli Evans <[email protected]>
@olizilla olizilla changed the title fix: make --no-wrap work as advertised. fix: make w3 up --no-wrap work as advertised. Jan 17, 2024
passing a default forces it to be parsed as a boolean, which makes hidden=true work as expected.

License: MIT
Signed-off-by: Oli Evans <[email protected]>
@olizilla olizilla merged commit 426faad into main Jan 17, 2024
1 check passed
@olizilla olizilla deleted the no-no-wrap branch January 17, 2024 16:20
olizilla pushed a commit that referenced this pull request Jan 17, 2024
🤖 I have created a release *beep* *boop*
---


##
[7.2.1](v7.2.0...v7.2.1)
(2024-01-17)


### Bug Fixes

* make `w3 up --no-wrap` work as advertised.
([#160](#160))
([426faad](426faad))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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