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

Might as well take 0.0.12 of typhonjs-escomplex #195

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Might as well take 0.0.12 of typhonjs-escomplex #195

wants to merge 2 commits into from

Conversation

typhonrt
Copy link
Contributor

@typhonrt typhonrt commented Aug 10, 2016

@jsoverson You might as well take 0.0.11 0.0.12 of typhonjs-escomplex before updating the Plato NPM module. I've strengthened / corrected a few Halstead metrics gathered, so accuracy in that regard is up. The old escomplex needed a thorough review. For instance this was counted as an operand not as an operator. Member expressions that are computed always added . as an operator instead of [], etc. Just some corrections over the old escomplex.

This PR simply bumps typhonjs-escomplex to 0.0.12.

It will be several days before I get 0.0.13 out as I'm fully working over how metrics are gathered for class / module aggregates; this isn't exposed by plato per se. If there are any concerns questions let me know.

@typhonrt typhonrt changed the title Might as well take 0.0.11 of typhonjs-escomplex Might as well take 0.0.12 of typhonjs-escomplex Aug 10, 2016
@typhonrt
Copy link
Contributor Author

@jsoverson I did sneak out 0.0.12 of typhonjs-escomplex. There is now support for regexp literals ala /^foobar/g which the old escomplex didn't parse.

A little background on the next release. Now I'm working on a larger refactor of Halstead method metric gathering. The old escomplex did some wonky things for method declarations such as adding the method name to the module aggregate, but then the parameters of the declaration are added to the given method metrics which is incorrect. Method declarations should be separate of the actual method metrics which should only contain data for the body of a method. The next update 0.0.13 will provide a true method aggregate for classes / modules. In addition an all inclusive aggregate will be calculated such that method declarations will be counted for class and module inclusive aggregates, but be separate of the pure method aggregate. This change will again rejigger the plato mappings for typhonjs-escomplex data, but I'll of course keep things in sync.

At this point you can either keep this PR open and wait for 0.0.13 to drop or publish the NPM module now. You don't seem to be in a rush to publish an update to the NPM module, so at this point waiting for 0.0.13 seems reasonable as that should be the last major structural change regarding plato integration and be the biggest impact on Halstead metrics gathered.

@typhonrt
Copy link
Contributor Author

@jsoverson it looks like you published the NPM module with a local checkout last week. Can you push that to the repo / IE package.json version update to 1.7.0? I'm closing in soon on 0.0.13with a significant strengthening of all metrics gathered especially for ES Modules / ES6+. Also going to fix the anonymous arrow / function expression scroll over in plato reports and post a few notes in the readme on how to configure typhonjs-escomplex for the CLI.

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.

1 participant