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

Update jsdom to v16 #20

Merged
merged 1 commit into from
Mar 6, 2020
Merged

Update jsdom to v16 #20

merged 1 commit into from
Mar 6, 2020

Conversation

pgoldrbx
Copy link

@pgoldrbx pgoldrbx commented Feb 22, 2020

Description

Used in the DOM interface for using JsonML to interact with the DOM
and impacts functionality within a node runtime environment.

Update the html.patch method to prevent raising an error on text nodes.
Prior to updating jsdom, the node was not updated but no error was emitted.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore, documentation, cleanup

Related Issue

n/a

Motivation and Context

Keeping dependencies up to date.

How Has This Been Tested?

This should be pretty well covered by existing tests. I worked through and extended coverage in #25 and #26 and feel pretty good about this.

Screenshots (if appropriate):

n/a

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation (if required).
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@coveralls
Copy link

coveralls commented Feb 22, 2020

Pull Request Test Coverage Report for Build 116

  • 3 of 3 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 81.044%

Totals Coverage Status
Change from base Build 114: 0.1%
Covered Lines: 334
Relevant Lines: 387

💛 - Coveralls

Copy link

@neilius neilius left a comment

Choose a reason for hiding this comment

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

Tests are all passing and the changes here look pretty straightforward. One little note, but otherwise good

@@ -625,6 +625,10 @@ exports.onerror = null;
* @return {Node} DOM Node
*/
var patch = exports.patch = function(elem, jml, filter) {
// Cannot patch text nodes
if (elem.nodeType === 3) {
Copy link

Choose a reason for hiding this comment

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

I know this is all over the codebase, but it might be nice to use the constant here (Node.TEXT_NODE) so you don't need the comment. I understand if you want to leave it so it's consistent though

Copy link
Author

Choose a reason for hiding this comment

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

100% agree. I think constants would be a good refactor. went for consistency

Used in the DOM interface for using JsonML to interact with the DOM
and impacts functionality within a node runtime environment.

Update the html.patch method to prevent raising an error on text nodes.
Prior to updating jsdom, the node was not updated but no error was emitted.
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.

3 participants