Commit Graph
2716 Commits
Author SHA1 Message Date
Christopher Willis-Ford 4a4dc1f3aa Merge branch 'develop' into use-scratch-fetch 2023-09-26 09:12:15 -07:00
Christopher Willis-Ford 4b02e41430 fix: remove use of 'globalThis' keyword 2023-08-07 14:07:12 -07:00
Christopher Willis-Ford 829ae1dfac fix: tell fetchWithTimeout to use scratchFetch from storage instance 2023-03-31 09:07:06 -07:00
Christopher Willis-Ford e696e3548b fix: don't set run ID until storage exists (also add tests) 2023-03-31 09:07:06 -07:00
Christopher Willis-Ford 9fca9ee583 feat: use scratchFetch
BREAKING CHANGE: servers must accept new header x-projectid
2023-03-31 09:07:06 -07:00
Andy O'Neill 2581446907 feat: ability to clear flyout blocks when language changes 2022-12-14 11:03:12 -05:00
Christopher Willis-Ford 56dd49aaed fix(extensions): try harder to avoid Scratch Link init in non-browser environments
Prior to this change, the Scratch Link init would fail in JSDOM. That means it fails in the
scratch-gui integration tests, so that's no good...
2022-08-16 23:42:55 -07:00
Christopher Willis-Ford 2bdea9106d feat(extensions): support Scratch Link 2.0 browser extension
Right now this is only needed for Safari
2022-08-16 08:20:27 -07:00
Christopher Willis-Ford 0e165275e0 Merge pull request #3619 from cwillisf/rpc-allow-id-0
correctly handle JSON-RPC requests with ID=0
2022-07-05 14:11:45 -07:00
Christopher Willis-Ford 840ffb5df0 test: don't use process.exit to end tests
Newer versions of `tap` run more asynchronously, so sometimes using `process.nextTick(process.exit)`
to end a test would prevent the test from completing correctly. Removing all instances of
`process.nextTick(process.exit)` put tests into three categories:
* the test still worked correctly -- no fixup needed.
* the test would hang because the VM's `_steppingInterval` was keeping
  Node alive. These tests call a new `quit()` method which ends the
  stepping interval.
* the `load-extensions` test needed special attention because the "Video
  Sensing" extension starts its own loop using `setTimeout`. I added a
  `_stopLoop()` method on the extension and directly call that from the
  test. I'm not completely happy with this solution but anything more
  general would likely require a change to the extension spec, so I'm
  leaving that as a followup task.
