automerge / automerge-repo

MIT License
419 stars 43 forks source link

Upgrade to XState 5 #311

Closed HerbCaudill closed 2 months ago

HerbCaudill commented 3 months ago

Adapts DocHandle to use XState 5 for its internal state machine. XState 5 has a simplified API, better Typescript DX, and a smaller bundle size.

It does introduce a number of breaking changes relative to XState 4 (details), so a lot of things had to be changed/rearranged/refactored - see comments inline.

Testing

After updating dependencies and building the monorepo, confirm that all tests still pass.

pnpm install
pnpm build
pnpm test
HerbCaudill commented 3 months ago

moving this to draft as I'm this is producing intermittent errors with the lf/auth provider

HerbCaudill commented 3 months ago

OK this should be good to go now. I had gotten the timeout syntax wrong - I had

after: { { delay, target: "unavailable" } }

when it should have been

after: { [delay]: { target: "unavailable" } }
pvh commented 3 months ago

@HerbCaudill can you update for all the stuff I merged? sorry for the merge carnage.

HerbCaudill commented 3 months ago

@HerbCaudill can you update for all the stuff I merged? sorry for the merge carnage.

@pvh I've rebased on current main