Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

un-deprecation using npm deprecate from doc example causes anxiety #7814

Closed
ungoldman opened this issue Mar 31, 2015 · 4 comments
Closed

un-deprecation using npm deprecate from doc example causes anxiety #7814

ungoldman opened this issue Mar 31, 2015 · 4 comments

Comments

@ungoldman
Copy link
Contributor

Hello!

Doc at https://docs.npmjs.com/cli/deprecate says:

To un-deprecate a package, specify an empty string ("") for the message argument.

Originally I was going to say it's not removing deprecation, just removing the deprecation message, e.g.

npm WARN deprecated derp@0.1.8: deprecation message

becomes

npm WARN deprecated derp@0.1.8:

However, copying it from the doc page I now realize there shouldn't be a space in the empty string (obviously I guess), but reading it on the doc page I had not gotten that impression:

screen shot 2015-03-31 at 1 49 10 pm

This is on a mac running latest chrome. I guess it's just a weird font rendering issue but it's enough to have fooled me into running npm deprecate derp@0.1.8 " " to try to remove it.

Sorry if this isn't real issue material but it's an understandable misreading, right?

Side-note: would it make sense to treat " " as an empty string and remove deprecation? It's not falsy but it sure is empty.

@othiym23
Copy link
Contributor

I think " " should probably be a validation error, just because it's mildly magical to treat it as the same as "". How would you suggest we make the documentation clearer?

@ungoldman
Copy link
Contributor Author

@othiym23 wrapping it in a code block ("") might be enough to clarify it for dummies like me.

@ungoldman
Copy link
Contributor Author

Oh weird, it already is wrapped in a code block.

<p>To un-deprecate a package, specify an empty string (<code>""</code>) for the <code>message</code> argument.</p>

I guess it's just the font that's a bit easy to misread.

@othiym23
Copy link
Contributor

othiym23 commented Apr 3, 2015

I think I'm going to call this close enough to resolved to be done. If you come up with a better way to show that empty string, I'd be happy to land a patch.

@othiym23 othiym23 closed this as completed Apr 3, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants