-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[p5.js 2.0] IO refactoring #7365
Conversation
Implementation of p5.Table is very broken and loadTable was also very broken. This commit does not fix the implementation fully as it still need to be decided whether p5.Table is to be retained. The fact that no one has noticed p5.Table and loadTable is so broken might be a good reason to not retain them as no one is using them.
Nice work, the loading implementations look clean! Using the worker to mock responses in tests is a cool approach. |
@davepagurek Yeah, that gives us more flexibility but for now is mainly to solve vitest itself not able to respond with 404 properly. I'm not doing too much test fixing just yet though, for now want to refactor the new implementation and maybe look into the file saving aspect. Tests I'll do after this. |
Starting a rewrite of the IO functions starting with the loading functions and will move to the saving functions later.
The main goal is to utilize promises and the
fetch
API as much as possible while exposing a reasonable public interface for the user. The overloads will also be simplified in favor of defaults and for more advanced users who wishes for more customized functionalities to pass inRequest
object instead.