Skip to content
Closed
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion packages/core-cli-utils/src/private/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ type PathCheckResult = {
export function isOnPath(dep: string, description: string): PathCheckResult {
const cmd = isWindows ? ['where', [dep]] : ['command', ['-v', dep]];
try {
const args = isWindows ? ['where', [dep]] : ['command', ['-v', dep]];
return {
dep,
description,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
* @oncall react_native
*/

import type {TargetCapabilityFlags} from '../inspector-proxy/types';

import {allowSelfSignedCertsInNodeFetch} from './FetchUtils';
import {
createAndConnectTarget,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ import {createDeviceMock} from './InspectorDeviceUtils';
import {withAbortSignalForEachTest} from './ResourceUtils';
import {withServerForEachTest} from './ServerUtils';

import nullthrows from 'nullthrows';

// Must be greater than or equal to PAGES_POLLING_INTERVAL in `InspectorProxy.js`.
const PAGES_POLLING_DELAY = 1000;

Expand Down
82 changes: 0 additions & 82 deletions packages/react-native-bots/dangerfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

const {danger, fail, /*message,*/ warn} = require('danger');
const includes = require('lodash.includes');
const fetch = require('node-fetch');
const {validate: validateChangelog} =
require('@rnx-kit/rn-changelog-generator').default;

Expand Down Expand Up @@ -101,84 +100,3 @@ if (isMergeRefStable) {
labels: ['Pick Request'],
});
}

// Wait for statuses and post a message if there are failures.
async function handleStatuses() {
const regex = /Test Suites: \d+ failed/;
let startChecking = Date.now();
let done = false;
while (!done) {
let now = Date.now();
if (now - startChecking > 90 * 60 * 1000) {
warn(
"One hour and a half have passed and the E2E jobs haven't finished yet.",
);
done = true;
continue;
}

const githubBaseURL = `https://api.github.com/repos/${danger.github.pr.base.repo.owner.login}/${danger.github.pr.base.repo.name}`;
const statusesURL = `${githubBaseURL}/commits/${danger.github.pr.head.sha}/statuses?per_page=100`;

const response = await fetch(statusesURL, {
headers: {
Accept: 'application/vnd.github+json',
'X-GitHub-Api-Version': '2022-11-28',
Authorization: `Bearer ${process.env.DANGER_GITHUB_API_TOKEN}`,
},
});

const data = await response.json();
const e2e_jobs = data.filter(job => {
return (
job.context === 'ci/circleci: test_e2e_ios'
// test_e2e_android does not currently tun
// || job.context === 'ci/circleci: test_e2e_android'
);
});
if (e2e_jobs.length <= 0) {
console.log('No e2e jobs found yet, retrying in 5 minutes.');
await new Promise(resolve => setTimeout(resolve, 5 * 60 * 1000));
continue;
}

const jobFinished = e2e_jobs.every(job => job.state !== 'pending');
if (!jobFinished) {
console.log("E2E jobs haven't finished yet, retrying in 5 minutes.");
await new Promise(resolve => setTimeout(resolve, 5 * 60 * 1000));
continue;
}

e2e_jobs.forEach(async job => {
const url = job.target_url;
const components = url.split('/');
const jobId = components[components.length - 1];
const jobUrl = `https://circleci.com/api/v2/project/gh/facebook/react-native/${jobId}`;
const artifactUrl = `${jobUrl}/artifacts`;
const artifactResponse = await fetch(artifactUrl);
const artifactData = await artifactResponse.json();
const testLogs = artifactData.items.filter(
item => item.path === 'tmp/test_log',
);
if (testLogs.length !== 1) {
warn(
`Can't find the E2E test log for ${job.context}. <a href=${jobUrl}>Job link</a>`,
);
return;
}

const logUrl = testLogs[0].url;
const logResponseText = await fetch(logUrl);
const logText = await logResponseText.text();

if (regex.test(logText)) {
warn(
`E2E tests for ${job.context} failed with errors. See the <a href="${logUrl}">logs for details<a/>`,
);
}
});
done = true;
}
}

// handleStatuses();
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class ElementProperties extends React.Component<Props> {
<View style={styles.col}>
<StyleInspector style={style} />
</View>
{<BoxInspector style={style} frame={this.props.frame} />}
<BoxInspector style={style} frame={this.props.frame} />
</View>
</View>
</TouchableWithoutFeedback>
Expand Down
5 changes: 1 addition & 4 deletions packages/react-native/Libraries/JSInspector/NetworkAgent.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

'use strict';

import type EventSender from './InspectorAgent';

const XMLHttpRequest = require('../Network/XMLHttpRequest');
const InspectorAgent = require('./InspectorAgent');
const JSInspector = require('./JSInspector');
Expand Down Expand Up @@ -232,7 +230,7 @@ class Interceptor {
const event: LoadingFinishedEvent = {
requestId: String(id),
timestamp: JSInspector.getTimestamp(),
encodedDataLength: encodedDataLength,
encodedDataLength,
};
this._agent.sendEvent('loadingFinished', event);
}
Expand Down Expand Up @@ -262,7 +260,6 @@ type EnableArgs = {
class NetworkAgent extends InspectorAgent {
static DOMAIN: $TEMPORARY$string<'Network'> = 'Network';

_sendEvent: EventSender;
_interceptor: ?Interceptor;

enable({maxResourceBufferSize, maxTotalBufferSize}: EnableArgs) {
Expand Down
2 changes: 1 addition & 1 deletion packages/rn-tester/js/components/RNTTitleBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const HeaderIOS = ({
<View
style={[styles.header, {backgroundColor: theme.SystemBackgroundColor}]}>
<View style={styles.headerCenter}>
<Text style={{...styles.title, ...{color: theme.LabelColor}}}>
<Text style={{...styles.title, color: theme.LabelColor}}>
{title}
</Text>
{documentationURL && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@ const RNTesterPage = require('../../components/RNTesterPage');
const React = require('react');
const {PanResponder, StyleSheet, View} = require('react-native');

type CircleStyles = {
backgroundColor?: string,
left?: number,
top?: number,
...
};

const CIRCLE_SIZE = 80;

type Props = $ReadOnly<{||}>;
Expand All @@ -39,7 +32,6 @@ type State = {|
class PanResponderExample extends React.Component<Props, State> {
_previousLeft: number = 20;
_previousTop: number = 84;
_circleStyles: {|style: CircleStyles|} = {style: {}};
circle: ?React.ElementRef<typeof View> = null;

state: State = {
Expand Down Expand Up @@ -147,7 +139,7 @@ exports.description =
exports.examples = [
{
title: 'Basic gesture handling',
render: function (): React.Element<typeof PanResponderExample> {
render(): React.Element<typeof PanResponderExample> {
return <PanResponderExample />;
},
},
Expand Down
Loading