Skip to content

Releases: Shopify/theme-tools

@shopify/[email protected]

04 Apr 18:31
fccecc9
Compare
Choose a tag to compare

Minor Changes

  • 03b41e1: Breaking: jsonValidationSet's schemas public API change

    Now takes a function of the following signature:

    interface JsonValidationSet = {
      schemas: (context: 'theme' | 'app') => Promise<SchemaDefinition[]>
    }

    Reason being we want to support fileMatch overloading of blocks/*.liquid files and we needed a way to identify which context you're in.

    Unfortunately, the JSON schema for blocks/*.liquid files in theme app extensions isn't the same one we have in themes. There doesn't seem to be a way to unify them either.

  • 03b41e1: Add support for the schemas manifest on Shopify/theme-liquid-docs

    Shopify/theme-liquid-docs now supports composable JSON schemas (with relative paths). To solve the blocks/*.liquid file match JSON schema overload depending on the context (app or theme), we defined two manifests that describe the schemas required by your solution and define the fileMatch rules:

    @shopify/theme-check-docs-updater now reads those manifests and downloads the tree of dependency that they require. We will no longer need to make new theme-tools releases whenever we add new schemas. We'll be able to dev them and their file associations directly from Shopify/theme-liquid-docs and have downstream consumers updated automatically (the same way docs are automatically updated).

  • 03b41e1: Breaking: the Config object requires a context property.

    This is mostly for internal use, but documented here anyway.

Patch Changes

@shopify/[email protected]

04 Apr 18:31
fccecc9
Compare
Choose a tag to compare

Minor Changes

  • 03b41e1: Breaking: jsonValidationSet's schemas public API change

    Now takes a function of the following signature:

    interface JsonValidationSet = {
      schemas: (context: 'theme' | 'app') => Promise<SchemaDefinition[]>
    }

    Reason being we want to support fileMatch overloading of blocks/*.liquid files and we needed a way to identify which context you're in.

    Unfortunately, the JSON schema for blocks/*.liquid files in theme app extensions isn't the same one we have in themes. There doesn't seem to be a way to unify them either.

  • 03b41e1: Add support for the schemas manifest on Shopify/theme-liquid-docs

    Shopify/theme-liquid-docs now supports composable JSON schemas (with relative paths). To solve the blocks/*.liquid file match JSON schema overload depending on the context (app or theme), we defined two manifests that describe the schemas required by your solution and define the fileMatch rules:

    @shopify/theme-check-docs-updater now reads those manifests and downloads the tree of dependency that they require. We will no longer need to make new theme-tools releases whenever we add new schemas. We'll be able to dev them and their file associations directly from Shopify/theme-liquid-docs and have downstream consumers updated automatically (the same way docs are automatically updated).

Patch Changes

@shopify/[email protected]

04 Apr 18:31
fccecc9
Compare
Choose a tag to compare

Minor Changes

  • 03b41e1: Breaking: jsonValidationSet's schemas public API change

    Now takes a function of the following signature:

    interface JsonValidationSet = {
      schemas: (context: 'theme' | 'app') => Promise<SchemaDefinition[]>
    }

    Reason being we want to support fileMatch overloading of blocks/*.liquid files and we needed a way to identify which context you're in.

    Unfortunately, the JSON schema for blocks/*.liquid files in theme app extensions isn't the same one we have in themes. There doesn't seem to be a way to unify them either.

  • 03b41e1: Theme Check Config files now accept the context property

    In your .theme-check.yml files, you can set the context property to theme or app. By default, it's theme. The theme-check:theme-app-extension config sets it to app.

    You shouldn't need to care about this. It's there so we can do contextual things internally.

  • 03b41e1: Add support for the schemas manifest on Shopify/theme-liquid-docs

    Shopify/theme-liquid-docs now supports composable JSON schemas (with relative paths). To solve the blocks/*.liquid file match JSON schema overload depending on the context (app or theme), we defined two manifests that describe the schemas required by your solution and define the fileMatch rules:

    @shopify/theme-check-docs-updater now reads those manifests and downloads the tree of dependency that they require. We will no longer need to make new theme-tools releases whenever we add new schemas. We'll be able to dev them and their file associations directly from Shopify/theme-liquid-docs and have downstream consumers updated automatically (the same way docs are automatically updated).

Patch Changes

@shopify/[email protected]

04 Apr 18:31
fccecc9
Compare
Choose a tag to compare

Minor Changes

  • 03b41e1: Breaking: jsonValidationSet's schemas public API change

    Now takes a function of the following signature:

    interface JsonValidationSet = {
      schemas: (context: 'theme' | 'app') => Promise<SchemaDefinition[]>
    }

    Reason being we want to support fileMatch overloading of blocks/*.liquid files and we needed a way to identify which context you're in.

    Unfortunately, the JSON schema for blocks/*.liquid files in theme app extensions isn't the same one we have in themes. There doesn't seem to be a way to unify them either.

  • 03b41e1: Add support for the schemas manifest on Shopify/theme-liquid-docs

    Shopify/theme-liquid-docs now supports composable JSON schemas (with relative paths). To solve the blocks/*.liquid file match JSON schema overload depending on the context (app or theme), we defined two manifests that describe the schemas required by your solution and define the fileMatch rules:

    @shopify/theme-check-docs-updater now reads those manifests and downloads the tree of dependency that they require. We will no longer need to make new theme-tools releases whenever we add new schemas. We'll be able to dev them and their file associations directly from Shopify/theme-liquid-docs and have downstream consumers updated automatically (the same way docs are automatically updated).

Patch Changes

@shopify/[email protected]

04 Apr 18:31
fccecc9
Compare
Choose a tag to compare

Minor Changes

  • 03b41e1: Breaking: jsonValidationSet's schemas public API change

    Now takes a function of the following signature:

    interface JsonValidationSet = {
      schemas: (context: 'theme' | 'app') => Promise<SchemaDefinition[]>
    }

    Reason being we want to support fileMatch overloading of blocks/*.liquid files and we needed a way to identify which context you're in.

    Unfortunately, the JSON schema for blocks/*.liquid files in theme app extensions isn't the same one we have in themes. There doesn't seem to be a way to unify them either.

  • 03b41e1: Theme Check Config files now accept the context property

    In your .theme-check.yml files, you can set the context property to theme or app. By default, it's theme. The theme-check:theme-app-extension config sets it to app.

    You shouldn't need to care about this. It's there so we can do contextual things internally.

  • 03b41e1: Add support for the schemas manifest on Shopify/theme-liquid-docs

    Shopify/theme-liquid-docs now supports composable JSON schemas (with relative paths). To solve the blocks/*.liquid file match JSON schema overload depending on the context (app or theme), we defined two manifests that describe the schemas required by your solution and define the fileMatch rules:

    @shopify/theme-check-docs-updater now reads those manifests and downloads the tree of dependency that they require. We will no longer need to make new theme-tools releases whenever we add new schemas. We'll be able to dev them and their file associations directly from Shopify/theme-liquid-docs and have downstream consumers updated automatically (the same way docs are automatically updated).

@shopify/[email protected]

04 Apr 18:31
fccecc9
Compare
Choose a tag to compare

Minor Changes

  • 03b41e1: Breaking: jsonValidationSet's schemas public API change

    Now takes a function of the following signature:

    interface JsonValidationSet = {
      schemas: (context: 'theme' | 'app') => Promise<SchemaDefinition[]>
    }

    Reason being we want to support fileMatch overloading of blocks/*.liquid files and we needed a way to identify which context you're in.

    Unfortunately, the JSON schema for blocks/*.liquid files in theme app extensions isn't the same one we have in themes. There doesn't seem to be a way to unify them either.

  • 03b41e1: Theme Check Config files now accept the context property

    In your .theme-check.yml files, you can set the context property to theme or app. By default, it's theme. The theme-check:theme-app-extension config sets it to app.

    You shouldn't need to care about this. It's there so we can do contextual things internally.

  • 03b41e1: Add support for the schemas manifest on Shopify/theme-liquid-docs

    Shopify/theme-liquid-docs now supports composable JSON schemas (with relative paths). To solve the blocks/*.liquid file match JSON schema overload depending on the context (app or theme), we defined two manifests that describe the schemas required by your solution and define the fileMatch rules:

    @shopify/theme-check-docs-updater now reads those manifests and downloads the tree of dependency that they require. We will no longer need to make new theme-tools releases whenever we add new schemas. We'll be able to dev them and their file associations directly from Shopify/theme-liquid-docs and have downstream consumers updated automatically (the same way docs are automatically updated).

Patch Changes

@shopify/[email protected]

27 Mar 19:50
8447311
Compare
Choose a tag to compare

Patch Changes

@shopify/[email protected]

27 Mar 19:50
8447311
Compare
Choose a tag to compare

Minor Changes

  • 767d223: Breaking: Redesign jsonValidationSet public API

    (Only breaking for in-browser packages, node packages are still batteries-included)

    Before:

    type JsonValidationSet = {
      sectionSchema(): Promise<string>;
      translationSchema(): Promise<string>;
      validateSectionSchema(): Promise<ValidateFunction>;
    };

    After:

    type URI = string;
    
    type SchemaDefinition = {
      uri: string;
      fileMatch?: string[];
      schema: Promise<string>;
    };
    
    type JsonValidationSet = {
      schemas: SchemaDefinition[];
    };

    We’re getting rid of ajv and we’ll use vscode-json-languageservice in Theme Check instead. That dependency is required by the language server anyway, might as well reuse it instead of depending on a totally different solution for validation. We'll also get better reporting of Syntax Errors because the parser used by vscode-json-languageservice is better.

    Moreover, this new design leaves space for $ref support.

Patch Changes

@shopify/[email protected]

27 Mar 19:50
8447311
Compare
Choose a tag to compare

Minor Changes

  • 767d223: Breaking: Redesign jsonValidationSet public API

    (Only breaking for in-browser packages, node packages are still batteries-included)

    Before:

    type JsonValidationSet = {
      sectionSchema(): Promise<string>;
      translationSchema(): Promise<string>;
      validateSectionSchema(): Promise<ValidateFunction>;
    };

    After:

    type URI = string;
    
    type SchemaDefinition = {
      uri: string;
      fileMatch?: string[];
      schema: Promise<string>;
    };
    
    type JsonValidationSet = {
      schemas: SchemaDefinition[];
    };

    We’re getting rid of ajv and we’ll use vscode-json-languageservice in Theme Check instead. That dependency is required by the language server anyway, might as well reuse it instead of depending on a totally different solution for validation. We'll also get better reporting of Syntax Errors because the parser used by vscode-json-languageservice is better.

    Moreover, this new design leaves space for $ref support.

Patch Changes

@shopify/[email protected]

27 Mar 19:50
8447311
Compare
Choose a tag to compare

Patch Changes