react-native-macos 0.74.10 → 0.74.12

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.
@@ -16,7 +16,7 @@ const version: $ReadOnly<{
16
16
  }> = {
17
17
  major: 0,
18
18
  minor: 74,
19
- patch: 10,
19
+ patch: 12,
20
20
  prerelease: null,
21
21
  };
22
22
 
@@ -39,7 +39,7 @@ NS_ASSUME_NONNULL_BEGIN
39
39
  * reject the change completely. To change the replacement, return the changed version of the `text`. To accept the
40
40
  * change, return `text` argument as-is. To reject the change, return `nil`.
41
41
  */
42
- - (NSString *)textInputShouldChangeText:(NSString *)text inRange:(NSRange)range;
42
+ - (nullable NSString *)textInputShouldChangeText:(NSString *)text inRange:(NSRange)range; // [macOS]
43
43
  - (void)textInputDidChange;
44
44
 
45
45
  - (void)textInputDidChangeSelection;
@@ -23,7 +23,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
23
23
  __rnVersion = @{
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(74),
26
- RCTVersionPatch: @(10),
26
+ RCTVersionPatch: @(12),
27
27
  RCTVersionPrerelease: [NSNull null],
28
28
  };
29
29
  });
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.74.10
1
+ VERSION_NAME=0.74.12
2
2
  react.internal.publishingGroup=com.facebook.react
3
3
 
4
4
  android.useAndroidX=true
@@ -17,6 +17,6 @@ public class ReactNativeVersion {
17
17
  public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
18
18
  "major", 0,
19
19
  "minor", 74,
20
- "patch", 10,
20
+ "patch", 12,
21
21
  "prerelease", null);
22
22
  }
