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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 75 additions & 48 deletions .pnp.cjs

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .yarn/cache/fsevents-patch-19706e7e35-9.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
"packages/*"
],
"resolutions": {
"@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

"@types/react": "^17.0.0",
"eslint": "<=8.18.0",
"typescript": "<=4.6.4"
},
"dependencies": {
"@emotion/react": "11.9.3",
Expand Down
12 changes: 6 additions & 6 deletions packages/kratos-browser-flows/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
"events": "^3.3.0"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/react": "^12.1.3",
"@types/events": "^3.0.0",
"@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

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.

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

"@testing-library/react": "^12.1.5",
"@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 так же не обновлены

"axios": "^0.21.4",
"react": "^18.2.0",
"react-dom": "^18.2.0"
Expand Down
80 changes: 39 additions & 41 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,12 @@ __metadata:
resolution: "@atls/react-kratos-browser-flows@workspace:packages/kratos-browser-flows"
dependencies:
"@ory/kratos-client": "npm:^0.8.2-alpha.1"
"@testing-library/jest-dom": "npm:^5.16.2"
"@testing-library/react": "npm:^12.1.3"
"@types/events": "npm:^3.0.0"
"@types/react": "npm:18.2.20"
"@types/react-dom": "npm:18.2.7"
"@types/testing-library__jest-dom": "npm:^5.14.1"
"@testing-library/jest-dom": "npm:^5.17.0"
"@testing-library/react": "npm:^12.1.5"
"@types/events": "npm:^3.0.2"
"@types/react": "npm:18.2.31"
"@types/react-dom": "npm:18.2.14"
"@types/testing-library__jest-dom": "npm:^5.14.9"
axios: "npm:^0.21.4"
events: "npm:^3.3.0"
react: "npm:^18.2.0"
Expand Down Expand Up @@ -841,7 +841,7 @@ __metadata:
languageName: node
linkType: hard

"@emotion/react@npm:11.9.3":
"@emotion/react@npm:>=11.9.0 <11.10.0":
version: 11.9.3
resolution: "@emotion/react@npm:11.9.3"
dependencies:
Expand Down Expand Up @@ -1804,7 +1804,7 @@ __metadata:
languageName: node
linkType: hard

"@testing-library/jest-dom@npm:^5.16.1, @testing-library/jest-dom@npm:^5.16.2":
"@testing-library/jest-dom@npm:^5.16.1, @testing-library/jest-dom@npm:^5.16.2, @testing-library/jest-dom@npm:^5.17.0":
version: 5.17.0
resolution: "@testing-library/jest-dom@npm:5.17.0"
dependencies:
Expand Down Expand Up @@ -1843,7 +1843,7 @@ __metadata:
languageName: node
linkType: hard

"@testing-library/react@npm:^12.1.2, @testing-library/react@npm:^12.1.3":
"@testing-library/react@npm:^12.1.2, @testing-library/react@npm:^12.1.3, @testing-library/react@npm:^12.1.5":
version: 12.1.5
resolution: "@testing-library/react@npm:12.1.5"
dependencies:
Expand Down Expand Up @@ -1936,10 +1936,10 @@ __metadata:
languageName: node
linkType: hard

"@types/events@npm:^3.0.0":
version: 3.0.0
resolution: "@types/events@npm:3.0.0"
checksum: 5bfdde8bc87b1103cb90f2c988ebf9e1f77031df7e61c8db8718a87abbf7db9f8a56390d20932d8e86185fbc6e40543acbd24d440f238e39537998f8aabe3a6a
"@types/events@npm:^3.0.2":
version: 3.0.2
resolution: "@types/events@npm:3.0.2"
checksum: cb6788ca09789a8b875cc2cfdb4ac94396ee321d47c0d2b9a57d2c1b34d3d38e8100c15ea7b5c4a40faadf997b3faa8adaacdd1abc55965fc3aa8173b7c43d01
languageName: node
linkType: hard

Expand Down Expand Up @@ -2049,6 +2049,15 @@ __metadata:
languageName: node
linkType: hard

"@types/react-dom@npm:18.2.14":
version: 18.2.14
resolution: "@types/react-dom@npm:18.2.14"
dependencies:
"@types/react": "npm:*"
checksum: bc50ad2f862f4dab3460e61ad4e1e099b013dbe709ee596754461a3bf089e470124949e52d37dcc8c40862b3da70d0bf5809807a097abb82e0dc37ea8cd6e765
languageName: node
linkType: hard

"@types/react-dom@npm:18.2.7, @types/react-dom@npm:>=16.9.0, @types/react-dom@npm:^18.2.7":
version: 18.2.7
resolution: "@types/react-dom@npm:18.2.7"
Expand Down Expand Up @@ -2076,32 +2085,21 @@ __metadata:
languageName: node
linkType: hard

"@types/react@npm:*, @types/react@npm:16 || 17 || 18, @types/react@npm:18.2.20, @types/react@npm:>=16.9.0":
version: 18.2.20
resolution: "@types/react@npm:18.2.20"
dependencies:
"@types/prop-types": "npm:*"
"@types/scheduler": "npm:*"
csstype: "npm:^3.0.2"
checksum: 953bbd529bfb50d1a7085a94a0744391f46fe5ac80b2eed6abd3d3713f22b84d119362d18350cba48f3fe05caf6392bcc93789b5147838f556a4ff7831603371
languageName: node
linkType: hard

"@types/react@npm:^17":
version: 17.0.64
resolution: "@types/react@npm:17.0.64"
"@types/react@npm:^17.0.0":
version: 17.0.69
resolution: "@types/react@npm:17.0.69"
dependencies:
"@types/prop-types": "npm:*"
"@types/scheduler": "npm:*"
csstype: "npm:^3.0.2"
checksum: ab860c493c50753338b217467e71e023d084e90faabc460fc4b84c0d4feb10130be375c4516f8885b28c28a0743939e4f00569c986399b9cc53c8d31956d15ad
checksum: f5a0e4f6e333b234e9d7e03f29c427b919b47ea8b1a32422aa4dab5751b8d256c67018950d7d39af12f63a12e71b8829118baf2d19f86e93636219cab70fd425
languageName: node
linkType: hard

"@types/scheduler@npm:*":
version: 0.16.3
resolution: "@types/scheduler@npm:0.16.3"
checksum: 2bfdbd171397a218c87e98dc49e6d747c3cf34cecdcd1df2a05759ae7d5193dead67c68f2fe1ccf52c0c72b18eab75d155f0082913ce97b2fc37e8ef02d9115e
version: 0.16.5
resolution: "@types/scheduler@npm:0.16.5"
checksum: 6c0c61123b8fcb8e1c80dc8c379a57059b83e991d1e82fd2c87bf31e60e65de4f2f64980362aac7ba31307a96a8e113ca416990183ca5128b0f6f8aac6c44944
languageName: node
linkType: hard

Expand Down Expand Up @@ -2130,7 +2128,7 @@ __metadata:
languageName: node
linkType: hard

"@types/testing-library__jest-dom@npm:^5.14.1, @types/testing-library__jest-dom@npm:^5.14.2, @types/testing-library__jest-dom@npm:^5.9.1":
"@types/testing-library__jest-dom@npm:^5.14.1, @types/testing-library__jest-dom@npm:^5.14.2, @types/testing-library__jest-dom@npm:^5.14.9, @types/testing-library__jest-dom@npm:^5.9.1":
version: 5.14.9
resolution: "@types/testing-library__jest-dom@npm:5.14.9"
dependencies:
Expand Down Expand Up @@ -3354,7 +3352,7 @@ __metadata:
languageName: node
linkType: hard

"eslint@npm:8.18.0":
"eslint@npm:<=8.18.0":
version: 8.18.0
resolution: "eslint@npm:8.18.0"
dependencies:
Expand Down Expand Up @@ -7156,23 +7154,23 @@ __metadata:
languageName: node
linkType: hard

"typescript@npm:4.6.2":
version: 4.6.2
resolution: "typescript@npm:4.6.2"
"typescript@npm:<=4.6.4":
version: 4.6.4
resolution: "typescript@npm:4.6.4"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 61b86ce7f0ed351db6c24092c9fe2b6c330edba8871f1a6ac88cdf08c5df237e1e79d8d6dd118ba0903d90426662b2ab623074a1ee1563de50a49114329a3c2c
checksum: 6ed92bade9f1ba834733df9c932f42710381b4a3351369102ec99ad3bfa36b9bf2e57a639bff3ada2ab81dd3d97b1b14908601285fcbafed03a52da12adaaa98
languageName: node
linkType: hard

"typescript@patch:typescript@npm%3A4.6.2#optional!builtin<compat/typescript>":
version: 4.6.2
resolution: "typescript@patch:typescript@npm%3A4.6.2#optional!builtin<compat/typescript>::version=4.6.2&hash=5d3a66"
"typescript@patch:typescript@npm%3A<=4.6.4#optional!builtin<compat/typescript>":
version: 4.6.4
resolution: "typescript@patch:typescript@npm%3A4.6.4#optional!builtin<compat/typescript>::version=4.6.4&hash=5d3a66"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 55110ab105f77165c592d337eeaaddc1f18387e7624d218421b3121073daacbfca50c313c12b16c3b1341c47b1194fde78c7f4ebce929dcdf43d270ef9a13619
checksum: 0ee0e98dae9f55e67ce31749066b581698b563d2b6edc89430f5203ad770d51c43068ee00970df24b078c359dd6a8eb82da55a45b3e0ac2c61a0cf13f15c050a
languageName: node
linkType: hard

Expand Down
Loading