[RN][Codegen] Backports fix: exclusion of selectively disabled libraries from codegen generation (#52040)

This commit is contained in:
Riccardo Cipolleschi authored and GitHub committed 2025-06-16 12:41:28 +01:00
1 parent 0ebaaed281
commit 3acfe01382
2 files changed
+6

No files matched your search

@@ -52,6 +52,7 @@ describe('extractLibrariesFromJSON', () => {
jsSrcsDir: '.',
},
libraryPath: rootPath,
name: 'react-native',
});
});
@@ -71,6 +72,7 @@ describe('extractLibrariesFromJSON', () => {
jsSrcsDir: '.',
},
libraryPath: myDependencyPath,
name: 'react-native',
});
expect(libraries[1]).toEqual({
config: {
@@ -79,6 +81,7 @@ describe('extractLibrariesFromJSON', () => {
jsSrcsDir: 'component/js',
},
libraryPath: myDependencyPath,
name: 'my-component',
});
expect(libraries[2]).toEqual({
config: {
@@ -87,6 +90,7 @@ describe('extractLibrariesFromJSON', () => {
jsSrcsDir: 'module/js',
},
libraryPath: myDependencyPath,
name: 'my-module',
});
});
});
@@ -198,6 +198,7 @@ function printDeprecationWarningIfNeeded(dependency) {
function extractLibrariesFromConfigurationArray(configFile, dependencyPath) {
return configFile.codegenConfig.libraries.map(config => {
return {
name: config.name,
config,
libraryPath: dependencyPath,
};
@@ -213,6 +214,7 @@ function extractLibrariesFromJSON(configFile, dependencyPath) {
const config = configFile.codegenConfig;
return [
{
name: configFile.name,
config,
libraryPath: dependencyPath,
},