Commit graph

2731 commits

Author SHA1 Message Date
Christopher Willis-Ford
9355432337 fix: export ArgumentType and BlockType 2024-03-13 13:21:16 -07:00
Christopher Willis-Ford
4f213015bf Revert "fix!: export extension support types"
This reverts commit 4ebcd1f894.
2024-03-11 11:09:33 -07:00
Christopher Willis-Ford
4ebcd1f894 fix!: export extension support types 2024-03-11 10:05:50 -07:00
Christopher Willis-Ford
058685f41e fix: use web-worker to replace tiny-worker and worker-loader
for webpack 5 compatibility
2024-03-04 11:10:29 -08:00
Christopher Willis-Ford
64d17098a1 fix(build): misc webpack 5 build fixes 2024-03-04 11:10:29 -08:00
Christopher Willis-Ford
7d5a780638 style: fix the other lint complaints 2023-12-15 17:40:25 -08:00
Christopher Willis-Ford
8dbcc1fc8f style: fix hasOwnProperty lint complaints 2023-12-15 17:40:05 -08:00
Christopher Willis-Ford
2ae67598ee
Merge pull request #2449 from apple502j/patch-13
fix: wrapClamp direction during deserialization
2023-10-17 13:01:20 -07:00
Christopher Willis-Ford
15cdd2f69a
Merge pull request #2416 from adroitwhiz/no-relativetime
Remove Timer.relativeTime
2023-10-17 12:58:18 -07:00
Christopher Willis-Ford
bd51da51eb
Revert "fix: disable metadata for now" 2023-10-03 12:41:03 -07:00
Christopher Willis-Ford
95912963ce fix: disable metadata for now 2023-10-02 18:18:34 -07:00
Christopher Willis-Ford
802d211f95 fix: update GitHub links with /scratchfoundation/ 2023-09-28 09:16:47 -07:00
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 Chadha
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 Chadha
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