valentinnodan / mdx-intellij-plugin

MIT License
8 stars 2 forks source link

Support 2022.1 #24

Closed chklauser closed 2 years ago

chklauser commented 2 years ago

Upgrades to the 2022.1 version of the IntelliJ platform. There are, unfortunately, backwards-incompatible changes to the Markdown API, meaning this version of the plugin won't be compatible with previous versions of the platform.

šŸ˜… Having absolutely zero experience with IntelliJ plugins, I have puzzled together my changes based on the changes that were made in commit 31647e1ae9cfb469dbb78f050643ee73a81f5530 of the JetBrain Markdown plugin. There is probably one small change in behavior with respect to the AtxHeaderProvider constructor. The platform API change notes say

AtxHeaderProvider now always requires at least one space between # and its content as specified by the CommonMark spec.

I updated snapshot tests to match new names of AST nodes. (e.g., MarkdownParagraphImpl becomes MarkdownParagraph). No other changes to the AST snapshots were necessary.

Also:

I have

Thank you for maintaining the MDX plugin ā¤ļø. It makes writing high-quality documentation with Docusaurus fun šŸ¦•šŸ„³. This PR/a new release of the plugin absolutely not urgent for me. I'm perfectly content using my locally built version of the plugin šŸ˜„ (for anyone else reading this: build the project with gradle assemble and install the plugin ZIP from the build/distributions directory)

2022-04-03T18:59:51 [main] INFO  verification - Task check-plugin parameters:
Scheduled verifications (1):
mdx.js:1.0.221 against IU-221.5080.93

2022-04-03T18:59:53 [main] INFO  verification - Finished 1 of 1 verifications (in 1.9 s): IU-221.5080.93 against mdx.js:1.0.221: Compatible. 12 usages of deprecated API
Plugin mdx.js:1.0.221 against IU-221.5080.93: Compatible. 12 usages of deprecated API
Deprecated API usages (12): 
    #Deprecated method com.intellij.formatting.FormattingModelBuilder.createModel(PsiElement, CodeStyleSettings) is overridden
        Deprecated method com.intellij.formatting.FormattingModelBuilder.createModel(com.intellij.psi.PsiElement element, com.intellij.psi.codeStyle.CodeStyleSettings settings) : com.intellij.formatting.FormattingModel is overridden in class org.intellij.plugin.mdx.format.MdxFormattingModelBuilder
    #Deprecated field com.intellij.lang.javascript.DialectOptionHolder.JSX access
        Deprecated field com.intellij.lang.javascript.DialectOptionHolder.JSX : com.intellij.lang.javascript.DialectOptionHolder is accessed in org.intellij.plugin.mdx.js.MdxJSLanguage.<init>()
        Deprecated field com.intellij.lang.javascript.DialectOptionHolder.JSX : com.intellij.lang.javascript.DialectOptionHolder is accessed in org.intellij.plugin.mdx.highlighting.MdxEditorHighlighter.<init>(EditorColorsScheme)
    #Deprecated method com.intellij.psi.templateLanguages.TemplateDataElementType.getTemplateDataInsertionTokens() is overridden
        Deprecated method com.intellij.psi.templateLanguages.TemplateDataElementType.getTemplateDataInsertionTokens() : com.intellij.psi.tree.TokenSet is overridden in class org.intellij.plugin.mdx.lang.psi.MdxTemplateDataElementType
    #Deprecated field com.intellij.lang.javascript.JavaScriptSupportLoader.JSX_HARMONY access
        Deprecated field com.intellij.lang.javascript.JavaScriptSupportLoader.JSX_HARMONY : com.intellij.lang.javascript.JSLanguageDialect is accessed in org.intellij.plugin.mdx.js.MdxJSLanguageParser.<init>(PsiBuilder)
        Deprecated field com.intellij.lang.javascript.JavaScriptSupportLoader.JSX_HARMONY : com.intellij.lang.javascript.JSLanguageDialect is accessed in org.intellij.plugin.mdx.js.MdxJSLanguage.<init>()
    #Deprecated method com.intellij.lang.javascript.JSLanguageDialect.createParser(PsiBuilder) is overridden
        Deprecated method com.intellij.lang.javascript.JSLanguageDialect.createParser(com.intellij.lang.PsiBuilder builder) : java.lang.Object is overridden in class org.intellij.plugin.mdx.js.MdxJSLanguage
    #Deprecated method com.intellij.formatting.FormattingModelBuilder.createModel(PsiElement, CodeStyleSettings, FormattingMode) is overridden
        Deprecated method com.intellij.formatting.FormattingModelBuilder.createModel(com.intellij.psi.PsiElement element, com.intellij.psi.codeStyle.CodeStyleSettings settings, com.intellij.formatting.FormattingMode mode) : com.intellij.formatting.FormattingModel is overridden in class org.intellij.plugin.mdx.format.MdxJsFormattingModelBuilder
    #Deprecated method com.intellij.lang.javascript.JSLanguageDialect.getFileExtension() is overridden
        Deprecated method com.intellij.lang.javascript.JSLanguageDialect.getFileExtension() : java.lang.String is overridden in class org.intellij.plugin.mdx.js.MdxJSLanguage
    #Deprecated method com.intellij.lang.javascript.frameworks.modules.JSBaseModuleReferenceContributor.isSoft(PsiElement, String, boolean) invocation
        Deprecated method com.intellij.lang.javascript.frameworks.modules.JSBaseModuleReferenceContributor.isSoft(com.intellij.psi.PsiElement host, java.lang.String modulePath, boolean isCommonJS) : boolean is invoked in org.intellij.plugin.mdx.js.MdxModuleReferenceContributor.getReferences(String, PsiElement, int, PsiReferenceProvider, boolean) : FileReference[]
    #Deprecated class com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil reference
        Deprecated class com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil is referenced in org.intellij.plugin.mdx.js.MdxTagNameSynchronizer.TagNameSynchronizer.findSupport(RangeMarker, PsiFile, Document) : RangeMarker
    #Deprecated method com.intellij.formatting.FormattingModelBuilder.createModel(PsiElement, CodeStyleSettings) invocation
        Deprecated method com.intellij.formatting.FormattingModelBuilder.createModel(com.intellij.psi.PsiElement element, com.intellij.psi.codeStyle.CodeStyleSettings settings) : com.intellij.formatting.FormattingModel is invoked in org.intellij.plugin.mdx.format.MdxFormattingModelBuilder.createModel(PsiElement, CodeStyleSettings) : FormattingModel
    Plugin can be loaded/unloaded without IDE restart

2022-04-03T18:59:53 [main] INFO  verification - Total time spent downloading plugins and their dependencies: 0 ms
2022-04-03T18:59:53 [main] INFO  verification - Total amount of plugins and dependencies downloaded: 0 B
2022-04-03T18:59:53 [main] INFO  verification - Total amount of space used for plugins and dependencies: 339.42 KB
anstarovoyt commented 2 years ago

Thank you for the contribution! I will check and publish the plugin ASAP.