@shopify/theme-check-node
Advanced tools
Comparing version 1.19.0 to 1.20.0
import { AbsolutePath, Config } from '@shopify/theme-check-common'; | ||
import { ModernIdentifier } from './types'; | ||
/** | ||
@@ -14,4 +15,4 @@ * Given an absolute path to a config file, this function returns | ||
/** The absolute path of config file */ | ||
configPath: AbsolutePath | undefined, | ||
configPath: AbsolutePath | ModernIdentifier | undefined, | ||
/** The root of the theme */ | ||
root?: AbsolutePath | undefined): Promise<Config>; |
@@ -11,2 +11,3 @@ "use strict"; | ||
const validation_1 = require("./validation"); | ||
const types_1 = require("./types"); | ||
/** | ||
@@ -26,3 +27,5 @@ * Given an absolute path to a config file, this function returns | ||
/** The root of the theme */ | ||
root = configPath ? node_path_1.default.dirname(configPath) : undefined) { | ||
root = configPath && !types_1.ModernIdentifiers.includes(configPath) | ||
? node_path_1.default.dirname(configPath) | ||
: undefined) { | ||
if (!root) | ||
@@ -29,0 +32,0 @@ throw new Error('loadConfig cannot be called without a root argument'); |
import { Config, JSONSourceCode, LiquidSourceCode, Offense, Theme } from '@shopify/theme-check-common'; | ||
import { loadConfig } from './config'; | ||
export * from '@shopify/theme-check-common'; | ||
export * from './config/types'; | ||
export { loadConfig }; | ||
@@ -5,0 +6,0 @@ export type ThemeCheckRun = { |
@@ -34,2 +34,3 @@ "use strict"; | ||
__exportStar(require("@shopify/theme-check-common"), exports); | ||
__exportStar(require("./config/types"), exports); | ||
async function toSourceCode(absolutePath) { | ||
@@ -36,0 +37,0 @@ try { |
{ | ||
"name": "@shopify/theme-check-node", | ||
"version": "1.19.0", | ||
"version": "1.20.0", | ||
"main": "dist/index.js", | ||
@@ -28,4 +28,4 @@ "types": "dist/index.d.ts", | ||
"dependencies": { | ||
"@shopify/theme-check-common": "1.19.0", | ||
"@shopify/theme-check-docs-updater": "1.19.0", | ||
"@shopify/theme-check-common": "1.20.0", | ||
"@shopify/theme-check-docs-updater": "1.20.0", | ||
"glob": "^8.0.3", | ||
@@ -32,0 +32,0 @@ "yaml": "^2.3.0" |
46404
992
+ Added@shopify/liquid-html-parser@1.1.1(transitive)
+ Added@shopify/theme-check-common@1.20.0(transitive)
+ Added@shopify/theme-check-docs-updater@1.20.0(transitive)
- Removed@shopify/liquid-html-parser@1.1.0(transitive)
- Removed@shopify/theme-check-common@1.19.0(transitive)
- Removed@shopify/theme-check-docs-updater@1.19.0(transitive)