Tacodiva
b8defadedb
Merge remote-tracking branch 'origin/develop' into HEAD
2025-09-07 11:56:25 +10:00
Thomas Weber
ba9ae068ca
Don't compress formats that are already compressed ( #258 )
...
Closes https://github.com/TurboWarp/scratch-vm/issues/253
2025-05-13 21:45:21 -05:00
Thomas Weber
b8520ccd9a
Fix visual report error when thread target does not match editing target
...
Fixes #252
2025-03-27 13:34:21 -05:00
Thomas Weber
2d29cdc63a
Quit VM when execute test times out
...
A future test project will be designed such that failing to
quit the VM after timing out would severely inhibit the
performance of the other tests.
2025-03-07 01:11:17 -06:00
Thomas Weber
af3b7513a4
ir: Match vanilla quirks when handling variable or list fields with null ID
2025-01-18 00:29:09 -06:00
Thomas Weber
fdd954c012
Add URL argument to Scratch.canDownload
...
This lets us filter out javascript: URLs
2024-12-22 17:46:09 -06:00
Thomas Weber
1a578aa44e
Add canDownload API
...
https://github.com/TurboWarp/scratch-gui/issues/969
2024-12-22 11:51:26 -06:00
Muffin
9e6993de27
Add restricted fonts and case insensitivity to font manager ( #231 )
2024-11-02 21:39:44 -05:00
Tacodiva
df65b01cde
Merge branch 'origin/develop' into next-next
2024-09-26 11:50:09 +10:00
Tacodiva
59cc74c10b
Fix imports :c
2024-07-28 20:31:07 +10:00
Muffin
658ef8aba7
Add test for sb3 creation being deterministic over time
2024-07-18 12:44:49 -05:00
Tacodiva
02806b654a
Linty linty code
2024-06-17 10:37:37 +10:00
Tacodiva
71b75aad51
Add type assertion checking
2024-06-16 13:50:39 +10:00
Tacodiva
9d28fccb99
Add operator type testing
2024-06-16 13:50:30 +10: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
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
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
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
a15c069ac6
Improve promise-like extension block test
...
notably, fail on compiler errors, and run the test block several times
2024-01-26 20:39:05 -06:00
Muffin
b3e621c61b
Add test for promise-like blocks
2024-01-21 13:44:54 -06:00
Muffin
cd9782a64c
Replace minilog with nanolog
2024-01-14 01:48:32 -06:00
Muffin
c857903321
Replace use of deprecated vm.stop() in branch tests
2024-01-13 21:23:09 -06:00
Muffin
ce0b7d73ff
Add test for starting a substack beyond branchCount
2024-01-13 21:09:57 -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
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
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
Muffin
c9f93b9de7
Resolve relative Scratch.canEmbed() URLs before sending to security manager
2023-12-03 18:03:53 -06:00
Muffin
ec25b30c4a
Fix compiler regression when last block in loop returns a Promise
2023-08-26 21:45:53 -05:00
Muffin
4845bf89a1
Update loop and conditional tests
2023-08-23 15:59:31 -05:00
Muffin
8b43eae4de
Make addBuiltinExtension per-VM, not global
2023-08-23 13:37:04 -05:00
Muffin
e9f0a3686c
Implement LOOP blocks in interpreter
2023-08-22 16:34:47 -05:00
Muffin
87119eadb7
Implement CONDITIONAL blocks in interpreter
2023-08-22 16:34:47 -05:00
Muffin
db0776711f
Implement CONDITIONAL blocks in compiler
2023-08-22 16:34:47 -05:00
Muffin
6399562b90
Revert running unsandboxed extensions with fetch() and new AsyncFunction instead of <script>
...
It causes other issues:
- It *will* break projects
- Stack traces from errors in extensions are unusable
- We do not even get some of the originally intended benefits like parallel loading
2023-08-22 11:24:20 -05:00
GarboMuffin
9caca1c510
Merge pull request #157 from TurboWarp/modernize-loading
...
Use fetch() and AsyncFunction instead of `<script>` for unsandboxed extensions
2023-08-22 10:48:54 -05:00
Muffin
683620994f
Fix tests
2023-08-22 10:43:04 -05:00
Muffin
55cda8242c
Run unsandboxed extensions with fetch() and new AsyncFunction instead of <script>
...
Benefits:
- IIFE no longer needed
- Extensions can await
- Better error messages
Downsides:
- CORS now required to load extensions
2023-08-22 10:00:36 -05:00
Muffin
b9e84b7db2
Implement custom font manager
2023-08-16 10:34:06 -05:00
Muffin
efa7e9d639
Refactor asset serialization
2023-08-14 11:27:32 -05:00
Muffin
186ad43b5b
Add extensive event and hat test
2023-08-13 16:53:25 -05:00
Muffin
afb04f83d8
Run existing hat tests in both interpreter and compiler
2023-08-13 16:53:25 -05:00
Muffin
391c3dc979
Do not ignore compilation errors related to edge-activated hats
...
They can now be compiled, so this code is dead.
2023-08-13 16:53:25 -05:00
Muffin
843b4c3839
Add API to add a new "builtin" extension at runtime
...
This will be used by tests
2023-08-13 16:53:25 -05:00
Muffin
c549569651
Comment out test entirely to clean up logs
2023-08-08 22:56:17 -05:00
GarboMuffin
461ef267da
Merge pull request #144 from TurboWarp/xml-blocktype
...
BlockType.XML
2023-08-06 22:08:30 -05:00