Skip to content

[Local] Fix CI for 0.79-stable #51804

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

Merged
merged 3 commits into from
Jun 4, 2025
Merged
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
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
"test-e2e-local-clean": "node ./scripts/release-testing/test-e2e-local-clean.js",
"test-e2e-local": "node ./scripts/release-testing/test-e2e-local.js",
"test-ios": "./scripts/objc-test.sh test",
"test-typescript-offline": "dtslint --localTs node_modules/typescript/lib packages/react-native/types",
"test-typescript": "dtslint packages/react-native/types",
"test-typescript": "tsc -p packages/react-native/types/tsconfig.test.json",
"test": "jest",
"fantom": "JS_DIR='..' yarn jest --config packages/react-native-fantom/config/jest.config.js",
"trigger-react-native-release": "node ./scripts/releases-local/trigger-react-native-release.js",
Expand All @@ -49,7 +48,6 @@
"@babel/plugin-transform-regenerator": "^7.24.7",
"@babel/preset-env": "^7.25.3",
"@babel/preset-flow": "^7.24.7",
"@definitelytyped/dtslint": "^0.0.127",
"@jest/create-cache-key-function": "^29.7.0",
"@react-native/metro-babel-transformer": "0.79.2",
"@react-native/metro-config": "0.79.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ function findLibrariesFromReactNativeConfig(projectRoot, rnConfig) {
*
* This is needed when selectively disabling libraries in react-native.config.js since codegen should exclude those libraries as well.
*/
function findDisabledLibrariesByPlatform(reactNativeConfig, platform) {
function findDisabledLibrariesByPlatform(reactNativeConfig, platform) {
const dependencies = reactNativeConfig.dependencies ?? {};

return Object.keys(dependencies).filter(
Expand Down Expand Up @@ -610,7 +610,7 @@ function findCodegenEnabledLibraries(pkgJson, projectRoot, reactNativeConfig) {
}

function readReactNativeConfig(projectRoot) {
const rnConfigFilePath = path.resolve(projectRoot, 'react-native.config.js');Add commentMore actions
const rnConfigFilePath = path.resolve(projectRoot, 'react-native.config.js');

if (!fs.existsSync(rnConfigFilePath)) {
return {};
Expand Down Expand Up @@ -1071,7 +1071,11 @@ function execute(projectRoot, targetPlatform, baseOutputPath, source) {
buildCodegenIfNeeded();

const reactNativeConfig = readReactNativeConfig(projectRoot);
const codegenEnabledLibraries = findCodegenEnabledLibraries(pkgJson, projectRoot, reactNativeConfig);
const codegenEnabledLibraries = findCodegenEnabledLibraries(
pkgJson,
projectRoot,
reactNativeConfig,
);

if (codegenEnabledLibraries.length === 0) {
codegenLog('No codegen-enabled libraries found.', true);
Expand All @@ -1082,7 +1086,7 @@ function execute(projectRoot, targetPlatform, baseOutputPath, source) {
targetPlatform === 'all' ? supportedPlatforms : [targetPlatform];

for (const platform of platforms) {
const disabledLibraries = findDisabledLibrariesByPlatform(Add commentMore actions
const disabledLibraries = findDisabledLibrariesByPlatform(
reactNativeConfig,
platform,
);
Expand Down
1 change: 0 additions & 1 deletion packages/react-native/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
/// <reference path="../src/types/globals.d.ts" />
/// <reference path="modules/LaunchScreen.d.ts" />


export * from '../Libraries/ActionSheetIOS/ActionSheetIOS';
export * from '../Libraries/Alert/Alert';
export * from '../Libraries/Animated/Animated';
Expand Down
16 changes: 16 additions & 0 deletions packages/react-native/types/tsconfig.test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": ["es6"],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"types": [],
"jsx": "react",
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"paths": {"react-native": ["."]}
},
"include": ["../**/*.d.ts", "__typetests__/**/*"]
}
2 changes: 1 addition & 1 deletion scripts/run-ci-javascript-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ try {
}

describe('Test: TypeScript tests');
if (exec(`${YARN_BINARY} run test-typescript-offline`).code) {
if (exec(`${YARN_BINARY} run test-typescript`).code) {
echo('Failed to run TypeScript tests.');
exitCode = 1;
throw Error(exitCode);
Expand Down
Loading
Loading