react-native-tvos 0.71.11-0 → 0.71.12-0
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/Libraries/Components/View/View.js +1 -1
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/LogBox/Data/parseLogBoxLog.js +50 -20
- package/Libraries/LogBox/UI/LogBoxInspector.js +2 -1
- package/React/Base/RCTVersion.m +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/flow-typed/npm/ansi-regex_v5.x.x.js +14 -0
- package/package.json +3 -2
- package/scripts/cocoapods/__tests__/codegen_utils-test.rb +2 -2
- package/scripts/cocoapods/codegen_utils.rb +1 -1
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
- package/template/ios/HelloWorld.xcodeproj/project.pbxproj +3 -0
- package/template/package.json +1 -1
- package/types/public/ReactNativeTVTypes.d.ts +1 -1
|
@@ -14,12 +14,38 @@ import type {LogBoxLogData} from './LogBoxLog';
|
|
|
14
14
|
import parseErrorStack from '../../Core/Devtools/parseErrorStack';
|
|
15
15
|
import UTFSequence from '../../UTFSequence';
|
|
16
16
|
import stringifySafe from '../../Utilities/stringifySafe';
|
|
17
|
+
import ansiRegex from 'ansi-regex';
|
|
18
|
+
|
|
19
|
+
const ANSI_REGEX = ansiRegex().source;
|
|
17
20
|
|
|
18
21
|
const BABEL_TRANSFORM_ERROR_FORMAT =
|
|
19
22
|
/^(?:TransformError )?(?:SyntaxError: |ReferenceError: )(.*): (.*) \((\d+):(\d+)\)\n\n([\s\S]+)/;
|
|
23
|
+
|
|
24
|
+
// https://github.com/babel/babel/blob/33dbb85e9e9fe36915273080ecc42aee62ed0ade/packages/babel-code-frame/src/index.ts#L183-L184
|
|
25
|
+
const BABEL_CODE_FRAME_MARKER_PATTERN = new RegExp(
|
|
26
|
+
[
|
|
27
|
+
// Beginning of a line (per 'm' flag)
|
|
28
|
+
'^',
|
|
29
|
+
// Optional ANSI escapes for colors
|
|
30
|
+
`(?:${ANSI_REGEX})*`,
|
|
31
|
+
// Marker
|
|
32
|
+
'>',
|
|
33
|
+
// Optional ANSI escapes for colors
|
|
34
|
+
`(?:${ANSI_REGEX})*`,
|
|
35
|
+
// Left padding for line number
|
|
36
|
+
' +',
|
|
37
|
+
// Line number
|
|
38
|
+
'[0-9]+',
|
|
39
|
+
// Gutter
|
|
40
|
+
' \\|',
|
|
41
|
+
].join(''),
|
|
42
|
+
'm',
|
|
43
|
+
);
|
|
44
|
+
|
|
20
45
|
const BABEL_CODE_FRAME_ERROR_FORMAT =
|
|
21
46
|
// eslint-disable-next-line no-control-regex
|
|
22
47
|
/^(?:TransformError )?(?:.*):? (?:.*?)(\/.*): ([\s\S]+?)\n([ >]{2}[\d\s]+ \|[\s\S]+|\u{001b}[\s\S]+)/u;
|
|
48
|
+
|
|
23
49
|
const METRO_ERROR_FORMAT =
|
|
24
50
|
/^(?:InternalError Metro has encountered an error:) (.*): (.*) \((\d+):(\d+)\)\n\n([\s\S]+)/u;
|
|
25
51
|
|
|
@@ -241,27 +267,31 @@ export function parseLogBoxException(
|
|
|
241
267
|
};
|
|
242
268
|
}
|
|
243
269
|
|
|
244
|
-
|
|
270
|
+
// Perform a cheap match first before trying to parse the full message, which
|
|
271
|
+
// can get expensive for arbitrary input.
|
|
272
|
+
if (BABEL_CODE_FRAME_MARKER_PATTERN.test(message)) {
|
|
273
|
+
const babelCodeFrameError = message.match(BABEL_CODE_FRAME_ERROR_FORMAT);
|
|
245
274
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
275
|
+
if (babelCodeFrameError) {
|
|
276
|
+
// Codeframe errors are thrown from any use of buildCodeFrameError.
|
|
277
|
+
const [fileName, content, codeFrame] = babelCodeFrameError.slice(1);
|
|
278
|
+
return {
|
|
279
|
+
level: 'syntax',
|
|
280
|
+
stack: [],
|
|
281
|
+
isComponentError: false,
|
|
282
|
+
componentStack: [],
|
|
283
|
+
codeFrame: {
|
|
284
|
+
fileName,
|
|
285
|
+
location: null, // We are not given the location.
|
|
286
|
+
content: codeFrame,
|
|
287
|
+
},
|
|
288
|
+
message: {
|
|
289
|
+
content,
|
|
290
|
+
substitutions: [],
|
|
291
|
+
},
|
|
292
|
+
category: `${fileName}-${1}-${1}`,
|
|
293
|
+
};
|
|
294
|
+
}
|
|
265
295
|
}
|
|
266
296
|
|
|
267
297
|
if (message.match(/^TransformError /)) {
|
|
@@ -74,12 +74,13 @@ function LogBoxInspector(props: Props): React.Node {
|
|
|
74
74
|
total={logs.length}
|
|
75
75
|
level={log.level}
|
|
76
76
|
/>
|
|
77
|
-
|
|
77
|
+
{/* In the TV repo, place the footer above the body for easier navigation */}
|
|
78
78
|
<LogBoxInspectorFooter
|
|
79
79
|
onDismiss={props.onDismiss}
|
|
80
80
|
onMinimize={props.onMinimize}
|
|
81
81
|
level={log.level}
|
|
82
82
|
/>
|
|
83
|
+
<LogBoxInspectorBody log={log} onRetry={_handleRetry} />
|
|
83
84
|
</View>
|
|
84
85
|
);
|
|
85
86
|
}
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @flow strict
|
|
3
|
+
* @format
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
declare module 'ansi-regex' {
|
|
7
|
+
declare export type Options = {
|
|
8
|
+
/**
|
|
9
|
+
* Match only the first ANSI escape.
|
|
10
|
+
*/
|
|
11
|
+
+onlyFirst?: boolean,
|
|
12
|
+
};
|
|
13
|
+
declare export default function ansiRegex(options?: Options): RegExp;
|
|
14
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-tvos",
|
|
3
|
-
"version": "0.71.
|
|
3
|
+
"version": "0.71.12-0",
|
|
4
4
|
"bin": "./cli.js",
|
|
5
5
|
"description": "A framework for building native apps using React",
|
|
6
6
|
"license": "MIT",
|
|
@@ -126,6 +126,7 @@
|
|
|
126
126
|
"@react-native/polyfills": "2.0.0",
|
|
127
127
|
"abort-controller": "^3.0.0",
|
|
128
128
|
"anser": "^1.4.9",
|
|
129
|
+
"ansi-regex": "^5.0.0",
|
|
129
130
|
"base64-js": "^1.1.2",
|
|
130
131
|
"deprecated-react-native-prop-types": "^3.0.1",
|
|
131
132
|
"event-target-shim": "^5.0.1",
|
|
@@ -196,7 +197,7 @@
|
|
|
196
197
|
"mkdirp": "^0.5.1",
|
|
197
198
|
"mock-fs": "^5.1.4",
|
|
198
199
|
"prettier": "^2.4.1",
|
|
199
|
-
"react-native-core": "npm:react-native@0.71.
|
|
200
|
+
"react-native-core": "npm:react-native@0.71.12",
|
|
200
201
|
"shelljs": "^0.8.5",
|
|
201
202
|
"signedsource": "^1.0.0",
|
|
202
203
|
"typescript": "4.1.3",
|
|
@@ -352,7 +352,7 @@ class CodegenUtilsTests < Test::Unit::TestCase
|
|
|
352
352
|
'[Codegen] warn: using experimental new codegen integration'
|
|
353
353
|
])
|
|
354
354
|
assert_equal(codegen_utils_mock.get_react_codegen_script_phases_params, [{
|
|
355
|
-
:app_path =>
|
|
355
|
+
:app_path => app_path,
|
|
356
356
|
:config_file_dir => "",
|
|
357
357
|
:config_key => "codegenConfig",
|
|
358
358
|
:fabric_enabled => false,
|
|
@@ -361,7 +361,7 @@ class CodegenUtilsTests < Test::Unit::TestCase
|
|
|
361
361
|
assert_equal(codegen_utils_mock.get_react_codegen_spec_params, [{
|
|
362
362
|
:fabric_enabled => false,
|
|
363
363
|
:folly_version=>"2021.07.22.00",
|
|
364
|
-
:package_json_file => "
|
|
364
|
+
:package_json_file => "#{app_path}/ios/../node_modules/react-native/package.json",
|
|
365
365
|
:script_phases => "echo TestScript"
|
|
366
366
|
}])
|
|
367
367
|
assert_equal(codegen_utils_mock.generate_react_codegen_spec_params, [{
|
|
@@ -275,7 +275,7 @@ class CodegenUtils
|
|
|
275
275
|
:config_key => config_key
|
|
276
276
|
)
|
|
277
277
|
react_codegen_spec = codegen_utils.get_react_codegen_spec(
|
|
278
|
-
File.join(react_native_path, "package.json"),
|
|
278
|
+
File.join(relative_installation_root, react_native_path, "package.json"),
|
|
279
279
|
:folly_version => folly_version,
|
|
280
280
|
:fabric_enabled => fabric_enabled,
|
|
281
281
|
:hermes_enabled => hermes_enabled,
|
|
Binary file
|
|
Binary file
|
|
@@ -795,6 +795,8 @@
|
|
|
795
795
|
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.HelloWorld-tvOS";
|
|
796
796
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
797
797
|
SDKROOT = appletvos;
|
|
798
|
+
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
|
799
|
+
SWIFT_VERSION = 5.0;
|
|
798
800
|
TARGETED_DEVICE_FAMILY = 3;
|
|
799
801
|
TVOS_DEPLOYMENT_TARGET = 12.4;
|
|
800
802
|
};
|
|
@@ -825,6 +827,7 @@
|
|
|
825
827
|
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.HelloWorld-tvOS";
|
|
826
828
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
827
829
|
SDKROOT = appletvos;
|
|
830
|
+
SWIFT_VERSION = 5.0;
|
|
828
831
|
TARGETED_DEVICE_FAMILY = 3;
|
|
829
832
|
TVOS_DEPLOYMENT_TARGET = 12.4;
|
|
830
833
|
};
|
package/template/package.json
CHANGED