diff --git a/build/continuous-deploy-fingerprint-info/index.js b/build/continuous-deploy-fingerprint-info/index.js index 8c5128812..18195a15f 100644 --- a/build/continuous-deploy-fingerprint-info/index.js +++ b/build/continuous-deploy-fingerprint-info/index.js @@ -28199,6 +28199,7 @@ const core_1 = __nccwpck_require__(7484); const exec_1 = __nccwpck_require__(5236); const io_1 = __nccwpck_require__(4994); const expo_1 = __nccwpck_require__(4503); +const packageRunner_1 = __nccwpck_require__(7253); async function getBuildInfoForCurrentFingerprintAsync({ platform, workingDirectory, environment, profile, isInPullRequest, }) { const humanReadablePlatformName = platform === 'ios' ? 'iOS' : 'Android'; const fingerprintHash = await getFingerprintHashForPlatformAsync({ @@ -28234,11 +28235,12 @@ async function getFingerprintHashForPlatformAsync({ cwd, platform, environment, let args; if (environment) { commandLine = await (0, io_1.which)('eas', true); - const commandToExecute = ['npx', ...baseArguments].join(' ').replace(/"/g, '\\"'); + const runner = await (0, packageRunner_1.resolvePackageRunner)(); + const commandToExecute = [runner, ...baseArguments].join(' ').replace(/"/g, '\\"'); args = ['env:exec', '--non-interactive', environment, `"${commandToExecute}"`]; } else { - commandLine = 'npx'; + commandLine = await (0, packageRunner_1.resolvePackageRunner)(); args = baseArguments; } const { stdout } = await (0, exec_1.getExecOutput)(commandLine, args, { @@ -28264,7 +28266,7 @@ async function getBuildInfoWithFingerprintAsync({ cwd, platform, profile, finger platform, '--buildProfile', profile, - '--runtimeVersion', + '--fingerprint-hash', fingerprintHash, '--limit', '1', @@ -28321,6 +28323,31 @@ function getInput(name, options) { } +/***/ }), + +/***/ 7253: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolvePackageRunner = resolvePackageRunner; +const io_1 = __nccwpck_require__(4994); +/** + * Resolve the package runner to use for executing expo commands. + * Prefers `bunx` if available (works better with bun-managed projects), + * falls back to `npx`. + */ +async function resolvePackageRunner() { + try { + return await (0, io_1.which)('bunx', true); + } + catch { + return 'npx'; + } +} + + /***/ }), /***/ 4330: @@ -28333,6 +28360,7 @@ exports.loadProjectConfig = loadProjectConfig; const core_1 = __nccwpck_require__(7484); const exec_1 = __nccwpck_require__(5236); const io_1 = __nccwpck_require__(4994); +const packageRunner_1 = __nccwpck_require__(7253); /** * Load the Expo app project config in the given directory. * This runs `expo config` command instead of using `@expo/config` directly, @@ -28345,11 +28373,12 @@ async function loadProjectConfig(cwd, easEnvironment) { let args; if (easEnvironment) { commandLine = await (0, io_1.which)('eas', true); - const commandToExecute = ['npx', ...baseArguments].join(' ').replace(/"/g, '\\"'); + const runner = await (0, packageRunner_1.resolvePackageRunner)(); + const commandToExecute = [runner, ...baseArguments].join(' ').replace(/"/g, '\\"'); args = ['env:exec', '--non-interactive', easEnvironment, `"${commandToExecute}"`]; } else { - commandLine = 'npx'; + commandLine = await (0, packageRunner_1.resolvePackageRunner)(); args = baseArguments; } try { diff --git a/build/continuous-deploy-fingerprint/index.js b/build/continuous-deploy-fingerprint/index.js index 4d713c2c1..794894bc7 100644 --- a/build/continuous-deploy-fingerprint/index.js +++ b/build/continuous-deploy-fingerprint/index.js @@ -35160,6 +35160,7 @@ const core_1 = __nccwpck_require__(7484); const exec_1 = __nccwpck_require__(5236); const io_1 = __nccwpck_require__(4994); const expo_1 = __nccwpck_require__(4503); +const packageRunner_1 = __nccwpck_require__(7253); async function getBuildInfoForCurrentFingerprintAsync({ platform, workingDirectory, environment, profile, isInPullRequest, }) { const humanReadablePlatformName = platform === 'ios' ? 'iOS' : 'Android'; const fingerprintHash = await getFingerprintHashForPlatformAsync({ @@ -35195,11 +35196,12 @@ async function getFingerprintHashForPlatformAsync({ cwd, platform, environment, let args; if (environment) { commandLine = await (0, io_1.which)('eas', true); - const commandToExecute = ['npx', ...baseArguments].join(' ').replace(/"/g, '\\"'); + const runner = await (0, packageRunner_1.resolvePackageRunner)(); + const commandToExecute = [runner, ...baseArguments].join(' ').replace(/"/g, '\\"'); args = ['env:exec', '--non-interactive', environment, `"${commandToExecute}"`]; } else { - commandLine = 'npx'; + commandLine = await (0, packageRunner_1.resolvePackageRunner)(); args = baseArguments; } const { stdout } = await (0, exec_1.getExecOutput)(commandLine, args, { @@ -35225,7 +35227,7 @@ async function getBuildInfoWithFingerprintAsync({ cwd, platform, profile, finger platform, '--buildProfile', profile, - '--runtimeVersion', + '--fingerprint-hash', fingerprintHash, '--limit', '1', @@ -35447,6 +35449,31 @@ function getInput(name, options) { } +/***/ }), + +/***/ 7253: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolvePackageRunner = resolvePackageRunner; +const io_1 = __nccwpck_require__(4994); +/** + * Resolve the package runner to use for executing expo commands. + * Prefers `bunx` if available (works better with bun-managed projects), + * falls back to `npx`. + */ +async function resolvePackageRunner() { + try { + return await (0, io_1.which)('bunx', true); + } + catch { + return 'npx'; + } +} + + /***/ }), /***/ 4330: @@ -35459,6 +35486,7 @@ exports.loadProjectConfig = loadProjectConfig; const core_1 = __nccwpck_require__(7484); const exec_1 = __nccwpck_require__(5236); const io_1 = __nccwpck_require__(4994); +const packageRunner_1 = __nccwpck_require__(7253); /** * Load the Expo app project config in the given directory. * This runs `expo config` command instead of using `@expo/config` directly, @@ -35471,11 +35499,12 @@ async function loadProjectConfig(cwd, easEnvironment) { let args; if (easEnvironment) { commandLine = await (0, io_1.which)('eas', true); - const commandToExecute = ['npx', ...baseArguments].join(' ').replace(/"/g, '\\"'); + const runner = await (0, packageRunner_1.resolvePackageRunner)(); + const commandToExecute = [runner, ...baseArguments].join(' ').replace(/"/g, '\\"'); args = ['env:exec', '--non-interactive', easEnvironment, `"${commandToExecute}"`]; } else { - commandLine = 'npx'; + commandLine = await (0, packageRunner_1.resolvePackageRunner)(); args = baseArguments; } try { diff --git a/build/preview-build/index.js b/build/preview-build/index.js index c9a089e3c..ca6953039 100644 --- a/build/preview-build/index.js +++ b/build/preview-build/index.js @@ -99069,6 +99069,31 @@ async function getPullRequestFromGitCommitShaAsync(options, gitCommitHash) { } +/***/ }), + +/***/ 7253: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolvePackageRunner = resolvePackageRunner; +const io_1 = __nccwpck_require__(4994); +/** + * Resolve the package runner to use for executing expo commands. + * Prefers `bunx` if available (works better with bun-managed projects), + * falls back to `npx`. + */ +async function resolvePackageRunner() { + try { + return await (0, io_1.which)('bunx', true); + } + catch { + return 'npx'; + } +} + + /***/ }), /***/ 3497: @@ -99133,6 +99158,7 @@ exports.loadProjectConfig = loadProjectConfig; const core_1 = __nccwpck_require__(7484); const exec_1 = __nccwpck_require__(5236); const io_1 = __nccwpck_require__(4994); +const packageRunner_1 = __nccwpck_require__(7253); /** * Load the Expo app project config in the given directory. * This runs `expo config` command instead of using `@expo/config` directly, @@ -99145,11 +99171,12 @@ async function loadProjectConfig(cwd, easEnvironment) { let args; if (easEnvironment) { commandLine = await (0, io_1.which)('eas', true); - const commandToExecute = ['npx', ...baseArguments].join(' ').replace(/"/g, '\\"'); + const runner = await (0, packageRunner_1.resolvePackageRunner)(); + const commandToExecute = [runner, ...baseArguments].join(' ').replace(/"/g, '\\"'); args = ['env:exec', '--non-interactive', easEnvironment, `"${commandToExecute}"`]; } else { - commandLine = 'npx'; + commandLine = await (0, packageRunner_1.resolvePackageRunner)(); args = baseArguments; } try { diff --git a/build/preview/index.js b/build/preview/index.js index e1a36eb41..fcd449c94 100644 --- a/build/preview/index.js +++ b/build/preview/index.js @@ -35523,6 +35523,31 @@ async function getPullRequestFromGitCommitShaAsync(options, gitCommitHash) { } +/***/ }), + +/***/ 7253: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolvePackageRunner = resolvePackageRunner; +const io_1 = __nccwpck_require__(4994); +/** + * Resolve the package runner to use for executing expo commands. + * Prefers `bunx` if available (works better with bun-managed projects), + * falls back to `npx`. + */ +async function resolvePackageRunner() { + try { + return await (0, io_1.which)('bunx', true); + } + catch { + return 'npx'; + } +} + + /***/ }), /***/ 4330: @@ -35535,6 +35560,7 @@ exports.loadProjectConfig = loadProjectConfig; const core_1 = __nccwpck_require__(7484); const exec_1 = __nccwpck_require__(5236); const io_1 = __nccwpck_require__(4994); +const packageRunner_1 = __nccwpck_require__(7253); /** * Load the Expo app project config in the given directory. * This runs `expo config` command instead of using `@expo/config` directly, @@ -35547,11 +35573,12 @@ async function loadProjectConfig(cwd, easEnvironment) { let args; if (easEnvironment) { commandLine = await (0, io_1.which)('eas', true); - const commandToExecute = ['npx', ...baseArguments].join(' ').replace(/"/g, '\\"'); + const runner = await (0, packageRunner_1.resolvePackageRunner)(); + const commandToExecute = [runner, ...baseArguments].join(' ').replace(/"/g, '\\"'); args = ['env:exec', '--non-interactive', easEnvironment, `"${commandToExecute}"`]; } else { - commandLine = 'npx'; + commandLine = await (0, packageRunner_1.resolvePackageRunner)(); args = baseArguments; } try { diff --git a/bun.lock b/bun.lock index 33e237562..f822282ce 100644 --- a/bun.lock +++ b/bun.lock @@ -1,5 +1,6 @@ { "lockfileVersion": 1, + "configVersion": 0, "workspaces": { "": { "name": "expo-github-action", diff --git a/src/fingerprintUtils.ts b/src/fingerprintUtils.ts index 23ea009de..2fd2efb73 100644 --- a/src/fingerprintUtils.ts +++ b/src/fingerprintUtils.ts @@ -3,6 +3,7 @@ import { getExecOutput } from '@actions/exec'; import { which } from '@actions/io'; import { BuildInfo, BuildStatus } from './expo'; +import { resolvePackageRunner } from './packageRunner'; export async function getBuildInfoForCurrentFingerprintAsync({ platform, @@ -68,10 +69,11 @@ async function getFingerprintHashForPlatformAsync({ let args: string[]; if (environment) { commandLine = await which('eas', true); - const commandToExecute = ['npx', ...baseArguments].join(' ').replace(/"/g, '\\"'); + const runner = await resolvePackageRunner(); + const commandToExecute = [runner, ...baseArguments].join(' ').replace(/"/g, '\\"'); args = ['env:exec', '--non-interactive', environment, `"${commandToExecute}"`]; } else { - commandLine = 'npx'; + commandLine = await resolvePackageRunner(); args = baseArguments; } @@ -112,7 +114,7 @@ export async function getBuildInfoWithFingerprintAsync({ platform, '--buildProfile', profile, - '--runtimeVersion', + '--fingerprint-hash', fingerprintHash, '--limit', '1', diff --git a/src/packageRunner.ts b/src/packageRunner.ts new file mode 100644 index 000000000..2ac66e9ab --- /dev/null +++ b/src/packageRunner.ts @@ -0,0 +1,14 @@ +import { which } from '@actions/io'; + +/** + * Resolve the package runner to use for executing expo commands. + * Prefers `bunx` if available (works better with bun-managed projects), + * falls back to `npx`. + */ +export async function resolvePackageRunner(): Promise { + try { + return await which('bunx', true); + } catch { + return 'npx'; + } +} diff --git a/src/project.ts b/src/project.ts index 4a88e533a..8c4779dea 100644 --- a/src/project.ts +++ b/src/project.ts @@ -3,6 +3,8 @@ import { getExecOutput } from '@actions/exec'; import { which } from '@actions/io'; import { ExpoConfig } from '@expo/config'; +import { resolvePackageRunner } from './packageRunner'; + /** * Load the Expo app project config in the given directory. * This runs `expo config` command instead of using `@expo/config` directly, @@ -20,10 +22,11 @@ export async function loadProjectConfig( let args: string[]; if (easEnvironment) { commandLine = await which('eas', true); - const commandToExecute = ['npx', ...baseArguments].join(' ').replace(/"/g, '\\"'); + const runner = await resolvePackageRunner(); + const commandToExecute = [runner, ...baseArguments].join(' ').replace(/"/g, '\\"'); args = ['env:exec', '--non-interactive', easEnvironment, `"${commandToExecute}"`]; } else { - commandLine = 'npx'; + commandLine = await resolvePackageRunner(); args = baseArguments; }