2022-06-07 11:44:06 -07:00
Karishma Chadha f7e5272618 Delete sound.broken when updating the sound buffer 2022-05-25 18:23:23 -04:00
Karishma Chadha 3e193565ee Hook up error handling to bitmap loading flow and add tests for loading missing and corrupt bitmpas from sb2 and sprite2 files 2022-05-23 19:54:45 -04:00
Karishma Chadha 8ab21dd701 Handle error from sound failing to load (e.g. corrupted sound) 2022-05-19 17:45:27 -04:00
Karishma ChadhaandChristopher Willis-Ford 36849c9f40 Fix lint error
Co-authored-by: Christopher Willis-Ford <7019101+cwillisf@users.noreply.github.com>
2022-05-19 12:55:09 -04:00
Karishma Chadha 4679d06ac0 Update storage and update 'loadSound' to handle null asset from storage. Track additional metadata for broken costumes: 'bitmapResolution' and 'dataFormat'. 2022-05-18 21:26:36 -04:00
Karishma Chadha 11f938f8a9 Update to latest version of storage which fixes issue where an HTML 404 page was being returned for missing asset data. Update VM to handle null assets properly. 2022-05-18 16:55:46 -04:00
Karishma Chadha 2481f28191 Rewrite missing asset skip in the affirmative 2022-05-17 16:40:33 -04:00
Karishma Chadha 4ff6288d3f Fix typo in suggested code change 2022-05-16 16:32:58 -04:00
Karishma Chadha 05fa6cad3e Update handleLoadCostumeError to properly handle bitmap costumes 2022-05-16 16:24:10 -04:00
Karishma Chadha 1dfaa02c97 More code cleanup from PR review 2022-05-16 16:23:41 -04:00
Karishma ChadhaandChristopher Willis-Ford fd31a777e2 Code clean up from code review
Co-authored-by: Christopher Willis-Ford <7019101+cwillisf@users.noreply.github.com>
2022-05-16 16:07:08 -04:00
Karishma Chadha 172409c1e3 Handle rotationCenter values that might be 0. 2022-05-13 19:14:25 -04:00
Karishma Chadha 70a78cf7db Add tests for load costume error handling. Fix issue where asset data was not getting saved out properly. 2022-05-13 19:07:34 -04:00
Karishma Chadha a8618b378f Update load costume fixes to handle storage resolving null and put all error handling in one place. Could be used in the future to handle bitmap loading issues as well 2022-05-13 19:05:30 -04:00
Karishma Chadha deadce3bc6 Let GQM replace broken costume data but explicitly save and serialize broken costume data before finishing loading the costume. 2022-05-11 10:57:24 -04:00
Christopher Willis-Ford 4a15205d75 correctly handle JSON-RPC requests with ID=0 2022-04-29 10:58:23 -07:00
Christopher Willis-Ford c59af735ef support Scratch Link on ws://127.0.0.1:20111 2022-02-16 15:02:35 -08:00
Christopher Willis-Ford d119ca2477 Merge pull request #2903 from cwillisf/performance-mark-deserialize
use performance.mark to measure deserialize time
2021-10-29 07:32:14 -07:00
DD Liu 53c16601f6 Update comment 2021-06-01 13:42:13 -04:00
Eric Rosenbaum 679efb28fd lint 2021-04-29 11:39:05 -04:00
Eric Rosenbaum 0b4b32dcb0 Save and load the origin 2021-04-29 11:32:13 -04:00
DD Liu 529a87cdb8 Go back to only using svgrenderer to process vectors that we think are coming from scratch 2 2021-04-10 22:43:02 -04:00
DD Liu 62e7dde84e Put back deprecated function to not break gui 2021-04-01 18:28:15 -04:00
DD Liu 74928ede7c Fix playground 2021-03-23 16:32:05 -04:00
DD Liu e5560b067b Merge branch 'develop' into removev2SvgAdapter 2021-03-16 16:53:40 -04:00
DD Liu bb9c318561 Rename variables to be not homonyms 2021-03-16 16:36:14 -04:00
Christopher Willis-Ford 08fcae8fc6 Merge pull request #2891 from adroitwhiz/remove-nets
Replace nets with Fetch API
2021-03-08 11:10:20 -08:00
DD Liu 627e62a339 Remove v2SvgAdapter 2021-03-04 15:32:14 -05:00
adroitwhiz 1035e9da28 Clean up TTS request code 2021-03-04 00:29:50 -05:00
Eric Rosenbaum ddab65bac2 do not translate strings containing only digits 2021-03-01 11:48:07 -05:00
Christopher Willis-Ford 6dda5c4963 use performance.mark to measure deserialize time 2021-02-23 13:26:49 -08:00
adroitwhiz 1aa38db4e6 replace nets with Fetch API 2021-02-19 10:56:33 -05:00
DD Liu 04d401996c Remove commented code 2020-11-24 16:54:07 -05:00
DD Liu 87cb4a7ef0 Add userDidPickPeripheral to bt 2020-11-24 16:49:54 -05:00
DD Liu f19fd83563 Handle user did not pick peripheral 2020-11-23 01:01:06 -05:00
DD Liu 04b6963788 Pass on event type from CDM 2020-10-15 19:56:24 -04:00
DD Liu 7eabcb8a29 Merge pull request #2329 from adroitwhiz/remove-updatedrawableproperties
Remove remaining updateDrawableProperties calls
2020-09-24 15:50:26 -04:00
Eric Rosenbaum 9329f93e74 Merge pull request #2557 from ericrosenbaum/broadcast-wait-var-change-fix
Prevent "broadcast and wait" being interrupted by a change to its input
2020-09-16 17:52:28 -04:00
DD Liu 7c652246df Merge pull request #2356 from adroitwhiz/cast-to-black
Cast malformed color hex strings to RGBA 0,0,0,255 instead of null
2020-09-03 15:52:52 -04:00
Eric Rosenbaum a2b4cf8cfb store broadcastVar on stackFrame to prevent canceling
a broadcast early if the variable changes
2020-08-12 11:21:55 -04:00