From e752d63a118327d0fea38836ad532bfadfbd12b0 Mon Sep 17 00:00:00 2001 From: Nikolas Savvidis Date: Fri, 17 Feb 2023 01:27:44 +0100 Subject: [PATCH] expose version release notes --- .gitignore | 1 - releases/readme.md | 27 ++++ releases/v3/3.0.0.md | 337 +++++++++++++++++++++++++++++++++++++++ releases/v3/3.0.1.md | 15 ++ releases/v3/3.0.2.md | 3 + releases/v3/3.1.0.md | 53 +++++++ releases/v3/3.2.0.md | 98 ++++++++++++ releases/v3/3.2.1.md | 8 + releases/v3/3.2.2.md | 11 ++ releases/v4/4.0.0.md | 371 +++++++++++++++++++++++++++++++++++++++++++ 10 files changed, 923 insertions(+), 1 deletion(-) create mode 100644 releases/readme.md create mode 100644 releases/v3/3.0.0.md create mode 100644 releases/v3/3.0.1.md create mode 100644 releases/v3/3.0.2.md create mode 100644 releases/v3/3.1.0.md create mode 100644 releases/v3/3.2.0.md create mode 100644 releases/v3/3.2.1.md create mode 100644 releases/v3/3.2.2.md create mode 100644 releases/v4/4.0.0.md diff --git a/.gitignore b/.gitignore index c7996e73..9c6d7093 100755 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,6 @@ node_modules yarn.lock test/components/*.html versions -releases docs dist example diff --git a/releases/readme.md b/releases/readme.md new file mode 100644 index 00000000..3ade4027 --- /dev/null +++ b/releases/readme.md @@ -0,0 +1,27 @@ +# Releases + +This directory contains release notes and changelogs pertaining to each version of the extension. Versioning for this extension is not quite semantic but does borrow from the semantic foundations. Whenever a considerable amount of changes which require refactors by the end user result in a **major** version update. + +The extension is currently in the version **4.x.x** range. + +## v4.0.0 ~ Latest + +The extension is currently shipping on version 4. + +- [4.0.0](#) + +## v3.0.0 ~ v3.2.2 + +Releases in version 3.0.0 ~ 3.2.0 shipped with breaking changes and had significant features made available throughout it's lifespan. These versions span several months in circulation, starting from September 28, 2022 and ending February 18th, 2023. Users who are still operating in version 3 should update as soon as possible as released in this version range are now considered broken and and unsafe for usage. + +- [3.2.2](#) +- [3.2.1](#) +- [3.2.0](#) +- [3.1.0](#) +- [3.0.2](#) +- [3.0.1](#) +- [3.0.0](#) + +## v1.0.0 ~ v2.3.0 + +Releases prior to **v3.0.0** can be found in the [v2.3.0 Changelog](https://github.com/panoply/vscode-liquid/blob/v2.3.0/CHANGELOG.md) branch. If you are still operating on versions in this range it is highly recommended that you update to the latest version releases. diff --git a/releases/v3/3.0.0.md b/releases/v3/3.0.0.md new file mode 100644 index 00000000..668e414e --- /dev/null +++ b/releases/v3/3.0.0.md @@ -0,0 +1,337 @@ +

v3.0.0^ ~ vscode-liquid

+ +This is a well overdue update. While most issues were planned to be addressed in Liquify, it was apparent that **v2.3.0** was in dire need of an update. This version aims to fix the outstanding issues (most of which) pertained to formatting and have persisted for too long. + +_After you have addressed the breaking changes, take a look at the [readme](https://github.com/panoply/vscode-liquid) in the project._ + +## BREAKING CHANGES + +This version ships **breaking changes** and users will need to update and align in order to continue using the extension. The changes require you to replace workspace/user settings and/or configuration defined in the `.liquidrc` file (if you are using a `.liquidrc` file). Upgrading to the new version for the vast majority of users is a matter of copy and paste. + +#### CHANGES YOU NEED TO MAKE: + +- [The new `.liquidrc` file configuration](#the-new-liquidrc-file-configuration) +- [The new Workspace/User Settings](#the-new-workspaceuser-settings) + +#### CHANGES TO BE AWARE OF: + +- [The `ignore` tags option is no longer supported](#the-ignore-tags-option-is-no-longer-supported) +- [The`associate` tags option is no longer supported](#theassociate-tags-option-is-no-longer-supported) +- [Removed Liquid syntax highlighting in TS, JSX and TSX](#removed-liquid-syntax-highlighting-in-ts-jsx-and-tsx) +- [Liquid in JS, CSS and SCSS files now require `.liquid` suffixed filenames](#liquid-in-js-css-and-scss-files-now-require-liquid-suffixed-filenames) +- [The formatting key-binding was removed](#the-formatting-key-binding-was-removed-75) + +## The new `.liquidrc` file configuration + +As of version **3.0.0** the old schema used in `.liquidrc` files is **no longer supported**. If you are using a `.liquidrc` file you will **need** to update the file and align it with the new formatting rules. + +Below is the **new** defaults for the `.liquidrc` file: + +```json +{ + "ignore": [], + "crlf": false, + "commentIndent": true, + "endNewline": false, + "indentChar": " ", + "indentSize": 2, + "preserveComment": false, + "preserveLine": 2, + "wrap": 0, + "markup": { + "correct": false, + "commentNewline": false, + "attributeCasing": "preserve", + "attributeValues": "preserve", + "attributeSort": false, + "attributeSortList": [], + "forceAttribute": false, + "forceLeadAttribute": false, + "forceIndent": false, + "preserveText": false, + "preserveAttributes": false, + "selfCloseSpace": false, + "quoteConvert": "none" + }, + "style": { + "correct": false, + "classPadding": false, + "noLeadZero": false, + "sortSelectors": false, + "sortProperties": false + }, + "script": { + "correct": false, + "braceNewline": false, + "bracePadding": false, + "braceStyle": "none", + "braceAllman": false, + "caseSpace": false, + "inlineReturn": true, + "elseNewline": false, + "endComma": "never", + "arrayFormat": "default", + "objectIndent": "default", + "functionNameSpace": false, + "functionSpace": false, + "styleGuide": "none", + "ternaryLine": false, + "methodChain": 4, + "neverFlatten": false, + "noCaseIndent": false, + "noSemicolon": false, + "quoteConvert": "none" + }, + "json": { + "arrayFormat": "default", + "braceAllman": false, + "bracePadding": false, + "objectIndent": "default" + } +} +``` + +## The new workspace/user settings + +The **v2.3.0** workspace/user settings **will not work** and users need to align configuration to the new **v3.0.0** settings. The `liquid.rules` option is completely deprecated and the `liquid.format` option no longer accepts a _boolean_ type. + +The **v3.0.0** settings are as follows: + +```jsonc +{ + // Deprecated v2.3.0 Settings + // "liquid.format": true, + // "liquid.rules": {}, + + // New v3.0.0 Settings + // + "liquid.engine": "shopify", + "liquid.config.baseUrl": ".", + "liquid.settings.target": "workspace", + "liquid.completion.tags": true, + "liquid.completion.objects": true, + "liquid.completion.filters": true, + "liquid.format.enable": true, // instead of "liquid.format": true, + "liquid.format.ignore": [], + "liquid.format.wrap": 0, + "liquid.format.indentSize": 2, + "liquid.format.endNewLine": false, + "liquid.format.commentIndent": false, + "liquid.format.preserveLine": 3, + "liquid.format.preserveComment": false, + "liquid.format.crlf": false, + "liquid.format.markup": {}, + "liquid.format.script": {}, + "liquid.format.style": {}, + "liquid.format.json": {}, + } +} +``` + +## The `ignore` tags option is no longer supported + +In version **2.3.0** the extension provided an `ignore[]` option which could be used to define a set of either Liquid or HTML tags to have excluded (ignored) from formatting. In version **3.0.0** the `ignore[]` option is not used to ignore tags from formatting but instead the option is used to ignore files and directories. + +A string list of relative _glob_ patterns is the new expected type: + + + + + + + + + + +
.liquidrc rule file +workspace/user settings +
+ +```jsonc +{ + // New v3.0.0 + // + // Option is used to ignore files/directories + // + "ignore": ["./dir/file-to-ignore.liquid", "./example/*"] + + // Deprecated v2.3.0 + // + // "ignore": [ + // { + // "type": "liquid", + // "begin": "comment", + // "end": "endcomment" + // } + // ] +} +``` + + + +```jsonc +{ + // New v3.0.0 + // + // Option is used to ignore files/directories + // + "liquid.format.ignore": ["./dir/file-to-ignore.liquid", "./example/*"] + + // Deprecated v2.3.0 + // + // "liquid.rules.ignore": [ + // { + // "type": "liquid", + // "begin": "comment", + // "end": "endcomment" + // } + // ] +} +``` + +
+ +> **Note** +> When you wish to exclude/ignore tags from beautification you can do this using [Prettify Inline Control](https://github.com/panoply/prettify#inline-control) comments. + +### Removed Liquid in HTML grammar injections + +This release has removed grammar injections from HTML. This means that users no longer use HTML as the language identifier for Liquid files. HTML intellisense features like hovers and completions are preserved. After upgrading to v3.0.0 all `.liquid` extension files will be associated to the **Liquid** language identifier. + +> **Note** +> Users leveraging the Shopify Liquid extension may need to make a decision on whether to continue using that alongside this extension. + +### The`associate` tags option is no longer supported + +The associated formatting option is deprecated and no longer supported. The new formatting capabilities provided by [Prettify](https://github.com/panoply/prettify) negate the need for such a feature and users who relied on this capability will need to wait until documentation is written for the _grammars_ option provided by Prettify. + +### Removed Liquid syntax highlighting in TS, JSX and TSX + +Liquid syntax highlighting within `.ts`, `.jsx` and `.tsx` files is no longer supported. This capability was experimental at the time it was appropriated. This feature also caused problems for many users who were not working exclusively with Liquid projects so it is both an appropriate and sensible decision to remove. + +### Liquid in JS, CSS and SCSS files now require `.liquid` suffixed filenames + +Syntax highlighting Liquid in JavaScript, CSS and SCSS now requires filenames to be suffixed with a `.liquid` extension in order for highlighting to be enabled. In version **2.3.0** syntax highlighting for Liquid in these languages was applied using injection grammars but it was not an ideal approach. Users who depend upon this feature will need to suffix the file names to apply highlighting. + +- `.css` → `.css.liquid` +- `.scss` → `.scss.liquid` +- `.js` → `.js.liquid` + +This change also impacts intellisense capabilities. In **2.3.0** intellisense capabilities were preserved in these languages along side Liquid but in this version **3.0.0** intellisense is not supported. + +> **Note** +> In Liquify intellisense will work as expected but in this version and future versions until Liquify supersedes. + +### The formatting key-binding was removed #75 + +The key-binding used in **v2.3.0** would overwrite the default key bindings of vscode and was very problematic. Invoking beautification using a key-binding now adhere to the default vscode formatting key map: + +

⇧ ⌥ F

+ +`shift + alt + F` + +_This requires the `editor.defaultFormatter` be set `sissel.shopify-liquid` on a per-language basis. See the [readme](https://github.com/panoply/vscode-liquid#setting-default-formatter) section on setting a default formatter._ + +# Completions + +This version also ships a pre-release (Liquify) feature. Completions for Liquid Standard and Liquid Shopify are available and you can enable/disable these features using the following workspace/user settings: + +```jsonc +{ + "liquid.completions.tags": true, + "liquid.completions.filters": true, + "liquid.completions.objects": true +} +``` + +## Tag Completions + +https://user-images.githubusercontent.com/7041324/192540349-f2895f12-b7e4-43df-bd8f-32ddded2302c.mov + +## Object Completions + +https://user-images.githubusercontent.com/7041324/192760204-b0775e58-8d7a-4f31-99c4-248b8ab704f0.mov + +## Filter Completions + +https://user-images.githubusercontent.com/7041324/192541665-669e652e-4864-41ef-8bd2-45f18aed01d7.mov + +## JSON Template Completions + +In Shopify themes, JSON templates and settings_schema files provide intellisense capabilities such as code completions, validations and hover descriptions. + +https://user-images.githubusercontent.com/7041324/192542979-af281b10-e7d3-4731-a43e-ddf201bfcbd0.mov + +## Additional new Features + +This release also ships several new features that aim to provide a more integrated experience when working with Liquid in vscode. These new capabilities are optional and mainly geared towards Shopify Theme developers. + +### Intellisense Supported Configuration + +_The `.liquidrc` and configuration provided to user/workspace settings in vscode supports intellisense features. Completions, validations and descriptions which describe each option._ + +### Ignore Files/Directories + +_You can now exclude files/directories from beautification. The `ignore` rule accepts a \_glob_ match pattern relative to your working root directory of paths that should be excluded from formatting.\_ + +### Extended Syntax Support + +_This version also brings support for Liquid contained in JSON and YAML files. JSON support is applied using grammar injection so intellisense capabilities are preserved. YAML support is made available through file extension suffix (eg: `.yaml.liquid`)._ + +### Improved status bar item + +_You will notice in this release that the status bar item no longer uses the "Liquid" label and instead the 💧 emoji is the primary point of reference._ + +### More informative Output logs + +_Output logs now include formatting stats and other various informative information about operations taking place by the extension. This will help users better understand what is happening behind the scenes._ + +### Snippets character choices + +_Snippets now employ a more refined approach when it comes to applying whitespace dashes `-` - In previous versions 2 identical snippets would be made available (one for whitespace and one without) but now you can determine this in the tab assertion, so a single snippet entry (much cleaner). Liquid filter snippets similar dashes will infer pipe characters using choice completions._ + +### Informative Output Logs + +_The output log prints informative information about actions that have taken place_ + +Screenshot 2022-09-28 at 12 48 57 + +# Fixes + +Below is the list of issues that have been resolved in this update. Thanks to all developers who submitted issues and I apologize it took this long to apply an update. + +| Issue | Title | Submitted | +| ----- | ----------------------------------------------------------------------- | ------------------------ | +| #33 | **Formatting issues** | @davidpanzarella | +| #35 | **Comments** | @entozoon | +| #37 | **Markdown horizontal rule gets highlighted as if it were frontmatter** | @paulozoom | +| #38 | **Inline JSON gets messed up** | @lmartins | +| #39 | **Comments with Quotes Cause Strange HTML Injection** | @entozoon | +| #49 | **Respect editor settings or allow using tabs** | @passcod | +| #50 | **Formatting splits td tags** | @MiBuena | +| #52 | **Extension should only affect liquid tags** | @aes421 | +| #57 | **front matter in scss** | @irik77587 | +| #60 | **Snippet for checkbox setting has invalid default value** | @larsschellhas | +| #62 | **Highlighting does not work** | @jarkin13 | +| #64 | **Formatter changes single quotation to double quotation** | @renestalder | +| #71 | **Closing braces of a liquid object** | @endepointe | +| #73 | **Formatter isn't handling style well** | @james0r | +| #75 | **Format key binding conflicts with default key binding on Mac** | @ktnyt | +| #79 | **Formatting breaks json-ld script blocks** | @DPangerl | +| #83 | **assign variables breaks into new lines** | @mau2099 | +| #84 | **Syntax highlighting in yaml files** | @benjaminbosko | +| #86 | **Weird schema formatting** | @Weird schema formatting | +| #89 | **Force-attribute for 2+ attributes for HTML in .liquidrc** | @james0r | +| #96 | **vscode liquid format on save adds new tabs** | @itszoose | + +# What about Liquify? + +Liquify is still in development and in last few days I have had some communication with Shopify relating to the project. As per _Liquify and the future of this extension_ (#56) the project has been a very big undertaking and (currently) the codebase consists of nearly 100k lines spanning across 15 different modules. + +Writing parsers and building out lexers is both a challenging and time consuming task and with each advancement you tend to introduce more possibilities and thus more time and deliberation. + +In the last few months I got around to shipping a pre-release of [Prettify](https://github.com/panoply/prettify). Prettify is the beautification tool that Liquify will run atop of and it is now used in this version of the extension (so please report defects or issues!). Prettify alone took the better part of 6 months to refine and overhaul as it was adapted from the late Sparser and PrettyDiff projects that were being used in this extension up until **v2.3.0**. Liquify is still very much alive but albeit a tad cryogenic. + +Join the [Liquify Discord](https://discord.gg/eUNEsxMuWt) + +@panoply diff --git a/releases/v3/3.0.1.md b/releases/v3/3.0.1.md new file mode 100644 index 00000000..36abb291 --- /dev/null +++ b/releases/v3/3.0.1.md @@ -0,0 +1,15 @@ +# v3.0.1 ~ vscode-liquid + +This is a patch release version. As per #100 the defaults applied that automatically set `editor.formatOnSave` to Liquid CSS, Liquid SCSS and Liquid JavaScript are now opt-in. This prevents the extension form running unexpectedly on folks workspaces which have upgraded but not read documentation of release notes. + +## Notes + +### Frontmatter + +The initial release did not support frontmatter during beautification. Prettify does not yet support frontmatter beautification so triple dashed delimiter regions are ignored by default until support is made possible. + +### Fixed JSON inherited Rules + +JSON rules were not being applied correctly, this patch also fixes that. + +@panoply diff --git a/releases/v3/3.0.2.md b/releases/v3/3.0.2.md new file mode 100644 index 00000000..be7805e2 --- /dev/null +++ b/releases/v3/3.0.2.md @@ -0,0 +1,3 @@ +# v3.0.2 ~ vscode-liquid + +This is a patch release version. As per [#102](https://github.com/panoply/vscode-liquid/issues/102) which fixes and shortcut command `cmd + /` to create a liquid comments. diff --git a/releases/v3/3.1.0.md b/releases/v3/3.1.0.md new file mode 100644 index 00000000..1652eb51 --- /dev/null +++ b/releases/v3/3.1.0.md @@ -0,0 +1,53 @@ +# v3.1.1 ~ vscode-liquid + +This release irons out a lots bugs in the initial [v3.0.0](https://github.com/panoply/vscode-liquid/releases/edit/v3.0.0) release and includes some addition features. + +### Fixed various formatting defects + +Various defects were fixed that were apparent in **v3.0.0** - Things should be a lot less aggressive now. There is still a lot more work to be done on this front but things are getting more stable. The goal before next **minor** is to iron out and refine configuration IntelliSense. This is a lot of work, so stay tuned. + +### Improved Syntax Highlighting + +The Liquid grammars have been improved and refined. As per #105 the new syntax highlighting supports **type** scopes and will apply coloring to objects and object properties which reflect the referenced type, for example: + +syntax-scopes + +Big thanks to @muchisx who spent a considerable amount of time to report of inform on the various scopes and issues. Great stuff. + +### Added 14 more completions + +This release includes some additional Shopify object completions. Completions is a new capability to this extension and is something that will be refined as it reaches closer to the official Liquify supersede. I will soon open source the [Liquid Language Specification](https://www.npmjs.com/package/@liquify/liquid-language-specs) package which is responsible from making the completions possible and will be hoping keen contributors will assist in ensuring the Shopify specs include the most recent API for Liquid. + +- selling_plan_allocation +- selling_plan_allocation_price_adjustment +- selling_plan_checkout_charge +- selling_plan_group +- selling_plan_group_option +- selling_plan_option +- selling_plan_price_adjustment +- settings +- sort_option +- tablerowloop +- transaction_payment_details +- unit_price_measurement +- video +- video_source + +### Fixes + +Below is the list of issues that have been resolved in this update. Thanks to all developers who submitted issues and I apologize it took this long to apply an update. + +| Issue | Title | Submitted | +| ----- | ------------------------------------------------------------------------ | ---------------- | +| #102 | **Comments only being added with opening tags** | @davidwarrington | +| #105 | **3.0 update syntax highlighting not as good as before** | @muchisx | +| #111 | **Adding an extra "}" on format** | @jamiegalbreath | +| #113 | **forloop.index0** | @davidwarrington | +| #115 | **Liquid formatting issues** | @t3pfaffe | +| #117 | **Emmet shortcuts not working in HTML** | @davidwarrington | +| #118 | **Schema Snippets not working** | @jzelaya-manduka | +| #119 | **Incorrect comment blocks in Liquid files with this extension enabled** | @t3pfaffe | + +Join the [Liquify Discord](https://discord.gg/eUNEsxMuWt) + +@panoply diff --git a/releases/v3/3.2.0.md b/releases/v3/3.2.0.md new file mode 100644 index 00000000..024c7b0b --- /dev/null +++ b/releases/v3/3.2.0.md @@ -0,0 +1,98 @@ +# v3.2.0 ~ vscode-liquid + +Welcome to version **3.2.0** of the vscode liquid extension. This release ships various patches and brings supports for multiple development essentials, specifically those working with the Shopify Liquid variation (ie: Shopify Themes). Bug fixes and several [Prettify](https://github.com/panoply/prettify) improvements. + +# Completions + +In 3.1.x completions were made available but in order to keep daily users from overwhelm, they were only being be made available on certain trigger characters. As of 3.2.0, completions are now made available at various points with persisted item listings that adheres to the general structure of Liquid tokens + +### Completion Triggers + +As 3.2.0 object, tag and filter completions are now invoked both on existing triggers but also in accordance to cursor positions and surrounding characters and words. This means you'll have all Shopify objects at your fingertips at the appropriate places. + +
+ +  Video Example + + +https://user-images.githubusercontent.com/7041324/203686641-30bbc04a-65c2-4a2e-9306-9e5d98a356e6.mov + +
+ +### Operator Completions + +Liquid logical operator completions are now supported. Though frivolous in the grand scale of things, the feature is part of the Liquify supersede and has been made available as the Liquify release approaches. Operators help speed up the development process for you. + +
+ +  Video Example + + +https://user-images.githubusercontent.com/7041324/203685381-ca4d7dbf-40fb-4896-b3d3-ea280b285c3b.mov + +
+ +### Schema Completions + +Shopify theme developers now have completions provided in accordance with data contained within section file `{% schema %}` JSON tags. This new capability will use the `info` defined values as _descriptions_ and respects `block.type` scopes with support for both control flow tags. + +
+ +  Video Example + + +https://user-images.githubusercontent.com/7041324/203685872-17cd2b99-2b31-4d73-8900-243e3a50eb60.mov + +
+ +
+ +  Code Example + + +```liquid +{% for block in section.blocks %} + + {% if block.type == 'some_block_type' %} + + {% # only completions for the block type "some_block_type'" will be made available %} + + {{ block.settings. }} + + {% elsif block.type == 'another_block_type' %} + + {% # only completions for the block type "another_block_type'" will be made available %} + + {{ block.settings. }} + + {% endif %} + +{% endfor %} +``` + +
+ +# Schema IntelliSense + +This version supports schema tag intelliSense capabilities. This is achieved on the client until the Liquify supersede and handling moves to the server using LSP. The feature drastically improves productivity for developers working with the Shopify Liquid variation. Schema IntelliSense will transform the way developers write `{% schema %}` sections. + +# Formatting + +Version 3.2.0 ships a considerable amount of improvements for [Prettify](https://github.com/panoply/prettify) and exposes some additional beautification rules for more refined output. In previous versions of the extension, Prettify had some edge cases situations that needed ironing. Since the release of v3 and thanks to users taking time to report the defects, Prettify and beautification capabilities have improved, making it more stable and customizable. Prettify now provides 6 (new) additional formatting rules. + +### New Markup Rules + +These rules allow you to take control of your Liquid + Markup code styles. + +- `delimiterTrims` +- `lineBreakSeparator` +- `normalizeSpacing` +- `valueForce` +- `ignoreScripts` +- `ignoreStyles` + +### Removed Rules + +The following rule was remove as `normalizeSpacing` now handles this capability. + +- `delimiterSpacing` diff --git a/releases/v3/3.2.1.md b/releases/v3/3.2.1.md new file mode 100644 index 00000000..b1e223a9 --- /dev/null +++ b/releases/v3/3.2.1.md @@ -0,0 +1,8 @@ +# v3.2.1 ~ vscode-liquid + +Couple of minor patches following **3.2.0** release. + +### Patches + +- Patched issue pertaining to Prettify beautification in CSS +- Disabled `normalizedSpacing` from occurring on `{%- liquid -%}` tokens. diff --git a/releases/v3/3.2.2.md b/releases/v3/3.2.2.md new file mode 100644 index 00000000..16d23d10 --- /dev/null +++ b/releases/v3/3.2.2.md @@ -0,0 +1,11 @@ +# v3.2.2 ~ vscode-liquid + +Some additional refinements following **3.2.0** minor version release and the subsequent patch **3.2.1**. This version fixes #135. + +### Changes + +Despite being a patch version release, it is important to note that Tag snippets no longer provide trim conditionals, you should instead rely on the formatting rule `delimiterTrims` for controlling this aspect. Some additional tags snippets were provided as an added bonus. + +### Improvements + +Schema tag blocks now support for locale based [IETF](https://en.wikipedia.org/wiki/IETF_language_tag) completions for the specified properties such as labels, info etc. It is important to note that not _all_ locale IEFT names are supported, only a few (for now) but this will be improved in later versions. diff --git a/releases/v4/4.0.0.md b/releases/v4/4.0.0.md new file mode 100644 index 00000000..d5fe8b34 --- /dev/null +++ b/releases/v4/4.0.0.md @@ -0,0 +1,371 @@ +# v4.0.0 ~ vscode-liquid + +This version ships with **breaking changes** and requires that you to align with new configuration. This is an important update as it will be the last change you will need to undertake relating to configurations in preparation for the Liquify supersede. The next major release of the extension will be Liquify which means all future features will up-streamed to that project. + +### See [this gist](https://gist.github.com/panoply/c371a90df35171f341b6cc5d7dccc312) for the quickfix upgrade guide. + +# Breaking Changes + +Workspace and `.liquidrc` file settings now use a new definition structure for formatting configuration. There is no backwards compatibility, so you can either update to **3.4.0** or continue using **3.2.2**. Below is the **breaking changes** that ship in this release. + +> **TLDR** +> No problems fam, see this [gist](https://gist.github.com/panoply/c371a90df35171f341b6cc5d7dccc312). + +### Changed Rule Definitions + +The new configurations are expressed using different structures. Depending on how you define settings, be it within a `.liquidrc` file or from within a`.vscode/settings.json` file, beautification rules have changed. See the below examples of the new configuration structures: + +### Updating a `.liquidrc` File + +For developers who leverage a `.liquidrc` file for beautification rules, the new structure requires you to nest rules under a `format` key property. + + + + + + + + + + + + + + + + + +
OLD CONFIGURATION NEW CONFIGURATION
+ +```jsonc +{ + // "liquid.format.wrap": 0, + // "liquid.format.crlf": false, + // "liquid.format.endNewLine": false, + // "liquid.format.indentSize": 2, + // "liquid.format.preserveLine": 3, + // "liquid.format.commentIndent": false, + // "liquid.format.preserveComment": false, + // "liquid.format.markup": {}, + // "liquid.format.script": {}, + // "liquid.format.style": {}, + // "liquid.format.json": {}, +} +``` + + + +```jsonc +{ + "format": { + "ignore": [], + "wrap": 0, + "crlf": false, + "endNewLine": false, + "indentSize": 2, + "preserveLine": 3, + "liquid": {}, // New! Liquid specific format rules + "markup": {}, + "json": {}, + "style": {}, + "script": {} + } +} +``` + +
+ +### Updating Workspace Settings + +For developers who use workspace settings (`.vscode/settings.json`) for defining beautification options. You will need to move configuration to the `liquid.format.rules` object. + + + + + + + + + + + + + + + + + +
OLD CONFIGURATION NEW CONFIGURATION
+ +```jsonc +{ + // "liquid.format.wrap": 0, + // "liquid.format.crlf": false, + // "liquid.format.endNewLine": false, + // "liquid.format.indentSize": 2, + // "liquid.format.preserveLine": 3, + // "liquid.format.commentIndent": false, + // "liquid.format.preserveComment": false, + // "liquid.format.markup": {}, + // "liquid.format.script": {}, + // "liquid.format.style": {}, + // "liquid.format.json": {}, +} +``` + + + +```jsonc +{ + "liquid.format.rules": { + "wrap": 0, + "crlf": false, + "endNewLine": false, + "indentSize": 2, + "preserveLine": 3, + "liquid": {}, + "markup": {}, + "json": {}, + "style": {}, + "script": {} + } +} +``` + +
+ +### Deprecated the `liquid.settings.target` workspace option + +The `liquid.settings.target` option was deprecated and is no longer supported. Editor settings will default to the workspace `.vscode/settings.json` file and if one is not present in the project then the global (User Settings JSON) file will be used. + +### Deprecated the `package.json` prettify config option + +In version **v3.0.0** an additional configuration method was made available which allowed you to define formatting rules in a `package.json` file using a `prettify` property. As of version **3.4.0** this is no longer supported. This was experimental. Option definitions within package.json files will return in Liquify, but under a different field value. + +### Deprecated the `liquid.format.enable` workspace option + +As per https://github.com/panoply/vscode-liquid/issues/132 the `liquid.format.enable` setting is no longer supported. To enable formatting on save within Liquid files, you will ne provide the following vscode workspace settings: + +```jsonc +{ + "[liquid]": { + "editor.formatOnSave": true, + "editor.defaultFormatter": "sissel.shopify-liquid" + } +} +``` + +# New! File Associated Completions + +As of version **3.4.0** users have even more essential features available when choosing this extension. Support for file associated completions are now available! Using the `files` option available in both the `.liquidrc` or workspace `.vscode/settings.json` you can provide file path reference to project associated files. When you provide references, then completion support is made available for the related definition. + + + + + + + + + + + + + + + +
+ +Using a `.liquidrc` file + + + +Using workspace `.vscode/settings.json` file + +
+ + +```jsonc +{ + "engine": "shopify", // set engine to shopify + "files": { + "locales": "", // eg: ./path/en.default.json + "settings": "", // eg: ./path//settings_data.json + "snippets": [], // eg: ["./snippets/*"] + "sections": [], // eg: ["./sections/*"] + } +} +``` + + + + +```jsonc +{ + + "liquid.engine": "shopify", + + "liquid.files.locales": "", + "liquid.files.settings": "", + "liquid.files.snippets": [], + "liquid.files.sections": [], + +} +``` + +
+ +### Locale Completion Support + +This release provides locale completion support. This is achieved by providing a project relative path to the default locale file used by your theme. When defined, the extension will provide locale completions in translation object token expressions. Locale completions will be triggered in when a quotation character is detected following output token delimiters, eg: `{{ ' }}` or `{{ " }}`. In addition, the `| t ` filter will be inserted automatically when none is detected. + +### Settings Completion Support + +This release provides `settings_schema.json` completion support. This is achieved by providing a project relative path to the location of your `settings_data.json` file used by your theme. When defined, the extension will provide completions on the `settings.*` object in Liquid tag and output tokens. + +### Snippet Completion Support + +This release provides snippet file completion support. This is achieved by defining project relative path/s to directories that contain snippets or alternatively you can provide globs matches. Snippets will be shown for in `{% render '' %}` tag and will also allow you to quick open files. + +# Prettify Improvements + +This release is now using version `0.5.5.beta.1` of [Prettify](). Huge improvements pertaining to CSS coming along with the most stable markup (html + liquid) release to date. Test cases against 100+ different code sample structures has move Prettify to a safe level wherein code output respects input intent, meaning that changes will not go about augmenting in unpredictable ways. This release provides new beautification rules that expose more fine grained control over how your code should be beautified. + +### New! Language Specifics + +Prettify has made previous global level rules available on a per-language basis. This means that you use these rules in all supported lexer (liquid, markup, style and script) modes. + +- `commentIndent` +- `commentNewline` +- `preserveComment` + +### New! Liquid Specific Rules + +Liquid beautification rules are no longer coupled together with `markup` and instead are now defined on via a new`liquid` property. This new structure decouples and separates Liquid from markup allowing for more concise control for Liquid specific beautification. + +
+ + + SEE CHANGES + + + + + + + + + + + + + + + + +
OLD CONFIGURATION NEW CONFIGURATION
+ + +```jsonc + +// markup configuration no longer includes liquid +// specific formatting rules. Instead you define those +// rules on a { "liquid": {} } property + +{ + "markup": { + + // "delimiterTrims": "preserve", + // "normalizeSpacing": true, + // "lineBreakSeparator": "before", + // "valueForce": "intent" + + "attributeCasing": "preserve", + "attributeSort": false, + "attributeSortList": [], + "correct": false, + "commentIndent": false, + "commentNewline": false, + "forceAttribute": true, + "forceIndent": false, + "forceLeadAttribute": false, + "preserveAttributes": false, + "preserveText": false, + "ignoreScripts": false, + "ignoreStyles": false, + "quoteConvert": "none", + "selfCloseSpace": true + } +} +``` + + + +```jsonc +{ + "liquid": { + "commentIndent": false, + "commentNewline": false, + "delimiterTrims": "preserve", + "ignoreTagList": [], + "lineBreakSeparator": "before", + "normalizeSpacing": true, + "preserveComment": false, + "quoteConvert": "single", + "valueForce": "intent" + }, + "markup": { + "attributeCasing": "preserve", + "attributeSort": false, + "attributeSortList": [], + "commentIndent": false, + "commentNewline": false, + "correct": false, + "forceAttribute": true, + "forceLeadAttribute": false, + "forceIndent": false, + "ignoreScripts": false, + "ignoreStyles": false, + "preserveComment": false, + "preserveAttributes": false, + "preserveText": false, + "quoteConvert": "none", + "selfCloseSpace": true + } +} +``` + +
+ +
+ +### New! Liquid Rule: `ignoreTagList[]` + +This is a `liquid` specific rule which accepts a list of tag names to excluded from formatting. + +### New! Global Rule: `useTabs` + +This is a **global** rule that replaces `indentChar` and will use `\t` tab indentations instead of single whitespace characters + +# New! Schema Snippets + +In version **3.2.0** the extension introduced `{% schema %}` tag completion and validation support. This release improves upon this essential feature now `{% schema %}` JSON supports snippet completion capabilities. + +### Snippets and Tabstops + +Schema JSON provided snippet completion which can be invoked with `CRTL`+`SPACE`. All section structures are available, with additional ENBF tab-stop support which converts `id` defined values to Upcase format Labels. + +### Full IETF local support + +This release now supports all IETF locale completion sturctures for labels and other translation based properties. + +### Detailed and informative descriptions + +Schema JSON code regions now provide detailed documentation reference in hover and completion descriptions This information is extracted directly from the Shopify documentation. + +# Contributors + +Special thanks to the great [@davidwarrington](https://github.com/davidwarrington) and [@MaxDesignFR](https://github.com/MaxDesignFR) for helping work through some of the decision making in this release. + +#### Happy Holidays! + +@panoply