Skip to content
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

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

Merged
merged 20 commits into from
Jan 6, 2021
Merged

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

@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>
@Andarist
Copy link
Member

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.

packages/core/src/scxml.ts Outdated Show resolved Hide resolved
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.

None yet

2 participants