Commit Graph

28 Commits

Author SHA1 Message Date
Mrugesh Mohapatra
ad9b1f89d8 fix(api, client): update Gatsby, webpack & related things (#41452)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-03-25 12:13:43 -07:00
Mrugesh Mohapatra
6c91f81b0e chore(deps): upgrade eslint, prettier & related packages 2021-03-11 12:19:42 +05:30
Oliver Eyton-Williams
e363bb9810 fix: ensure babel presets load (#41233)
In rare cases, loadPresetReact could get into a race with itself. In
these cases the first call would set presetReact and the second call
would exit early as a result.  This would mean babelOptionsJSX would be
undefined and the transformation would fail.
2021-02-23 20:22:20 +05:30
Oliver Eyton-Williams
fffc0e51ec chore(client): refactor & organise config (#40875) 2021-02-03 15:22:07 +05:30
Oliver Eyton-Williams
eb75f8c8cc fix(client): ensure presetEnv is loaded (#39431)
Prior to this, if a user first loaded a React challenge and then
navigated to a JS challenge, they would see
TypeError: Cannot read property 'presets' of undefined
in the console and be unable to run tests or evaluate code until they
reloaded the page.
2020-08-19 13:30:46 -07:00
Oliver Eyton-Williams
b4926052f4 chore: refactor and simplify testing (#39050) 2020-06-13 14:57:15 +05:30
Oliver Eyton-Williams
5e56a9a938 Feat(curriculum): scss not sass (#38764) 2020-05-09 20:01:18 +05:30
Oliver Eyton-Williams
5b80595fbf fix: remove useless logging (#38246) 2020-02-21 15:08:53 +05:30
Oliver Eyton-Williams
7cdf01276d fix: ensure Babel options exist when used
Also renamed 'config' to 'options' to be consistent with the calling
function.
2020-02-20 19:52:23 +05:30
Oliver Eyton-Williams
ebc6197c54 fix: assume scripts inside HTML are js, not jsx 2020-02-20 19:52:23 +05:30
Oliver Eyton-Williams
d87c16e65e fix: only load preset when needed 2020-02-20 19:52:23 +05:30
Oliver Eyton-Williams
21833ab508 fix: load all Babel libs dynamically 2020-02-20 19:52:23 +05:30
Oliver Eyton-Williams
c6eb40ceef feat: remove protection from interview prep (#38136)
The interview prep section includes many challenges that require long
running calculations which can be mistaken for infinite loops. This
removes the loop protection from those challenges, while the tests are
being evaluated.

It keeps the protection for the preview, since it is easy to create
broken code while working on a challenge and that should not crash the
site.
2020-02-04 10:33:56 +05:30
Oliver Eyton-Williams
f5feff386a fix: stop user code after 500ms of execution
Code like `var xs = []; while(true){ xs.push(1) }` can quickly run the
browser out of memory causing it to crash.  These changes stop user loops
from running indefinitely so that common mistakes will no longer cause
the browser to crash.

Also, the user is informed if a long running loop is detected (js and
jsx challenges) during preview or testing.  Before this there was no
protection for js challenges and no information was given to the
user if they had created such a loop.

Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com>
Co-Authored-By: mrugesh <1884376+raisedadead@users.noreply.github.com>
Co-Authored-By: Randell Dawson <5313213+RandellDawson@users.noreply.github.com>
2020-01-03 11:41:52 +05:30
Oliver Eyton-Williams
e5abfa15ad Revert "fix: stop user code after 100ms of execution" (#37965)
This reverts commit 01b37f664f.
2019-12-21 11:09:32 +05:30
Oliver Eyton-Williams
01b37f664f fix: stop user code after 100ms of execution (#37841)
Co-authored-by: mrugesh <1884376+raisedadead@users.noreply.github.com>
Co-authored-by: Randell Dawson <5313213+RandellDawson@users.noreply.github.com>
Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
2019-12-20 19:28:17 +05:30
Oliver Eyton-Williams
beecb04c1a fix: report errors thrown after the frame is ready
Certain challenges involve code that is not run until the user
interacts with the preview (typically via a click listener). This uses
consoleProxy to report those errors.

Error logging has been simplified, reducing the number of places errors
can be reported from.

Some of the redux-saga code has been renamed in an attempt to improve
clarity.
2019-11-19 22:23:57 +05:30
Oliver Eyton-Williams
687c4fdb98 fix(client): add cache-busting hashes to chunks (#37746)
* fix(client): add cache-busting hashes to chunks

* fix: create cache-busting names for the workers

Prior to this PR the first webpack compilation gave the workers static
names.  This can cause caching problems, so this PR adds hashes to
their names to invalidate the cache.

In order for Gatsby to find them, the names are added to the
config directory.
2019-11-15 01:43:44 +05:30
Valeriy S
845b966bda fix(client): execute web workers concurrently 2019-03-29 15:06:10 +05:30
Bouncey
b13e5fb41a feat: Use prettier-eslint to format code 2019-02-19 14:30:27 +05:30
Valeriy
dcca74ab92 fix: use factory method to create worker executor 2019-01-14 13:44:54 +00:00
Valeriy S
cc0b504224 fix(client): tune a worker executor 2019-01-14 13:44:54 +00:00
Valeriy S
4bf89a873e fix(client): transform html scripts 2019-01-10 11:29:53 +00:00
Valeriy
a4fd935b8b feat: execute js challenges saga 2018-12-06 13:05:09 +00:00
Valeriy S
ea060b13f2 fix: rename SASS worker 2018-11-12 12:44:00 +00:00
Valeriy
ecadba95db fix(client): prevent endless SASS conversion 2018-11-12 12:44:00 +00:00
Valeriy
3123f8c5b9 fix(learn): transformers don't apply 2018-10-06 02:39:36 +01:00
Bouncey
5b254f3ad6 chore(learn): Merge learn in to the client app 2018-09-30 12:42:40 +01:00