-
Notifications
You must be signed in to change notification settings - Fork 13
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
chore(editools)!: upgrade @keystone-6/core to 5.2.0 #379
Conversation
a9e1773
to
88bd31e
Compare
@caesarWHLee @erase2004 有空請幫忙看一下 PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
確認到以下問題,可一併處理,或另外處理
-
field level 的 ACL 需要改寫:
- 受影響 List: Field, FieldOption, Form, FormAnswer, IndexItem, Question
- 請參考 https://keystonejs.com/docs/config/access-control#field-access-control
-
dfaultValue 應為 defaultValue,或者移除該設定
- 受影響 List: LiveblogItem, Question
-
sortOrder 的 dfaultValue 應為 defaultValue,而且 false 無法指派為 integer,所以看是用 0 作為預設值,或是刪除這個設定
- 受影響 List: Field, FieldOption,
-
ui > displayMode 數值錯誤,不存在 display 選項,應為 cards, select 或 count
- 受影響 List: FieldOption, Form, FormAnswer, FormResult, Liveblog, Publisher
-
Publisher list 中存在額外錯誤
- 在同一個 ui 底下,重複的 key 的錯誤,e.g., linkToItem, inlineCreate
- isindexed 應為 isIndexed, 而且數值為 boolean
- displayoOde 應為 displayMode
- resolveInput 中有 type error
另外,file 和 image 影響到的 list,上到 dev 後,須確認上傳後的網址資訊是否正確。
packages/editools/lists/Form.ts
Outdated
@@ -57,7 +58,7 @@ const listConfigurations = list({ | |||
disabledButtons: [], | |||
website: 'readr', | |||
}), | |||
heroImage: customFields.relationship({ | |||
heroImage: relationship({ | |||
label: '首圖', | |||
ref: 'Photo', | |||
customConfig: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
customConfig 應移除?
packages/editools/lists/Form.ts
Outdated
@@ -72,7 +73,7 @@ const listConfigurations = list({ | |||
}, | |||
}, | |||
}), | |||
mobileImage: customFields.relationship({ | |||
mobileImage: relationship({ | |||
label: '手機首圖', | |||
ref: 'Photo', | |||
customConfig: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
customConfig 應移除?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
這裡面有大量的錯誤:
- ui > removeMode 的數值錯誤
- 在同一個 ui 底下,重複的 key 的錯誤,e.g., linkToItem, inlineCreate
- hook 應為 hooks,但 resolveInput 有使用到未被引入的 draftConverter
@@ -14,7 +14,7 @@ const listConfigurations = list({ | |||
label: '標題', | |||
validation: { isRequired: true }, | |||
}), | |||
imageFile: image(), | |||
imageFile: image({ storage: 'images' }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在 Ln. 44 和 Ln. 121, 122 有 type error
packages/editools/lists/Liveblog.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
這裡面有大量的錯誤:
在同一個 ui 底下,重複的 key 的錯誤,e.g., inlineCreate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Ln. 99, Ln. 146 有 type error
- Ln. 165 使用到不存在的 draftConverter (
customFields.draftConverter
)
packages/editools/lists/Question.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hook 應為 hooks,但 resolveInput 使用到不存在的 draftConverter ( customFields.draftConverter
)
上述的錯誤是在 @keystone-6/core@1.1.0 時就存在的問題,和升到 5.2.0 沒有直接的關係。 |
@caesarWHLee |
This patch address review comment - mirror-media#379 (comment) - mirror-media#379 (comment)
This patch address review comment - mirror-media#379 (comment) - mirror-media#379 (comment)
7546a58
to
570c20a
Compare
後來再測一次發現,
和 @caesarWHLee 研究了一陣子, 因為
因為 目前和文瀚推測是 yarn 1.* 的 bug,所以這邊就不再花時間研究怎麼處理, |
This patch address review comment - mirror-media#379 (comment) - mirror-media#379 (comment)
570c20a
to
23e6590
Compare
BREAKING CHANGE: This patch upgrades @keystone-6/core dependency, which changes the `image` field type on the web UI. Upgrade KeystoneJS 6 dependencies - @keystone-6/auth: 1.0.0 -> 7.0.0 - @keystone-6/core: 1.1.1 -> 5.2.0 Since @mirrormedia/lilith-core also depends on @keystone-6/core, therefore, we also need to upgrade lilith-core. Those changes in lilith-core will be in another PR. Here, we temparorily upgrade lilith-core to the workable alpha version. Fix dependencies version to avoid multiple React copies problems - next@13.3.4 - react@18.2.0 - react-dom@18.2.0
- replace `custom.relationship` by built-in `relationship` field type. - replace `custom.timestamp` by built-in `timestamp` field type - update `ui.views` - update `image` field arguments - udpate `file` field argumenets
This patch address review comment - mirror-media#379 (comment) - mirror-media#379 (comment)
23e6590
to
9359b86
Compare
BREAKING CHANGE:
GQL schema is changed due to @keystone-6/core upgrade.
Mainly, fields, such as
image_mode
,file_mode
, which are generated byimage
,file
field type are effected.Related PR:
#378