Skip to content

Make JSStackTrace internal #50792

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
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
9 changes: 0 additions & 9 deletions packages/react-native/ReactAndroid/api/ReactAndroid.api
Original file line number Diff line number Diff line change
@@ -5320,15 +5320,6 @@ public abstract interface class com/facebook/react/uimanager/util/ReactFindViewU
public abstract fun onViewFound (Landroid/view/View;)V
}

public final class com/facebook/react/util/JSStackTrace {
public static final field COLUMN_KEY Ljava/lang/String;
public static final field FILE_KEY Ljava/lang/String;
public static final field INSTANCE Lcom/facebook/react/util/JSStackTrace;
public static final field LINE_NUMBER_KEY Ljava/lang/String;
public static final field METHOD_NAME_KEY Ljava/lang/String;
public static final fun format (Ljava/lang/String;Lcom/facebook/react/bridge/ReadableArray;)Ljava/lang/String;
}

public final class com/facebook/react/util/RNLog {
public static final field ADVICE I
public static final field ERROR I
Original file line number Diff line number Diff line change
@@ -12,16 +12,16 @@ import com.facebook.react.bridge.ReadableMap
import com.facebook.react.bridge.ReadableType
import java.util.regex.Pattern

public object JSStackTrace {
internal object JSStackTrace {

public const val LINE_NUMBER_KEY: String = "lineNumber"
public const val FILE_KEY: String = "file"
public const val COLUMN_KEY: String = "column"
public const val METHOD_NAME_KEY: String = "methodName"
const val LINE_NUMBER_KEY: String = "lineNumber"
const val FILE_KEY: String = "file"
const val COLUMN_KEY: String = "column"
const val METHOD_NAME_KEY: String = "methodName"
private val FILE_ID_PATTERN = Pattern.compile("\\b((?:seg-\\d+(?:_\\d+)?|\\d+)\\.js)")

@JvmStatic
public fun format(message: String, stack: ReadableArray): String {
fun format(message: String, stack: ReadableArray): String {
val stringBuilder = StringBuilder(message).append(", stack:\n")
for (i in 0 until stack.size()) {
val frame = stack.getMap(i) ?: continue

Unchanged files with check annotations Beta

testHook2: function () {},
};
module.exports = MessageQueueTestModule;

Check warning on line 22 in packages/react-native/Libraries/BatchedBridge/__mocks__/MessageQueueTestModule.js

GitHub Actions / test_js (20)

Use `export` syntax instead of CommonJS `module.exports`

Check warning on line 22 in packages/react-native/Libraries/BatchedBridge/__mocks__/MessageQueueTestModule.js

GitHub Actions / test_js (18)

Use `export` syntax instead of CommonJS `module.exports`

Check warning on line 22 in packages/react-native/Libraries/BatchedBridge/__mocks__/MessageQueueTestModule.js

GitHub Actions / test_js (22)

Use `export` syntax instead of CommonJS `module.exports`
remoteModuleConfig: remoteModulesConfig,
};
module.exports = MessageQueueTestConfig;

Check warning on line 38 in packages/react-native/Libraries/BatchedBridge/__mocks__/MessageQueueTestConfig.js

GitHub Actions / test_js (20)

Use `export` syntax instead of CommonJS `module.exports`

Check warning on line 38 in packages/react-native/Libraries/BatchedBridge/__mocks__/MessageQueueTestConfig.js

GitHub Actions / test_js (18)

Use `export` syntax instead of CommonJS `module.exports`

Check warning on line 38 in packages/react-native/Libraries/BatchedBridge/__mocks__/MessageQueueTestConfig.js

GitHub Actions / test_js (22)

Use `export` syntax instead of CommonJS `module.exports`
* transform which can receive values from multiple parents.
*/
export function flushValue(rootNode: AnimatedNode): void {
// eslint-disable-next-line func-call-spacing

Check warning on line 55 in packages/react-native/Libraries/Animated/nodes/AnimatedValue.js

GitHub Actions / test_js (20)

'func-call-spacing' rule is disabled but never reported

Check warning on line 55 in packages/react-native/Libraries/Animated/nodes/AnimatedValue.js

GitHub Actions / test_js (18)

'func-call-spacing' rule is disabled but never reported

Check warning on line 55 in packages/react-native/Libraries/Animated/nodes/AnimatedValue.js

GitHub Actions / test_js (22)

'func-call-spacing' rule is disabled but never reported
const leaves = new Set<{update: () => void, ...}>();
function findAnimatedStyles(node: AnimatedNode) {
// $FlowFixMe[prop-missing]
import type AnimatedValue from '../nodes/AnimatedValue';
import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
import * as ReactNativeFeatureFlags from '../../../src/private/featureflags/ReactNativeFeatureFlags';

Check warning on line 16 in packages/react-native/Libraries/Animated/animations/Animation.js

GitHub Actions / test_js (20)

'ReactNativeFeatureFlags' is defined but never used

Check warning on line 16 in packages/react-native/Libraries/Animated/animations/Animation.js

GitHub Actions / test_js (18)

'ReactNativeFeatureFlags' is defined but never used

Check warning on line 16 in packages/react-native/Libraries/Animated/animations/Animation.js

GitHub Actions / test_js (22)

'ReactNativeFeatureFlags' is defined but never used
import AnimatedProps from '../nodes/AnimatedProps';
export type EndResult = {finished: boolean, value?: number, ...};
nativeTypeDiffingTypesAliases,
nativeTypeDiffingTypesMethodParamLookup,
nativeTypeDiffingTypesMethodLookup,
_,

Check warning on line 85 in packages/react-native-compatibility-check/src/__tests__/TypeDiffing-test.js

GitHub Actions / test_js (20)

'_' is assigned a value but never used

Check warning on line 85 in packages/react-native-compatibility-check/src/__tests__/TypeDiffing-test.js

GitHub Actions / test_js (18)

'_' is assigned a value but never used

Check warning on line 85 in packages/react-native-compatibility-check/src/__tests__/TypeDiffing-test.js

GitHub Actions / test_js (22)

'_' is assigned a value but never used
nativeTypeDiffingTypesEnums,
] = getModule(
'native-module-type-diffing-types',
'use client';
/* eslint-disable no-shadow, eqeqeq, curly, no-unused-vars, no-void, no-control-regex */

Check warning on line 14 in packages/polyfills/console.js

GitHub Actions / test_js (20)

'curly' rule is disabled but never reported

Check warning on line 14 in packages/polyfills/console.js

GitHub Actions / test_js (18)

'curly' rule is disabled but never reported

Check warning on line 14 in packages/polyfills/console.js

GitHub Actions / test_js (22)

'curly' rule is disabled but never reported
/**
* This pipes all of our console logging functions to native logging so that
const debug = require('debug')('Metro:InspectorProxy');
const PAGES_POLLING_INTERVAL = 1000;
const MIN_MESSAGE_QUEUE_BYTES_TO_REPORT = 2 * 1024 * 1024; // 2 MiB

Check warning on line 40 in packages/dev-middleware/src/inspector-proxy/Device.js

GitHub Actions / test_js (20)

'MIN_MESSAGE_QUEUE_BYTES_TO_REPORT' is assigned a value but never used

Check warning on line 40 in packages/dev-middleware/src/inspector-proxy/Device.js

GitHub Actions / test_js (18)

'MIN_MESSAGE_QUEUE_BYTES_TO_REPORT' is assigned a value but never used

Check warning on line 40 in packages/dev-middleware/src/inspector-proxy/Device.js

GitHub Actions / test_js (22)

'MIN_MESSAGE_QUEUE_BYTES_TO_REPORT' is assigned a value but never used
const WS_CLOSURE_CODE = {
NORMAL: 1000,
return assets[assetId - 1];
}
module.exports = {registerAsset, getAssetByID};

Check warning on line 43 in packages/assets/registry.js

GitHub Actions / test_js (20)

Use `export` syntax instead of CommonJS `module.exports`

Check warning on line 43 in packages/assets/registry.js

GitHub Actions / test_js (18)

Use `export` syntax instead of CommonJS `module.exports`

Check warning on line 43 in packages/assets/registry.js

GitHub Actions / test_js (22)

Use `export` syntax instead of CommonJS `module.exports`
// Modifications are explained inline by comments beginning with `// MODIFIED`.
// MODIFIED: Added ESLint suppression comment - no-unused-vars doesn't understand declaration files
/* eslint-disable no-unused-vars */

Check warning on line 15 in flow-typed/npm/jest.js

GitHub Actions / test_js (20)

'no-unused-vars' rule is disabled but never reported

Check warning on line 15 in flow-typed/npm/jest.js

GitHub Actions / test_js (18)

'no-unused-vars' rule is disabled but never reported

Check warning on line 15 in flow-typed/npm/jest.js

GitHub Actions / test_js (22)

'no-unused-vars' rule is disabled but never reported
type JestMockFn<TArguments: $ReadOnlyArray<mixed>, TReturn> = {
(...args: TArguments): TReturn,
fromEnc: buffer$Encoding,
toEnc: buffer$Encoding,
): Node$Buffer;
declare var Buffer: Node$Buffer;

Check warning on line 200 in flow-typed/environment/node.js

GitHub Actions / test_js (20)

'Buffer' is already declared in the upper scope on line 53 column 15

Check warning on line 200 in flow-typed/environment/node.js

GitHub Actions / test_js (18)

'Buffer' is already declared in the upper scope on line 53 column 15

Check warning on line 200 in flow-typed/environment/node.js

GitHub Actions / test_js (22)

'Buffer' is already declared in the upper scope on line 53 column 15
}
type child_process$execOpts = {