mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
[RN][Codegen] Backports fix: exclusion of selectively disabled libraries from codegen generation
This commit is contained in:
+4
@@ -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,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user