File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
packages/app/src/cli/services Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import {runWithTimer} from '@shopify/cli-kit/node/metadata'
1717import { AbortError } from '@shopify/cli-kit/node/error'
1818import { Writable } from 'stream'
1919
20- const SHOPIFY_FUNCTION_NPM_PACKAGE_MAJOR_VERSION = '1'
20+ export const SHOPIFY_FUNCTION_NPM_PACKAGE_MAJOR_VERSION = '1'
2121
2222class InvalidShopifyFunctionPackageError extends AbortError {
2323 constructor ( message : string ) {
Original file line number Diff line number Diff line change 11import { configurationFileNames , versions } from '../../constants.js'
22import { AppInterface } from '../../models/app/app.js'
3- import { buildGraphqlTypes } from '../function/build.js'
3+ import { buildGraphqlTypes , SHOPIFY_FUNCTION_NPM_PACKAGE_MAJOR_VERSION } from '../function/build.js'
44import { GenerateExtensionContentOutput } from '../../prompts/generate/extension.js'
55import { ExtensionFlavor , ExtensionTemplate } from '../../models/app/template.js'
66import { ensureDownloadedExtensionFlavorExists , ensureExtensionDirectoryExists } from '../extensions/common.js'
@@ -299,7 +299,10 @@ function getSrcFileExtension(extensionFlavor: ExtensionFlavorValue): SrcFileExte
299299export function getFunctionRuntimeDependencies ( templateLanguage : string ) : DependencyVersion [ ] {
300300 const dependencies : DependencyVersion [ ] = [ ]
301301 if ( templateLanguage === 'javascript' ) {
302- dependencies . push ( { name : '@shopify/shopify_function' , version : '1.0.0' } )
302+ dependencies . push ( {
303+ name : '@shopify/shopify_function' ,
304+ version : `~${ SHOPIFY_FUNCTION_NPM_PACKAGE_MAJOR_VERSION } .0.0` ,
305+ } )
303306 }
304307 return dependencies
305308}
You can’t perform that action at this time.
0 commit comments