Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Shopify/theme-tools
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: @shopify/prettier-plugin-liquid@1.5.0
Choose a base ref
...
head repository: Shopify/theme-tools
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: @shopify/prettier-plugin-liquid@1.5.1
Choose a head ref

Commits on May 10, 2024

  1. Fixup typo in changelog

    charlespwd committed May 10, 2024
    Copy the full SHA
    07166da View commit details

Commits on May 30, 2024

  1. Copy the full SHA
    3e77601 View commit details
  2. Update 'theme-check-common'

    karreiro committed May 30, 2024
    2
    Copy the full SHA
    ff78229 View commit details
  3. Release 30-05-24: Updated 8 package versions (#361)

    theme-check-vscode: 2.3.2 -> 2.3.3 (patch)
    @shopify/theme-check-common: 2.5.1 -> 2.6.0 (minor)
    @shopify/theme-check-browser: 2.5.1 -> 2.6.0 (minor)
    @shopify/theme-check-node: 2.5.1 -> 2.6.0 (minor)
    @shopify/theme-language-server-common: 1.11.1 -> 1.11.2 (patch)
    @shopify/theme-language-server-browser: 1.11.1 -> 1.11.2 (patch)
    @shopify/theme-language-server-node: 1.11.1 -> 1.11.2 (patch)
    @shopify/theme-check-docs-updater: 2.5.1 -> 2.6.0 (minor)
    karreiro authored May 30, 2024
    Copy the full SHA
    593665f View commit details

Commits on Jun 6, 2024

  1. Add VariableName check (#359)

    * Add VariableName check
    
    * Add changeset for my changes
    
    * Add docs URL
    
    * Add changeset for my changes
    
    * Remove legacy changeset
    
    * Update packages/theme-check-common/src/checks/variable-name/index.ts
    
    Co-authored-by: Guilherme Carreiro <karreiro@gmail.com>
    
    * Remove lodash package
    
    * Fix identical naming occurences
    
    * Formatting
    
    * Update packages/theme-check-common/src/checks/variable-name/index.ts
    
    Co-authored-by: Guilherme Carreiro <karreiro@gmail.com>
    
    ---------
    
    Co-authored-by: Guilherme Carreiro <karreiro@gmail.com>
    madsenmm and karreiro authored Jun 6, 2024
    Copy the full SHA
    bb79d83 View commit details

Commits on Jun 10, 2024

  1. Copy the full SHA
    f6b0a20 View commit details
  2. Release 10-06-24: Updated 8 package versions (#364)

    theme-check-vscode: 2.3.3 -> 2.4.0 (minor)
    @shopify/theme-check-common: 2.6.0 -> 2.7.0 (minor)
    @shopify/theme-check-node: 2.6.0 -> 2.7.0 (minor)
    @shopify/theme-check-browser: 2.6.0 -> 2.7.0 (minor)
    @shopify/theme-language-server-common: 1.11.2 -> 1.11.3 (patch)
    @shopify/theme-language-server-browser: 1.11.2 -> 1.11.3 (patch)
    @shopify/theme-language-server-node: 1.11.2 -> 1.11.3 (patch)
    @shopify/theme-check-docs-updater: 2.6.0 -> 2.7.0 (minor)
    karreiro authored Jun 10, 2024
    Copy the full SHA
    78b1893 View commit details

Commits on Jun 18, 2024

  1. Adds new check for uniqueness of ids for blocks (#363)

    * Adds new check for uniqueness of ids for static block
    
    * Address comments
    
    * Changelog file
    
    * Address comments 2
    
    * Update .changeset/silly-sheep-happen.md
    
    Co-authored-by: Guilherme Carreiro <guilherme.carreiro@shopify.com>
    
    ---------
    
    Co-authored-by: Guilherme Carreiro <guilherme.carreiro@shopify.com>
    MateusJabour and karreiro authored Jun 18, 2024
    Copy the full SHA
    a3a23f4 View commit details
  2. Adds new check for usage of valid types (#365)

    * Adds new check for usage of valid types when rendering static blocks
    
    * Fix documentation url and add changeset
    
    * Update .changeset/nice-boats-raise.md
    
    Co-authored-by: Guilherme Carreiro <guilherme.carreiro@shopify.com>
    
    ---------
    
    Co-authored-by: Guilherme Carreiro <guilherme.carreiro@shopify.com>
    MateusJabour and karreiro authored Jun 18, 2024
    Copy the full SHA
    5f67d6d View commit details

Commits on Jun 19, 2024

  1. Release 19-06-24: Updated 8 package versions

    theme-check-vscode: 2.4.0 -> 2.4.1 (patch)
    @shopify/theme-check-common: 2.7.0 -> 2.8.0 (minor)
    @shopify/theme-check-browser: 2.7.0 -> 2.8.0 (minor)
    @shopify/theme-check-node: 2.7.0 -> 2.8.0 (minor)
    @shopify/theme-language-server-common: 1.11.3 -> 1.11.4 (patch)
    @shopify/theme-language-server-browser: 1.11.3 -> 1.11.4 (patch)
    @shopify/theme-language-server-node: 1.11.3 -> 1.11.4 (patch)
    @shopify/theme-check-docs-updater: 2.7.0 -> 2.8.0 (minor)
    mgmanzella committed Jun 19, 2024
    Copy the full SHA
    67080a8 View commit details

Commits on Jun 25, 2024

  1. Copy the full SHA
    d46e6a0 View commit details
  2. Add changeset

    miazbikowski committed Jun 25, 2024
    Copy the full SHA
    457f9cb View commit details
  3. Fix format:

    miazbikowski committed Jun 25, 2024
    Copy the full SHA
    8e4feeb View commit details

Commits on Jul 2, 2024

  1. Copy the full SHA
    d7c6204 View commit details
  2. Release 02-07-24: Updated 4 package versions (#399)

    theme-check-vscode: 2.4.1 -> 2.4.2 (patch)
    @shopify/theme-language-server-common: 1.11.4 -> 1.12.0 (minor)
    @shopify/theme-language-server-browser: 1.11.4 -> 1.12.0 (minor)
    @shopify/theme-language-server-node: 1.11.4 -> 1.12.0 (minor)
    karreiro authored Jul 2, 2024
    Copy the full SHA
    df8d36a View commit details
  3. Copy the full SHA
    e6e3054 View commit details

Commits on Jul 5, 2024

  1. Copy the full SHA
    11aa19d View commit details

Commits on Jul 8, 2024

  1. Copy the full SHA
    3df13fb View commit details
  2. Merge pull request #396 from Shopify/miaz/add-capture-static-blocks-c…

    …heck
    
    Add capture static blocks check
    lukeh-shopify authored Jul 8, 2024
    Copy the full SHA
    89cb122 View commit details

Commits on Jul 26, 2024

  1. Fix number formatting

    Tobias Mønster Madsen committed Jul 26, 2024
    Copy the full SHA
    384f8e1 View commit details
  2. Update changeset

    Tobias Mønster Madsen committed Jul 26, 2024
    Copy the full SHA
    edb7f2e View commit details

Commits on Jul 30, 2024

  1. Update .changeset/little-grapes-fix.md

    Co-authored-by: Luke Hickin <88160492+lukeh-shopify@users.noreply.github.com>
    madsenmm and lukeh-shopify authored Jul 30, 2024
    Copy the full SHA
    4c6cdf0 View commit details
  2. Update packages/theme-check-common/src/checks/variable-name/index.ts

    Co-authored-by: Luke Hickin <88160492+lukeh-shopify@users.noreply.github.com>
    madsenmm and lukeh-shopify authored Jul 30, 2024
    Copy the full SHA
    d09aa22 View commit details
  3. Add testcases

    Tobias Mønster Madsen committed Jul 30, 2024
    Copy the full SHA
    b1c0ff6 View commit details
  4. Merge pull request #462 from madsenmm/variable-name-numbers

    Fix number formatting
    lukeh-shopify authored Jul 30, 2024
    Copy the full SHA
    ec49006 View commit details

Commits on Aug 6, 2024

  1. Copy the full SHA
    098519a View commit details
  2. Release 06-08-24: Updated 10 package versions

    theme-check-vscode: 2.4.2 -> 2.4.3 (patch)
    @shopify/theme-check-common: 2.8.0 -> 2.9.0 (minor)
    @shopify/theme-check-node: 2.8.0 -> 2.9.0 (minor)
    @shopify/lang-jsonc: 0.0.0 -> 1.0.0 (major)
    @shopify/theme-check-browser: 2.8.0 -> 2.9.0 (minor)
    @shopify/theme-language-server-common: 1.12.0 -> 1.12.1 (patch)
    @shopify/codemirror-language-client: 0.5.1 -> 0.5.1 (none)
    @shopify/theme-language-server-browser: 1.12.0 -> 1.12.1 (patch)
    @shopify/theme-language-server-node: 1.12.0 -> 1.12.1 (patch)
    @shopify/theme-check-docs-updater: 2.8.0 -> 2.9.0 (minor)
    lukeh-shopify committed Aug 6, 2024
    Copy the full SHA
    5bdb837 View commit details
  3. Merge pull request #467 from Shopify/release/06-08-24-ae26e824

    Theme Tools Release: 06-08-24
    lukeh-shopify authored Aug 6, 2024
    Copy the full SHA
    81e9996 View commit details

Commits on Aug 22, 2024

  1. Copy the full SHA
    cd63696 View commit details
  2. Change all shopify.dev theme doc (#472)

    * [~] Change all links to theme docs
    
    * Update packages/theme-check-common/src/checks/valid-json/index.ts
    
    * Update packages/theme-check-common/src/checks/json-syntax-error/index.ts
    
    ---------
    
    Co-authored-by: Guilherme Carreiro <karreiro@gmail.com>
    PolMrt and karreiro authored Aug 22, 2024
    Copy the full SHA
    01f4a7b View commit details

Commits on Sep 5, 2024

  1. Copy the full SHA
    70e2241 View commit details

Commits on Sep 6, 2024

  1. Merge pull request #480 from /issues/335

    Fix broken parsing of liquid attribute names
    lukeh-shopify authored Sep 6, 2024
    Copy the full SHA
    787fd22 View commit details

Commits on Sep 12, 2024

  1. Copy the full SHA
    28a5d31 View commit details

Commits on Sep 17, 2024

  1. Fix bug in autocomplete for snippets

    Previously this was matching against the first period it found in the
    snippet file and removing everything up until the end of the file name.
    
    This meant that if you had a file like `foo.bar.baz.liquid` it would
    only offer `foo` as the suggestion. This change allows for any number of
    periods to be added to the file name and only removes the final
    `.liquid`.
    graygilmore committed Sep 17, 2024
    Copy the full SHA
    f96425e View commit details

Commits on Sep 18, 2024

  1. Add LinkedEditingRanges support for HTML tag names (#486)

    Just like HTML, this feature remains behind the `editor.linkedEditing` configuration.
    
    ```json
    // In VS Code's settings.json
    "editor.linkedEditing": true
    ```
    
    Reason being is that VS Code's implementation is kind of buggy. The
    thing can get out of sync or you can type the name of a void element and
    all of a sudden the rename doesn't complete anymore.
    
    This stuff is hard to explain and I suspect is the reason why MSFT chose
    to put that setting opt-in rather than opt-out.
    charlespwd authored Sep 18, 2024
    Copy the full SHA
    474b859 View commit details
  2. Copy the full SHA
    8f4fa6d View commit details
  3. Add changeset

    jamesmengo committed Sep 18, 2024
    Copy the full SHA
    1c73710 View commit details
  4. Move tests

    jamesmengo committed Sep 18, 2024
    Copy the full SHA
    f8e1780 View commit details
  5. Merge pull request #495 from Shopify/jm/fix-whitespace-endtag

    [Fix] - Improve parsing of whitespace stripping characters in Liquid tags and variables
    jamesmengo authored Sep 18, 2024
    Copy the full SHA
    f93c118 View commit details

Commits on Sep 19, 2024

  1. Bump vitest to 2.0 (#498)

    charlespwd authored Sep 19, 2024
    Copy the full SHA
    9931394 View commit details

Commits on Sep 20, 2024

  1. Add DocumentHighlight support for HTML tags and Liquid blocks (#487)

    When you hover over a HTML tag open, the close tag is highlighted and vice-versa.
    
    ```html
    <div> <!-- this div gets highlighted -->
       <div></div>
    </div> <!-- with this one-->
    ```
    
    When you hover over a Liquid block open, the close block is highlighted (and branches if any).
    
    ```liquid
    {% # this if, elsif, else, endif all get highlighted together %}
    {% if cond %}
    
    {% elsif cond %}
    
    {% else %}
    
    {% endif %}
    ```
    charlespwd authored Sep 20, 2024
    Copy the full SHA
    a946a4e View commit details
  2. Add Rename support for HTML element names (#488)

    Press F2 for rename in pairs. A safer way to do linked editing.
    
    ```liquid
    <!-- press F2 on the HTML tag name and choose a different name for the open/close pair-->
    <product--{{ type }} src="...">
      ...
    </product--{{ type }}>
    ```
    charlespwd authored Sep 20, 2024
    Copy the full SHA
    b5a2fbc View commit details

Commits on Sep 23, 2024

  1. Merge pull request #496 from Shopify/gg-snippet-being-snippy

    Fix bug preventing snippets with periods to be autocompleted
    graygilmore authored Sep 23, 2024
    Copy the full SHA
    8b1faee View commit details
  2. Copy the full SHA
    42c76d9 View commit details

Commits on Sep 27, 2024

  1. Add HTML Element close tag auto-insertion support (#501)

    * Rearchitect OnTypeFormattingProvider for extensibility
    
    * Add HTML Element close tag auto-insertion support
    
    Fixes #499
    
    * Add onEnterRules for HTML so that the indentation is correct after pressing enter
    
    * Complete inside branches
    charlespwd authored Sep 27, 2024
    Copy the full SHA
    d1f9fef View commit details
  2. Copy the full SHA
    9badd60 View commit details
  3. Add an entry's syntax declaration to hover info

    We currently have this information but aren't displaying it in any way.
    If available, this commit adds the syntax under the name of the
    tag/filter when hovering so that developers can more easily see how it
    can be used.
    graygilmore committed Sep 27, 2024
    Copy the full SHA
    f0f9ec2 View commit details

Commits on Sep 30, 2024

  1. Copy the full SHA
    264321f View commit details
  2. Merge pull request #509 from Shopify/fix-auto-completing-liquid-tag

    Remove `endliquid` as suggested auto-completion
    aswamy authored Sep 30, 2024
    Copy the full SHA
    9473b5c View commit details
  3. Merge pull request #508 from Shopify/gg-syntax-on-hover

    Add an entry's syntax declaration to hover info
    graygilmore authored Sep 30, 2024
    Copy the full SHA
    bc49fab View commit details
Showing with 3,965 additions and 617 deletions.
  1. +1 −0 .gitignore
  2. +1 −1 README.md
  3. +109 −1 ThirdPartyNotices.txt
  4. +2 −1 package.json
  5. +7 −1 packages/codemirror-language-client/CHANGELOG.md
  6. +3 −2 packages/codemirror-language-client/README.md
  7. +4 −3 packages/codemirror-language-client/package.json
  8. +4 −4 packages/codemirror-language-client/playground/src/playground.ts
  9. +2 −0 packages/codemirror-language-client/playground/tsconfig.json
  10. +8 −0 packages/codemirror-language-client/src/CodeMirrorLanguageClient.ts
  11. +111 −0 packages/codemirror-language-client/src/extensions/documentHighlights.spec.ts
  12. +91 −0 packages/codemirror-language-client/src/extensions/documentHighlights.ts
  13. +2 −1 packages/codemirror-language-client/src/extensions/index.ts
  14. +7 −23 packages/codemirror-language-client/src/extensions/lspLinter.ts
  15. +0 −8 packages/codemirror-language-client/src/index.spec.ts
  16. +6 −1 packages/codemirror-language-client/src/test/MockClient.ts
  17. +22 −0 packages/codemirror-language-client/src/utils/simpleStateField.ts
  18. +9 −0 packages/lang-jsonc/CHANGELOG.md
  19. +45 −0 packages/lang-jsonc/README.md
  20. +47 −0 packages/lang-jsonc/package.json
  21. +14 −0 packages/lang-jsonc/src/highlight.ts
  22. +2 −0 packages/lang-jsonc/src/index.ts
  23. +45 −0 packages/lang-jsonc/src/jsonc.grammar
  24. +33 −0 packages/lang-jsonc/src/jsonc.ts
  25. +3 −0 packages/lang-jsonc/src/parser.d.ts
  26. +18 −0 packages/lang-jsonc/tsconfig.json
  27. +9 −0 packages/lang-jsonc/tsconfig.umd.json
  28. +8 −0 packages/liquid-html-parser/CHANGELOG.md
  29. +2 −2 packages/liquid-html-parser/grammar/liquid-html.ohm
  30. +1 −1 packages/liquid-html-parser/package.json
  31. +13 −2 packages/liquid-html-parser/src/errors.ts
  32. +39 −0 packages/liquid-html-parser/src/stage-1-cst.spec.ts
  33. +18 −3 packages/liquid-html-parser/src/stage-2-ast.ts
  34. +11 −1 packages/prettier-plugin-liquid/CHANGELOG.md
  35. +2 −2 packages/prettier-plugin-liquid/package.json
  36. +3 −3 packages/prettier-plugin-liquid/vitest.config.mjs
  37. +28 −0 packages/theme-check-browser/CHANGELOG.md
  38. +2 −2 packages/theme-check-browser/package.json
  39. +29 −1 packages/theme-check-common/CHANGELOG.md
  40. +1 −1 packages/theme-check-common/README.md
  41. +3 −2 packages/theme-check-common/package.json
  42. +2 −2 packages/theme-check-common/src/JSONValidator.ts
  43. +1 −1 packages/theme-check-common/src/checks/app-block-valid-tags/index.ts
  44. +1 −1 packages/theme-check-common/src/checks/asset-preload/index.ts
  45. +23 −1 packages/theme-check-common/src/checks/asset-size-app-block-css/index.spec.ts
  46. +1 −1 packages/theme-check-common/src/checks/asset-size-app-block-css/index.ts
  47. +1 −1 packages/theme-check-common/src/checks/asset-size-app-block-javascript/index.ts
  48. +1 −1 packages/theme-check-common/src/checks/asset-size-css/index.ts
  49. +1 −1 packages/theme-check-common/src/checks/asset-size-javascript/index.ts
  50. +42 −0 packages/theme-check-common/src/checks/capture-on-content-for-block/index.spec.ts
  51. +60 −0 packages/theme-check-common/src/checks/capture-on-content-for-block/index.ts
  52. +1 −1 packages/theme-check-common/src/checks/cdn-preconnect/index.ts
  53. +1 −1 packages/theme-check-common/src/checks/content-for-header-modification/index.ts
  54. +1 −1 packages/theme-check-common/src/checks/deprecate-bgsizes/index.ts
  55. +1 −1 packages/theme-check-common/src/checks/deprecate-lazysizes/index.ts
  56. +1 −1 packages/theme-check-common/src/checks/deprecated-filter/index.ts
  57. +1 −1 packages/theme-check-common/src/checks/deprecated-tag/index.ts
  58. +1 −1 packages/theme-check-common/src/checks/img-width-and-height/index.ts
  59. +10 −2 packages/theme-check-common/src/checks/index.ts
  60. +1 −1 packages/theme-check-common/src/checks/json-syntax-error/index.ts
  61. +1 −1 packages/theme-check-common/src/checks/matching-translations/index.ts
  62. +1 −1 packages/theme-check-common/src/checks/missing-asset/index.ts
  63. +1 −1 packages/theme-check-common/src/checks/missing-template/index.ts
  64. +1 −1 packages/theme-check-common/src/checks/pagination-size/index.ts
  65. +1 −1 packages/theme-check-common/src/checks/parser-blocking-script/index.ts
  66. +1 −1 packages/theme-check-common/src/checks/remote-asset/index.ts
  67. +1 −1 packages/theme-check-common/src/checks/required-layout-theme-object/index.ts
  68. +1 −1 packages/theme-check-common/src/checks/translation-key-exists/index.ts
  69. +1 −1 packages/theme-check-common/src/checks/unclosed-html-element/index.ts
  70. +1 −1 packages/theme-check-common/src/checks/undefined-object/index.ts
  71. +55 −0 packages/theme-check-common/src/checks/unique-static-block-id/index.spec.ts
  72. +63 −0 packages/theme-check-common/src/checks/unique-static-block-id/index.ts
  73. +1 −1 packages/theme-check-common/src/checks/unknown-filter/index.ts
  74. +1 −1 packages/theme-check-common/src/checks/unused-assign/index.ts
  75. +1 −1 packages/theme-check-common/src/checks/valid-html-translation/index.ts
  76. +1 −1 packages/theme-check-common/src/checks/valid-json/index.ts
  77. +2 −11 packages/theme-check-common/src/checks/valid-schema/index.spec.ts
  78. +1 −1 packages/theme-check-common/src/checks/valid-schema/index.ts
  79. +40 −0 packages/theme-check-common/src/checks/valid-static-block-type/index.spec.ts
  80. +64 −0 packages/theme-check-common/src/checks/valid-static-block-type/index.ts
  81. +62 −0 packages/theme-check-common/src/checks/variable-name/index.spec.ts
  82. +113 −0 packages/theme-check-common/src/checks/variable-name/index.ts
  83. +60 −0 packages/theme-check-common/src/json.spec.ts
  84. +20 −1 packages/theme-check-common/src/json.ts
  85. +71 −0 packages/theme-check-common/src/utils/error.spec.ts
  86. +37 −4 packages/theme-check-common/src/utils/error.ts
  87. +7 −0 packages/theme-check-common/src/utils/markup.ts
  88. +28 −0 packages/theme-check-docs-updater/CHANGELOG.md
  89. +2 −2 packages/theme-check-docs-updater/package.json
  90. +41 −1 packages/theme-check-node/CHANGELOG.md
  91. +13 −0 packages/theme-check-node/configs/all.yml
  92. +13 −0 packages/theme-check-node/configs/recommended.yml
  93. +3 −3 packages/theme-check-node/package.json
  94. +39 −0 packages/theme-language-server-browser/CHANGELOG.md
  95. +2 −2 packages/theme-language-server-browser/package.json
  96. +115 −1 packages/theme-language-server-common/CHANGELOG.md
  97. +3 −3 packages/theme-language-server-common/package.json
  98. +4 −0 packages/theme-language-server-common/src/ClientCapabilities.ts
  99. +5 −0 packages/theme-language-server-common/src/completions/params/LiquidCompletionParams.spec.ts
  100. +7 −2 packages/theme-language-server-common/src/completions/params/LiquidCompletionParams.ts
  101. +16 −0 packages/theme-language-server-common/src/completions/providers/LiquidTagsCompletionProvider.spec.ts
  102. +22 −3 packages/theme-language-server-common/src/completions/providers/LiquidTagsCompletionProvider.ts
  103. +46 −0 packages/theme-language-server-common/src/docset/MarkdownRenderer.spec.ts
  104. +20 −3 packages/theme-language-server-common/src/docset/MarkdownRenderer.ts
  105. +10 −0 packages/theme-language-server-common/src/documentHighlights/BaseDocumentHighlightsProvider.ts
  106. +54 −0 packages/theme-language-server-common/src/documentHighlights/DocumentHighlightsProvider.ts
  107. +1 −0 packages/theme-language-server-common/src/documentHighlights/index.ts
  108. +94 −0 ...uage-server-common/src/documentHighlights/providers/HtmlTagNameDocumentHighlightsProvider.spec.ts
  109. +22 −0 ...-language-server-common/src/documentHighlights/providers/HtmlTagNameDocumentHighlightsProvider.ts
  110. +188 −0 ...e-server-common/src/documentHighlights/providers/LiquidBlockTagDocumentHighlightsProvider.spec.ts
  111. +73 −0 ...nguage-server-common/src/documentHighlights/providers/LiquidBlockTagDocumentHighlightsProvider.ts
  112. +2 −0 packages/theme-language-server-common/src/documentHighlights/providers/index.ts
  113. +1 −1 packages/theme-language-server-common/src/documents/DocumentManager.ts
  114. +4 −73 packages/theme-language-server-common/src/formatting/OnTypeFormattingProvider.spec.ts
  115. +17 −101 packages/theme-language-server-common/src/formatting/OnTypeFormattingProvider.ts
  116. +89 −0 ...nguage-server-common/src/formatting/providers/BracketsAutoclosingOnTypeFormattingProvider.spec.ts
  117. +114 −0 ...me-language-server-common/src/formatting/providers/BracketsAutoclosingOnTypeFormattingProvider.ts
  118. +179 −0 ...age-server-common/src/formatting/providers/HtmlElementAutoclosingOnTypeFormattingProvider.spec.ts
  119. +128 −0 ...language-server-common/src/formatting/providers/HtmlElementAutoclosingOnTypeFormattingProvider.ts
  120. +12 −0 packages/theme-language-server-common/src/formatting/types.ts
  121. +1 −1 packages/theme-language-server-common/src/index.ts
  122. +10 −0 packages/theme-language-server-common/src/linkedEditingRanges/BaseLinkedEditingRangesProvider.ts
  123. +40 −0 packages/theme-language-server-common/src/linkedEditingRanges/LinkedEditingRangesProvider.ts
  124. +1 −0 packages/theme-language-server-common/src/linkedEditingRanges/index.ts
  125. +74 −0 ...language-server-common/src/linkedEditingRanges/providers/EmptyHtmlTagLinkedRangesProvider.spec.ts
  126. +47 −0 ...heme-language-server-common/src/linkedEditingRanges/providers/EmptyHtmlTagLinkedRangesProvider.ts
  127. +102 −0 ...-language-server-common/src/linkedEditingRanges/providers/HtmlTagNameLinkedRangesProvider.spec.ts
  128. +28 −0 ...theme-language-server-common/src/linkedEditingRanges/providers/HtmlTagNameLinkedRangesProvider.ts
  129. +2 −0 packages/theme-language-server-common/src/linkedEditingRanges/providers/index.ts
  130. +3 −0 packages/theme-language-server-common/src/linkedEditingRanges/wordPattern.ts
  131. +21 −0 packages/theme-language-server-common/src/rename/BaseRenameProvider.ts
  132. +74 −0 packages/theme-language-server-common/src/rename/RenameProvider.ts
  133. +78 −0 packages/theme-language-server-common/src/rename/providers/HtmlTagNameRenameProvider.spec.ts
  134. +60 −0 packages/theme-language-server-common/src/rename/providers/HtmlTagNameRenameProvider.ts
  135. +47 −4 packages/theme-language-server-common/src/server/startServer.ts
  136. +61 −0 packages/theme-language-server-common/src/utils/htmlTagNames.ts
  137. +2 −0 packages/theme-language-server-common/src/utils/index.ts
  138. +3 −0 packages/theme-language-server-common/src/utils/isCovered.ts
  139. +13 −1 packages/theme-language-server-common/src/visitor.ts
  140. +50 −1 packages/theme-language-server-node/CHANGELOG.md
  141. +4 −4 packages/theme-language-server-node/package.json
  142. +119 −0 packages/vscode-extension/CHANGELOG.md
  143. +1 −1 packages/vscode-extension/README.md
  144. +3 −0 packages/vscode-extension/allowCommentsSchema.json
  145. +27 −5 packages/vscode-extension/package.json
  146. +19 −2 packages/vscode-extension/scripts/on-enter-actions.ts
  147. +1 −0 packages/vscode-extension/src/extension.ts
  148. +6 −5 vitest.config.mjs
  149. +176 −282 yarn.lock
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -19,3 +19,4 @@ yarn-error.log
package-lock.json
.npmrc
packages/theme-check-docs-updater/data
packages/lang-jsonc/src/parser.*
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ This monorepo is home of all things dev tools for Shopify themes:
- [`@shopify/codemirror-language-client`](./packages/codemirror-language-client) — A CodeMirror Language Client (batteries not included).
- [`theme-check-vscode`](./packages/vscode-extension) — The VS Code extension that uses it all.

These tools are also integrated in the [Online Store Code Editor](https://shopify.dev/docs/themes/tools/code-editor) and the [Shopify CLI](https://shopify.dev/docs/themes/tools/cli).
These tools are also integrated in the [Online Store Code Editor](https://shopify.dev/docs/storefronts/themes/tools/code-editor) and the [Shopify CLI](https://shopify.dev/docs/api/shopify-cli/theme).

They can be used individually or collectively, catering to varied use cases and offering flexibility in their application.

110 changes: 109 additions & 1 deletion ThirdPartyNotices.txt
Original file line number Diff line number Diff line change
@@ -2,7 +2,11 @@ THIRD-PARTY SOFTWARE NOTICES AND INFORMATION

The theme-language-server project incorporates third party material from the projects listed below. The original copyright notice and the license under which Shopify received such third party material are set forth below. Shopify reserves all other rights not expressly granted, whether by implication, estoppel or otherwise.

1. vscode-languageserver-node (https://github.com/microsoft/vscode-languageserver-node)
1. vscode-languageserver-node (https://github.com/microsoft/vscode-languageserver-node)
2. @yetoapp/jsonc (https://github.com/yettoapp/lezer-jsonc)
3. @lezer/json (https://github.com/lezer-parser/json)
4. @codemirror/lang-json (https://github.com/codemirror/lang-json)
5. monaco-editor (https://github.com/microsoft/monaco-editor)

%% vscode-languageserver-node NOTICES, INFORMATION, AND LICENSE BEGIN HERE
=========================================
@@ -25,3 +29,107 @@ BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CON
OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
=========================================
END OF vscode-languageserver-node NOTICES, INFORMATION, AND LICENSE

%% yetoapp/lezer-jsonc NOTICES, INFORMATION, AND LICENSE BEGIN HERE
=========================================
MIT License

Copyright (c) 2023 Lox Populi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
=========================================
END OF yetoapp/lezer-jsonc NOTICES, INFORMATION, AND LICENSE

%% @lezer/json NOTICES, INFORMATION, AND LICENSE BEGIN HERE
=========================================
MIT License

Copyright (C) 2020 by Marijn Haverbeke <marijn@haverbeke.berlin>, Arun Srinivasan <rulfzid@gmail.com>, and others

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
=========================================
END OF @lezer/json NOTICES, INFORMATION, AND LICENSE

%% @codemirror/lang-json NOTICES, INFORMATION, AND LICENSE BEGIN HERE
=========================================
MIT License

Copyright (C) 2018-2021 by Marijn Haverbeke <marijn@haverbeke.berlin> and others

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
=========================================
END OF @codemirror/lang-json NOTICES, INFORMATION, AND LICENSE

%% monaco-editor NOTICES, INFORMATION, AND LICENSE BEGIN HERE
=========================================
The MIT License (MIT)

Copyright (c) 2016 - present Microsoft Corporation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
=========================================
END OF monaco-editor NOTICES, INFORMATION, AND LICENSE
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@
"license": "MIT",
"private": true,
"workspaces": [
"packages/lang-*",
"packages/codemirror-language-client",
"packages/liquid-html-parser",
"packages/prettier-plugin-liquid",
@@ -45,7 +46,7 @@
"ts-node": "^10.9.1",
"tsconfig-paths-webpack-plugin": "^4.1.0",
"typescript": "^4.9.3",
"vitest": "^1.5.0",
"vitest": "^2.1.1",
"vscode-languageserver-protocol": "^3.17.3",
"vscode-languageserver-textdocument": "^1.0.8",
"webpack": "^5.76.0",
8 changes: 7 additions & 1 deletion packages/codemirror-language-client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# @shopify/codemirror-language-client

## 0.6.0

### Minor Changes

- 42c76d9: Add support for LSP Document Highlight requests

## 0.5.1

### Patch Changes

- 8e3c7e2: Breaking: add `getDefaultSchema{Locale,Translations}(Factory)?` dependencies

To be used to power `MatchingTranslations` for [Schema translations](https://shopify.dev/docs/themes/architecture/locales/schema-locale-files).
To be used to power `MatchingTranslations` for [Schema translations](https://shopify.dev/docs/storefronts/themes/architecture/locales/schema-locale-files).

To be used to power Schema translations code completion and hover in section and theme block `{% schema %}` JSON blobs.

5 changes: 3 additions & 2 deletions packages/codemirror-language-client/README.md
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
# CodeMirror Language Client

[CodeMirror](https://codemirror.net/) is the open source library that powers the [Online Store Code Editor](https://shopify.dev/docs/themes/tools/code-editor).
[CodeMirror](https://codemirror.net/) is the open source library that powers the [Online Store Code Editor](https://shopify.dev/docs/storefronts/themes/tools/code-editor).

The [Language Server Protocol](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/) empowers developers to write one language server that can run in all language clients. Write a client, and you gain access to all servers; write one server, and all clients can use it.

@@ -13,6 +13,7 @@ This repo serves as a CodeMirror Language Client. Feed it a Language Server and
- [x] Diagnostics (aka Linting)
- [x] Completions
- [x] Hover
- [x] Document Highlights
- [ ] Document Links
- [ ] Workspace Edits (aka Refactorings, Quickfix, etc.)

@@ -84,7 +85,7 @@ main();

- [`vscode-languageserver-types`](https://github.com/microsoft/vscode-languageserver-node/tree/main/types)

This library is useful to get the types of specific parts of the Protocol.
This library is useful to get the types of specific parts of the Protocol.

Examples: `Diagnostic`, `URI`, `TextDocument`, `Position`, `Range`, `LocationLink`, etc.

7 changes: 4 additions & 3 deletions packages/codemirror-language-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shopify/codemirror-language-client",
"version": "0.5.1",
"version": "0.6.0",
"description": "A Language Client for CodeMirror",
"author": "CP Clermont <cp.clermont@shopify.com>",
"homepage": "https://github.com/Shopify/theme-tools/tree/main/packages/codemirror-language-client#readme",
@@ -51,8 +51,9 @@
"@codemirror/theme-one-dark": "^6.1.2",
"@codemirror/view": "^6.9.2",
"@replit/codemirror-vim": "^6.2.1",
"@shopify/theme-check-docs-updater": "^2.3.0",
"@shopify/theme-language-server-browser": "^1.9.0",
"@shopify/theme-check-docs-updater": "^2.9.1",
"@shopify/theme-language-server-browser": "^1.13.0",
"@shopify/lang-jsonc": "^1.0.0",
"@types/markdown-it": "^13.0.4",
"codemirror": "^6.0.1",
"markdown-it": "^13.0.2"
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { basicSetup } from 'codemirror';
import { EditorView, keymap } from '@codemirror/view';
import { Compartment, EditorState } from '@codemirror/state';
import { json } from '@codemirror/lang-json';
import { jsonc } from '@shopify/lang-jsonc';
import { vim } from '@replit/codemirror-vim';
import MarkdownIt from 'markdown-it';
// import { oneDark } from '@codemirror/theme-one-dark';
@@ -15,6 +15,7 @@ import { MarkedString, MarkupContent } from 'vscode-languageserver-protocol';
const md = new MarkdownIt();

const exampleTemplate = `{% # sections/title.liquid %}
{% # mod-alt-v for vim mode %}
<section>
<h2>{{ section.settings.title }}</h2>
{% echo 'hi' | upcase %}
@@ -163,8 +164,7 @@ async function main() {
extensions: [
vimConfig,
basicSetup,
json(),
// liquidHighLightStyle,
jsonc(),
// oneDark,
client.extension('browser:/locales/en.default.json'),
],
@@ -192,7 +192,7 @@ async function main() {
extensions: [
vimConfig,
basicSetup,
json(),
jsonc(),
// liquidHighLightStyle,
// oneDark,
client.extension('browser:/locales/en.default.schema.json'),
2 changes: 2 additions & 0 deletions packages/codemirror-language-client/playground/tsconfig.json
Original file line number Diff line number Diff line change
@@ -13,11 +13,13 @@
"resolveJsonModule": true,
"paths": {
"@shopify/codemirror-language-client": ["../src"],
"@shopify/lang-jsonc": ["../../lang-jsonc/src"],
"@shopify/theme-language-server-browser": ["../../theme-language-server-browser/src"]
}
},
"references": [
{ "path": ".." },
{ "path": "../../lang-jsonc" },
{ "path": "../../theme-language-server-browser" }
]
}
Original file line number Diff line number Diff line change
@@ -14,6 +14,7 @@ import {
fileUriFacet,
infoRendererFacet,
lspComplete,
lspDocumentHighlights,
lspHover,
lspLinter,
serverCapabilitiesFacet,
@@ -29,6 +30,9 @@ import { hoverRendererFacet } from './extensions/hover';
*/
const clientCapabilities: ClientCapabilities = {
textDocument: {
documentHighlight: {
dynamicRegistration: false,
},
completion: {
// We send the completion context to the server
contextSupport: true,
@@ -106,6 +110,7 @@ export class CodeMirrorLanguageClient {
private readonly linterExtension: Extension;
private readonly hoverRenderer: HoverRenderer | undefined;
private readonly hoverExtension: Extension;
private readonly documentHighlightsExtension: Extension;

constructor(
private readonly worker: Worker,
@@ -132,6 +137,8 @@ export class CodeMirrorLanguageClient {

this.hoverRenderer = hoverRenderer;
this.hoverExtension = lspHover(hoverOptions);

this.documentHighlightsExtension = lspDocumentHighlights();
}

public async start() {
@@ -162,6 +169,7 @@ export class CodeMirrorLanguageClient {
infoRendererFacet.of(this.infoRenderer),
diagnosticRendererFacet.of(this.diagnosticRenderer),
hoverRendererFacet.of(this.hoverRenderer),
this.documentHighlightsExtension,
]
.concat(shouldLint ? this.linterExtension : [])
.concat(shouldComplete ? this.autocompleteExtension : [])
Loading