Skip to content

[v5] Add support for partial wildcards (prefix matching)#1811

Merged
davidkpiano merged 20 commits intonextfrom
v5/wildcard
Jan 6, 2021
Merged

[v5] Add support for partial wildcards (prefix matching)#1811
davidkpiano merged 20 commits intonextfrom
v5/wildcard

Conversation

@davidkpiano
Copy link
Member

@davidkpiano davidkpiano commented Jan 4, 2021

This PR adds support for prefix matching with wildcards (and without wildcards for SCXML machines only):

const machine = createMachine({
  // ...
  on: {
    // This transition accepts event types like:
    // "mouse", "mouse.click", "mouse.move.out", etc.
    // but not events like "mouseclick"
    'mouse.*': {/* ... */}
  }
});

https://github.com/davidkpiano/xstate/projects/1#card-52117183

@davidkpiano davidkpiano requested a review from Andarist January 4, 2021 05:29
@changeset-bot
Copy link

changeset-bot bot commented Jan 4, 2021

🦋 Changeset detected

Latest commit: 5d16a73

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 11 packages
Name Type
xstate Major
@xstate/graph Major
@xstate/immer Major
@xstate/inspect Major
@xstate/react Major
@xstate/test Major
@xstate/vue Major

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

Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
davidkpiano and others added 2 commits January 4, 2021 18:32
@Andarist
Copy link
Collaborator

Andarist commented Jan 5, 2021

I've reviewed some SCXML tests that got enabled to check if they were enabled correctly - I haven't done that for all of them. I might do it but not sure if you want to stall this PR waiting for that. I might compile a list of enabled tests later for myself to re-check them.

davidkpiano and others added 8 commits January 5, 2021 08:56
Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
@davidkpiano davidkpiano merged commit bfc7c68 into next Jan 6, 2021
@davidkpiano davidkpiano deleted the v5/wildcard branch January 6, 2021 00:57
@github-actions github-actions bot mentioned this pull request Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants