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

demo worker #1418

Merged
merged 14 commits into from Feb 17, 2019

Conversation

@UziTech
Copy link
Member

commented Feb 13, 2019

Description

I added a web worker to the demo page. This will allow easier testing for redos attacks.

You can test it out at: https://docs-8bxhez41v.now.sh/demo/

This PR adds is branched off #1415 with remyhunt#1 merged so we should get that PR merged first.

Contributor

  • no tests required for this PR.

Committer

In most cases, this should be a different person than the contributor.

  • Draft GitHub release notes have been updated.
  • CI is green (no forced merge required).
  • Merge PR

UziTech added some commits Feb 13, 2019

@UziTech

This comment has been minimized.

Copy link
Member Author

commented Feb 13, 2019

Check out the current redos here

This takes about 10 seconds to parse on my machine.

You can change the version to 0.4.0 and see it only takes a few ms

@UziTech

This comment has been minimized.

Copy link
Member Author

commented Feb 14, 2019

I added the ability to add commit version so we could test PRs

image

check out the current redos with PR #1414 here

You can switch between ceee178 and master to see the redos

docs/demo/demo.js Outdated Show resolved Hide resolved

UziTech added some commits Feb 14, 2019

@UziTech

This comment has been minimized.

Copy link
Member Author

commented Feb 14, 2019

I also got it working with PRs

image

I moved quite a bit of code around to make it more readable and added a loading screen at the beginning since we need to load the versions and worker before anything will work.

the latest version is at: https://docs-g29qo7nxq.now.sh/demo/

@styfle

styfle approved these changes Feb 14, 2019

Copy link
Member

left a comment

Amazing! 🎉

I was going to suggest we start deploying PR's using ZEIT Now but this is almost just as good, as long as we don't refactor marked into multiple files.

@UziTech UziTech requested review from davisjam and joshbruce Feb 14, 2019

@UziTech

This comment has been minimized.

Copy link
Member Author

commented Feb 14, 2019

If we refactor marked in multiple files and use ES modules it should still work in modern browsers.

@davisjam
Copy link
Contributor

left a comment

I've never used WebWorkers but this looks about like I would have imagined it.

Can we recycle some of this code into a marked+timeout API usable in Node and web contexts?

@joshbruce
Copy link
Member

left a comment

Just verification for milestone considerations. This only effects the demo site at this point, not marked itself. It improves our ability to discover the one major bug type we feel rushed to fix.

@UziTech

This comment has been minimized.

Copy link
Member Author

commented Feb 14, 2019

@joshbruce correct, this only changes the demo site

@joshbruce

This comment has been minimized.

Copy link
Member

commented Feb 15, 2019

Sorry didn't notice this the first time but I'd like to add the same caveat for my approval as what's on #1414 - what's up with Snyk? What needs to happen? What can I do to help that endeavor?

@UziTech

This comment has been minimized.

Copy link
Member Author

commented Feb 16, 2019

see my comment on Snyk at #1414 (comment)

@UziTech UziTech merged commit da67561 into markedjs:master Feb 17, 2019

2 of 4 checks passed

security/snyk - package.json (markedjsbot) 1 vulnerable dependency path
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
WIP Ready for review
Details
security/snyk - package.json (UziTech) No manifest changes detected
@UziTech UziTech referenced this pull request Feb 18, 2019
11 of 12 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.