Skip to content

Commit

Permalink
fix: Serialize in-memory attributes into deep DOM clone (#208)
Browse files Browse the repository at this point in the history
* WIP: Spike to serialize into DOM clone

* Small updates & sprinkling of docs

* WIP: Introduce DOM class to handle all DOM operations

* Add method docs, fix security error with CSSOM

* Run lint

Bye `let` & semi-colons :(

* Fix integration test

Introduce cheerio so we can parse the DOM string in the node tests. This is
better than searching the entire DOM string for strings that we expect to be
there. This gives us a jQuery like interface to pick elements & attributes out.

* Setup empty test suite

* Add types for cheerio

* Write tests for input serialization

* Adding CSSOM tests

* Add doctype test & remove lint disable comment

* Move tsconfig change to test config file

* Use `cssRules` over `rules`, add CI browser config

* Add error stub check _before_ the method is called

This is to ensure the stub has never been called before we actually expect it to

* Add options interface

* Add more types

* Fix comment typos

* Write test for stabilizing both inputs & CSSOM

* Only create input GUID once

* Add more types

* Add more types

* Break CI cache, use NPM instead of yarn in CI

* The final type down

* No need to pass around a refrence of the DOM when stabilizing

These methods are already mutating the cloned DOM. There's no need to capture it
in a variable and return it from each stabilize method. It gives the illustion
that it's not causing side-effects, but it really is. Let's make that explicit
  • Loading branch information
Robdel12 authored May 31, 2019
1 parent 680ee3d commit 56d76bd
Show file tree
Hide file tree
Showing 11 changed files with 690 additions and 147 deletions.
7 changes: 3 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ jobs:
- checkout
- restore_cache: &restore_cache
keys:
- v1-yarn-{{checksum ".circleci/config.yml"}}-{{ checksum "package-lock.json"}}
- v1-yarn-{{checksum ".circleci/config.yml"}}
- run: .circleci/greenkeeper
- run: yarn add -D nyc@11 @oclif/nyc-config@1 mocha-junit-reporter@1
- v2-yarn-{{checksum ".circleci/config.yml"}}-{{ checksum "package-lock.json"}}
- run: npm ci
- run: npm install -D nyc@11 @oclif/nyc-config@1 mocha-junit-reporter@1
- run: ./bin/run --version
- run: ./bin/run --help
- run: |
Expand Down
Loading

0 comments on commit 56d76bd

Please sign in to comment.