Skip to content

Replace HTML to DOM implementation with html-dom-parser package#28

Merged
remarkablemark merged 4 commits intomasterfrom
html-to-dom
Oct 14, 2016
Merged

Replace HTML to DOM implementation with html-dom-parser package#28
remarkablemark merged 4 commits intomasterfrom
html-to-dom

Conversation

@remarkablemark
Copy link
Copy Markdown
Owner

Summary:

Updating the package and tests now that the HTML to DOM logic has been externalized to html-dom-parser package.

Tasks:

  • Replace HTML to DOM implement with html-dom-parser
    • Save to dependencies:
      • html-dom-parser@0.0.2
    • Remove from dependencies:
      • domhandler@2.3.0
      • htmlparser2@3.9.1
    • Remove lib/html-to-dom-server.js and lib/html-to-dom-client.js and require html-dom-parser
  • Tests
    • Replace with html-dom-parser where necessary
    • Prune and remove unused tests and helpers
    • Tidy tests, mocks, and helpers
    • Add test for doctype (should be ignored by parser)
  • README
    • Update Special Thanks section
    • Tidy where necessary

The HTML to DOM parser has been externalized to its own package.

Save to dependencies:
- html-dom-parser@0.0.2

Remove from dependencies:
- domhandler@2.3.0
- htmlparser2@3.9.1

Remove files:
- lib/html-to-dom-server.js
- lib/html-to-dom-client.js

Update `index.js` to require `html-dom-parser`.
Fix broken requires in tests now that `lib/html-to-dom-server.js`
and `lib/html-to-dom-client.js` have been deleted (use
`html-dom-parser` instead).

Remove HTML to DOM tests since `html-dom-parser` has its own tests.

Remove `helpers.deepEqualCircular()` and its tests as it was
used to test HTML to DOM parsing (which is no longer handled by
this package, but `html-dom-parser`).
- Rename `test/data.json` to `test/helpers/mocks.json`
- Require mocks in test helpers index
- Add a test for doctype (should be skipped and not parsed)
- Tidy tests
Replace `htmlparser2` with `html-dom-parser` link and tidy up
other parts.
@remarkablemark remarkablemark self-assigned this Oct 14, 2016
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+1.3%) to 99.225% when pulling e207d62 on html-to-dom into 40fec9d on master.

@remarkablemark remarkablemark merged commit 310f45e into master Oct 14, 2016
@remarkablemark remarkablemark deleted the html-to-dom branch October 14, 2016 17:04
remarkablemark added a commit that referenced this pull request Oct 14, 2016
- Replace HTML to DOM implementation with `html-dom-parser` (#28)
  - Update dependencies
    - Save `html-dom-parser`
    - Remove `domhandler` and `htmlparser2`
  - Update tests
    - Remove unused tests and helpers
    - Update mocks
    - Add test for doctype
- Throw `TypeError` instead of `Error` for invalid first argument
  - Update tests
- README
  - Update "Special Thanks" section
  - Tidy where necessary
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