From 6af0983936f595f9014b547114b54c3bb9a11705 Mon Sep 17 00:00:00 2001 From: CP Clermont Date: Thu, 31 Oct 2024 09:19:40 -0400 Subject: [PATCH] Release 31-10-24: Updated 9 package versions (#549) @shopify/theme-language-server-common: 1.14.0 -> 2.0.0 (major) theme-check-vscode: 2.6.0 -> 3.0.0 (major) @shopify/theme-check-common: 2.9.2 -> 3.0.0 (major) @shopify/codemirror-language-client: 0.6.0 -> 0.7.0 (minor) @shopify/theme-check-browser: 2.9.2 -> 3.0.0 (major) @shopify/theme-check-node: 2.9.2 -> 3.0.0 (major) @shopify/theme-language-server-browser: 1.14.0 -> 2.0.0 (major) @shopify/theme-language-server-node: 1.14.0 -> 2.0.0 (major) @shopify/theme-check-docs-updater: 2.9.2 -> 3.0.0 (major) --- .changeset/brown-phones-peel.md | 11 --- .changeset/curly-books-end.md | 15 ---- .changeset/dry-adults-jump.md | 5 -- .changeset/early-buttons-jump.md | 13 ---- .changeset/hungry-cups-fry.md | 21 ------ .changeset/light-ways-sin.md | 10 --- .changeset/moody-turkeys-switch.md | 29 -------- .changeset/silent-comics-reflect.md | 5 -- .changeset/smooth-balloons-provide.md | 5 -- .changeset/stale-swans-draw.md | 26 ------- .../codemirror-language-client/CHANGELOG.md | 6 ++ .../codemirror-language-client/package.json | 6 +- .../release-orchestrator/src/messaging.ts | 16 +++- packages/theme-check-browser/CHANGELOG.md | 27 +++++++ packages/theme-check-browser/package.json | 4 +- packages/theme-check-common/CHANGELOG.md | 36 +++++++++ packages/theme-check-common/package.json | 2 +- .../theme-check-docs-updater/CHANGELOG.md | 9 +++ .../theme-check-docs-updater/package.json | 4 +- packages/theme-check-node/CHANGELOG.md | 28 +++++++ packages/theme-check-node/package.json | 6 +- .../CHANGELOG.md | 70 ++++++++++++++++++ .../package.json | 4 +- .../theme-language-server-common/CHANGELOG.md | 65 +++++++++++++++++ .../theme-language-server-common/package.json | 4 +- .../theme-language-server-node/CHANGELOG.md | 73 +++++++++++++++++++ .../theme-language-server-node/package.json | 8 +- packages/vscode-extension/CHANGELOG.md | 43 +++++++++++ packages/vscode-extension/package.json | 10 +-- 29 files changed, 393 insertions(+), 168 deletions(-) delete mode 100644 .changeset/brown-phones-peel.md delete mode 100644 .changeset/curly-books-end.md delete mode 100644 .changeset/dry-adults-jump.md delete mode 100644 .changeset/early-buttons-jump.md delete mode 100644 .changeset/hungry-cups-fry.md delete mode 100644 .changeset/light-ways-sin.md delete mode 100644 .changeset/moody-turkeys-switch.md delete mode 100644 .changeset/silent-comics-reflect.md delete mode 100644 .changeset/smooth-balloons-provide.md delete mode 100644 .changeset/stale-swans-draw.md diff --git a/.changeset/brown-phones-peel.md b/.changeset/brown-phones-peel.md deleted file mode 100644 index b1a1156c3..000000000 --- a/.changeset/brown-phones-peel.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'@shopify/theme-language-server-common': minor -'theme-check-vscode': minor ---- - -Add on snippet rename automatic refactor support - -When `snippets/*.liquid` files are renamed, we'll change all the old references to point to the new files: - -- `{% render 'oldName' %}` -> `{% render 'newName' %}` -- `{% include 'oldName' %}` -> `{% include 'newName' %}` diff --git a/.changeset/curly-books-end.md b/.changeset/curly-books-end.md deleted file mode 100644 index 107ced2f0..000000000 --- a/.changeset/curly-books-end.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -'@shopify/theme-check-common': major -'@shopify/theme-language-server-common': major ---- - -[Breaking] Replace absolute path concerns with URIs - -This implies a couple of changes: -- `Config` now holds a `rootUri` instead of `root` path. -- `loadConfig` injections needs to change their return value accordingly -- In checks, - - The context helper `absolutePath` has been replaced by `toUri` - - The context helper `relativePath` has been replaced by `toRelativePath` -- `SourceCode` objects now hold a `uri` instead of a `path` -- `toSourceCode` now accepts a `uri` instead of a `path` diff --git a/.changeset/dry-adults-jump.md b/.changeset/dry-adults-jump.md deleted file mode 100644 index f87ae6d1a..000000000 --- a/.changeset/dry-adults-jump.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/codemirror-language-client': minor ---- - -Expose language client in CodeMirrorLanguageClient diff --git a/.changeset/early-buttons-jump.md b/.changeset/early-buttons-jump.md deleted file mode 100644 index 667166cc6..000000000 --- a/.changeset/early-buttons-jump.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -'@shopify/theme-language-server-common': minor -'theme-check-vscode': minor ---- - -Add on asset rename automatic refactor support - -When `assets/*` files are renamed, we'll change all the old references to point to the new files: - -- `{{ 'oldName.js' | asset_url }}` -> `{{ 'newName.js' | asset_url }}` -- `{% echo 'oldName.js' | asset_url %}` -> `{% echo 'newName.js' | asset_url %}` - -Works with `.(js|css).liquid` asset files as well. diff --git a/.changeset/hungry-cups-fry.md b/.changeset/hungry-cups-fry.md deleted file mode 100644 index f3fb2c6c4..000000000 --- a/.changeset/hungry-cups-fry.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -'@shopify/theme-check-browser': major -'@shopify/theme-check-common': major -'@shopify/theme-check-node': major ---- - -[Breaking] Replace fs-based dependency injections with AbstractFileSystem injection - -```diff -runChecks(theme, { -- getDefaultTranslations, -- getDefaultLocale, -- getDefaultSchemaLocale, -- getDefaultSchemaTranslations, -- fileExists, -- fileSize, -+ fs: new FileSystemImpl(), - themeDocset, - jsonValidationSet, -}) -``` diff --git a/.changeset/light-ways-sin.md b/.changeset/light-ways-sin.md deleted file mode 100644 index 0996075a8..000000000 --- a/.changeset/light-ways-sin.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'theme-check-vscode': major ---- - -Add support for virtual file systems - -The Shopify Liquid VS Code extension now works in a large set of new environments: -- Remote files -- Git backed files -- VS Code for the Web diff --git a/.changeset/moody-turkeys-switch.md b/.changeset/moody-turkeys-switch.md deleted file mode 100644 index 810bc2fdf..000000000 --- a/.changeset/moody-turkeys-switch.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -'@shopify/theme-language-server-browser': major -'@shopify/theme-language-server-common': major -'@shopify/theme-language-server-node': major ---- - -[Breaking] Replace fs-based dependency injection by an AbstractFileSystem injection - -```diff -+ class FileSystemImpl implements AbstractFileSystem { -+ /* ... */ -+ } - -startServer(worker, { -- findRootURI, -- fileExists, -- fileSize, -- getDefaultTranslationsFactory, -- getDefaultLocaleFactory, -- getDefaultSchemaTranslationsFactory, -- getDefaultSchemaLocaleFactory, -- getThemeSettingsSchemaForRootURI, -+ fs: new FileSystemImpl(), - loadConfig, - log, - themeDocset, - jsonValidationSet, -}) -``` diff --git a/.changeset/silent-comics-reflect.md b/.changeset/silent-comics-reflect.md deleted file mode 100644 index c54ef8a2a..000000000 --- a/.changeset/silent-comics-reflect.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'theme-check-vscode': major ---- - -[BREAKING] Remove support for ruby language server diff --git a/.changeset/smooth-balloons-provide.md b/.changeset/smooth-balloons-provide.md deleted file mode 100644 index 165a00fec..000000000 --- a/.changeset/smooth-balloons-provide.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@shopify/theme-check-common': patch ---- - -(Internal) Add path.basename util diff --git a/.changeset/stale-swans-draw.md b/.changeset/stale-swans-draw.md deleted file mode 100644 index e032650b3..000000000 --- a/.changeset/stale-swans-draw.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -'@shopify/theme-language-server-browser': major -'@shopify/theme-language-server-node': major ---- - -Expose language server connection in Public API - -This lets you send non-standard LSP messages to the client. - -```ts -import { getConnection, startServer, AbstractFileSystem } from '@shopify/theme-language-server-browser' - -class MainThreadFileSystem implements AbstractFileSystem { - constructor(private connection) {} - readFile(uri) { return this.connection.sendRequest('fs/readFile', uri); } - readDirectory(uri) { return this.connection.sendRequest('fs/readDirectory', uri); } - readFile(uri) { return this.connection.sendRequest('fs/stat', uri); } -} - -const worker = self as any as Worker; -const connection = getConnection(worker); -const fs = new MainThreadFileSystem(connection); -const dependencies = { /* ... */ }; - -startServer(worker, dependencies, connection); -``` diff --git a/packages/codemirror-language-client/CHANGELOG.md b/packages/codemirror-language-client/CHANGELOG.md index e5c33440f..84c6cce17 100644 --- a/packages/codemirror-language-client/CHANGELOG.md +++ b/packages/codemirror-language-client/CHANGELOG.md @@ -1,5 +1,11 @@ # @shopify/codemirror-language-client +## 0.7.0 + +### Minor Changes + +- 4b574c1: Expose language client in CodeMirrorLanguageClient + ## 0.6.0 ### Minor Changes diff --git a/packages/codemirror-language-client/package.json b/packages/codemirror-language-client/package.json index bdea33277..99ea372fe 100644 --- a/packages/codemirror-language-client/package.json +++ b/packages/codemirror-language-client/package.json @@ -1,6 +1,6 @@ { "name": "@shopify/codemirror-language-client", - "version": "0.6.0", + "version": "0.7.0", "description": "A Language Client for CodeMirror", "author": "CP Clermont ", "homepage": "https://github.com/Shopify/theme-tools/tree/main/packages/codemirror-language-client#readme", @@ -51,8 +51,8 @@ "@codemirror/theme-one-dark": "^6.1.2", "@codemirror/view": "^6.9.2", "@replit/codemirror-vim": "^6.2.1", - "@shopify/theme-check-docs-updater": "^2.9.1", - "@shopify/theme-language-server-browser": "^1.13.0", + "@shopify/theme-check-docs-updater": "^3.0.0", + "@shopify/theme-language-server-browser": "^2.0.0", "@shopify/lang-jsonc": "^1.0.0", "@types/markdown-it": "^13.0.4", "codemirror": "^6.0.1", diff --git a/packages/release-orchestrator/src/messaging.ts b/packages/release-orchestrator/src/messaging.ts index 9a0550625..85d8a265a 100644 --- a/packages/release-orchestrator/src/messaging.ts +++ b/packages/release-orchestrator/src/messaging.ts @@ -1,3 +1,4 @@ +import { spawn } from 'node:child_process'; import { generateMarkdown } from './generate-markdown'; import { getCurrentDateFormatted } from './get-current-date-formatted'; import { run } from './utils'; @@ -6,10 +7,14 @@ import type { StatusProperty } from './types'; const buildGithubPRLink = (branchName: string, title: string, description: string): string => { const encodedTitle = encodeURIComponent(title); const encodedDescription = encodeURIComponent(description); - - const url = `https://github.com/Shopify/theme-tools/compare/${branchName}?expand=1&title=${encodedTitle}&body=${encodedDescription}`; - - return url; + if (encodedDescription.length > 2083) { + console.log( + 'The PR description is too long to be included in the URL. The PR description has been placed in your clipboard.', + ); + return `https://github.com/Shopify/theme-tools/compare/${branchName}?expand=1&title=${encodedTitle}`; + } else { + return `https://github.com/Shopify/theme-tools/compare/${branchName}?expand=1&title=${encodedTitle}&body=${encodedDescription}`; + } }; const noop = () => {}; @@ -34,6 +39,9 @@ ${prLink} // from terminal when you don't have to :) run(`open '${prLink}'`).then(noop, noop); + // Copy the pr description to clipboard in case the pr description is too long + spawn('pbcopy').stdin.end(prDescription); + console.log(message); }; diff --git a/packages/theme-check-browser/CHANGELOG.md b/packages/theme-check-browser/CHANGELOG.md index f26be809e..1c1199d06 100644 --- a/packages/theme-check-browser/CHANGELOG.md +++ b/packages/theme-check-browser/CHANGELOG.md @@ -1,5 +1,32 @@ # @shopify/theme-check-browser +## 3.0.0 + +### Major Changes + +- 4b574c1: [Breaking] Replace fs-based dependency injections with AbstractFileSystem injection + + ```diff + runChecks(theme, { + - getDefaultTranslations, + - getDefaultLocale, + - getDefaultSchemaLocale, + - getDefaultSchemaTranslations, + - fileExists, + - fileSize, + + fs: new FileSystemImpl(), + themeDocset, + jsonValidationSet, + }) + ``` + +### Patch Changes + +- Updated dependencies [4b574c1] +- Updated dependencies [4b574c1] +- Updated dependencies [5fab0e9] + - @shopify/theme-check-common@3.0.0 + ## 2.9.2 ### Patch Changes diff --git a/packages/theme-check-browser/package.json b/packages/theme-check-browser/package.json index 7506f6516..36e487419 100644 --- a/packages/theme-check-browser/package.json +++ b/packages/theme-check-browser/package.json @@ -1,6 +1,6 @@ { "name": "@shopify/theme-check-browser", - "version": "2.9.2", + "version": "3.0.0", "main": "dist/index.js", "types": "dist/index.d.ts", "license": "MIT", @@ -26,6 +26,6 @@ "type-check": "tsc --noEmit" }, "dependencies": { - "@shopify/theme-check-common": "2.9.2" + "@shopify/theme-check-common": "3.0.0" } } diff --git a/packages/theme-check-common/CHANGELOG.md b/packages/theme-check-common/CHANGELOG.md index d780c3156..2c7487cbd 100644 --- a/packages/theme-check-common/CHANGELOG.md +++ b/packages/theme-check-common/CHANGELOG.md @@ -1,5 +1,41 @@ # @shopify/theme-check-common +## 3.0.0 + +### Major Changes + +- 4b574c1: [Breaking] Replace absolute path concerns with URIs + + This implies a couple of changes: + + - `Config` now holds a `rootUri` instead of `root` path. + - `loadConfig` injections needs to change their return value accordingly + - In checks, + - The context helper `absolutePath` has been replaced by `toUri` + - The context helper `relativePath` has been replaced by `toRelativePath` + - `SourceCode` objects now hold a `uri` instead of a `path` + - `toSourceCode` now accepts a `uri` instead of a `path` + +- 4b574c1: [Breaking] Replace fs-based dependency injections with AbstractFileSystem injection + + ```diff + runChecks(theme, { + - getDefaultTranslations, + - getDefaultLocale, + - getDefaultSchemaLocale, + - getDefaultSchemaTranslations, + - fileExists, + - fileSize, + + fs: new FileSystemImpl(), + themeDocset, + jsonValidationSet, + }) + ``` + +### Patch Changes + +- 5fab0e9: (Internal) Add path.basename util + ## 2.9.2 ### Patch Changes diff --git a/packages/theme-check-common/package.json b/packages/theme-check-common/package.json index ae2b34372..bdcb6870d 100644 --- a/packages/theme-check-common/package.json +++ b/packages/theme-check-common/package.json @@ -1,6 +1,6 @@ { "name": "@shopify/theme-check-common", - "version": "2.9.2", + "version": "3.0.0", "license": "MIT", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/theme-check-docs-updater/CHANGELOG.md b/packages/theme-check-docs-updater/CHANGELOG.md index 1c9e48424..8c4bf67a6 100644 --- a/packages/theme-check-docs-updater/CHANGELOG.md +++ b/packages/theme-check-docs-updater/CHANGELOG.md @@ -1,5 +1,14 @@ # @shopify/theme-check-docs-updater +## 3.0.0 + +### Patch Changes + +- Updated dependencies [4b574c1] +- Updated dependencies [4b574c1] +- Updated dependencies [5fab0e9] + - @shopify/theme-check-common@3.0.0 + ## 2.9.2 ### Patch Changes diff --git a/packages/theme-check-docs-updater/package.json b/packages/theme-check-docs-updater/package.json index 0d7a61fec..04e71650c 100644 --- a/packages/theme-check-docs-updater/package.json +++ b/packages/theme-check-docs-updater/package.json @@ -1,6 +1,6 @@ { "name": "@shopify/theme-check-docs-updater", - "version": "2.9.2", + "version": "3.0.0", "description": "Scripts to initialize theme-check data with assets from the theme-liquid-docs repo.", "main": "dist/index.js", "author": "Albert Chu ", @@ -30,7 +30,7 @@ "type-check": "tsc --noEmit" }, "dependencies": { - "@shopify/theme-check-common": "^2.9.2", + "@shopify/theme-check-common": "^3.0.0", "env-paths": "^2.2.1", "node-fetch": "^2.6.11" }, diff --git a/packages/theme-check-node/CHANGELOG.md b/packages/theme-check-node/CHANGELOG.md index d8f6daab3..4437a05ae 100644 --- a/packages/theme-check-node/CHANGELOG.md +++ b/packages/theme-check-node/CHANGELOG.md @@ -1,5 +1,33 @@ # @shopify/theme-check-node +## 3.0.0 + +### Major Changes + +- 4b574c1: [Breaking] Replace fs-based dependency injections with AbstractFileSystem injection + + ```diff + runChecks(theme, { + - getDefaultTranslations, + - getDefaultLocale, + - getDefaultSchemaLocale, + - getDefaultSchemaTranslations, + - fileExists, + - fileSize, + + fs: new FileSystemImpl(), + themeDocset, + jsonValidationSet, + }) + ``` + +### Patch Changes + +- Updated dependencies [4b574c1] +- Updated dependencies [4b574c1] +- Updated dependencies [5fab0e9] + - @shopify/theme-check-common@3.0.0 + - @shopify/theme-check-docs-updater@3.0.0 + ## 2.9.2 ### Patch Changes diff --git a/packages/theme-check-node/package.json b/packages/theme-check-node/package.json index 847449346..83b5cbd72 100644 --- a/packages/theme-check-node/package.json +++ b/packages/theme-check-node/package.json @@ -1,6 +1,6 @@ { "name": "@shopify/theme-check-node", - "version": "2.9.2", + "version": "3.0.0", "main": "dist/index.js", "types": "dist/index.d.ts", "author": "CP Clermont ", @@ -33,8 +33,8 @@ "type-check": "tsc --noEmit" }, "dependencies": { - "@shopify/theme-check-common": "2.9.2", - "@shopify/theme-check-docs-updater": "2.9.2", + "@shopify/theme-check-common": "3.0.0", + "@shopify/theme-check-docs-updater": "3.0.0", "glob": "^8.0.3", "vscode-uri": "^3.0.7", "yaml": "^2.3.0" diff --git a/packages/theme-language-server-browser/CHANGELOG.md b/packages/theme-language-server-browser/CHANGELOG.md index 004388e14..4cefa8ccc 100644 --- a/packages/theme-language-server-browser/CHANGELOG.md +++ b/packages/theme-language-server-browser/CHANGELOG.md @@ -1,5 +1,75 @@ # @shopify/theme-language-server-browser +## 2.0.0 + +### Major Changes + +- 4b574c1: [Breaking] Replace fs-based dependency injection by an AbstractFileSystem injection + + ```diff + + class FileSystemImpl implements AbstractFileSystem { + + /* ... */ + + } + + startServer(worker, { + - findRootURI, + - fileExists, + - fileSize, + - getDefaultTranslationsFactory, + - getDefaultLocaleFactory, + - getDefaultSchemaTranslationsFactory, + - getDefaultSchemaLocaleFactory, + - getThemeSettingsSchemaForRootURI, + + fs: new FileSystemImpl(), + loadConfig, + log, + themeDocset, + jsonValidationSet, + }) + ``` + +- 4b574c1: Expose language server connection in Public API + + This lets you send non-standard LSP messages to the client. + + ```ts + import { + getConnection, + startServer, + AbstractFileSystem, + } from '@shopify/theme-language-server-browser'; + + class MainThreadFileSystem implements AbstractFileSystem { + constructor(private connection) {} + readFile(uri) { + return this.connection.sendRequest('fs/readFile', uri); + } + readDirectory(uri) { + return this.connection.sendRequest('fs/readDirectory', uri); + } + readFile(uri) { + return this.connection.sendRequest('fs/stat', uri); + } + } + + const worker = self as any as Worker; + const connection = getConnection(worker); + const fs = new MainThreadFileSystem(connection); + const dependencies = { + /* ... */ + }; + + startServer(worker, dependencies, connection); + ``` + +### Patch Changes + +- Updated dependencies [5fab0e9] +- Updated dependencies [4b574c1] +- Updated dependencies [5fab0e9] +- Updated dependencies [4b574c1] + - @shopify/theme-language-server-common@2.0.0 + ## 1.14.0 ### Patch Changes diff --git a/packages/theme-language-server-browser/package.json b/packages/theme-language-server-browser/package.json index 4025f6673..a4bf34e0f 100644 --- a/packages/theme-language-server-browser/package.json +++ b/packages/theme-language-server-browser/package.json @@ -1,6 +1,6 @@ { "name": "@shopify/theme-language-server-browser", - "version": "1.14.0", + "version": "2.0.0", "main": "dist/index.js", "types": "dist/index.d.ts", "author": "CP Clermont ", @@ -27,7 +27,7 @@ "type-check": "tsc --noEmit" }, "dependencies": { - "@shopify/theme-language-server-common": "1.14.0", + "@shopify/theme-language-server-common": "2.0.0", "vscode-languageserver": "^8.0.2" } } diff --git a/packages/theme-language-server-common/CHANGELOG.md b/packages/theme-language-server-common/CHANGELOG.md index 28690c5ad..f13b99e66 100644 --- a/packages/theme-language-server-common/CHANGELOG.md +++ b/packages/theme-language-server-common/CHANGELOG.md @@ -1,5 +1,70 @@ # @shopify/theme-language-server-common +## 2.0.0 + +### Major Changes + +- 4b574c1: [Breaking] Replace absolute path concerns with URIs + + This implies a couple of changes: + + - `Config` now holds a `rootUri` instead of `root` path. + - `loadConfig` injections needs to change their return value accordingly + - In checks, + - The context helper `absolutePath` has been replaced by `toUri` + - The context helper `relativePath` has been replaced by `toRelativePath` + - `SourceCode` objects now hold a `uri` instead of a `path` + - `toSourceCode` now accepts a `uri` instead of a `path` + +- 4b574c1: [Breaking] Replace fs-based dependency injection by an AbstractFileSystem injection + + ```diff + + class FileSystemImpl implements AbstractFileSystem { + + /* ... */ + + } + + startServer(worker, { + - findRootURI, + - fileExists, + - fileSize, + - getDefaultTranslationsFactory, + - getDefaultLocaleFactory, + - getDefaultSchemaTranslationsFactory, + - getDefaultSchemaLocaleFactory, + - getThemeSettingsSchemaForRootURI, + + fs: new FileSystemImpl(), + loadConfig, + log, + themeDocset, + jsonValidationSet, + }) + ``` + +### Minor Changes + +- 5fab0e9: Add on snippet rename automatic refactor support + + When `snippets/*.liquid` files are renamed, we'll change all the old references to point to the new files: + + - `{% render 'oldName' %}` -> `{% render 'newName' %}` + - `{% include 'oldName' %}` -> `{% include 'newName' %}` + +- 5fab0e9: Add on asset rename automatic refactor support + + When `assets/*` files are renamed, we'll change all the old references to point to the new files: + + - `{{ 'oldName.js' | asset_url }}` -> `{{ 'newName.js' | asset_url }}` + - `{% echo 'oldName.js' | asset_url %}` -> `{% echo 'newName.js' | asset_url %}` + + Works with `.(js|css).liquid` asset files as well. + +### Patch Changes + +- Updated dependencies [4b574c1] +- Updated dependencies [4b574c1] +- Updated dependencies [5fab0e9] + - @shopify/theme-check-common@3.0.0 + ## 1.14.0 ### Minor Changes diff --git a/packages/theme-language-server-common/package.json b/packages/theme-language-server-common/package.json index b6b950067..951f4bb38 100644 --- a/packages/theme-language-server-common/package.json +++ b/packages/theme-language-server-common/package.json @@ -1,6 +1,6 @@ { "name": "@shopify/theme-language-server-common", - "version": "1.14.0", + "version": "2.0.0", "main": "dist/index.js", "types": "dist/index.d.ts", "author": "CP Clermont ", @@ -28,7 +28,7 @@ }, "dependencies": { "@shopify/liquid-html-parser": "^2.0.5", - "@shopify/theme-check-common": "2.9.2", + "@shopify/theme-check-common": "3.0.0", "@vscode/web-custom-data": "^0.4.6", "vscode-json-languageservice": "^5.3.10", "vscode-languageserver": "^8.0.2", diff --git a/packages/theme-language-server-node/CHANGELOG.md b/packages/theme-language-server-node/CHANGELOG.md index 23fb13b13..00d37afa5 100644 --- a/packages/theme-language-server-node/CHANGELOG.md +++ b/packages/theme-language-server-node/CHANGELOG.md @@ -1,5 +1,78 @@ # @shopify/theme-language-server-node +## 2.0.0 + +### Major Changes + +- 4b574c1: [Breaking] Replace fs-based dependency injection by an AbstractFileSystem injection + + ```diff + + class FileSystemImpl implements AbstractFileSystem { + + /* ... */ + + } + + startServer(worker, { + - findRootURI, + - fileExists, + - fileSize, + - getDefaultTranslationsFactory, + - getDefaultLocaleFactory, + - getDefaultSchemaTranslationsFactory, + - getDefaultSchemaLocaleFactory, + - getThemeSettingsSchemaForRootURI, + + fs: new FileSystemImpl(), + loadConfig, + log, + themeDocset, + jsonValidationSet, + }) + ``` + +- 4b574c1: Expose language server connection in Public API + + This lets you send non-standard LSP messages to the client. + + ```ts + import { + getConnection, + startServer, + AbstractFileSystem, + } from '@shopify/theme-language-server-browser'; + + class MainThreadFileSystem implements AbstractFileSystem { + constructor(private connection) {} + readFile(uri) { + return this.connection.sendRequest('fs/readFile', uri); + } + readDirectory(uri) { + return this.connection.sendRequest('fs/readDirectory', uri); + } + readFile(uri) { + return this.connection.sendRequest('fs/stat', uri); + } + } + + const worker = self as any as Worker; + const connection = getConnection(worker); + const fs = new MainThreadFileSystem(connection); + const dependencies = { + /* ... */ + }; + + startServer(worker, dependencies, connection); + ``` + +### Patch Changes + +- Updated dependencies [5fab0e9] +- Updated dependencies [4b574c1] +- Updated dependencies [5fab0e9] +- Updated dependencies [4b574c1] +- Updated dependencies [4b574c1] + - @shopify/theme-language-server-common@2.0.0 + - @shopify/theme-check-node@3.0.0 + - @shopify/theme-check-docs-updater@3.0.0 + ## 1.14.0 ### Patch Changes diff --git a/packages/theme-language-server-node/package.json b/packages/theme-language-server-node/package.json index 1ad79a4e9..837a71ef8 100644 --- a/packages/theme-language-server-node/package.json +++ b/packages/theme-language-server-node/package.json @@ -1,6 +1,6 @@ { "name": "@shopify/theme-language-server-node", - "version": "1.14.0", + "version": "2.0.0", "main": "dist/index.js", "types": "dist/index.d.ts", "author": "CP Clermont ", @@ -27,9 +27,9 @@ "type-check": "tsc --noEmit" }, "dependencies": { - "@shopify/theme-language-server-common": "1.14.0", - "@shopify/theme-check-node": "^2.9.2", - "@shopify/theme-check-docs-updater": "^2.9.2", + "@shopify/theme-language-server-common": "2.0.0", + "@shopify/theme-check-node": "^3.0.0", + "@shopify/theme-check-docs-updater": "^3.0.0", "glob": "^8.0.3", "node-fetch": "^2.6.11", "vscode-languageserver": "^8.0.2", diff --git a/packages/vscode-extension/CHANGELOG.md b/packages/vscode-extension/CHANGELOG.md index 1435d0dac..36bf96605 100644 --- a/packages/vscode-extension/CHANGELOG.md +++ b/packages/vscode-extension/CHANGELOG.md @@ -1,5 +1,48 @@ ## theme-check-vscode +## 3.0.0 + +### Major Changes + +- 4b574c1: Add support for virtual file systems + + The Shopify Liquid VS Code extension now works in a large set of new environments: + + - Remote files + - Git backed files + - VS Code for the Web + +- 4b574c1: [BREAKING] Remove support for ruby language server + +### Minor Changes + +- 5fab0e9: Add on snippet rename automatic refactor support + + When `snippets/*.liquid` files are renamed, we'll change all the old references to point to the new files: + + - `{% render 'oldName' %}` -> `{% render 'newName' %}` + - `{% include 'oldName' %}` -> `{% include 'newName' %}` + +- 5fab0e9: Add on asset rename automatic refactor support + + When `assets/*` files are renamed, we'll change all the old references to point to the new files: + + - `{{ 'oldName.js' | asset_url }}` -> `{{ 'newName.js' | asset_url }}` + - `{% echo 'oldName.js' | asset_url %}` -> `{% echo 'newName.js' | asset_url %}` + + Works with `.(js|css).liquid` asset files as well. + +### Patch Changes + +- Updated dependencies [4b574c1] +- Updated dependencies [4b574c1] +- Updated dependencies [4b574c1] +- Updated dependencies [5fab0e9] +- Updated dependencies [4b574c1] + - @shopify/theme-check-common@3.0.0 + - @shopify/theme-language-server-browser@2.0.0 + - @shopify/theme-language-server-node@2.0.0 + ## 2.6.0 ### Minor Changes diff --git a/packages/vscode-extension/package.json b/packages/vscode-extension/package.json index 089fbbe90..d993d50d5 100644 --- a/packages/vscode-extension/package.json +++ b/packages/vscode-extension/package.json @@ -10,7 +10,7 @@ "bugs": { "url": "https://github.com/shopify/theme-tools/issues" }, - "version": "2.6.0", + "version": "3.0.0", "publisher": "Shopify", "private": true, "license": "SEE LICENSE IN LICENSE.md", @@ -61,15 +61,15 @@ "dependencies": { "@shopify/liquid-html-parser": "^2.0.5", "@shopify/prettier-plugin-liquid": "^1.5.2", - "@shopify/theme-language-server-browser": "^1.14.0", - "@shopify/theme-language-server-node": "^1.14.0", - "@shopify/theme-check-common": "^2.9.2", + "@shopify/theme-language-server-browser": "^2.0.0", + "@shopify/theme-language-server-node": "^2.0.0", + "@shopify/theme-check-common": "^3.0.0", "prettier": "^2.6.2", "vscode-languageclient": "^8.1.0", "vscode-uri": "^3.0.8" }, "devDependencies": { - "@shopify/theme-check-docs-updater": "^2.9.2", + "@shopify/theme-check-docs-updater": "^3.0.0", "@types/glob": "^8.0.0", "@types/node": "16.x", "@types/prettier": "^2.4.2",