expo-desktop 0.1.20 → 0.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { spawn } from "node:child_process";
|
|
2
2
|
import fs from "node:fs/promises";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import
|
|
4
|
+
import process from "node:process";
|
|
5
5
|
import readline from "node:readline";
|
|
6
6
|
import { stripVTControlCharacters } from "node:util";
|
|
7
7
|
/**
|
|
8
8
|
* Clack {@link Task} that runs a subprocess; piped stdout/stderr lines are sent
|
|
9
|
-
* through the task `message` callback (not `log.message`). Lines are also kept
|
|
10
|
-
* an interleaved buffer; on failure they are written under
|
|
11
|
-
* {@link SpawnOptions.cwd} or the current working
|
|
9
|
+
* through the task `message` callback (not `log.message`). Lines are also kept
|
|
10
|
+
* in an interleaved buffer; on failure they are written under
|
|
11
|
+
* {@link debugLogDir} or {@link SpawnOptions.cwd} or the current working
|
|
12
|
+
* directory.
|
|
12
13
|
*/
|
|
13
14
|
export function promisifiedSpawnTask({ title, command, args, options = {}, debugLogDir, }) {
|
|
14
15
|
return {
|
|
@@ -16,7 +17,16 @@ export function promisifiedSpawnTask({ title, command, args, options = {}, debug
|
|
|
16
17
|
task: (message) => runPromisifiedSpawn({
|
|
17
18
|
command,
|
|
18
19
|
args,
|
|
19
|
-
options
|
|
20
|
+
options: {
|
|
21
|
+
// On Windows, Volta-managed package managers are spawned via .cmd
|
|
22
|
+
// shims which require shell interpretation. Although I've been having
|
|
23
|
+
// luck with `shell: false` with Volta-managed package managers on
|
|
24
|
+
// macOS, I'd rather just go with one consistent approach across all
|
|
25
|
+
// platforms, and `shell: true` will tend to reduce surprises.
|
|
26
|
+
// https://github.com/shirakaba/expo-desktop/issues/4
|
|
27
|
+
shell: true,
|
|
28
|
+
...options,
|
|
29
|
+
},
|
|
20
30
|
logLine: message,
|
|
21
31
|
...(debugLogDir !== undefined ? { debugLogDir } : {}),
|
|
22
32
|
}),
|
|
@@ -129,7 +139,7 @@ function envWithForcedColorIfPiped(options) {
|
|
|
129
139
|
const stdoutMode = Array.isArray(stdio) ? stdio.at(1) : stdio;
|
|
130
140
|
const stderrMode = Array.isArray(stdio) ? stdio.at(2) : stdio;
|
|
131
141
|
const capturesOutput = stdoutMode !== "inherit" || stderrMode !== "inherit";
|
|
132
|
-
const base = { ...env, ...options?.env };
|
|
142
|
+
const base = { ...process.env, ...options?.env };
|
|
133
143
|
if (!capturesOutput || base.NO_COLOR !== undefined) {
|
|
134
144
|
return base;
|
|
135
145
|
}
|
|
@@ -272,6 +272,9 @@ async function updatePackageJson({ localDev, name, projectPath, task, versions,
|
|
|
272
272
|
["expo-desktop-stubs"]: `^${versions.expoMajor}.0.0`,
|
|
273
273
|
};
|
|
274
274
|
for (const [key, value] of Object.entries(monorepoDeps)) {
|
|
275
|
+
// TODO: Try replacing this `localDev` logic with `linkWorkspacePackages`:
|
|
276
|
+
// - https://pnpm.io/workspaces#linkworkspacepackages
|
|
277
|
+
// - https://pnpm.io/workspaces#workspace-protocol-workspace
|
|
275
278
|
packageJson.dependencies[key] = localDev ? `file:../../${key}` : value;
|
|
276
279
|
}
|
|
277
280
|
packageJson.dependencies["react-native-macos"] = versions.macos;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-desktop",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.23",
|
|
4
4
|
"description": "Best-effort desktop support for Expo",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"android",
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
"@clack/prompts": "^1.2.0",
|
|
38
38
|
"arktype": "^2.2.0",
|
|
39
39
|
"citty": "^0.2.2",
|
|
40
|
+
"expo-desktop-config-plugins": "^1.1.22",
|
|
41
|
+
"expo-desktop-prebuild-config": "^1.0.11",
|
|
40
42
|
"glob": "^10.5.0",
|
|
41
43
|
"kleur": "^4.1.5",
|
|
42
44
|
"mustache": "^4.2.0",
|
|
43
|
-
"toml": "^4.1.1"
|
|
44
|
-
"expo-desktop-config-plugins": "1.1.20",
|
|
45
|
-
"expo-desktop-prebuild-config": "1.0.9"
|
|
45
|
+
"toml": "^4.1.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@expo/config": "^12.0.13",
|