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

Use external pathval module #830

Merged
merged 1 commit into from
Oct 8, 2016
Merged

Conversation

lucasfcosta
Copy link
Member

@lucasfcosta lucasfcosta commented Oct 5, 2016

This includes a refactor for Chai to use the external pathval module as we discussed previously on #457 and #737.

I also removed the old tests since they're now running at the separate module and removed an unused utility export (.getPathValue), if you guys want me to keep it just tell me, but since we were not using it I just removed that, which is also a breaking change if anyone is using utils.getPathValue. If you disagree let me know, I'd love to hear your opinions on this matter.

Also, since we needed pathval's exports twice I added a new declaration at the top of our utils/index.js file for that, I thought it would be better to do it this way than thrusting Node would use its cache correctly to find the same module. If you think there's a better way to do this, share your ideas 😄

At last, but not least, please take a look at this comment before merging this PR since the latest release of pathval has breaking changes but we just bumped the minor version number, so if we decide to release a new major version I'll have to change package.json.

Thanks guys! ❤️

@meeber
Copy link
Contributor

meeber commented Oct 5, 2016

Looks good but agreed on waiting for pathval version fix before merging.

* Main exports
*/

var exports = module.exports = {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am I missing something or this line is extra?

Copy link
Member Author

@lucasfcosta lucasfcosta Oct 5, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are totally right! I messed up this file on the latest rebase.
I have just fixed this.

@vieiralucas
Copy link
Member

-318 lines 😎

@keithamus
Copy link
Member

LGTM! Great work @lucasfcosta

@meeber
Copy link
Contributor

meeber commented Oct 8, 2016

@lucasfcosta As mentioned in chaijs/pathval#39 (comment), I think that we should manually update pathval to 1.0.0 and then update this PR to use that.

@lucasfcosta
Copy link
Member Author

lucasfcosta commented Oct 8, 2016

This one is done!
Also, thanks for helping us release the 1.0.0 version of pathval @meeber!

I also added the following note to our migration guide (just in case):

@meeber
Copy link
Contributor

meeber commented Oct 8, 2016

LGTM

@meeber meeber merged commit 95f1d77 into chaijs:master Oct 8, 2016
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.

5 participants