-
Notifications
You must be signed in to change notification settings - Fork 79
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
Update prosemirror-*
, remove @types/prosemirror-*
#1359
Conversation
@@ -50,7 +50,7 @@ | |||
"lint:prettier": "prettier --check --ignore-unknown .", | |||
"lint:tsc": "turbo run --continue lint:tsc", | |||
"lint:yarn-deduplicate": "yarn-deduplicate --fail --list --strategy=fewer", | |||
"postinstall": "patch-package && husky install && yarn codegen", | |||
"postinstall": "patch-package --error-on-warn && husky install && yarn codegen", |
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.
Bonus, see justification in: blockprotocol/blockprotocol#736
blocks/paragraph/package.json
Outdated
@@ -30,8 +30,7 @@ | |||
"mock-block-dock": "0.0.38", | |||
"react": "^18.2.0", | |||
"react-dom": "^18.2.0", | |||
"typescript": "4.8.4", | |||
"typescript-json-schema": "0.54.0" |
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.
Bonus: follow-up from #1353 (comment)
prosemirror-*
, remove @types/prosemirror-*
Getting this from
The rest looks clean. @nathggns thoughts? (feel free to push if you want) UPD All CI checks pass now. |
@@ -28,71 +28,22 @@ module.exports = { | |||
"error", | |||
{ | |||
selector: | |||
"TSTypeReference[typeName.name=/^(DirectEditorProps|EditorProps|EditorView|EditorState|NodeView|ProsemirrorNode|Command|Transaction|Plugin|PluginKey)$/]:not([typeParameters])", | |||
"TSTypeReference[typeName.name=/^(Plugin|PluginKey)$/]:not([typeParameters])", |
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.
Plugin
and PluginKey
are still generic (one arg instead of two)
// @ts-expect-error -- NodeType#schema is readonly in prosemirror-model | ||
value.schema = schema; | ||
// @ts-expect-error -- NodeType#nodes is readonly in prosemirror-model | ||
this.nodes[key] = value; |
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.
@nathggns do you see any possible issues with these @ts-expect-error
instances? There are two more just below.
Reviewing this now |
π What is the purpose of this PR?
When updating
devDependencies
in #1353, I noticed that@types/prosemirror-*
packages got deprecated (e.g.@types/prosemirror-view
). It turned out that the typings were moved into ProseMirror packages themselves.This PR removes
@types/prosemirror-*
and updates allprosemirror-*
packages to the latest available versions. They are semver-minor, so should be backwards-compatible with the versions we've had. The main change is the removal of genericSchema
argument from all types.π Related links
π Does this require a change to the docs?
See PR comment below
πΎ Next steps
Configure autoupdates for prosemirror deps
π‘ What tests cover this?
β How to test this?