Skip to content

Remove unmaintained dependency: disparity #1264

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

Merged
merged 2 commits into from
Jul 16, 2019
Merged

Remove unmaintained dependency: disparity #1264

merged 2 commits into from
Jul 16, 2019

Conversation

ben-turner
Copy link
Contributor

The dependency disparity has not been updated for 4 years and is using
a very old version of the diff package which has a security alert.

This alert is not relevant to the current usage of the package, however,
it does generate noise when installing. Additionally, it seems unwise to
be relying on unmaintained packages.

This commit replaces disparity with diff and adds some code to color the
output, which is based on disparity's logic.

Related issue #1257

The dependency disparity has not been updated for 4 years and is using
a very old version of the diff package which has a security alert.

This alert is not relevant to the current usage of the package, however
it does generate noise when installing. Additionally, it seems unwise to
be relying on unmaintained packages.

This commit replaces disparity with diff and adds some code to color the
output which is based on disparity's logic.
const diffHeader = diffLines
.slice(0, 2)
.join('')
.replace(/[^\n\r]+/g, `${ansi.yellow.open}$&${ansi.yellow.close}`);
Copy link
Member

Choose a reason for hiding this comment

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

Could we use the pre-existing chalk dependency for this styling instead of introducing ansi-styles?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call. My original intention was to keep the logic as close to disparity as possible but using chalk makes much more sense.

@tmcw tmcw merged commit 226a666 into documentationjs:master Jul 16, 2019
@tmcw
Copy link
Member

tmcw commented Jul 16, 2019

Thanks!

robseaman added a commit to precor/web-api-bridge that referenced this pull request Aug 15, 2019
robseaman added a commit to precor/web-api-bridge that referenced this pull request Aug 15, 2019
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.

2 participants