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

Refactoring let (e.g. reduce scope) #3294

Merged
merged 14 commits into from Nov 5, 2018

Conversation

4 participants
@segayuu
Copy link
Contributor

commented Oct 18, 2018

  • Add test cases for the changes.
  • Passed the CI test.

@segayuu segayuu requested a review from hexojs/core Oct 18, 2018

@coveralls

This comment has been minimized.

Copy link

commented Oct 18, 2018

Coverage Status

Coverage increased (+0.006%) to 97.228% when pulling a258716 on segayuu:refactoring-let into 3fbbe5d on hexojs:master.

@segayuu segayuu force-pushed the segayuu:refactoring-let branch from 2d9ca40 to 6807610 Oct 23, 2018

@segayuu segayuu force-pushed the segayuu:refactoring-let branch from 6807610 to 7172dff Oct 24, 2018

@segayuu segayuu force-pushed the segayuu:refactoring-let branch from 7172dff to 8d021ca Oct 24, 2018

@segayuu segayuu force-pushed the segayuu:refactoring-let branch from 8d021ca to 8ae1700 Oct 24, 2018

@segayuu

This comment has been minimized.

Copy link
Contributor Author

commented Oct 24, 2018

The cause of failure only with currentVersion (11.0.0) is unknown.

@tomap

This comment has been minimized.

Copy link
Contributor

commented Oct 24, 2018

Also confused

@tomap

This comment has been minimized.

Copy link
Contributor

commented Oct 24, 2018

Quick way to fix/debug, split in two your changes, which seem pretty isolated, and make two PRs, and repeat with whichever fails...

@tomap

This comment has been minimized.

Copy link
Contributor

commented Oct 24, 2018

Oups, sorry, I just spotted that it has nothing to do with your changes. Maybe a minor update on one of our dependency triggered that...

@segayuu

This comment has been minimized.

Copy link
Contributor Author

commented Oct 25, 2018

As a result of examination, it turned out that it was caused by the difference of nodejs version.
The initial value of the depth option of util.inspect() has changed since node v11.
node v11: 20 node v10: 2
Here is the test line where the error appears.
Given the default value change, it is clear that the test on this line will fail on v11.

In #3305 I am fixing the code that causes the error.


args.unshift(data);

for (let i = 0, len = filters.length; i < len; i++) {
result = filters[i].apply(ctx, args);
const result = filters[i].apply(ctx, args);

This comment has been minimized.

Copy link
@NoahDragon

NoahDragon Nov 2, 2018

Member

I'm not understanding why we need to change this? Due to performance?

This comment has been minimized.

Copy link
@segayuu

segayuu Nov 5, 2018

Author Contributor

If that comment is about this line, the purpose is to reduce the scope of result.

segayuu added some commits Nov 4, 2018

@NoahDragon

This comment has been minimized.

Copy link
Member

commented Nov 5, 2018

Is this still WIP? I saw the travis passed in the last commit, but it is failed now.

@segayuu

This comment has been minimized.

Copy link
Contributor Author

commented Nov 5, 2018

An error occurred because the conflict resolution failed. It is resolved now.

@NoahDragon
Copy link
Member

left a comment

LGTM. Thanks for making the code cleaner and easier to read.

@segayuu segayuu merged commit 087b3fa into hexojs:master Nov 5, 2018

3 of 4 checks passed

codeclimate 4 issues to fix
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.006%) to 97.228%
Details

@segayuu segayuu deleted the segayuu:refactoring-let branch Nov 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.