esdoc-node icon indicating copy to clipboard operation
esdoc-node copied to clipboard

Version 1.0.5 has a bug for destructuring

Open homer0 opened this issue 6 years ago • 3 comments

@lcodes This is what I already commented on #7. The PR removed one of the basic functionalities of the plugin (and even the tests for it) in order to add support for very edge case:

const { one: { two } } = required('...');

In order to add support for that, the support for this was removed:

const { one } = require('...');

I believe one level destructuring should be enough, as it's "basically the same" as a named import on ES, while destructuring on multiple levels doesn't exist.

From what I understand, this plugin was made in order to transpile to the syntax ESDoc uses, ESModules, not just to get coverage when you use require.

Also, have in mind that you released it as a fix and this was super breaking; I have ~15 public projects, using this plugin, that lost their coverage because of the hidden variable added on the PR.

Please, revert #7

homer0 avatar Oct 29 '19 07:10 homer0

ping @lcodes sorry to bother you again, but I really don't want to have to fork it and use from github :P.

homer0 avatar Nov 06 '19 04:11 homer0

ping @lcodes

homer0 avatar Nov 20 '19 06:11 homer0

ping @lcodes (sorry I'm being annoying)

homer0 avatar Dec 08 '19 09:12 homer0