@react-native/core-cli-utils 0.82.0-nightly-20250727-df3f0967b → 0.82.0-nightly-20250729-e17e3e3f3
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.
- package/dist/index.js +1 -1
- package/dist/private/android.js +1 -1
- package/dist/private/app.js +11 -11
- package/dist/private/apple.js +16 -16
- package/dist/private/clean.d.ts +3 -3
- package/dist/private/clean.js +14 -14
- package/dist/private/clean.js.flow +2 -2
- package/dist/private/utils.d.ts +2 -2
- package/dist/private/utils.js.flow +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -35,7 +35,7 @@ function _interopRequireWildcard(e, r) {
|
|
|
35
35
|
var i = a ? Object.getOwnPropertyDescriptor(e, u) : null;
|
|
36
36
|
i && (i.get || i.set) ? Object.defineProperty(n, u, i) : (n[u] = e[u]);
|
|
37
37
|
}
|
|
38
|
-
return (n.default = e), t && t.set(e, n), n;
|
|
38
|
+
return ((n.default = e), t && t.set(e, n), n);
|
|
39
39
|
}
|
|
40
40
|
const android = (exports.android = _android2.tasks);
|
|
41
41
|
const app = (exports.app = _app2.tasks);
|
package/dist/private/android.js
CHANGED
package/dist/private/app.js
CHANGED
|
@@ -37,7 +37,7 @@ const tasks = (exports.tasks = {
|
|
|
37
37
|
}
|
|
38
38
|
}),
|
|
39
39
|
javascript: (0, _utils.task)(SECOND, "Metro watching for changes", () =>
|
|
40
|
-
metro("serve", ...args)
|
|
40
|
+
metro("serve", ...args),
|
|
41
41
|
),
|
|
42
42
|
};
|
|
43
43
|
return options.mode === "bundle"
|
|
@@ -53,7 +53,7 @@ const bundleApp = (options, ...metroArgs) => {
|
|
|
53
53
|
options.jsvm === "hermes" ? options.outputJsBundle : options.outputBundle;
|
|
54
54
|
if (output === options.outputJsBundle && !output.endsWith(".js")) {
|
|
55
55
|
log(
|
|
56
|
-
`Appending .js to outputBundle (because metro cli does it if it's missing): ${output}
|
|
56
|
+
`Appending .js to outputBundle (because metro cli does it if it's missing): ${output}`,
|
|
57
57
|
);
|
|
58
58
|
output += ".js";
|
|
59
59
|
}
|
|
@@ -81,7 +81,7 @@ const bundleApp = (options, ...metroArgs) => {
|
|
|
81
81
|
args.push("--source-map");
|
|
82
82
|
}
|
|
83
83
|
return metro("build", options.entryFile, ...args, ...metroArgs);
|
|
84
|
-
}
|
|
84
|
+
},
|
|
85
85
|
),
|
|
86
86
|
};
|
|
87
87
|
if (options.jsvm === "jsc") {
|
|
@@ -95,7 +95,7 @@ const bundleApp = (options, ...metroArgs) => {
|
|
|
95
95
|
if (!isHermesInstalled) {
|
|
96
96
|
throw new Error(
|
|
97
97
|
"Hermes Pod must be installed before bundling.\n" +
|
|
98
|
-
"Did you forget to bootstrap?"
|
|
98
|
+
"Did you forget to bootstrap?",
|
|
99
99
|
);
|
|
100
100
|
}
|
|
101
101
|
const hermesc = _path.default.join(hermes.path, hermes.hermesc);
|
|
@@ -106,15 +106,15 @@ const bundleApp = (options, ...metroArgs) => {
|
|
|
106
106
|
"Check if SourceMap script available",
|
|
107
107
|
() => {
|
|
108
108
|
composeSourceMaps = getNodePackagePath(
|
|
109
|
-
"react-native/scripts/compose-source-maps.js"
|
|
109
|
+
"react-native/scripts/compose-source-maps.js",
|
|
110
110
|
);
|
|
111
|
-
}
|
|
111
|
+
},
|
|
112
112
|
);
|
|
113
113
|
}
|
|
114
114
|
bundle.validateHermesc = (0, _utils.task)(
|
|
115
115
|
FIRST,
|
|
116
116
|
"Check if Hermesc is available",
|
|
117
|
-
() => (0, _execa.default)(hermesc, ["--version"])
|
|
117
|
+
() => (0, _execa.default)(hermesc, ["--version"]),
|
|
118
118
|
);
|
|
119
119
|
bundle.convert = (0, _utils.task)(
|
|
120
120
|
THIRD,
|
|
@@ -132,7 +132,7 @@ const bundleApp = (options, ...metroArgs) => {
|
|
|
132
132
|
return (0, _execa.default)(hermesc, args, {
|
|
133
133
|
cwd: options.cwd,
|
|
134
134
|
});
|
|
135
|
-
}
|
|
135
|
+
},
|
|
136
136
|
);
|
|
137
137
|
bundle.compose = (0, _utils.task)(
|
|
138
138
|
FOURTH,
|
|
@@ -140,7 +140,7 @@ const bundleApp = (options, ...metroArgs) => {
|
|
|
140
140
|
() => {
|
|
141
141
|
if (composeSourceMaps == null) {
|
|
142
142
|
throw new Error(
|
|
143
|
-
"Unable to find the compose-source-map.js script in react-native"
|
|
143
|
+
"Unable to find the compose-source-map.js script in react-native",
|
|
144
144
|
);
|
|
145
145
|
}
|
|
146
146
|
const metroSourceMap = output.replace(/(\.js)?$/, ".map");
|
|
@@ -155,7 +155,7 @@ const bundleApp = (options, ...metroArgs) => {
|
|
|
155
155
|
],
|
|
156
156
|
{
|
|
157
157
|
cwd: options.cwd,
|
|
158
|
-
}
|
|
158
|
+
},
|
|
159
159
|
);
|
|
160
160
|
compose.finally(() => {
|
|
161
161
|
_fs.default.rmSync(metroSourceMap, {
|
|
@@ -166,7 +166,7 @@ const bundleApp = (options, ...metroArgs) => {
|
|
|
166
166
|
});
|
|
167
167
|
});
|
|
168
168
|
return compose;
|
|
169
|
-
}
|
|
169
|
+
},
|
|
170
170
|
);
|
|
171
171
|
return bundle;
|
|
172
172
|
};
|
package/dist/private/apple.js
CHANGED
|
@@ -17,7 +17,7 @@ function checkPodfileInSyncWithManifest(lockfilePath, manifestLockfilePath) {
|
|
|
17
17
|
const found = _fs.default.readFileSync(manifestLockfilePath, "utf8");
|
|
18
18
|
if (expected !== found) {
|
|
19
19
|
throw new Error(
|
|
20
|
-
"Please run: yarn bootstrap ios, Podfile.lock and Pods/Manifest.lock are out of sync"
|
|
20
|
+
"Please run: yarn bootstrap ios, Podfile.lock and Pods/Manifest.lock are out of sync",
|
|
21
21
|
);
|
|
22
22
|
}
|
|
23
23
|
} catch (e) {
|
|
@@ -43,12 +43,12 @@ const tasks = (exports.tasks = {
|
|
|
43
43
|
}),
|
|
44
44
|
runCodegen: (0, _utils.task)(SECOND, "Run codegen", () => {
|
|
45
45
|
const reactNativePath = _path.default.dirname(
|
|
46
|
-
getNodePackagePath("react-native")
|
|
46
|
+
getNodePackagePath("react-native"),
|
|
47
47
|
);
|
|
48
48
|
const codegenScript = _path.default.join(
|
|
49
49
|
reactNativePath,
|
|
50
50
|
"scripts",
|
|
51
|
-
"generate-codegen-artifacts.js"
|
|
51
|
+
"generate-codegen-artifacts.js",
|
|
52
52
|
);
|
|
53
53
|
_execa.default.sync("node", [
|
|
54
54
|
codegenScript,
|
|
@@ -66,14 +66,14 @@ const tasks = (exports.tasks = {
|
|
|
66
66
|
() => {
|
|
67
67
|
(0, _utils.assertDependencies)(
|
|
68
68
|
(0, _utils.isOnPath)("pod", "CocoaPods"),
|
|
69
|
-
(0, _utils.isOnPath)("bundle", "Bundler to manage Ruby's gems")
|
|
69
|
+
(0, _utils.isOnPath)("bundle", "Bundler to manage Ruby's gems"),
|
|
70
70
|
);
|
|
71
|
-
}
|
|
71
|
+
},
|
|
72
72
|
),
|
|
73
73
|
installRubyGems: (0, _utils.task)(FOURTH, "Install Ruby Gems", () =>
|
|
74
74
|
(0, _execa.default)("bundle", ["install"], {
|
|
75
75
|
cwd: options.cwd,
|
|
76
|
-
})
|
|
76
|
+
}),
|
|
77
77
|
),
|
|
78
78
|
installDependencies: (0, _utils.task)(
|
|
79
79
|
FIFTH,
|
|
@@ -92,7 +92,7 @@ const tasks = (exports.tasks = {
|
|
|
92
92
|
cwd: options.cwd,
|
|
93
93
|
env,
|
|
94
94
|
});
|
|
95
|
-
}
|
|
95
|
+
},
|
|
96
96
|
),
|
|
97
97
|
}),
|
|
98
98
|
build: (options, ...args) => ({
|
|
@@ -101,9 +101,9 @@ const tasks = (exports.tasks = {
|
|
|
101
101
|
"Check you've run xcode-select --install for xcodebuild",
|
|
102
102
|
() => {
|
|
103
103
|
(0, _utils.assertDependencies)(
|
|
104
|
-
(0, _utils.isOnPath)("xcodebuild", "Xcode Commandline Tools")
|
|
104
|
+
(0, _utils.isOnPath)("xcodebuild", "Xcode Commandline Tools"),
|
|
105
105
|
);
|
|
106
|
-
}
|
|
106
|
+
},
|
|
107
107
|
),
|
|
108
108
|
hasPodsInstalled: (0, _utils.task)(
|
|
109
109
|
FIRST,
|
|
@@ -113,7 +113,7 @@ const tasks = (exports.tasks = {
|
|
|
113
113
|
try {
|
|
114
114
|
_fs.default.accessSync(
|
|
115
115
|
_path.default.join(options.cwd, file),
|
|
116
|
-
_fs.default.constants.F_OK | _fs.default.constants.R_OK
|
|
116
|
+
_fs.default.constants.F_OK | _fs.default.constants.R_OK,
|
|
117
117
|
);
|
|
118
118
|
} catch (e) {
|
|
119
119
|
throw new Error("Please run: yarn run boostrap ios: " + e.message);
|
|
@@ -121,9 +121,9 @@ const tasks = (exports.tasks = {
|
|
|
121
121
|
}
|
|
122
122
|
checkPodfileInSyncWithManifest(
|
|
123
123
|
_path.default.join(options.cwd, "Podfile.lock"),
|
|
124
|
-
_path.default.join(options.cwd, "Pods/Manifest.lock")
|
|
124
|
+
_path.default.join(options.cwd, "Pods/Manifest.lock"),
|
|
125
125
|
);
|
|
126
|
-
}
|
|
126
|
+
},
|
|
127
127
|
),
|
|
128
128
|
build: (0, _utils.task)(SECOND, "build an app artifact", () => {
|
|
129
129
|
const _args = [
|
|
@@ -160,9 +160,9 @@ const tasks = (exports.tasks = {
|
|
|
160
160
|
"Check you've run xcode-select --install for xcrun",
|
|
161
161
|
() => {
|
|
162
162
|
(0, _utils.assertDependencies)(
|
|
163
|
-
(0, _utils.isOnPath)("xcrun", "An Xcode Commandline tool: xcrun")
|
|
163
|
+
(0, _utils.isOnPath)("xcrun", "An Xcode Commandline tool: xcrun"),
|
|
164
164
|
);
|
|
165
|
-
}
|
|
165
|
+
},
|
|
166
166
|
),
|
|
167
167
|
install: (0, _utils.task)(SECOND, "Install the app on a simulator", () =>
|
|
168
168
|
(0, _execa.default)(
|
|
@@ -171,8 +171,8 @@ const tasks = (exports.tasks = {
|
|
|
171
171
|
{
|
|
172
172
|
cwd: options.cwd,
|
|
173
173
|
env: options.env,
|
|
174
|
-
}
|
|
175
|
-
)
|
|
174
|
+
},
|
|
175
|
+
),
|
|
176
176
|
),
|
|
177
177
|
}),
|
|
178
178
|
},
|
package/dist/private/clean.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ import type { ExecaPromise, Options as ExecaOptions } from "execa";
|
|
|
16
16
|
*/
|
|
17
17
|
export declare function deleteDirectoryContents(
|
|
18
18
|
directory: string,
|
|
19
|
-
filePattern: RegExp
|
|
19
|
+
filePattern: RegExp,
|
|
20
20
|
): () => Promise<void>;
|
|
21
21
|
/**
|
|
22
22
|
* Removes a directory recursively.
|
|
@@ -28,7 +28,7 @@ export declare function deleteDirectory(directory: string): () => Promise<void>;
|
|
|
28
28
|
* @private
|
|
29
29
|
*/
|
|
30
30
|
export declare function deleteTmpDirectoryContents(
|
|
31
|
-
filepattern: RegExp
|
|
31
|
+
filepattern: RegExp,
|
|
32
32
|
): () => Promise<void>;
|
|
33
33
|
type CocoaPodsClean = { clean: Task<ExecaPromise> };
|
|
34
34
|
type AndroidClean = { validate: Task<void>; run: Task<ExecaPromise> };
|
|
@@ -46,7 +46,7 @@ type YarnClean = { clean: Task<ExecaPromise> };
|
|
|
46
46
|
type CleanTasks = {
|
|
47
47
|
android: (
|
|
48
48
|
andoirdSrcDir: null | undefined | string,
|
|
49
|
-
opts?: ExecaOptions
|
|
49
|
+
opts?: ExecaOptions,
|
|
50
50
|
) => AndroidClean;
|
|
51
51
|
cocoapods: CocoaPodsClean;
|
|
52
52
|
metro: () => MetroClean;
|
package/dist/private/clean.js
CHANGED
|
@@ -31,7 +31,7 @@ function deleteDirectoryContents(directory, filePattern) {
|
|
|
31
31
|
return async function deleteDirectoryContentsAction() {
|
|
32
32
|
const base = _path.default.dirname(directory);
|
|
33
33
|
const files = (0, _fs.readdirSync)(base).filter((filename) =>
|
|
34
|
-
filePattern.test(filename)
|
|
34
|
+
filePattern.test(filename),
|
|
35
35
|
);
|
|
36
36
|
for (const filename of files) {
|
|
37
37
|
rmrf(_path.default.join(base, filename));
|
|
@@ -51,13 +51,13 @@ const tasks = (exports.tasks = {
|
|
|
51
51
|
android: (androidSrcDir, opts) => ({
|
|
52
52
|
validate: (0, _utils.task)(FIRST, "Check gradlew is available", () => {
|
|
53
53
|
(0, _utils.assertDependencies)(
|
|
54
|
-
(0, _utils.isOnPath)(platformGradlew, "Gradle wrapper")
|
|
54
|
+
(0, _utils.isOnPath)(platformGradlew, "Gradle wrapper"),
|
|
55
55
|
);
|
|
56
56
|
}),
|
|
57
57
|
run: (0, _utils.task)(SECOND, "🧹 Clean Gradle cache", () => {
|
|
58
58
|
const gradlew = _path.default.join(
|
|
59
59
|
androidSrcDir ?? "android",
|
|
60
|
-
platformGradlew
|
|
60
|
+
platformGradlew,
|
|
61
61
|
);
|
|
62
62
|
const script = _path.default.basename(gradlew);
|
|
63
63
|
const cwd = _path.default.dirname(gradlew);
|
|
@@ -67,7 +67,7 @@ const tasks = (exports.tasks = {
|
|
|
67
67
|
{
|
|
68
68
|
cwd,
|
|
69
69
|
...opts,
|
|
70
|
-
}
|
|
70
|
+
},
|
|
71
71
|
);
|
|
72
72
|
}),
|
|
73
73
|
}),
|
|
@@ -75,30 +75,30 @@ const tasks = (exports.tasks = {
|
|
|
75
75
|
metro: (0, _utils.task)(
|
|
76
76
|
FIRST,
|
|
77
77
|
"🧹 Clean Metro cache",
|
|
78
|
-
deleteTmpDirectoryContents(/^metro-.+/)
|
|
78
|
+
deleteTmpDirectoryContents(/^metro-.+/),
|
|
79
79
|
),
|
|
80
80
|
haste: (0, _utils.task)(
|
|
81
81
|
FIRST,
|
|
82
82
|
"🧹 Clean Haste cache",
|
|
83
|
-
deleteTmpDirectoryContents(/^haste-map-.+/)
|
|
83
|
+
deleteTmpDirectoryContents(/^haste-map-.+/),
|
|
84
84
|
),
|
|
85
85
|
react_native: (0, _utils.task)(
|
|
86
86
|
FIRST,
|
|
87
87
|
"🧹 Clean React Native cache",
|
|
88
|
-
deleteTmpDirectoryContents(/^react-.+/)
|
|
88
|
+
deleteTmpDirectoryContents(/^react-.+/),
|
|
89
89
|
),
|
|
90
90
|
}),
|
|
91
91
|
npm: (projectRootDir) => ({
|
|
92
92
|
node_modules: (0, _utils.task)(
|
|
93
93
|
FIRST,
|
|
94
94
|
"🧹 Clean node_modules",
|
|
95
|
-
deleteDirectory(_path.default.join(projectRootDir, "node_modules"))
|
|
95
|
+
deleteDirectory(_path.default.join(projectRootDir, "node_modules")),
|
|
96
96
|
),
|
|
97
97
|
verify_cache: (0, _utils.task)(SECOND, "🔬 Verify npm cache", (opts) =>
|
|
98
98
|
(0, _execa.default)("npm", ["cache", "verify"], {
|
|
99
99
|
cwd: projectRootDir,
|
|
100
100
|
...opts,
|
|
101
|
-
})
|
|
101
|
+
}),
|
|
102
102
|
),
|
|
103
103
|
}),
|
|
104
104
|
watchman: (projectRootDir) => ({
|
|
@@ -109,14 +109,14 @@ const tasks = (exports.tasks = {
|
|
|
109
109
|
{
|
|
110
110
|
cwd: projectRootDir,
|
|
111
111
|
...opts,
|
|
112
|
-
}
|
|
113
|
-
)
|
|
112
|
+
},
|
|
113
|
+
),
|
|
114
114
|
),
|
|
115
115
|
cache: (0, _utils.task)(SECOND, "🧹 Delete Watchman cache", (opts) =>
|
|
116
116
|
(0, _execa.default)("watchman", ["watch-del-all"], {
|
|
117
117
|
cwd: projectRootDir,
|
|
118
118
|
...opts,
|
|
119
|
-
})
|
|
119
|
+
}),
|
|
120
120
|
),
|
|
121
121
|
}),
|
|
122
122
|
yarn: (projectRootDir) => ({
|
|
@@ -124,7 +124,7 @@ const tasks = (exports.tasks = {
|
|
|
124
124
|
(0, _execa.default)("yarn", ["cache", "clean"], {
|
|
125
125
|
cwd: projectRootDir,
|
|
126
126
|
...opts,
|
|
127
|
-
})
|
|
127
|
+
}),
|
|
128
128
|
),
|
|
129
129
|
}),
|
|
130
130
|
});
|
|
@@ -134,7 +134,7 @@ if (_utils.isMacOS) {
|
|
|
134
134
|
(0, _execa.default)("bundle", ["exec", "pod", "deintegrate"], {
|
|
135
135
|
cwd: projectRootDir,
|
|
136
136
|
...opts,
|
|
137
|
-
})
|
|
137
|
+
}),
|
|
138
138
|
),
|
|
139
139
|
});
|
|
140
140
|
}
|
|
@@ -17,7 +17,7 @@ import type { ExecaPromise, Options as ExecaOptions } from "execa";
|
|
|
17
17
|
*/
|
|
18
18
|
declare export function deleteDirectoryContents(
|
|
19
19
|
directory: string,
|
|
20
|
-
filePattern: RegExp
|
|
20
|
+
filePattern: RegExp,
|
|
21
21
|
): () => Promise<void>;
|
|
22
22
|
|
|
23
23
|
/**
|
|
@@ -31,7 +31,7 @@ declare export function deleteDirectory(directory: string): () => Promise<void>;
|
|
|
31
31
|
* @private
|
|
32
32
|
*/
|
|
33
33
|
declare export function deleteTmpDirectoryContents(
|
|
34
|
-
filepattern: RegExp
|
|
34
|
+
filepattern: RegExp,
|
|
35
35
|
): () => Promise<void>;
|
|
36
36
|
|
|
37
37
|
type CocoaPodsClean = {
|
package/dist/private/utils.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ import type { Task } from "./types";
|
|
|
12
12
|
export declare function task<R>(
|
|
13
13
|
order: number,
|
|
14
14
|
label: string,
|
|
15
|
-
action: Task<R>["action"]
|
|
15
|
+
action: Task<R>["action"],
|
|
16
16
|
): Task<R>;
|
|
17
17
|
export declare const isWindows: any;
|
|
18
18
|
export declare type isWindows = typeof isWindows;
|
|
@@ -23,7 +23,7 @@ export declare type toPascalCase = typeof toPascalCase;
|
|
|
23
23
|
type PathCheckResult = { found: boolean; dep: string; description: string };
|
|
24
24
|
export declare function isOnPath(
|
|
25
25
|
dep: string,
|
|
26
|
-
description: string
|
|
26
|
+
description: string,
|
|
27
27
|
): PathCheckResult;
|
|
28
28
|
export declare function assertDependencies(
|
|
29
29
|
...deps: ReadonlyArray<ReturnType<typeof isOnPath>>
|
|
@@ -13,7 +13,7 @@ import type { Task } from "./types";
|
|
|
13
13
|
declare export function task<R>(
|
|
14
14
|
order: number,
|
|
15
15
|
label: string,
|
|
16
|
-
action: Task<R>["action"]
|
|
16
|
+
action: Task<R>["action"],
|
|
17
17
|
): Task<R>;
|
|
18
18
|
|
|
19
19
|
declare export const isWindows: $FlowFixMe;
|
|
@@ -29,7 +29,7 @@ type PathCheckResult = {
|
|
|
29
29
|
|
|
30
30
|
declare export function isOnPath(
|
|
31
31
|
dep: string,
|
|
32
|
-
description: string
|
|
32
|
+
description: string,
|
|
33
33
|
): PathCheckResult;
|
|
34
34
|
|
|
35
35
|
declare export function assertDependencies(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native/core-cli-utils",
|
|
3
|
-
"version": "0.82.0-nightly-
|
|
3
|
+
"version": "0.82.0-nightly-20250729-e17e3e3f3",
|
|
4
4
|
"description": "React Native CLI library for Frameworks to build on",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/index.flow.js",
|