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

feat(scripts-module): add runParams for factory modules #98

Merged
merged 2 commits into from
Aug 28, 2023

Conversation

heymdall-legal
Copy link
Collaborator

  • Добавлено описание типов для Factory-модулей, доступно как FactoryModule.

  • Factory-модули теперь могут принимать runParams - отдельный параметр, который не будет передаваться на сервер, а
    сразу будет попадать из клиента в клиент.

  • Mountable модули теперь могут использовать запись вида export default mountableModule; вместо отдельных экспортов
    mount и unmount функций.

@changeset-bot
Copy link

changeset-bot bot commented Aug 24, 2023

🦋 Changeset detected

Latest commit: 005e26c

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

This PR includes changesets to release 4 packages
Name Type
@alfalab/scripts-server Patch
@alfalab/scripts-modules Minor
example-modules Patch
example Patch

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

RunParams = void,
ServerState extends BaseModuleState = BaseModuleState,
> = {
(serverState: ServerState, runParams: RunParams): ReturnType;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Был большой соблазн поменять местами параметры у этих модулей, чтобы они были более похоже на moutable, но это был бы breaking change, а не хочется ломать api если его кто-то уже использует. Но если использования еще нет - то можно бы и поломать без поднятия мажорки

Copy link
Collaborator

Choose a reason for hiding this comment

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

Давай поменяем. С учётом того, что с вероятностью 99.9% мы пока единственные потребители, нам не сложно будет подстроиться

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Поменял

@heymdall-legal heymdall-legal merged commit 6965441 into master Aug 28, 2023
@heymdall-legal heymdall-legal deleted the feat/module-types branch August 28, 2023 09:29
@core-ds-bot core-ds-bot mentioned this pull request Aug 28, 2023
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.

4 participants