Skip to content

Commit

Permalink
Merge pull request #3475 from Shopify/prepare-javy-cli-for-global-cli
Browse files Browse the repository at this point in the history
Improve calls to javy-cli dependency
  • Loading branch information
isaacroldan authored Feb 23, 2024
2 parents 8b2561a + d8734dd commit 80fc3df
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 17 deletions.
1 change: 0 additions & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
"h3": "0.7.21",
"http-proxy": "1.18.1",
"ink": "4.4.1",
"javy-cli": "0.1.8",
"micromatch": "4.0.5",
"react": "18.2.0",
"react-dom": "18.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ describe('draftExtensionsPush', () => {
await draftExtensionsPush(draftExtensionsPushOptions(app))

// Then
expect(vi.mocked(exec)).toHaveBeenCalledWith('npm', ['exec', '--', 'javy', '--version'], {cwd: app.directory})
expect(vi.mocked(exec)).toHaveBeenCalledWith('npm', ['exec', '--', 'javy-cli', '--version'], {cwd: app.directory})
expect(updateExtensionDraft).toHaveBeenCalledOnce()
expect(enableDeveloperPreview).not.toHaveBeenCalled()
})
Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/cli/services/function/build.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ describe('runJavy', () => {
[
'exec',
'--',
'javy',
'javy-cli',
'compile',
'-d',
'-o',
Expand Down Expand Up @@ -329,7 +329,7 @@ describe('ExportJavyBuilder', () => {
[
'exec',
'--',
'javy',
'javy-cli',
'compile',
'-d',
'-o',
Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/cli/services/function/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export async function runJavy(
options: JSFunctionBuildOptions,
extra: string[] = [],
) {
const args = ['exec', '--', 'javy', 'compile', '-d', '-o', fun.outputPath, 'dist/function.js', ...extra]
const args = ['exec', '--', 'javy-cli', 'compile', '-d', '-o', fun.outputPath, 'dist/function.js', ...extra]

return exec('npm', args, {
cwd: fun.directory,
Expand All @@ -178,7 +178,7 @@ export async function runJavy(
export async function installJavy(app: AppInterface) {
const javyRequired = app.allExtensions.some((ext) => ext.features.includes('function') && ext.isJavaScript)
if (javyRequired) {
await exec('npm', ['exec', '--', 'javy', '--version'], {cwd: app.directory})
await exec('npm', ['exec', '--', 'javy-cli', '--version'], {cwd: app.directory})
}
}

Expand Down
11 changes: 0 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 80fc3df

Please sign in to comment.