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

Issue #130: Грейд версий @atls/react-kratos-browser-flows #132

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Voiislav
Copy link

No description provided.

@Voiislav Voiislav added the enhancement New feature or request label Oct 25, 2023
@Voiislav Voiislav self-assigned this Oct 25, 2023
@Voiislav Voiislav linked an issue Oct 25, 2023 that may be closed by this pull request
"@types/react": "18.2.20",
"@types/react-dom": "18.2.7",
"@types/testing-library__jest-dom": "^5.14.1",
"@testing-library/jest-dom": "^5.17.0",
Copy link
Member

Choose a reason for hiding this comment

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

^ в версиях не используем, только жестко фиксированные как ты сделал с @types/react

"@types/react": "18.2.20",
"@types/react-dom": "18.2.7",
"@types/testing-library__jest-dom": "^5.14.1",
"@testing-library/jest-dom": "^5.17.0",
Copy link
Member

Choose a reason for hiding this comment

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

Выше версии не обновлены, особенно @ory/kratos-client

Copy link
Author

@Voiislav Voiislav Oct 25, 2023

Choose a reason for hiding this comment

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

если обновить @ory/kratos-client до последней версии, то возникают ошибки. Пример на скрине:

Details

photo_2023-10-25 14 53 41

Наиболее последняя версия, с которой ошибок нет - 0.9.0-alpha.3. Оставлять ее?

Copy link
Member

Choose a reason for hiding this comment

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

Попробуй добавь в зависимости пакета:

    "@ory/client": "1.2.11",
    "@ory/integrations": "1.1.5",
    "@ory/kratos-client": "1.0.0",

Copy link
Author

Choose a reason for hiding this comment

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

Добавил. Ошибки есть. Пример на скрине.

Details

photo_2023-10-25 15 16 44

Copy link
Member

Choose a reason for hiding this comment

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

Замени в проекте:

  • SubmitSelfServiceVerificationFlowBody на VerificationFlowBody

По остальному посмотри откуда идут экспорты тут https://github.com/atls/nextjs/tree/master/packages/identity-integration

Это аналогичный пакет, но под nextjs

Copy link
Author

Choose a reason for hiding this comment

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

Замени в проекте:

SubmitSelfServiceVerificationFlowBody на VerificationFlowBody

Ошибка:

packages/kratos-browser-flows/src/flows/verification.flow.ts
➤ YN0000: │
➤ YN0000: │ Error: Module '"@ory/kratos-client"' has no exported member 'VerificationFlowBody'.

Copy link
Member

Choose a reason for hiding this comment

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

Проверься с тем пакетом что выслал - там тот же функционал и экспорты. Из-за старости версии тут могут различаться по названию интерфейсов.

"@types/events": "^3.0.2",
"@types/react": "18.2.31",
"@types/react-dom": "18.2.14",
"@types/testing-library__jest-dom": "^5.14.9",
Copy link
Member

Choose a reason for hiding this comment

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

peerDependencies так же не обновлены

"@emotion/react": "11.9.3",
"eslint": "8.18.0",
"typescript": "4.6.2"
"@emotion/react": ">=11.9.0 <11.10.0",
Copy link
Member

Choose a reason for hiding this comment

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

Тут я тебя ввел в заблуждение - обычно когда говорим "не выше" имеется в виду что можно использовать и последнюю. Т.е. @types/react я бы зафиксировал "17.Х.Х", где Х - последняя версия на npmjs.com

@emotion/react, eslint и typescript здесь лишние - их мы можем фиксировать вручную в проектах.

Вообще resolutions используется тогда, когда наши внешние зависимости тянут с собой что то, что нас не устраивает по версии. Вот твой случай - у тебя из-за внешних зависимостей @types/react "задваивался", из-за чего были ошибки. Поэтому я предложил тебе воспользоваться resolutions

Copy link
Author

Choose a reason for hiding this comment

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

@emotion/react, eslint и typescript здесь лишние - их мы можем фиксировать вручную в проектах.

Имеешь в виду, что @emotion/react, eslint и typescript можно убрать из resolutions? Они были там до меня.

Copy link
Member

Choose a reason for hiding this comment

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

Можешь оставить, главное версии держи четко зафиксированными. Ну и посмотри чтобы не было диссонанса - например, в resolutions тайпскрипт - 4.6.4, а ниже - 4.6.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Грейд версий @atls/react-kratos-browser-flows
2 participants