Add virtual filesystem support via executeWithFs#12
Add virtual filesystem support via executeWithFs#12aybanda wants to merge 3 commits intotscircuit:mainfrom
Conversation
seveibar
left a comment
There was a problem hiding this comment.
this looks great, but you gotta install biome and format because your diff is huge and I can't tell what you changed- mostly because of semicolons being added everywhere
|
|
||
| const circuitJson = await circuitWebWorker.getCircuitJson() | ||
| const circuitJson = await circuitWebWorker.getCircuitJson(); | ||
| ``` |
There was a problem hiding this comment.
use git checkout origin/main -- README.md on files you didn't mean to change
check your work by looking at files changed and make sure you're not submitting unnecessary code
| const proxiedCallback = Comlink.proxy(callback) | ||
| webWorker.on(event, proxiedCallback) | ||
| }, | ||
| async executeWithFs({ fsMap, entrypoint }: ExecuteWithFsOptions) { |
There was a problem hiding this comment.
look at the syntax for the other files- why change the syntax?
| interface ExecuteWithFsOptions { | ||
| fsMap: Record<string, string> | ||
| entrypoint: string | ||
| } |
There was a problem hiding this comment.
you've defined this type twice
| if (!fsMap[fullPath]) { | ||
| throw new Error(`Import not found in filesystem: ${fullPath}`) | ||
| } | ||
| return `// Virtual import: ${fullPath}\n${fsMap[fullPath]}` |
There was a problem hiding this comment.
this technique...
- doesn't work for
jsonfiles or other extensions - changes the exports of the main module, will cause conflicting duplicate exports
- doesn't handle recursive imports or modules that import other modules
|
This was a good attempt but it's taking more time to review this than to write it /tip $5 |
|
🎉🎈 @aybanda has been awarded $5! 🎈🎊 |
Adds
.executeWithFs()method to support virtual filesystem and relative imports.Changes
executeWithFsmethod to APITesting
/claim #11