-
-
Notifications
You must be signed in to change notification settings - Fork 12
Rewrite to ts morph #29
Conversation
# Conflicts: # packages/xstate-compiled/package.json # packages/xstate-compiled/src/extractMachines.ts # packages/xstate-compiled/tsconfig.json # yarn.lock
🦋 Changeset detectedLatest commit: 0305fc1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Very exciting. I've added a complex machine test case into master which tests parallel states, nested states etc. When I tried it on this branch, the tests failed. Could you pull that into this PR and try to make it pass? |
…ion as possible value of cond
…to types when things outside of the Machine call are used
Found a machine in my work repo that fails on the branch. I've added it to master - pull it in to see the changes. Copying here as well in case merging is a PITA:
|
Ah, i knew this has to happen - was just hoping that a little bit later :P i think i need to bring back the schema-based approach, just need to make the logic more tolerant to matching any state-likes (previously ive tried to be too strict about compound/atomic/etc). Will work on that today/tomorrow - hopefully wont take too long. That approach will allow me to just skip over extracting context which is problematic here |
# Conflicts: # packages/xstate-compiled/src/introspectMachine.ts # yarn.lock
@Andarist Do you think you will find time to continue on this? I am not sure if this PR solves it specifically, but missing support for path aliases from |
I have actually got back to working on this already earlier this week.
It should because file resolution is delegated to TS and it's tsconfig.json-aware. Unless you would have some very specific setup for which the current logic fails to locate the
We could definitely use some help if you'd like to collaborate on this. I have very limited time to work on all of this (2 kids at home 😉) and there are some things to figure out in relation to IDE, linting etc. We have some additional plans to restructure this tool plus provide VSCode extension - gonna be posting more about this soon but the implementation definitely won't happen over night. |
# Conflicts: # packages/xstate-compiled/examples/createMachineOptions.machine.ts # packages/xstate-compiled/examples/options.machine.ts # packages/xstate-compiled/package.json # packages/xstate-compiled/src/extractMachines.ts # packages/xstate-compiled/src/index.ts # packages/xstate-compiled/src/introspectMachine.ts # yarn.lock
…re using interpret incorrectly
d8f8b82
to
9a7c2d1
Compare
I've pushed out my recent work on this - it works for the majority of cases, existing tests pass. However, if I fail to extract things the DX ain't great because no helpful errors are printed to the user. It's very important to get this right as without that this is not really that usable. I've also dropped temporarily support for This relies on type inference so explicit type params for |
Was this closed accidentally? |
No description provided.