Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"@callstack/react-native-visionos": "0.76 - 0.79",
"@expo/config-plugins": ">=5.0",
"react": "18.2 - 19.2",
"react-native": "0.76 - 0.83 || >=0.83.0-0 <0.84.0",
"react-native": "0.76 - 0.84 || >=0.84.0-0 <0.85.0",
"react-native-macos": "^0.0.0-0 || 0.76 - 0.81",
"react-native-windows": "^0.0.0-0 || 0.76 - 0.81"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/app/scripts/testing/test-apple.mts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const getIOSSimulatorName = memo(() => {
"An error occurred while trying to evaluate 'wdio.config.mjs'"
);
}
return stdout.trim();
return `'${stdout.trim()}'`;
});

/**
Expand Down
10 changes: 6 additions & 4 deletions packages/app/scripts/testing/test-e2e.mts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ import { spawnSync } from "node:child_process";
import { Socket } from "node:net";
import { isMain } from "../helpers.js";

export const DEFAULT_SPAWN_OPTIONS = {
stdio: "inherit",
shell: true, // Yarn won't be able to find commands otherwise
} as const;

/**
* Invokes a shell command with optional arguments.
*/
export function $(command: string, ...args: string[]) {
const { status } = spawnSync(command, args, {
stdio: "inherit",
shell: process.platform === "win32",
});
const { status } = spawnSync(command, args, DEFAULT_SPAWN_OPTIONS);
if (status !== 0) {
throw new Error(
`An error occurred while executing: ${command} ${args.join(" ")}`
Expand Down
13 changes: 5 additions & 8 deletions packages/app/scripts/testing/test-matrix.mts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import type { BuildConfig, TargetPlatform } from "../types.js";
import { green, red, yellow } from "../utils/colors.mjs";
import { rm_r } from "../utils/filesystem.mjs";
import { getIOSSimulatorName, installPods } from "./test-apple.mts";
import { $, $$, test } from "./test-e2e.mts";
import { $, $$, DEFAULT_SPAWN_OPTIONS, test } from "./test-e2e.mts";

type PlatformConfig = {
name: string;
Expand Down Expand Up @@ -364,8 +364,8 @@ if (platforms.length === 0) {
.then(() => {
showBanner("Initialize new app");
$(
PACKAGE_MANAGER,
"init-test-app",
process.argv0,
"../scripts/init.mjs",
"--destination",
"template-example",
"--name",
Expand All @@ -379,7 +379,7 @@ if (platforms.length === 0) {
.then(() => {
showBanner("Reconfigure existing app");
const args = [
"configure-test-app",
"../scripts/configure.mjs",
"-p",
"android",
"-p",
Expand All @@ -391,10 +391,7 @@ if (platforms.length === 0) {
"-p",
"windows",
];
const { status } = spawnSync(PACKAGE_MANAGER, args, {
stdio: "inherit",
shell: process.platform === "win32",
});
const { status } = spawnSync(process.argv0, args, DEFAULT_SPAWN_OPTIONS);
if (status !== 1) {
throw new Error("Expected an error");
}
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12262,7 +12262,7 @@ __metadata:
"@callstack/react-native-visionos": 0.76 - 0.79
"@expo/config-plugins": ">=5.0"
react: 18.2 - 19.2
react-native: 0.76 - 0.83 || >=0.83.0-0 <0.84.0
react-native: 0.76 - 0.84 || >=0.84.0-0 <0.85.0
react-native-macos: ^0.0.0-0 || 0.76 - 0.81
react-native-windows: ^0.0.0-0 || 0.76 - 0.81
peerDependenciesMeta:
Expand Down
Loading