2

For example, right now there is "apn" module v2.1.3 on npmjs: https://www.npmjs.com/package/apn

But there is issue. And I'm using 1.7.8.

I know that I can go to node_modules/apn/ and read README.md. But I wonder if there is way to see docs for 1.7.8 on npmjs.com?

I tried https://www.npmjs.com/package/apn@1.7.8, it doesn't work, but it would be good feature.

1 Answers1

3

Your best option would be to see the docs on GitHub.

A link for this specific example:

But it is possible (though unlikely) that some module may not be available on GitHub (or not be tagged properly). In that case you'd need to get the metadata from:

Download the tarball:

and extract it to get the docs.

rsp
  • 107,747
  • 29
  • 201
  • 177
  • Good idea. The issue here that not all authors manage tags on github for their modules – Dmitriy Eroshenko Feb 08 '17 at 12:38
  • @DmitriyEroshenko True. In that case you'd have to extract the docs from the tarball yourself - see the updated answer. – rsp Feb 08 '17 at 12:40
  • Yes, this is option too. But as I mentioned above, I can see README.md in node_modules/apn/README.md after module installed, but there is no markdown formatting when I open in editor and there is no way to share link with another developer. So, main issue that npm website doesn't let to see docs for certain version of module. Looks like this is not possible. I wrote question directly to their support, will see if there any way to do it. – Dmitriy Eroshenko Feb 08 '17 at 13:27
  • @DmitriyEroshenko Please post a comment here when you get any response from them. It would be great if it was possible to see readme for old versions of modules directly on the npm website. – rsp Feb 08 '17 at 14:12
  • This is what I got: ================================ Thanks for emailing. What you are doing is probably the best solution. We aren't able to show all the package versions README.md on the website, however you can still download the tarballs for any version of any package in the registry. For example, https://registry.npmjs.org/apn/-/apn-1.7.8.tgz is the direct link to the tarball for the package you're using, which would include all the docs that were included at that publish. I hope this helps. Let me know if there is anything else I can do for you. I'll be here to help. – Dmitriy Eroshenko Feb 09 '17 at 16:16