File tree Expand file tree Collapse file tree 4 files changed +8
-14
lines changed
Expand file tree Collapse file tree 4 files changed +8
-14
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @shopify/app ' : minor
3+ ---
4+
5+ Unsupported sections in your app.toml file will present a validation error. Opt-out with SHOPIFY_CLI_DISABLE_UNSUPPORTED_CONFIG_PROPERTY_CHECKS.
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ export const environmentVariableNames = {
55 enableAppLogPolling : 'SHOPIFY_CLI_ENABLE_APP_LOG_POLLING' ,
66 templatesJsonPath : 'SHOPIFY_CLI_APP_TEMPLATES_JSON_PATH' ,
77 mkcertBinaryPath : 'SHOPIFY_CLI_MKCERT_BINARY' ,
8- enableUnsupportedConfigPropertyChecks : 'SHOPIFY_CLI_ENABLE_UNSUPPORTED_CONFIG_PROPERTY_CHECKS' ,
98 disableUnsupportedConfigPropertyChecks : 'SHOPIFY_CLI_DISABLE_UNSUPPORTED_CONFIG_PROPERTY_CHECKS' ,
109 disableMinificationOnDev : 'SHOPIFY_CLI_DISABLE_MINIFICATION_ON_DEV' ,
1110 disableWasmTomlPatch : 'SHOPIFY_CLI_DISABLE_WASM_TOML_PATCH' ,
Original file line number Diff line number Diff line change @@ -2547,8 +2547,7 @@ wrong = "property"
25472547 await expect ( loadTestingApp ( ) ) . rejects . toThrow ( AbortError )
25482548 } )
25492549
2550- test ( 'loads the app with an unsupported config property, under failure mode' , async ( ) => {
2551- vi . stubEnv ( 'SHOPIFY_CLI_ENABLE_UNSUPPORTED_CONFIG_PROPERTY_CHECKS' , '1' )
2550+ test ( 'loads the app with an unsupported config property, under failure mode (default)' , async ( ) => {
25522551 const linkedAppConfigurationWithExtraConfig = `
25532552 name = "for-testing"
25542553 client_id = "1234567890"
@@ -2575,7 +2574,6 @@ wrong = "property"
25752574 await expect ( loadTestingApp ( ) ) . rejects . toThrow (
25762575 'Unsupported section(s) in app configuration: and_another, something_else' ,
25772576 )
2578- vi . unstubAllEnvs ( )
25792577 } )
25802578
25812579 test ( 'loads the app with an unsupported config property, under passthrough mode' , async ( ) => {
Original file line number Diff line number Diff line change @@ -55,7 +55,6 @@ import {getArrayRejectingUndefined} from '@shopify/cli-kit/common/array'
5555import { showNotificationsIfNeeded } from '@shopify/cli-kit/node/notifications-system'
5656import ignore from 'ignore'
5757import { getEnvironmentVariables } from '@shopify/cli-kit/node/environment'
58- import { isShopify } from '@shopify/cli-kit/node/context/local'
5958import { isTruthy } from '@shopify/cli-kit/node/context/utilities'
6059
6160const defaultExtensionDirectory = 'extensions/*'
@@ -185,18 +184,11 @@ export function parseConfigurationObjectAgainstSpecification<TSchema extends zod
185184/**
186185 * Returns true if we should fail if an unsupported app.toml config property is found.
187186 *
188- * This is activated if SHOPIFY_CLI_ENABLE_UNSUPPORTED_CONFIG_PROPERTY_CHECKS is set or the developer is an internal Shopify dev.
187+ * This is deactivated if SHOPIFY_CLI_DISABLE_UNSUPPORTED_CONFIG_PROPERTY_CHECKS is set
189188 */
190189async function shouldFailIfUnsupportedConfigProperty ( ) : Promise < boolean > {
191190 const env = getEnvironmentVariables ( )
192- const enableUnsupportedConfigPropertyChecks = env [ environmentVariableNames . enableUnsupportedConfigPropertyChecks ]
193-
194- if ( isTruthy ( enableUnsupportedConfigPropertyChecks ) ) return true
195-
196- const isInternalDeveloper = await isShopify ( )
197- if ( ! isInternalDeveloper ) return false
198-
199- // internal devs can also opt-out
191+ // devs can also opt-out
200192 const disableUnsupportedConfigPropertyChecks = env [ environmentVariableNames . disableUnsupportedConfigPropertyChecks ]
201193 return ! isTruthy ( disableUnsupportedConfigPropertyChecks )
202194}
You can’t perform that action at this time.
0 commit comments