Skip to content

Fix custom plugins not available in events hooks. Add test.#932

Merged
delucis merged 2 commits into
boardgameio:masterfrom
MathieuLoutre:plugin-order
Apr 26, 2021
Merged

Fix custom plugins not available in events hooks. Add test.#932
delucis merged 2 commits into
boardgameio:masterfrom
MathieuLoutre:plugin-order

Conversation

@MathieuLoutre

Copy link
Copy Markdown
Contributor

Checklist

  • Use a separate branch in your local repo (not master).
  • Test coverage is 100% (or you have a story for why it's ok).

This changes the order the plugins are flushed in to fix the problem mentioned in #910. It also adds a test to make sure it works.

This removes the additional reverse as it seemed necessary to separate PluginEvents from the rest (hence CORE_PLUGINS and DEFAULT_PLUGINS) to execute everything in the right order.

@delucis delucis closed this Apr 25, 2021
@delucis delucis reopened this Apr 25, 2021

@delucis delucis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @MathieuLoutre! I think we need to keep reverse (see comment), but otherwise this is great!

Comment thread src/plugins/main.ts Outdated
@MathieuLoutre

Copy link
Copy Markdown
Contributor Author

Great! I've added the reverse and a comment to that effect — hope it's clear enough!

@delucis delucis merged commit b832b07 into boardgameio:master Apr 26, 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