Skip to content

Releases: Shopify/theme-tools

@shopify/[email protected]

11 Nov 21:32
f274227
Compare
Choose a tag to compare

Patch Changes

@shopify/[email protected]

11 Nov 21:32
f274227
Compare
Choose a tag to compare

Minor Changes

  • b431db7: Add ValidateSchemaName check

  • 8f3bc18: Add "block" or "blocks" completion for the content_for Liquid tag (Thanks @Smintfy)

  • 568d53b: Add support for the content_for Liquid tag

  • 6014dfd: Support metafield auto-completion based on .shopify/metafields.json file

    • The metafield definitions can be fetched from Admin API

    • The format of the JSON needs to be the following:

      {
      "<definition_group>": [
      {
      "name": "...",
      "namespace": "...",
      "description": "...",
      "type": {
      "category": "...",
      "name": "..."
      },
      },
      ...
      ],
      ...
      }

    The definition group needs to be one of the following:

    • 'article'
    • 'blog'
    • 'brand'
    • 'collection'
    • 'company'
    • 'company_location'
    • 'location'
    • 'market'
    • 'order'
    • 'page'
    • 'product'
    • 'variant'
    • 'shop'

Patch Changes

@shopify/[email protected]

11 Nov 21:32
f274227
Compare
Choose a tag to compare

Patch Changes

@shopify/[email protected]

11 Nov 21:32
f274227
Compare
Choose a tag to compare

Minor Changes

  • b431db7: Add ValidateSchemaName check
  • 568d53b: Add the ValidContentForArguments check

Patch Changes

@shopify/[email protected]

11 Nov 21:32
f274227
Compare
Choose a tag to compare

Patch Changes

@shopify/[email protected]

11 Nov 21:32
f274227
Compare
Choose a tag to compare

Minor Changes

  • b431db7: Add ValidateSchemaName check

  • 568d53b: Add the ValidContentForArguments check

  • 6014dfd: Support metafield auto-completion based on .shopify/metafields.json file

    • The metafield definitions can be fetched from Admin API

    • The format of the JSON needs to be the following:

      {
      "<definition_group>": [
      {
      "name": "...",
      "namespace": "...",
      "description": "...",
      "type": {
      "category": "...",
      "name": "..."
      },
      },
      ...
      ],
      ...
      }

    The definition group needs to be one of the following:

    • 'article'
    • 'blog'
    • 'brand'
    • 'collection'
    • 'company'
    • 'company_location'
    • 'location'
    • 'market'
    • 'order'
    • 'page'
    • 'product'
    • 'variant'
    • 'shop'

Patch Changes

@shopify/[email protected]

11 Nov 21:32
f274227
Compare
Choose a tag to compare

Minor Changes

  • 568d53b: Add the ValidContentForArguments check

Patch Changes

@shopify/[email protected]

11 Nov 21:32
f274227
Compare
Choose a tag to compare

Minor Changes

  • 568d53b: Add support for the content_for Liquid tag

Patch Changes

@shopify/[email protected]

11 Nov 21:32
f274227
Compare
Choose a tag to compare

Minor Changes

  • 568d53b: Add support for the content_for Liquid tag

@shopify/[email protected]

31 Oct 13:21
6af0983
Compare
Choose a tag to compare

Major Changes

  • 4b574c1: [Breaking] Replace fs-based dependency injection by an AbstractFileSystem injection

    + 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.

    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