- Updated dependencies [6803e99c]
- Updated dependencies [6803e99c]
- @shopify/liquid-html-parser@2.10.0
- @shopify/theme-check-common@3.28.0
- @shopify/theme-graph@0.3.0
- @shopify/theme-check-docs-updater@3.28.0
- Updated dependencies
- Updated dependencies [180eacbe]
- @shopify/theme-graph@0.2.8
- @shopify/theme-check-common@3.27.0
- @shopify/theme-check-docs-updater@3.27.0
- 7b107b4f: Fix RemoteAsset check incorrectly flagging base64 data URIs as external assets
- ab6c8369: Accept common aliases for built-in Theme Check configs in YAML
extendsvalues. - 8e63afac: Treat theme app extension blocks as theme graph entry points so snippets rendered by app blocks are not reported as orphaned.
- cacd8f32: [internal] local development fix for breakpoints
- Updated dependencies [388cd60b]
- Updated dependencies [3cc63ff2]
- Updated dependencies [8e63afac]
- Updated dependencies [cacd8f32]
- @shopify/theme-check-common@3.26.1
- @shopify/theme-graph@0.2.7
- @shopify/theme-check-docs-updater@3.26.1
- Updated dependencies
- Updated dependencies [892683dc]
- Updated dependencies [e330f115]
- @shopify/theme-graph@0.2.6
- @shopify/theme-check-common@3.26.0
- @shopify/theme-check-docs-updater@3.26.0
- 5f098a2d: Temporarily remove
ValidScopedCSSClassfrom the recommended config. The check causes severe save lag in VS Code on larger themes (see #1179) because it re-parses every{% stylesheet %}tag in the theme on every save. It remains available as an opt-in check. Will be re-enabled once the performance issue is resolved. - 54e1418b: Fix VSCode extension failing to resolve custom check packages from node_modules (e.g.
extends: '@acme/theme-check-extension/recommended.yml'). The extension server is webpack-bundled, sorequire.resolvewas being handled by webpack instead of Node.js, returning a module ID rather than a file path. Now usescreateRequirefromnode:moduleto get real Node.js resolution. - Updated dependencies
- Updated dependencies [5f098a2d]
- @shopify/theme-graph@0.2.5
- @shopify/theme-check-common@3.25.1
- @shopify/theme-check-docs-updater@3.25.1
-
78a55fc0: Introduce new theme-check to detect invalid CSS class usage in HTML
ValidScopedCSSClassdetects invalid CSS classes in HTML if it deems them being out of scope. A CSS class is in-scope if it matches any of the following:- The CSS class is declared in
assets/*.cssfile - The CSS class is declared in the file's
stylesheettag - The CSS class is declared in a direct ancestor's
stylesheettag - The CSS class is declared in a snippet file's
stylesheettag that is rendered by this file or its direct ancestor (recursive)
- The CSS class is declared in
- Updated dependencies [e10da7cc]
- Updated dependencies [020d34fd]
- Updated dependencies [78a55fc0]
- Updated dependencies [69513792]
- Updated dependencies [78a55fc0]
- @shopify/theme-check-common@3.25.0
- @shopify/theme-graph@0.2.4
- @shopify/theme-check-docs-updater@3.25.0
- bc8002ba: New theme check to ensure translation values inside of
schematag are valid
- Updated dependencies [346cc150]
- Updated dependencies [2df8b65e]
- Updated dependencies [bc8002ba]
- Updated dependencies [b1bca3f9]
- @shopify/theme-check-common@3.24.0
- @shopify/theme-check-docs-updater@3.24.0
- 8f523617: Bump to TypeScript 5
- Updated dependencies [8f523617]
- @shopify/theme-check-common@3.23.1
- @shopify/theme-check-docs-updater@3.23.1
- f00a1620: Remove 'CaptureOnContentForBlock' check — Theme development standards have evolved and changed, and this check has been fully deactivated on major themes. With more intense use blocks, this technique proven as a good approach to avoid duplication and promote reusability
- Updated dependencies [f00a1620]
- Updated dependencies [450b3f28]
- Updated dependencies [4bcb1126]
- Updated dependencies [dd1f4c8f]
- @shopify/theme-check-common@3.23.0
- @shopify/theme-check-docs-updater@3.23.0
- 0380e438: Added a new OrphanedSnippet theme check to discover and warn if a snippet isn't referenced anywhere
- Updated dependencies [2fb378ca]
- Updated dependencies [0c0f6c06]
- Updated dependencies [c2228360]
- Updated dependencies [0380e438]
- Updated dependencies [2784a83b]
- Updated dependencies [39a6e632]
- @shopify/theme-check-common@3.22.0
- @shopify/theme-check-docs-updater@3.22.0
- Updated dependencies [a7d0e2d0]
- Updated dependencies [e1bf12c7]
- Updated dependencies [1ebf9246]
- Updated dependencies [374ff3de]
- Updated dependencies [b226e52c]
- Updated dependencies [0bfc7859]
- @shopify/theme-check-common@3.21.0
- @shopify/theme-check-docs-updater@3.21.0
- d605777f: Remove theme-check ValidDocParamNames
- Updated dependencies [d605777f]
- @shopify/theme-check-common@3.20.1
- @shopify/theme-check-docs-updater@3.20.1
- 23992051: Update liquid paginate max limit rule from 50 to 250
- Updated dependencies [f28daa84]
- Updated dependencies [4ae72589]
- Updated dependencies [23992051]
- Updated dependencies [8ab6a8e7]
- @shopify/theme-check-common@3.20.0
- @shopify/theme-check-docs-updater@3.20.0
- Updated dependencies [a3a513dc]
- @shopify/theme-check-common@3.19.0
- @shopify/theme-check-docs-updater@3.19.0
- Updated dependencies [ce5cb33a]
- @shopify/theme-check-common@3.18.1
- @shopify/theme-check-docs-updater@3.18.1
- 649da6df: Introduce check that warn developers that
{% stylesheet %}and{% javascript %}tags only support static content - 444c9edc: Add hardcoded-routes theme check which reports a warning when hardcoded routes are used instead of the routes object
- 4477a6d9: Fix small windows bug in NodeFileSystem.readDirectory
- 06840d80: Fix readDirectory issue when root finding did not work
- Updated dependencies [649da6df]
- Updated dependencies [4477a6d9]
- Updated dependencies [606053f1]
- Updated dependencies [444c9edc]
- @shopify/theme-check-common@3.18.0
- @shopify/theme-check-docs-updater@3.18.0
- Updated dependencies [4d9ba806]
- @shopify/theme-check-common@3.17.1
- @shopify/theme-check-docs-updater@3.17.1
- Updated dependencies [20625a1b]
- Updated dependencies [c3504252]
- @shopify/theme-check-common@3.17.0
- @shopify/theme-check-docs-updater@3.17.0
- Updated dependencies [83b1b760]
- @shopify/theme-check-common@3.16.1
- @shopify/theme-check-docs-updater@3.16.1
- Updated dependencies [37f41c6e]
- Updated dependencies [7f243690]
- Updated dependencies [a1fa7376]
- Updated dependencies [90577cd2]
- Updated dependencies [19f5589b]
- @shopify/theme-check-common@3.16.0
- @shopify/theme-check-docs-updater@3.16.0
- Updated dependencies [d7949240]
- @shopify/theme-check-common@3.15.1
- @shopify/theme-check-docs-updater@3.15.1
-
4d557619: Add
content_forargument theme checks if static block has LiquidDoc- DuplicateContentForArguments - Ensures arguments provided for
content_fortag are unique - MissingContentForArguments - Ensures all required arguments, as per LiquidDoc, are provided
- UnrecognizedContentForArguments - Ensures arguments provided exclusively match LiquidDoc params
- ValidContentForArgumentTypes - Ensures arguments match type defined in LiquidDoc
- DuplicateContentForArguments - Ensures arguments provided for
-
c0f42c37: Restrict LiquidDoc param names in blocks based on
content_fortag params- LiquidDoc inside blocks have limitations on names because
content_fortag uses the following param names:- id
- type
- attributes
- block
- blocks
- class
- context
- inherit
- resource
- resources
- schema
- section
- sections
- settings
- snippet
- snippets
- template
- templates
- LiquidDoc inside blocks have limitations on names because
- aa43656b: [internal] Building blocks to support LiquidDoc for blocks
- Updated dependencies [4d557619]
- Updated dependencies [067a75eb]
- Updated dependencies [aa43656b]
- Updated dependencies [dccca5a5]
- Updated dependencies [c0f42c37]
- Updated dependencies [39339f88]
- Updated dependencies [660bd7df]
- Updated dependencies [c0f42c37]
- @shopify/theme-check-common@3.15.0
- @shopify/theme-check-docs-updater@3.15.0
- Updated dependencies [906455b0]
- @shopify/theme-check-common@3.14.1
- @shopify/theme-check-docs-updater@3.14.1
- 75c02293: Fix slow render tag theme checks
- Updated dependencies [b6f94d16]
- Updated dependencies [75c02293]
- Updated dependencies [e75f896d]
- Updated dependencies [034a803b]
- Updated dependencies [e75f896d]
- @shopify/theme-check-common@3.14.0
- @shopify/theme-check-docs-updater@3.14.0
- @shopify/theme-check-common@3.13.1
- @shopify/theme-check-docs-updater@3.13.1
- Updated dependencies [d9204c55]
- Updated dependencies [886ee4b1]
- Updated dependencies [cf51a514]
- Updated dependencies [3fff76bf]
- @shopify/theme-check-common@3.13.0
- @shopify/theme-check-docs-updater@3.13.0
- 449d1623: Fix false positives when running theme check on theme app extensions
- Updated dependencies [d42ed610]
- Updated dependencies [ea9f2451]
- Updated dependencies [6268e838]
- @shopify/theme-check-common@3.12.0
- @shopify/theme-check-docs-updater@3.12.0
- 5a5b7592: [Bug fix] Fix file URI handling for Windows platforms
- Updated dependencies [9ffbe27d]
- @shopify/theme-check-common@3.11.1
- @shopify/theme-check-docs-updater@3.11.1
-
8a0393a1: Theme check to ensure liquid doc param names don't collide with reserved words
- Theme check will report a warning if param name collides with global liquid objects
- Theme check will report a warning if param name collides with liquid tags
-
c55077e7: Split ValidRenderSnippetParams theme check into MissingRenderSnippetParams and UnrecognizedRenderSnippetParams. This allows them to be disabled independantly.
-
a851f379: Add DuplicateRenderSnippetParams theme check
Introduces a new theme check to detect and report duplicate parameters in Liquid render tags. The check:
- Identifies duplicate parameter names in render snippets
- Provides suggestions to remove redundant parameters
- Updated dependencies [8a0393a1]
- Updated dependencies [0d96194e]
- Updated dependencies [21354237]
- Updated dependencies [dafba833]
- Updated dependencies [c55077e7]
- Updated dependencies [48d4d79e]
- Updated dependencies [a851f379]
- @shopify/theme-check-common@3.11.0
- @shopify/theme-check-docs-updater@3.11.0
-
10493c9d: New
UnusedDocParamtheme-check rule- Theme check will verify that parameters defined within a snippet's
docheader are used within the body
- Theme check will verify that parameters defined within a snippet's
-
f130a78f: Introduce a new theme check which validates the types of parameters passed to snippets against the liquidDoc header.
- Reports type mismatches
- Suggests autofixes (replace with default or remove value)
- Skips type checking for variable lookups
- Skips type checking for unknown parameters
- Skips type checking for unknown types
-
1a4482eb: New theme checks to validate liquid doc params
UniqueDocParamNameswill check if param names are unique within thedoctagValidDocParamTypeswill check if the param types defined in thedoctag are supported
-
754f7f66: New theme check to ensure
doctag is only used in snippet files
- Updated dependencies [10493c9d]
- Updated dependencies [f130a78f]
- Updated dependencies [1a4482eb]
- Updated dependencies [5ad43a8c]
- Updated dependencies [79c9f773]
- Updated dependencies [754f7f66]
- Updated dependencies [dc8c9fda]
- Updated dependencies [beccb69e]
- @shopify/theme-check-common@3.10.0
- @shopify/theme-check-docs-updater@3.10.0
- Updated dependencies [f077a9ec]
- Updated dependencies [0bb780de]
- @shopify/theme-check-common@3.9.0
- @shopify/theme-check-docs-updater@3.9.0
-
fe84a17a: Add ValidRenderSnippetParams check which validates args passed to snippets with LiquidDoc definitions
- Checks that required parameters are provided
- Checks that unknown parameters are not provided
-
055cef77: Theme check verifies if setting key exists within block schemas and section schemas
- Check if the keys inside
presets.[].settingsanddefault.settingsexist assettings.[].idin the same file - Check if the keys inside
presets.[](recursive .blocks.[]).settingsanddefault.blocks.[].settingsexist assettings.[].idinside the referenced block's file
- Check if the keys inside
- Updated dependencies [fe84a17a]
- Updated dependencies [055cef77]
- Updated dependencies [e9c1d98a]
- Updated dependencies [d32afb7f]
- @shopify/theme-check-common@3.8.0
- @shopify/theme-check-docs-updater@3.8.0
- Updated dependencies [2ef93d17]
- @shopify/theme-check-common@3.7.2
- @shopify/theme-check-docs-updater@3.7.2
- 841ca6d1: Update repository URL for all packages to be case sensitive
- Updated dependencies [841ca6d1]
- @shopify/theme-check-docs-updater@3.7.1
- @shopify/theme-check-common@3.7.1
- Updated dependencies [c85a6131]
- Updated dependencies [913d5386]
- Updated dependencies [931dc9b9]
- @shopify/theme-check-common@3.7.0
- @shopify/theme-check-docs-updater@3.7.0
- @shopify/theme-check-common@3.6.1
- @shopify/theme-check-docs-updater@3.6.1
- Updated dependencies [c74850c8]
- Updated dependencies [c60e61ba]
- Updated dependencies [b31e0f85]
- Updated dependencies [34c2268a]
- @shopify/theme-check-common@3.6.0
- @shopify/theme-check-docs-updater@3.6.0
- d7436b4a: Add
JsonMissingBlockcheck - 6f1862c8: Add
SchemaPresetsStaticBlockscheck
- Updated dependencies [8e909870]
- Updated dependencies [d7436b4a]
- Updated dependencies [6f1862c8]
- Updated dependencies [d01e657b]
- @shopify/theme-check-common@3.5.0
- @shopify/theme-check-docs-updater@3.5.0
- Updated dependencies [8912fab8]
- Updated dependencies [51ec6a7a]
- @shopify/theme-check-common@3.4.0
- @shopify/theme-check-docs-updater@3.4.0
- 05ae5ea8: Added MissingSchema theme check to identify missing schemas in theme app extensions.
- 26215724: Add EmptyBlockContent Check
- 73758ba1: Add LiquidFreeSettings check
- 5e8a2bfe: Add
SchemaPresetsBlockOrdercheck - 1083b2bc: Refactor ValidBlockTarget and ValidLocalBlocks.
- Updated dependencies [05ae5ea8]
- Updated dependencies [3e69d732]
- Updated dependencies [26215724]
- Updated dependencies [73758ba1]
- Updated dependencies [5e8a2bfe]
- Updated dependencies [05b928ea]
- Updated dependencies [1083b2bc]
- Updated dependencies [a579d59e]
- Updated dependencies [5a2caaee]
- Updated dependencies [d2b5942a]
- @shopify/theme-check-common@3.3.0
- @shopify/theme-check-docs-updater@3.3.0
- Updated dependencies [16e2f37]
- @shopify/theme-check-common@3.2.2
- @shopify/theme-check-docs-updater@3.2.2
- 4a18a78: Temporarily disable ValidBlockTarget
- Updated dependencies [4a18a78]
- @shopify/theme-check-common@3.2.1
- @shopify/theme-check-docs-updater@3.2.1
- 3f7680e: Add the
ValidBlockTargetCheck - add2445: [Internal] Add better building blocks for dealing with
{% schema %}content - 8a0bf78: Add the
ValidLocalBlocksCheck - c4813ff: Add the
BlockIdUsagecheck
- 7a6dfe8: Fix weird root URI loading bug
- Updated dependencies [3f7680e]
- Updated dependencies [add2445]
- Updated dependencies [8a0bf78]
- Updated dependencies [7a6dfe8]
- Updated dependencies [7317830]
- Updated dependencies [c4813ff]
- Updated dependencies [b558bfe]
- Updated dependencies [9a07208]
- Updated dependencies [f09c923]
- @shopify/theme-check-common@3.2.0
- @shopify/theme-check-docs-updater@3.2.0
- b431db7: Add
ValidateSchemaNamecheck - 568d53b: Add the
ValidContentForArgumentscheck
- Updated dependencies [b431db7]
- Updated dependencies [568d53b]
- Updated dependencies [6014dfd]
- @shopify/theme-check-common@3.1.0
- @shopify/theme-check-docs-updater@3.1.0
-
4b574c1: [Breaking] Replace fs-based dependency injections with AbstractFileSystem injection
runChecks(theme, { - getDefaultTranslations, - getDefaultLocale, - getDefaultSchemaLocale, - getDefaultSchemaTranslations, - fileExists, - fileSize, + fs: new FileSystemImpl(), themeDocset, jsonValidationSet, })
- Updated dependencies [4b574c1]
- Updated dependencies [4b574c1]
- Updated dependencies [5fab0e9]
- @shopify/theme-check-common@3.0.0
- @shopify/theme-check-docs-updater@3.0.0
- @shopify/theme-check-common@2.9.2
- @shopify/theme-check-docs-updater@2.9.2
- @shopify/theme-check-common@2.9.1
- @shopify/theme-check-docs-updater@2.9.1
- 457f9cb: Add CaptureOnContentForBlock check
- Updated dependencies [457f9cb]
- Updated dependencies [edb7f2e]
- @shopify/theme-check-common@2.9.0
- @shopify/theme-check-docs-updater@2.9.0
- bb79d83: Add VariableName check
- Updated dependencies [bb79d83]
- @shopify/theme-check-common@2.7.0
- @shopify/theme-check-docs-updater@2.7.0
- Updated dependencies [ff78229]
- @shopify/theme-check-common@2.6.0
- @shopify/theme-check-docs-updater@2.6.0
- 0dc03a9: Prevent loading the same plugin more than once
- 312d804: Add logging support to the docs loader
- Updated dependencies [ec1fbd7]
- Updated dependencies [312d804]
- @shopify/theme-check-common@2.5.1
- @shopify/theme-check-docs-updater@2.5.1
-
03b41e1: Breaking:
jsonValidationSet's schemas public API changeNow takes a function of the following signature:
interface JsonValidationSet = { schemas: (context: 'theme' | 'app') => Promise<SchemaDefinition[]> }
Reason being we want to support
fileMatchoverloading ofblocks/*.liquidfiles and we needed a way to identify which context you're in.Unfortunately, the JSON schema for
blocks/*.liquidfiles 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
contextpropertyIn your
.theme-check.ymlfiles, you can set thecontextproperty tothemeorapp. By default, it'stheme. Thetheme-check:theme-app-extensionconfig sets it toapp.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/*.liquidfile match JSON schema overload depending on the context (apportheme), we defined two manifests that describe the schemas required by your solution and define the fileMatch rules:@shopify/theme-check-docs-updaternow 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).
- Updated dependencies [03b41e1]
- Updated dependencies [03b41e1]
- Updated dependencies [03b41e1]
- @shopify/theme-check-docs-updater@2.5.0
- @shopify/theme-check-common@2.5.0
- Updated dependencies [767d223]
- Updated dependencies [767d223]
- Updated dependencies [767d223]
- @shopify/theme-check-common@2.4.0
- @shopify/theme-check-docs-updater@2.4.0
-
8e3c7e2: Breaking: add
getDefaultSchema{Locale,Translations}(Factory)?dependenciesTo be used to power
MatchingTranslationsfor Schema translations.To be used to power Schema translations code completion and hover in section and theme block
{% schema %}JSON blobs.
- 8e3c7e2: Unify parseJSON usage
- Updated dependencies [8e3c7e2]
- Updated dependencies [8e3c7e2]
- Updated dependencies [8e3c7e2]
- @shopify/theme-check-common@2.3.0
- @shopify/theme-check-docs-updater@2.3.0
- 08ca661: Fix theme file glob on Windows (CLI issue)
- @shopify/theme-check-common@2.2.2
- @shopify/theme-check-docs-updater@2.2.2
- Updated dependencies [8710bde]
- @shopify/theme-check-common@2.2.1
- @shopify/theme-check-docs-updater@2.2.1
- d66d49c: Add
{findRoot, reusableFindRoot, PathHandler}to the public API
-
d66d49c: Improve root finding of theme app extensions and zipped themes
Folders for which all the following is true are considered a root:
- have a
snippets/folder, and - don't have a
../.theme-check.yml, - don't have a
../../.theme-check.yml.
No config file or
.gitfolder required. - have a
-
d66d49c: Unify root finding algorithm for node LS and TC packages
- @shopify/theme-check-common@2.2.0
- @shopify/theme-check-docs-updater@2.2.0
-
042f1e0: internal rename of
schemaValidatorstojsonValidationSetThe node packages absorbs this change and the dependency injection is not breaking.
-
402f151: Improve YAML parsing error messages caused by YAML aliases
ignore: # this causes an error because * at the start of a statement in YAML # is used for aliases to anchors such as `&.code-workspaces` - *.code-workspaces # what you want is this - '*.code-worksapces'
It’s a pretty obscure error for the non-initiated, so now we’ll instead throw an error like this:
YAML parsing error: Unresolved alias *.code-workspaces Did you forget to wrap it in quotes? '*.code-workspaces' -
Updated dependencies [042f1e0]
-
Updated dependencies [a9ae65f]
- @shopify/theme-check-docs-updater@2.1.0
- @shopify/theme-check-common@2.1.0
- Updated dependencies [84f9eda]
- @shopify/theme-check-docs-updater@2.0.4
- @shopify/theme-check-common@2.0.4
- e5022ee: Fix loadConfig export to automatically select .theme-check.yml if present
- @shopify/theme-check-common@2.0.3
- @shopify/theme-check-docs-updater@2.0.3
- 0990c47: Fix config validation problem that required optional settings
- 617b766: Add parser support for trailing commas at the end of Liquid tags and filters
- Updated dependencies [0990c47]
- Updated dependencies [617b766]
- @shopify/theme-check-common@2.0.2
- @shopify/theme-check-docs-updater@2.0.2
- Updated dependencies [8f19b87]
- @shopify/theme-check-common@2.0.1
- @shopify/theme-check-docs-updater@2.0.1
-
8451075: Theme Check 2.0
Our official release of the next iteration of Theme Check, the linter for Shopify themes.
What is is: A TypeScript rewrite of Theme Check.
But... why? A couple of reasons:
- To lint Liquid files, we prefer one Abstract Syntax Tree (AST) per file. Not one Liquid AST and one HTML AST.
- Theme Check Ruby had weird duplicated checks because of that (such as
ParserBlockingJavaScriptandParserBlockingScriptTag) - For that we reused the
@shopify/liquid-html-parserwe wrote for the prettier plugin. - One tree, two languages.
- Theme Check Ruby had weird duplicated checks because of that (such as
- We wanted to run the linter in the Online Store Code Editor and—unlike WASM or WebSockets—there is no overhead or latency cost to running a TypeScript-based Language Server in a Web Worker.
- Theme developers are Front End developers. If we were to make a Venn diagram, we'd observe that the intersection of Ruby and Theme developers is much smaller than that of JavaScript and Theme developers.
- This makes the TypeScript codebase easier to contribute to.
- This makes the plugin ecosystem more accessible (you're more likely to have a
package.jsonfile in a theme than aGemfile).
- The
@shopify/cliwas rewritten in TypeScript. This made the Ruby integration very problematic.- Windows performance was terrible
- Installation setup was weird, often problematic and complicated
- The VS Code extension required a secondary installation step, and thus lost the ability to automatically self-update
With the move to TypeScript, we believe that it will make it easier for us to ship more robust features faster.
- To lint Liquid files, we prefer one Abstract Syntax Tree (AST) per file. Not one Liquid AST and one HTML AST.
- 8451075:
package.jsonand README cleanups - Updated dependencies [8451075]
- Updated dependencies [8451075]
- @shopify/theme-check-common@2.0.0
- @shopify/theme-check-docs-updater@2.0.0
- 636895f: Make LiquidHTMLSyntaxError more tolerant to unclosed nodes in branching code
- aeb9b3f: Add
UnclosedHTMLElementcheck
- Updated dependencies [636895f]
- Updated dependencies [aeb9b3f]
- @shopify/theme-check-common@1.22.0
- @shopify/theme-check-docs-updater@1.22.0
- Updated dependencies [772a1ce]
- Updated dependencies [b05a6a8]
- @shopify/theme-check-docs-updater@1.21.0
- @shopify/theme-check-common@1.21.0
- Updated dependencies [79b0549]
- Updated dependencies [ac1deb4]
- @shopify/theme-check-common@1.20.1
- @shopify/theme-check-docs-updater@1.20.1
- 78813ea: Export config types (modern identifiers, legacy identifiers, etc.)
- 78813ea: Fix root finding for theme app extensions without a config file
- @shopify/theme-check-common@1.20.0
- @shopify/theme-check-docs-updater@1.20.0
- Updated dependencies [d9f3063]
- @shopify/theme-check-common@1.19.0
- @shopify/theme-check-docs-updater@1.19.0
- Updated dependencies [fe54680]
- Updated dependencies [e00c319]
- @shopify/theme-check-common@1.18.2
- @shopify/theme-check-docs-updater@1.18.2
- Updated dependencies [aa33c5f]
- Updated dependencies [0d71145]
- @shopify/theme-check-common@1.18.1
- @shopify/theme-check-docs-updater@1.18.1
- 96d4d5e: Re-add
ignoreMissingsupport toMissingTemplate
- 84aa24c: Superfluous settings as warnings not errors
- Updated dependencies [96d4d5e]
- Updated dependencies [dacdd9f]
- @shopify/theme-check-common@1.18.0
- @shopify/theme-check-docs-updater@1.18.0
- 2cf7a11: Rename and alias a couple of checks
DeprecatedFilters->DeprecatedFilterDeprecatedTags->DeprecatedTag- Alias
LiquidHTMLSyntaxErrorwithSyntaxErrorandHtmlParsingError - Alias
ParserBlockingJavaScriptwithParserBlockingScriptTag - Alias
JSONSyntaxErrorwithValidJson - Alias
AssetSizeCSSwithAssetSizeCSSStylesheetTag - Alias
RemoteAssetwithAssetUrlFilters
- Updated dependencies [2cf7a11]
- Updated dependencies [2cf7a11]
- @shopify/theme-check-common@1.17.0
- @shopify/theme-check-docs-updater@1.17.0
- b3bd123: Fix backward compatibility with legacy
{include,exclude}_categoriessettings - Updated dependencies [8d35241]
- Updated dependencies [201f30c]
- Updated dependencies [c0298e7]
- Updated dependencies [6fad756]
- Updated dependencies [fc86c91]
- @shopify/theme-check-common@1.16.1
- @shopify/theme-check-docs-updater@1.16.1
- 279a464: Add
RemoteAssetcheck
- Updated dependencies [279a464]
- Updated dependencies [d71a5e2]
- @shopify/theme-check-common@1.16.0
- @shopify/theme-check-docs-updater@1.16.0
- f8b4e05: Runs theme check with external docs
- Updated dependencies [6c2c00f]
- Updated dependencies [f1a642f]
- @shopify/theme-check-common@1.15.0
- @shopify/theme-check-docs-updater@1.15.0
- b7514f4: Fixup UndefinedObject for sections
- Updated dependencies [b7514f4]
- @shopify/theme-check-common@1.14.1
- a05aebb: Add
AssetSizeJavascriptcheck
- Updated dependencies [beeb85f]
- Updated dependencies [a05aebb]
- @shopify/theme-check-common@1.14.0
- 14b9ee2: Fixup package.json configs
- Updated dependencies [14b9ee2]
- @shopify/theme-check-common@1.13.1
- 441a8c5: Remove
ImgLazyLoading - 12c794a: Add
DeprecatedTagscheck - 38f549b: Add .theme-check.yml support to the new Language Server in VS Code
- c00e929: Bug fix for
AssetSizeCSS: Fixes redundant messages. - 7838869: Remove unused dep in theme-check-node
- c00e929: Bug fix for
AssetSizeAppBlockCSS: Corrects underlining issues. - c00e929: Bug fix for
AssetUrlFilters: Reports better messaging. - b1b8366: Fix the recommended and severity values
- c00e929: Bug fix for
AssetSizeAppBlockJavascript: Corrects underlining issues. - Updated dependencies [441a8c5]
- Updated dependencies [c00e929]
- Updated dependencies [972c26c]
- Updated dependencies [25b79f0]
- Updated dependencies [f3cda64]
- Updated dependencies [b1b8366]
- Updated dependencies [c00e929]
- Updated dependencies [c00e929]
- Updated dependencies [12c794a]
- Updated dependencies [b1b8366]
- Updated dependencies [b1b8366]
- Updated dependencies [c00e929]
- @shopify/theme-check-common@1.13.0
- Patch bump because it depends on @shopify/prettier-plugin-liquid
- Updated dependencies
- Updated dependencies [5479a63]
- Updated dependencies [5479a63]
- @shopify/theme-check-common@1.12.1
- @shopify/prettier-plugin-liquid@1.2.3
- 5ba20bd: Fixed bug for
AssetUrlFilterscheck - 5ba20bd: Add
ContentForHeaderModificationcheck - 5ba20bd: Add
AssetSizeCSScheck - 5ba20bd: Add
AssetSizeAppBlockJavascriptcheck - 5ba20bd: Add
AssetSizeAppBlockCSScheck
- Updated dependencies [5ba20bd]
- Updated dependencies [5ba20bd]
- Updated dependencies [5ba20bd]
- Updated dependencies [5ba20bd]
- Updated dependencies [5ba20bd]
- @shopify/theme-check-common@1.12.0
- 2e73166: Fix the
DocsetEntrytypes to better match the theme-liquid-docs json files - Updated dependencies [2e73166]
- @shopify/theme-check-common@1.11.1
- e67a16d: Breaking: Dependency injected json schema validators
- Updated dependencies [e67a16d]
- @shopify/theme-check-common@1.11.0
- 4db7c7e: Add
UnknownFiltercheck - a94f23c: Bump prettier-plugin-liquid to v1.2.1
- Updated dependencies [4db7c7e]
- Updated dependencies [a94f23c]
- @shopify/theme-check-common@1.10.0
-
b3ed3b9: Add
ValidSchemacheck -
d19500f: Add
AppBlockValidTagscheck -
8e76424: Add support for
.theme-check.ymlconfig filesNew features:
-
Developers can write their own checks and publish them to npm
Modules that follow the
@scope/theme-check-*ortheme-check-*naming conventions are automatically loaded.The
requireproperty of the configuration file can be used to load checks that do not follow the naming convention.See Creating a Theme Check extension for more info.
-
extendscan be an array -
extendscan refer to node module dependencies -
extendsalso accepts "modern" config identifiers:theme-check:allfor all the checks and with default settingstheme-check:recommendedfor the recommended checks and settingstheme-check:theme-app-extensionfor theme app extensions
Removed features:
include_categories: []exclude_categories: []
Replaced features:
require: []this can be used to load unconventional (or private)theme-check-jschecks. Ruby checks are not supported.
Breaking changes:
-
Custom checks written in Ruby won't work Theme Check in TypeScript
-
The
*(star) glob inignoreconfigurations does not capture the forward slash (/) unless at the end of the pattern.Fix: replace
*by**.This comes from a difference between how
minimatchand Ruby handles file globs.
Extra care has been placed to make the transition as smooth as possible.
-
-
3096e53: Add
ValidHTMLTranslationcheck -
daf5189: Add
AssetPreloadcheck -
6fb9db9: Add
ImgLazyLoadingcheck
- Updated dependencies [b3ed3b9]
- Updated dependencies [d19500f]
- Updated dependencies [8e76424]
- Updated dependencies [3096e53]
- Updated dependencies [daf5189]
- Updated dependencies [6fb9db9]
- @shopify/theme-check-common@1.9.0
- 2f0f941: Add
MissingAssetcheck - fd3fc3c: Add
AssetUrlFilters - 5ae97c9: Add
PaginationSizecheck - 85cf8f3: Add
CdnPreconnect - 051aff1: Introduce
ThemeDocsetandThemeSchemasdependencies to support core checks
- Updated dependencies [2f0f941]
- Updated dependencies [fd3fc3c]
- Updated dependencies [5ae97c9]
- Updated dependencies [85cf8f3]
- Updated dependencies [051aff1]
- @shopify/theme-check-common@1.8.0
- Bump prettier-plugin-liquid to v1.1.0
- Updated dependencies
- @shopify/theme-check-common@1.7.1
- 502bad8: Add documentation URLs to checks
- Updated dependencies [502bad8]
- @shopify/theme-check-common@1.7.0
- 9e99728: Add
UnusedAssign - f99c896: Add
LiquidHTMLSyntaxError - e0c131a: Add
JSONSyntaxError - e0c131a: Breaking:
SourceCodecan takeast: AST[T] | Error, whereErroris a parsing error - ccd5146: Add
DeprecatedLazysizes - c715fbe: Add
ImgWidthAndHeight - 9e99728: Add
RequiredLayoutThemeObject - edd8925: Add
DeprecateBgsizes
- 9d3d557: Fix RequiredLayoutThemeObject bugs
- Updated dependencies [cad8e17]
- Updated dependencies [9e99728]
- Updated dependencies [f99c896]
- Updated dependencies [e0c131a]
- Updated dependencies [e0c131a]
- Updated dependencies [ccd5146]
- Updated dependencies [c715fbe]
- Updated dependencies [9e99728]
- Updated dependencies [9d3d557]
- Updated dependencies [edd8925]
- @shopify/theme-check-common@1.6.0
- 60c92be: Fix unhandled TranslationKeyExists error
- Updated dependencies [60c92be]
- @shopify/theme-check-common@1.5.1
-
71e6b44: Add support for fixes and suggestions
New:
context.reportnow accepts two new properties:-
fix: Fixer, accepts a callback that is given a corrector and produces transformations that are deemed safe to apply without confirmation on the initial document.- JSON checks will receive a
JSONCorrector(API) - LiquidHTML checks will receive a
StringCorrector(API)
type Fixer<S> = (corrector: Corrector<S>) => void;
- JSON checks will receive a
-
suggest: Suggestion[], accepts an array of Suggestion. Those are like fixes but are not considered safe either because there's multiple ways to fix the problem or because the change requires care.type Suggestion<S> = { message: String; fix: Fixer<S>; };
Example usage:
// A safe change, add a "TODO" translation key context.report({ message: `The translation for '${path}' is missing`, startIndex: closest.loc!.start.offset, endIndex: closest.loc!.end.offset, fix(corrector) { // corrector is inferred to be a JSONCorrector corrector.add(path, 'TODO'); }, }); // An unsafe change, add `defer` or `async` attributes on the script tag context.report({ message: 'Avoid parser blocking scripts by adding `defer` or `async` on this tag', startIndex: node.position.start, endIndex: node.position.end, suggest: [{ message: 'Add defer attribute', fix: corrector => { // corrector is inferred to be a StringCorrector corrector.insert(node.blockStartPosition.end, ' defer') }, }, { message: 'Add async attribute', fix: corrector => { // corrector is inferred to be a StringCorrector corrector.insert(node.blockStartPosition.end, ' async') }; }], })
Under the hood, corrector calls will be converted into a list of
Fixobjects.One can implement a
FixApplicator(a async function that takes aSourceCodeandFixobjects) to apply fixes in different contexts.- In Node.js, we'll implement a
FixApplicatorthat applies the fixes to the initial file and then save the changes to disk. - In the Language Server, we'll implement
FixApplicators that turn theFixes intoTextEditobjects.
New: the top level API now offers the
autofixfunction, one that takes aFixApplicatoras argument.This
autofixfunction applies all the safe changes (and ignores suggestions). -
- Updated dependencies [71e6b44]
- @shopify/theme-check-common@1.5.0
- a8cda19: Add TranslationKeyExists to allChecks array
- Updated dependencies [9f8d47f]
- Updated dependencies [a8cda19]
- @shopify/theme-check-common@1.4.1
- 9d419ca: Breaking: change dependency
get defaultLocaletogetDefaultLocale(): Promise<string>
- Updated dependencies [9d419ca]
- @shopify/theme-check-common@1.4.0
- 72a9330: Breaking: Add
defaultLocaledependency - 72a9330: Add check TranslationKeyExists
- 5329963: Breaking: change signature of
getDefaultTranslationsto return aPromise<Translations>
- Updated dependencies [72a9330]
- Updated dependencies [5329963]
- Updated dependencies [72a9330]
- Updated dependencies [5329963]
- @shopify/theme-check-common@1.3.0
- Updated dependencies [4c099d5]
- Updated dependencies [4c099d5]
- @shopify/theme-check-common@1.2.0
-
f4a2f27: Simplify public API
Breaking changes:
ThemeisSourceCode<S>[]instead of{ files: Map<string, SourceCode<S>> }SourceCodeno longer has arelativePathpropertytoSourceCodeno longer takes arelativePathas argumentConfighas arootproperty
-
37fc98a: Add dependencies to public API
fileExists(absolutePath: string): Promise<boolean>returns true when a file existsgetDefaultTranslations(): Promise<JSONObject>returns the parsed JSON contents of the default translations file
These dependencies are now added to the
contextobject and are usable by checks.Those exists as a lean way to get rid of the assumptions that all files are in the
Themeobject. We should be able to go a long way with these.
- Updated dependencies [f4a2f27]
- Updated dependencies [37fc98a]
- @shopify/theme-check-common@1.1.0
- d206674: Move toSourceCode to common for use in language-server-common
- Updated dependencies [d206674]
- @shopify/theme-check-common@1.0.1
- 233f00f: Initial release