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

WIP chore: use jsdom v13.2.0 to replace internal MutationObserver polyfill #34

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@huochunpeng
Copy link
Member

huochunpeng commented Feb 6, 2019

Dropped internal MutationObserver polyfill in favour of jsdom v13.2.0.
Also simpified and enhanced global vars creations for simulating browser environment, thank browser-env. It improves compatibility with other 3rd party libs in user's app, for example, global vars navigator/sessionStorage/localStorage are now available.
This also provides an alternative way to improve the compatibility of test setup in jest, comparing to aurelia/cli#1019.

chore: use jsdom v13.2.0 to replace internal MutationObserver polyfill
Dropped internal MutationObserver polyfill in favour of jsdom v13.2.0.
Also simpified and enhanced global vars creations for simulating browser environment, thank browser-env. It improves compatibility with other 3rd party libs in user's app, for example, global vars navigator/sessionStorage/localStorage are now available.
This also provides an alternative way to improve the compatibility of test setup in jest, comparing to aurelia/cli#1019.
@huochunpeng

This comment has been minimized.

Copy link
Member Author

huochunpeng commented Feb 6, 2019

There is a TS type checking error on existing code, I don't know how to fix it.

src/nodejs-platform.ts(47,5): error TS2322: Type 'Immediate' is not assignable to type 'number'.

nodejs-platform.js

  requestAnimationFrame(callback: (animationFrameStart: number) => void): number {
    return setImmediate(callback); // this one is type 'Immediate'
  }
@JeroenVinke

This comment has been minimized.

Copy link
Member

JeroenVinke commented Feb 7, 2019

We should test the ssr setup for memory leaks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment