凌
fed099c4cc
Fix isRecursiveCall failing on flyout blocks ( #227 )
2024-09-30 22:47:02 -05:00
Muffin
179030ad49
Don't eagerly cast boolean arguments to boolean ( #223 )
...
Fixes https://github.com/TurboWarp/scratch-vm/issues/222
2024-09-08 11:56:47 -05:00
Muffin
99ff662f7f
Don't emit STAGE_SIZE_CHANGED if stage size didn't change
...
and also fix the other STAGE_SIZE_CHANGED event test to
actually test that it is being fired when there is a change
2024-07-31 15:16:44 -05:00
Muffin
4c366e0110
Use a fixed modification date when zipping
2024-07-17 14:27:33 -05:00
Muffin
30a614dfc4
Expose compatibility layer stack frame on thread
...
For https://github.com/TurboWarp/scratch-vm/issues/212
2024-06-14 14:32:35 -05:00
Muffin
dff3c2f6ba
Optimize _keyArgToScratchKey
...
The special key name list is now a set instead of an array.
In the most common case of a simple letter, a search is skipped entirely.
Test coverage already exists.
2024-05-31 17:11:20 -05:00
Muffin
16415ba5cd
Use procedure variant in snapshots instead of just procedure code
2024-05-23 14:22:43 -05:00
Muffin
d39a30fb23
Replace wrapAssetRequest promise argument with a callback
...
The flexibility may be useful later
2024-05-22 20:36:25 -05:00
Muffin
d69256aa2d
Replace jszip with @turbowarp/jszip
2024-05-19 21:58:36 -05:00
Muffin
847088ca00
Remove unused thread.isKilled check
...
This check only makes sense if isKilled === true implies that it was already
removed from threads, however that is not the case in the VM itself and
especially in some extensions.
2024-05-15 15:00:42 -05:00
Muffin
f548d1b33c
Fix stopping a thread from inside of its blocks
...
Works in command or reporter after yielding or not.
These snippets are covered by the tests:
thread.status = Thread.STATUS_DONE;
thread.status = 4; (indirectly)
sequencer.retireThread(thread);
2024-05-15 14:46:23 -05:00
Muffin
73d71c0720
Fix benchmark playground
...
- added project token support
- option checkbox to enable compiler
2024-05-13 14:30:42 -05:00
Muffin
216b5b65d2
Add execute.js to unsupported exports
2024-05-09 18:55:20 -05:00
KyleKart and Muffin
ce04eafec0
Add boolean argument support to ScratchX compatibility layer ( #208 )
...
Co-authored-by: Muffin <muffin@muffin.ink >
2024-05-09 00:46:18 -05:00
AshimeeAlt and Muffin
6d94ef1672
Add JSGenerator.unstable_exports ( #209 )
...
Co-authored-by: Muffin <muffin@muffin.ink >
2024-05-09 00:23:30 -05:00
Muffin
5d30745cf8
Remove redundant sandboxed extension block error handling
...
Interpreter/compiler do this by default since
0593628e24
2024-05-09 00:21:24 -05:00
Muffin
0593628e24
Fix rejected promise behavior in interpreter and compiler
...
Before this command:
- Interpreter would popStack() and continue. Inside a loop this was like JS continue, outside it was like return
- Compiler would return literal undefined and keep going.
After this commit:
Both return the error as a string and then continue as normal.
This has several benefits:
- Users can actually see the error messages
- Logical execution flow
- Consistent behavior
- Blocks aren't even supposed to return rejected promises anyways
- No vanilla blocks return rejected promises so no compatibility concerns
Supersedes https://github.com/TurboWarp/scratch-vm/pull/207
2024-05-09 00:18:18 -05:00
JeremyGamer13 and Muffin
31c9eba1aa
Add platform info ( #205 )
...
- Platform info is now stored in project.json.
- Available to extensions on vm.runtime.platform.
- When loading a project with a different platform, emit an event and wait for callbacks before continuing.
Co-authored-by: Muffin <muffin@muffin.ink >
2024-05-08 23:01:26 -05:00
Muffin
11eec6604d
Allow scratch-gui (and others) to extend unsandboxed extension APIs
2024-04-06 16:01:31 -05:00
GarboMuffin
20f25f252c
interpreter: Do not re-evaluate procedure arguments after stop this script or return ( #202 )
...
"stop this script" and "return" would previously cause all the procedure
arguments to be re-evaluated and then discarded. In vanilla Scratch the
worst case is a performance penalty, but with our custom reporters it
can cause infinite loops.
Fixes https://github.com/TurboWarp/scratch-vm/issues/201
2024-03-30 17:53:13 -05:00
tpsnt
b6c42081b0
fix: wedo2 stop motor when power set to 0 ( #198 )
2024-02-28 19:21:10 -06:00
Muffin
fe5fad5e5c
Simplify 845c374f72 without array copy
...
Classic 1:40 AM merge moment
2024-02-12 11:47:19 -06:00
tpsnt and Muffin
845c374f72
Fix WeDo2.send sends empty message ( #192 )
...
* Fix WeDo2.send sends empty message
WeDo2.send invokes Base64Util.uint8ArrayToBase64(message). However message.arrayLength === undefined. This causes Base64Util.uint8ArrayToBase64 always returning empty string ''.
* Move the fix to base64-util instead
---------
Co-authored-by: Muffin <muffin@mailbox.org >
2024-02-10 01:40:36 -06:00
CST1229
58dbb21221
"Stage selected: less pen blocks" label on the stage
...
The motion category already does this, so this is for parity
2024-01-29 19:31:55 +01:00
GarboMuffin
ec1f7dea0c
Add vm.exports.i_will_not_ask_for_help_when_these_break() ( #181 )
2024-01-28 16:30:48 -06:00
FurryR
72cdbc26b3
Avoid using promise.catch in waitPromise
...
`promise.catch` is not included in PromiseLike
2024-01-17 19:22:57 +08:00
FurryR
46b9766b71
Fix compiler's waitPromise implementation
...
`waitPromise()` now finally allows PromiseLike
2024-01-17 18:50:21 +08:00
Muffin
03cd07ff11
Replace usage of log.warning with log.warn
2024-01-14 01:57:03 -06:00
Muffin
cd9782a64c
Replace minilog with nanolog
2024-01-14 01:48:32 -06:00
Muffin
9511cc4000
Remove note/drum concurrency limit when misc limits are removed
2024-01-13 21:58:18 -06:00
CST1229
d47a0964b7
compiler: don't use branchCount for substack compilation
...
This fixes a minor parity issue with the interpreter where if the number of SUBSTACK inputs in a block was more than its branchCount (e.g for blocks with mutators), the extra substacks didn't compile.
2024-01-13 21:09:44 -06:00
Muffin
74129b770a
Log the complete error when refreshBlocks() fails
2024-01-11 19:52:31 -06:00
Muffin
bb246c218f
Fix typo in comment
2024-01-11 12:44:52 -06:00
Muffin
b7e9016c56
Apply new TurboWarp/scratch-blocks extensions
2024-01-11 02:41:28 -06:00
Muffin
088b0c1780
Experiment with staticFetch to improve reliability of large data: URLs
2024-01-09 03:45:27 -06:00
Muffin
e4e461ac84
Reset runtime's extension storage when loading a new project
2024-01-03 03:35:39 -06:00
GarboMuffin
8297dd4cc9
Add native loading progress tracking ( #180 )
2024-01-03 00:56:54 -06:00
GarboMuffin
dd848dbbf6
Extension storage ( #179 )
2024-01-02 23:19:51 -06:00
LilyMakesThings and Muffin
7f9c8f759c
Add per-block extensions and colors ( #177 )
...
Co-authored-by: Muffin <muffin@mailbox.org >
2023-12-31 02:24:31 -06:00
Cubester and Muffin
b27142a012
Allow removing loop icon using branchIconURI ( #176 )
...
Co-authored-by: Muffin <muffin@mailbox.org >
2023-12-31 01:32:22 -06:00
Muffin
7e9dab88f4
Allow serializing and deserializing infinite length comments
...
Goes along with https://github.com/TurboWarp/scratch-blocks/commit/78177be01aab589a6cbd9844d530df02258d09c2
2023-12-31 01:09:00 -06:00
Muffin
c309c42894
Use media:// for default loop icon (requires scratch-blocks change)
...
They have always been subtly broken, but the high contrast changes finally the old path for good.
https://github.com/TurboWarp/scratch-blocks/commit/7413542d3731b58381e05fddf6913fbc494f9cd9
2023-12-31 00:24:20 -06:00
Muffin
66cbf13a7b
Replace scratch-svg-renderer with @turbowarp/scratch-svg-renderer
2023-12-30 00:13:22 -06:00
Muffin
ed487bd33e
merge-upstream: cli: use quit() instead of stop()
2023-12-24 21:44:15 -06:00
Muffin
9f26069ad6
merge-upstream: Fix ESLint errors
2023-12-22 17:56:40 -06:00
Muffin
81a0382e0f
merge-upstream: initial merge of upstream/develop
...
installs & compiles but has test errors
aside from expected merge conflicts, notable changes from upstream:
- removed husky, commitlint, etc.
- removed semantic-release etc.
2023-12-22 17:25:21 -06:00
Cubester and Muffin
bd0cf91d85
Add branchIconURI ( #174 )
...
Co-authored-by: Muffin <muffin@mailbox.org >
2023-12-22 16:47:48 -06:00
Muffin
24b6036825
Add Scratch.translate.language extension API
...
Requested by https://github.com/TurboWarp/extensions/pull/1172
2023-12-21 00:20:36 -06:00
Muffin
c9f93b9de7
Resolve relative Scratch.canEmbed() URLs before sending to security manager
2023-12-03 18:03:53 -06:00
GarboMuffin
b90d1bc7ef
Optimize counter blocks in compiler ( #170 )
2023-10-08 14:13:49 -05:00