@@ -17,7 +17,7 @@ namespace facebook::react {
17
17
  constexpr struct {
18
18
  int32_t Major = 0;
19
19
  int32_t Minor = 74;
20
- int32_t Patch = 10;
20
+ int32_t Patch = 12;
21
21
  std::string_view Prerelease = "";
22
22
  } ReactNativeVersion;
23
23
 
@@ -37,11 +37,10 @@ const {logger, CLIError, getDefaultUserTerminal} = (() => {
37
37
  })();
38
38
 
39
39
  /**
40
- * @param {string[]} _
41
- * @param {Record<string, unknown>} _ctx
42
40
  * @param {Options} args
41
+ * @returns {{ xcodeProject: XcodeProject, scheme: string }}
43
42
  */
44
- function runMacOS(_, _ctx, args) {
43
+ function parseArgs(args) {
45
44
  if (!fs.existsSync(args.projectPath)) {
46
45
  throw new CLIError(
47
46
  'macOS project folder not found. Are you sure this is a React Native project?',
@@ -78,6 +77,26 @@ function runMacOS(_, _ctx, args) {
78
77
  } "${chalk.bold(xcodeProject.name)}"`,
79
78
  );
80
79
 
80
+ return {xcodeProject, scheme};
81
+ }
82
+
83
+ /**
84
+ * @param {string[]} _
85
+ * @param {Record<string, unknown>} _ctx
86
+ * @param {Options} args
87
+ */
88
+ function buildMacOS(_, _ctx, args) {
89
+ const {xcodeProject, scheme} = parseArgs(args);
90
+ return buildProject(xcodeProject, scheme, {...args, packager: false});
91
+ }
92
+
93
+ /**
94
+ * @param {string[]} _
95
+ * @param {Record<string, unknown>} _ctx
96
+ * @param {Options} args
97
+ */
98
+ function runMacOS(_, _ctx, args) {
99
+ const {xcodeProject, scheme} = parseArgs(args);
81
100
  return run(xcodeProject, scheme, args);
82
101
  }
83
102
 
@@ -113,7 +132,7 @@ async function run(xcodeProject, scheme, args) {
113
132
 
114
133
  child_process.exec(
115
134
  'open -b ' + bundleID + ' -a ' + '"' + appPath + '"',
116
- (error, stdout, stderr) => {
135
+ (error, _stdout, stderr) => {
117
136
  if (error) {
118
137
  logger.error('Failed to launch the app', stderr);
119
138
  } else {
@@ -272,58 +291,75 @@ function getProcessOptions({packager, terminal, port}) {
272
291
  };
273
292
  }
274
293
 
275
- module.exports = {
276
- name: 'run-macos',
277
- description: 'builds your app and starts it',
278
- func: runMacOS,
279
- examples: [
280
- {
281
- desc: 'Run the macOS app',
282
- cmd: 'react-native run-macos',
283
- },
284
- ],
285
- options: [
286
- {
287
- name: '--configuration [string]',
288
- description:
289
- '[Deprecated] Explicitly set the scheme configuration to use',
290
- default: 'Debug',
291
- },
292
- {
293
- name: '--mode [string]',
294
- description:
295
- 'Explicitly set the scheme configuration to use, corresponds to `--configuration` in `xcodebuild` command, e.g. Debug, Release.',
296
- },
297
- {
298
- name: '--scheme [string]',
299
- description:
300
- 'Explicitly set Xcode scheme to use, corresponds to `--scheme` in `xcodebuild` command.',
301
- },
302
- {
303
- name: '--project-path [string]',
304
- description:
305
- 'Path relative to project root where the Xcode project ' +
306
- '(.xcodeproj) lives.',
307
- default: 'macos',
308
- },
309
- {
310
- name: '--no-packager',
311
- description: 'Do not launch packager while building',
312
- },
313
- {
314
- name: '--verbose',
315
- description: 'Do not use xcpretty even if installed',
316
- },
317
- {
318
- name: '--port [number]',
319
- default: process.env.RCT_METRO_PORT || 8081,
320
- parse: val => Number(val),
321
- },
322
- {
323
- name: '--terminal [string]',
324
- description:
325
- 'Launches the Metro Bundler in a new window using the specified terminal path.',
326
- default: getDefaultUserTerminal,
327
- },
328
- ],
329
- };
294
+ const commonOptions = [
295
+ {
296
+ name: '--mode [string]',
297
+ description:
298
+ 'Explicitly set the scheme configuration to use, corresponds to `--configuration` in `xcodebuild` command, e.g. Debug, Release.',
299
+ },
300
+ {
301
+ name: '--scheme [string]',
302
+ description:
303
+ 'Explicitly set Xcode scheme to use, corresponds to `--scheme` in `xcodebuild` command.',
304
+ },
305
+ {
306
+ name: '--project-path [string]',
307
+ description:
308
+ 'Path relative to project root where the Xcode project (.xcodeproj) lives.',
309
+ default: 'macos',
310
+ },
311
+ {
312
+ name: '--verbose',
313
+ description: 'Do not use xcpretty even if installed',
314
+ },
315
+ ];
316
+
317
+ module.exports = [
318
+ {
319
+ name: 'build-macos',
320
+ description: 'builds your app',
321
+ func: buildMacOS,
322
+ examples: [
323
+ {
324
+ desc: 'Build the macOS app',
325
+ cmd: 'react-native build-macos',
326
+ },
327
+ ],
328
+ options: commonOptions,
329
+ },
330
+ {
331
+ name: 'run-macos',
332
+ description: 'builds your app and starts it',
333
+ func: runMacOS,
334
+ examples: [
335
+ {
336
+ desc: 'Run the macOS app',
337
+ cmd: 'react-native run-macos',
338
+ },
339
+ ],
340
+ options: [
341
+ {
342
+ name: '--configuration [string]',
343
+ description:
344
+ '[Deprecated] Explicitly set the scheme configuration to use',
345
+ default: 'Debug',
346
+ },
347
+ ...commonOptions,
348
+ {
349
+ name: '--no-packager',
350
+ description: 'Do not launch packager while building',
351
+ },
352
+ {
353
+ name: '--port [number]',
354
+ default: process.env.RCT_METRO_PORT || 8081,
355
+ parse: val => Number(val),
356
+ },
357
+ {
358
+ name: '--terminal [string]',
359
+ description:
360
+ 'Launches the Metro Bundler in a new window using the specified terminal path.',
361
+ default: getDefaultUserTerminal,
362
+ },
363
+ ],
364
+ },
365
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-macos",
3
- "version": "0.74.10",
3
+ "version": "0.74.12",
4
4
  "description": "React Native for macOS",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -17,7 +17,7 @@ const {
17
17
  startCommand,
18
18
  } = require('@react-native/community-cli-plugin');
19
19
 
20
- const macosCommands = [require('./local-cli/runMacOS/runMacOS')]; // [macOS]
20
+ const macosCommands = require('./local-cli/runMacOS/runMacOS'); // [macOS]
21
21
 
22
22
  const codegenCommand = {
23
23
  name: 'codegen',