Open source the Codegen!

Summary:
This is very much a work in progress. Moving it into the open source repo to be able to hook it up to generate some Fabric files.

Will continue to iterate on it in the open.

Reviewed By: hramos, mdvacca

Differential Revision: D13500969

fbshipit-source-id: 79082447dc52b5834f24eb72bc6e07200b324238
This commit is contained in:
Eli White
2018-12-20 11:52:51 -08:00
committed by Facebook Github Bot
parent 4d9f02f568
commit a3c6e1da10
42 changed files with 7669 additions and 6 deletions

120
codegen/BUCK Normal file
View File

@@ -0,0 +1,120 @@
load("@fbsource//tools/build_defs/oss:rn_defs.bzl", "rn_xplat_cxx_library")
load("@fbsource//tools/build_defs:default_platform_defs.bzl", "ANDROID", "APPLE")
load("@fbsource//tools/build_defs:fb_native_wrapper.bzl", "fb_native")
load("@fbsource//tools/build_defs:fb_xplat_cxx_binary.bzl", "fb_xplat_cxx_binary")
load("@fbsource//xplat/js/react-native-github/codegen:DEFS.bzl", "rn_codegen_test")
fb_native.sh_binary(
name = "rn_codegen",
main = "buck_tests/generate_tests.sh",
resources = glob(
[
"**/*.js",
"buck_tests/generate-tests.js",
],
) + [
"xplat//js:setup_env",
],
visibility = ["PUBLIC"],
)
rn_codegen_test(
fixture_name = "SINGLE_COMPONENT_WITH_BOOLEAN_PROP",
)
rn_codegen_test(
fixture_name = "SINGLE_COMPONENT_WITH_STRING_PROP",
)
rn_codegen_test(
fixture_name = "SINGLE_COMPONENT_WITH_INTEGER_PROPS",
)
rn_codegen_test(
fixture_name = "SINGLE_COMPONENT_WITH_FLOAT_PROPS",
)
rn_codegen_test(
fixture_name = "SINGLE_COMPONENT_WITH_COLOR_PROP",
)
rn_codegen_test(
fixture_name = "SINGLE_COMPONENT_WITH_ENUM_PROP",
)
rn_codegen_test(
fixture_name = "SINGLE_COMPONENT_WITH_EVENT_PROPS",
)
rn_codegen_test(
fixture_name = "SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS",
)
rn_codegen_test(
fixture_name = "TWO_COMPONENTS_SAME_FILE",
)
rn_codegen_test(
fixture_name = "TWO_COMPONENTS_DIFFERENT_FILES",
)
fb_xplat_cxx_binary(
name = "rn_codegen_binary",
srcs = ["buck_tests/emptyFile.cpp"],
compiler_flags = [
"-fexceptions",
"-frtti",
"-std=c++14",
"-Wall",
],
platforms = (ANDROID, APPLE),
preprocessor_flags = [
"-DLOG_TAG=\"ReactNative\"",
"-DWITH_FBSYSTRACE=1",
],
visibility = ["PUBLIC"],
deps = [
":generated_fixture_library-SINGLE_COMPONENT_WITH_BOOLEAN_PROP",
":generated_fixture_library-SINGLE_COMPONENT_WITH_COLOR_PROP",
":generated_fixture_library-SINGLE_COMPONENT_WITH_ENUM_PROP",
":generated_fixture_library-SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS",
":generated_fixture_library-SINGLE_COMPONENT_WITH_EVENT_PROPS",
":generated_fixture_library-SINGLE_COMPONENT_WITH_FLOAT_PROPS",
":generated_fixture_library-SINGLE_COMPONENT_WITH_INTEGER_PROPS",
":generated_fixture_library-SINGLE_COMPONENT_WITH_STRING_PROP",
":generated_fixture_library-TWO_COMPONENTS_DIFFERENT_FILES",
":generated_fixture_library-TWO_COMPONENTS_SAME_FILE",
],
)
rn_xplat_cxx_library(
name = "rn_codegen_library",
srcs = ["buck_tests/emptyFile.cpp"],
headers = [],
compiler_flags = [
"-fexceptions",
"-frtti",
"-std=c++14",
"-Wall",
],
platforms = (ANDROID, APPLE),
preprocessor_flags = [
"-DLOG_TAG=\"ReactNative\"",
"-DWITH_FBSYSTRACE=1",
],
visibility = [
"PUBLIC",
],
deps = [
":generated_fixture_library-SINGLE_COMPONENT_WITH_BOOLEAN_PROP",
":generated_fixture_library-SINGLE_COMPONENT_WITH_COLOR_PROP",
":generated_fixture_library-SINGLE_COMPONENT_WITH_ENUM_PROP",
":generated_fixture_library-SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS",
":generated_fixture_library-SINGLE_COMPONENT_WITH_EVENT_PROPS",
":generated_fixture_library-SINGLE_COMPONENT_WITH_FLOAT_PROPS",
":generated_fixture_library-SINGLE_COMPONENT_WITH_INTEGER_PROPS",
":generated_fixture_library-SINGLE_COMPONENT_WITH_STRING_PROP",
":generated_fixture_library-TWO_COMPONENTS_DIFFERENT_FILES",
":generated_fixture_library-TWO_COMPONENTS_SAME_FILE",
],
)

96
codegen/DEFS.bzl Normal file
View File

@@ -0,0 +1,96 @@
load("@fbsource//tools/build_defs:default_platform_defs.bzl", "ANDROID", "APPLE")
load("@fbsource//tools/build_defs:fb_native_wrapper.bzl", "fb_native")
load(
"//tools/build_defs/oss:rn_defs.bzl",
"react_native_xplat_target",
"rn_xplat_cxx_library",
)
def rn_codegen_test(
fixture_name = ""):
generate_fixtures_rule_name = "generate_fixtures-{}".format(fixture_name)
generate_component_descriptor_h_name = "generate_component_descriptor_h-{}".format(fixture_name)
generate_event_emitter_cpp_name = "generate_event_emitter_cpp-{}".format(fixture_name)
generate_event_emitter_h_name = "generate_event_emitter_h-{}".format(fixture_name)
generate_props_cpp_name = "generate_props_cpp-{}".format(fixture_name)
generate_props_h_name = "generated_props_h-{}".format(fixture_name)
generate_shadow_node_h_name = "generated_shadow_node_h-{}".format(fixture_name)
fb_native.genrule(
name = generate_fixtures_rule_name,
srcs = [],
cmd = "$(exe :rn_codegen) {} $OUT".format(fixture_name),
out = "codegenfiles-{}".format(fixture_name),
)
fb_native.genrule(
name = generate_component_descriptor_h_name,
cmd = "cp $(location :{})/ComponentDescriptors.h $OUT".format(generate_fixtures_rule_name),
out = "ComponentDescriptors.h",
)
fb_native.genrule(
name = generate_event_emitter_cpp_name,
cmd = "cp $(location :{})/EventEmitters.cpp $OUT".format(generate_fixtures_rule_name),
out = "EventEmitters.cpp",
)
fb_native.genrule(
name = generate_event_emitter_h_name,
cmd = "cp $(location :{})/EventEmitters.h $OUT".format(generate_fixtures_rule_name),
out = "EventEmitters.h",
)
fb_native.genrule(
name = generate_props_cpp_name,
cmd = "cp $(location :{})/Props.cpp $OUT".format(generate_fixtures_rule_name),
out = "Props.cpp",
)
fb_native.genrule(
name = generate_props_h_name,
cmd = "cp $(location :{})/Props.h $OUT".format(generate_fixtures_rule_name),
out = "Props.h",
)
fb_native.genrule(
name = generate_shadow_node_h_name,
cmd = "cp $(location :{})/ShadowNodes.h $OUT".format(generate_fixtures_rule_name),
out = "ShadowNodes.h",
)
# libs
rn_xplat_cxx_library(
name = "generated_fixture_library-{}".format(fixture_name),
srcs = [
":{}".format(generate_event_emitter_cpp_name),
":{}".format(generate_props_cpp_name),
],
headers = [
":{}".format(generate_component_descriptor_h_name),
":{}".format(generate_event_emitter_h_name),
":{}".format(generate_props_h_name),
":{}".format(generate_shadow_node_h_name),
],
exported_headers = {
"ComponentDescriptors.h": ":{}".format(generate_component_descriptor_h_name),
"EventEmitters.h": ":{}".format(generate_event_emitter_h_name),
"Props.h": ":{}".format(generate_props_h_name),
"ShadowNodes.h": ":{}".format(generate_shadow_node_h_name),
},
header_namespace = "react/components/{}".format(fixture_name),
compiler_flags = [
"-fexceptions",
"-frtti",
"-std=c++14",
"-Wall",
],
platforms = (ANDROID, APPLE),
preprocessor_flags = [
"-DLOG_TAG=\"ReactNative\"",
"-DWITH_FBSYSTRACE=1",
],
deps = [
react_native_xplat_target("fabric/components/view:view"),
],
)

View File

@@ -0,0 +1,14 @@
#import <react/components/SINGLE_COMPONENT_WITH_BOOLEAN_PROP/ComponentDescriptors.h>
#import <react/components/SINGLE_COMPONENT_WITH_STRING_PROP/ComponentDescriptors.h>
#import <react/components/SINGLE_COMPONENT_WITH_INTEGER_PROPS/ComponentDescriptors.h>
#import <react/components/SINGLE_COMPONENT_WITH_FLOAT_PROPS/ComponentDescriptors.h>
#import <react/components/SINGLE_COMPONENT_WITH_COLOR_PROP/ComponentDescriptors.h>
#import <react/components/SINGLE_COMPONENT_WITH_ENUM_PROP/ComponentDescriptors.h>
#import <react/components/SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS/ComponentDescriptors.h>
#import <react/components/SINGLE_COMPONENT_WITH_EVENT_PROPS/ComponentDescriptors.h>
#import <react/components/TWO_COMPONENTS_SAME_FILE/ComponentDescriptors.h>
#import <react/components/TWO_COMPONENTS_DIFFERENT_FILES/ComponentDescriptors.h>
int main(){
return 0;
}

View File

@@ -0,0 +1,39 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
* @format
*/
'use strict';
const RNCodegen = require('../src/generators/RNCodegen.js');
const fixtures = require('../src/generators/__test_fixtures__/fixtures.js');
const mkdirp = require('mkdirp');
const args = process.argv.slice(2);
if (args.length !== 2) {
throw new Error(
'Expected to receive the fixture name and output directory as the only arg',
);
}
const fixtureName = args[0];
const outputDirectory = args[1];
mkdirp.sync(outputDirectory);
const fixture = fixtures[fixtureName];
if (fixture == null) {
throw new Error(`Can't find fixture with name ${fixtureName}`);
}
RNCodegen.generate({
libraryName: fixtureName,
schema: fixture,
outputDirectory,
});

View File

@@ -0,0 +1,15 @@
#!/bin/bash
set -e
set -u
THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd)
# shellcheck source=xplat/js/env-utils/setup_env_vars.sh
source "$THIS_DIR/../../../env-utils/setup_env_vars.sh"
pushd "$THIS_DIR/.." >/dev/null
"$INSTALL_NODE_MODULES"
popd >/dev/null
exec "$FLOW_NODE_BINARY" "$THIS_DIR/generate-tests.js" "$@"

7
codegen/package.json Normal file
View File

@@ -0,0 +1,7 @@
{
"dependencies": {
"jscodeshift": "^0.6.2",
"nullthrows": "^1.1.0"
},
"private": true
}

View File

@@ -0,0 +1,106 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
* @format
*/
'use strict';
export type ObjectPropertyType =
| $ReadOnly<{|
type: 'BooleanTypeAnnotation',
name: string,
optional: boolean,
|}>
| $ReadOnly<{|
type: 'StringTypeAnnotation',
name: string,
optional: boolean,
|}>
| $ReadOnly<{|
type: 'FloatTypeAnnotation',
name: string,
optional: boolean,
|}>
| $ReadOnly<{|
type: 'Int32TypeAnnotation',
name: string,
optional: boolean,
|}>
| $ReadOnly<{|
type: 'ObjectTypeAnnotation',
name: string,
optional: boolean,
properties: $ReadOnlyArray<ObjectPropertyType>,
|}>;
type PropTypeTypeAnnotation =
| $ReadOnly<{|
type: 'BooleanTypeAnnotation',
default: boolean,
|}>
| $ReadOnly<{|
type: 'StringTypeAnnotation',
default: string,
|}>
| $ReadOnly<{|
type: 'FloatTypeAnnotation',
default: number,
|}>
| $ReadOnly<{|
type: 'Int32TypeAnnotation',
default: number,
|}>
| $ReadOnly<{|
type: 'StringEnumTypeAnnotation',
default: string,
options: $ReadOnlyArray<{|
name: string,
|}>,
|}>
| $ReadOnly<{|
type: 'NativePrimitiveTypeAnnotation',
name: 'ColorPrimitive',
|}>;
export type PropTypeShape = $ReadOnly<{|
name: string,
optional: boolean,
typeAnnotation: PropTypeTypeAnnotation,
|}>;
export type EventTypeShape = $ReadOnly<{|
name: string,
bubblingType: 'direct' | 'bubble',
optional: boolean,
typeAnnotation: $ReadOnly<{|
type: 'EventTypeAnnotation',
argument: $ReadOnly<{|
type: 'ObjectTypeAnnotation',
properties: $ReadOnlyArray<ObjectPropertyType>,
|}>,
|}>,
|}>;
export type ComponentShape = $ReadOnly<{|
extendsProps: $ReadOnlyArray<{|
type: 'ReactNativeBuiltInType',
knownTypeName: 'ReactNativeCoreViewProps',
|}>,
events: $ReadOnlyArray<EventTypeShape>,
props: $ReadOnlyArray<PropTypeShape>,
|}>;
export type SchemaType = $ReadOnly<{|
modules: $ReadOnly<{
[module: string]: $ReadOnly<{|
components?: $ReadOnly<{
[component: string]: ComponentShape,
}>,
|}>,
}>,
|}>;

19
codegen/src/Helpers.js Normal file
View File

@@ -0,0 +1,19 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
* @format
*/
'use strict';
function upperCaseFirst(inString: string): string {
return inString[0].toUpperCase() + inString.slice(1);
}
module.exports = {
upperCaseFirst,
};

View File

@@ -0,0 +1,75 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @format
*/
'use strict';
const nullthrows = require('nullthrows');
import type {SchemaType} from './CodegenSchema';
function getErrors(schema: SchemaType): $ReadOnlyArray<string> {
const errors = new Set();
// Map of component name -> Array of module names
const componentModules: Map<string, Array<string>> = new Map();
Object.keys(schema.modules).forEach(moduleName => {
const module = schema.modules[moduleName];
if (module.components == null) {
return;
}
Object.keys(module.components).forEach(componentName => {
if (module.components == null) {
return;
}
const component = module.components[componentName];
if (!componentModules.has(componentName)) {
componentModules.set(componentName, []);
}
nullthrows(componentModules.get(componentName)).push(moduleName);
if (component.props.length === 0) {
errors.add(
`${componentName} in module ${moduleName} must define props`,
);
}
});
});
componentModules.forEach((modules, componentName) => {
if (modules.length > 1) {
errors.add(
`Duplicate components found with name ${componentName}. Found in modules ${modules.join(
', ',
)}`,
);
}
});
return Array.from(errors).sort();
}
function validate(schema: SchemaType) {
const errors = getErrors(schema);
if (errors.length !== 0) {
throw new Error('Errors found validating schema:\n' + errors.join('\n'));
}
}
module.exports = {
getErrors,
validate,
};

View File

@@ -0,0 +1,99 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @emails oncall+react_native
* @flow strict-local
* @format
*/
'use strict';
const fixtures = require('../generators/__test_fixtures__/fixtures.js');
const schemaValidator = require('../SchemaValidator.js');
import type {SchemaType} from '../CodegenSchema.js';
const simpleProp = {
name: 'disabled',
optional: true,
typeAnnotation: {
type: 'BooleanTypeAnnotation',
default: false,
},
};
describe('SchemaValidator', () => {
it('fails on components across modules with same name', () => {
const fixture: SchemaType = {
modules: {
Module1: {
components: {
Component1: {
extendsProps: [
{
type: 'ReactNativeBuiltInType',
knownTypeName: 'ReactNativeCoreViewProps',
},
],
events: [],
props: [simpleProp],
},
},
},
Module2: {
components: {
Component1: {
extendsProps: [
{
type: 'ReactNativeBuiltInType',
knownTypeName: 'ReactNativeCoreViewProps',
},
],
events: [],
props: [simpleProp],
},
},
},
},
};
expect(schemaValidator.getErrors(fixture)).toMatchSnapshot();
});
it('fails on components with no props', () => {
const fixture: SchemaType = {
modules: {
Switch: {
components: {
BooleanPropNativeComponent: {
extendsProps: [
{
type: 'ReactNativeBuiltInType',
knownTypeName: 'ReactNativeCoreViewProps',
},
],
events: [],
props: [],
},
},
},
},
};
expect(schemaValidator.getErrors(fixture)).toMatchSnapshot();
});
describe('fixture', () => {
Object.keys(fixtures)
.sort()
.forEach(fixtureName => {
const fixture = fixtures[fixtureName];
it(`${fixtureName} has no errors`, () => {
expect(schemaValidator.getErrors(fixture)).toHaveLength(0);
});
});
});
});

View File

@@ -0,0 +1,13 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`SchemaValidator fails on components across modules with same name 1`] = `
Array [
"Duplicate components found with name Component1. Found in modules Module1, Module2",
]
`;
exports[`SchemaValidator fails on components with no props 1`] = `
Array [
"BooleanPropNativeComponent in module Switch must define props",
]
`;

View File

@@ -0,0 +1,37 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
* @format
*/
'use strict';
function getCppTypeForAnnotation(
type:
| 'BooleanTypeAnnotation'
| 'StringTypeAnnotation'
| 'Int32TypeAnnotation'
| 'FloatTypeAnnotation',
): string {
switch (type) {
case 'BooleanTypeAnnotation':
return 'bool';
case 'StringTypeAnnotation':
return 'std::string';
case 'Int32TypeAnnotation':
return 'int';
case 'FloatTypeAnnotation':
return 'Float';
default:
(type: empty);
throw new Error(`Receieved invalid typeAnnotation ${type}`);
}
}
module.exports = {
getCppTypeForAnnotation,
};

View File

@@ -0,0 +1,27 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
* @format
*/
'use strict';
const {upperCaseFirst} = require('../Helpers.js');
// import type {EventTypeShape} from './CodegenSchema';
function generateStructName(
componentName: string,
parts: $ReadOnlyArray<string> = [],
) {
const additional = parts.map(upperCaseFirst).join('');
return `${componentName}${additional}Struct`;
}
module.exports = {
generateStructName,
};

View File

@@ -0,0 +1,71 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
* @format
*/
'use strict';
import type {SchemaType} from '../CodegenSchema';
// File path -> contents
type FilesOutput = Map<string, string>;
const template = `
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/components/::_LIBRARY_::/ShadowNodes.h>
#include <react/core/ConcreteComponentDescriptor.h>
namespace facebook {
namespace react {
::_COMPONENT_DESCRIPTORS_::
} // namespace react
} // namespace facebook
`;
const componentTemplate = `
using ::_CLASSNAME_::ComponentDescriptor = ConcreteComponentDescriptor<::_CLASSNAME_::ShadowNode>;
`.trim();
module.exports = {
generate(libraryName: string, schema: SchemaType): FilesOutput {
const fileName = 'ComponentDescriptors.h';
const componentDescriptors = Object.keys(schema.modules)
.map(moduleName => {
const components = schema.modules[moduleName].components;
// No components in this module
if (components == null) {
return null;
}
return Object.keys(components)
.map(componentName => {
return componentTemplate.replace(/::_CLASSNAME_::/g, componentName);
})
.join('\n');
})
.filter(Boolean)
.join('\n');
const replacedTemplate = template
.replace(/::_COMPONENT_DESCRIPTORS_::/g, componentDescriptors)
.replace('::_LIBRARY_::', libraryName);
return new Map([[fileName, replacedTemplate]]);
},
};

View File

@@ -0,0 +1,172 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
* @format
*/
/*
https://phabricator.internmc.facebook.com/diffusion/FBS/browse/master/xplat/js/react-native-github/ReactCommon/fabric/components/switch/SwitchEventEmitter.cpp
void SwitchEventEmitter::onChange(bool value) const {
dispatchEvent("change", [value](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, "value", value);
return payload;
});
}
*/
'use strict';
const {generateStructName} = require('./EventEmitterHelpers.js');
import type {
ComponentShape,
EventTypeShape,
ObjectPropertyType,
SchemaType,
} from '../CodegenSchema';
// File path -> contents
type FilesOutput = Map<string, string>;
type ComponentCollection = $ReadOnly<{
[component: string]: ComponentShape,
}>;
type SettersSet = Set<string>;
const template = `
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/::_LIBRARY_::/EventEmitters.h>
namespace facebook {
namespace react {
::_EVENTS_::
} // namespace react
} // namespace facebook
`;
const componentTemplate = `
void ::_CLASSNAME_::EventEmitter::::_EVENT_NAME_::(::_STRUCT_NAME_:: event) const {
dispatchEvent("::_EVENT_NAME_::", [event=std::move(event)](jsi::Runtime &runtime) {
::_IMPLEMENTATION_::
});
}
`.trim();
function generateSetter(variableName, propertyName, propertyParts) {
const trailingPeriod = propertyParts.length === 0 ? '' : '.';
const eventChain = `event.${propertyParts.join(
'.',
)}${trailingPeriod}${propertyName});`;
return `${variableName}.setProperty(runtime, "${propertyName}", ${eventChain}`;
}
function generateSetters(
parentPropertyName: string,
properties: $ReadOnlyArray<ObjectPropertyType>,
propertyParts: $ReadOnlyArray<string>,
): string {
const propSetters = properties
.map(eventProperty => {
switch (eventProperty.type) {
case 'BooleanTypeAnnotation':
case 'StringTypeAnnotation':
case 'Int32TypeAnnotation':
case 'FloatTypeAnnotation':
return generateSetter(
parentPropertyName,
eventProperty.name,
propertyParts,
);
case 'ObjectTypeAnnotation':
const propertyName = eventProperty.name;
return `
{
auto ${propertyName} = jsi::Object(runtime);
${generateSetters(
propertyName,
eventProperty.properties,
propertyParts.concat([propertyName]),
)}
${parentPropertyName}.setProperty(runtime, "${propertyName}", ${propertyName});
}
`.trim();
default:
(eventProperty: empty);
throw new Error('Receieved invalid event property type');
}
})
.join('\n');
return propSetters;
}
function generateEvent(componentName: string, event): string {
const implementation = `
auto payload = jsi::Object(runtime);
${generateSetters('payload', event.typeAnnotation.argument.properties, [])}
return payload;
`.trim();
return componentTemplate
.replace(/::_CLASSNAME_::/g, componentName)
.replace(/::_EVENT_NAME_::/g, event.name)
.replace(
'::_STRUCT_NAME_::',
generateStructName(componentName, [event.name]),
)
.replace('::_IMPLEMENTATION_::', implementation);
}
module.exports = {
generate(libraryName: string, schema: SchemaType): FilesOutput {
const moduleComponents: ComponentCollection = Object.keys(schema.modules)
.map(moduleName => {
const components = schema.modules[moduleName].components;
// No components in this module
if (components == null) {
return null;
}
return components;
})
.filter(Boolean)
.reduce((acc, components) => Object.assign(acc, components), {});
const fileName = 'EventEmitters.cpp';
const componentEmitters = Object.keys(moduleComponents)
.map(componentName => {
const component = moduleComponents[componentName];
return component.events
.map(event => {
return generateEvent(componentName, event);
})
.join('\n');
})
.join('\n');
const replacedTemplate = template
.replace(/::_COMPONENT_EMITTERS_::/g, componentEmitters)
.replace('::_LIBRARY_::', libraryName)
.replace('::_EVENTS_::', componentEmitters);
return new Map([[fileName, replacedTemplate]]);
},
};

View File

@@ -0,0 +1,222 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @format
*/
'use strict';
const nullthrows = require('nullthrows');
const {getCppTypeForAnnotation} = require('./CppHelpers.js');
const {generateStructName} = require('./EventEmitterHelpers.js');
import type {
ComponentShape,
EventTypeShape,
ObjectPropertyType,
SchemaType,
} from '../CodegenSchema';
// File path -> contents
type FilesOutput = Map<string, string>;
type StructsMap = Map<string, string>;
type ComponentCollection = $ReadOnly<{
[component: string]: ComponentShape,
}>;
const template = `
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/components/view/ViewEventEmitter.h>
namespace facebook {
namespace react {
::_COMPONENT_EMITTERS_::
} // namespace react
} // namespace facebook
`;
const componentTemplate = `
::_STRUCTS_::
class ::_CLASSNAME_::EventEmitter : public ViewEventEmitter {
public:
using ViewEventEmitter::ViewEventEmitter;
::_EVENTS_::
};
`.trim();
const structTemplate = `
struct ::_STRUCT_NAME_:: {
::_FIELDS_::
};
`.trim();
function getNativeTypeFromAnnotation(
componentName: string,
eventProperty: ObjectPropertyType,
nameParts: $ReadOnlyArray<string>,
): string {
const type = eventProperty.type;
switch (type) {
case 'BooleanTypeAnnotation':
case 'StringTypeAnnotation':
case 'Int32TypeAnnotation':
case 'FloatTypeAnnotation':
return getCppTypeForAnnotation(type);
case 'ObjectTypeAnnotation':
return generateStructName(
componentName,
nameParts.concat([eventProperty.name]),
);
default:
(type: empty);
throw new Error(`Receieved invalid event property type ${type}`);
}
}
function generateStruct(
structs: StructsMap,
componentName: string,
nameParts: $ReadOnlyArray<string>,
properties: $ReadOnlyArray<ObjectPropertyType>,
): void {
const structNameParts = nameParts;
const structName = generateStructName(componentName, structNameParts);
const fields = properties
.map(property => {
return `${getNativeTypeFromAnnotation(
componentName,
property,
structNameParts,
)} ${property.name};`;
})
.join('\n');
properties.forEach((property: ObjectPropertyType) => {
const name = property.name;
switch (property.type) {
case 'BooleanTypeAnnotation':
case 'StringTypeAnnotation':
case 'Int32TypeAnnotation':
case 'FloatTypeAnnotation':
return;
case 'ObjectTypeAnnotation':
generateStruct(
structs,
componentName,
nameParts.concat([name]),
nullthrows(property.properties),
);
return;
default:
(property: empty);
throw new Error(
`Receieved invalid event property type ${property.type}`,
);
}
});
structs.set(
structName,
structTemplate
.replace('::_STRUCT_NAME_::', structName)
.replace('::_FIELDS_::', fields),
);
}
function generateStructs(componentName: string, component): string {
const structs: StructsMap = new Map();
component.events.forEach(event => {
generateStruct(
structs,
componentName,
[event.name],
event.typeAnnotation.argument.properties,
);
});
return Array.from(structs.values()).join('\n\n');
}
function generateEvent(componentName: string, event: EventTypeShape): string {
const structName = generateStructName(componentName, [event.name]);
return `void ${event.name}(${structName} value) const;`;
}
function generateEvents(componentName: string, component): string {
return component.events
.map(event => generateEvent(componentName, event))
.join('\n\n');
}
module.exports = {
generate(libraryName: string, schema: SchemaType): FilesOutput {
const moduleComponents: ComponentCollection = Object.keys(schema.modules)
.map(moduleName => {
const components = schema.modules[moduleName].components;
// No components in this module
if (components == null) {
return null;
}
return components;
})
.filter(Boolean)
.reduce((acc, components) => Object.assign(acc, components), {});
const moduleComponentsWithEvents = Object.keys(moduleComponents).filter(
componentName => moduleComponents[componentName].events.length > 0,
);
const fileName = 'EventEmitters.h';
const componentEmitters =
moduleComponentsWithEvents.length > 0
? Object.keys(moduleComponents)
.map(componentName => {
const component = moduleComponents[componentName];
const replacedTemplate = componentTemplate
.replace(/::_CLASSNAME_::/g, componentName)
.replace(
'::_STRUCTS_::',
generateStructs(componentName, component),
)
.replace(
'::_EVENTS_::',
generateEvents(componentName, component),
)
.trim();
return replacedTemplate;
})
.join('\n')
: '';
const replacedTemplate = template.replace(
/::_COMPONENT_EMITTERS_::/g,
componentEmitters,
);
return new Map([[fileName, replacedTemplate]]);
},
};

View File

@@ -0,0 +1,120 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
* @format
*/
'use strict';
import type {ComponentShape, SchemaType} from '../CodegenSchema';
// File path -> contents
type FilesOutput = Map<string, string>;
const template = `
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/::_LIBRARY_::/Props.h>
#include <react/core/propsConversions.h>
namespace facebook {
namespace react {
::_COMPONENT_CLASSES_::
} // namespace react
} // namespace facebook
`;
const componentTemplate = `
::_CLASSNAME_::::::_CLASSNAME_::(
const ::_CLASSNAME_:: &sourceProps,
const RawProps &rawProps):::_EXTEND_CLASSES_::
::_PROPS_::
{}
`.trim();
function generatePropsString(component: ComponentShape) {
return component.props
.map(prop => {
return `${prop.name}(convertRawProp(rawProps, "${
prop.name
}", sourceProps.${prop.name}, ${prop.name}))`;
})
.join(',\n');
}
function getClassExtendString(component): string {
const extendString =
' ' +
component.extendsProps
.map(extendProps => {
switch (extendProps.type) {
case 'ReactNativeBuiltInType':
switch (extendProps.knownTypeName) {
case 'ReactNativeCoreViewProps':
return 'ViewProps(sourceProps, rawProps)';
default:
(extendProps.knownTypeName: empty);
throw new Error('Invalid knownTypeName');
}
default:
(extendProps.type: empty);
throw new Error('Invalid extended type');
}
})
.join(', ') +
',';
return extendString;
}
module.exports = {
generate(libraryName: string, schema: SchemaType): FilesOutput {
const fileName = 'Props.cpp';
const componentProps = Object.keys(schema.modules)
.map(moduleName => {
const components = schema.modules[moduleName].components;
// No components in this module
if (components == null) {
return null;
}
return Object.keys(components)
.map(componentName => {
const component = components[componentName];
const newName = `${componentName}Props`;
const propsString = generatePropsString(component);
const extendString = getClassExtendString(component);
const replacedTemplate = componentTemplate
.replace(/::_CLASSNAME_::/g, newName)
.replace('::_EXTEND_CLASSES_::', extendString)
.replace('::_PROPS_::', propsString);
return replacedTemplate;
})
.join('\n');
})
.filter(Boolean)
.join('\n');
const replacedTemplate = template
.replace(/::_COMPONENT_CLASSES_::/g, componentProps)
.replace('::_LIBRARY_::', libraryName);
return new Map([[fileName, replacedTemplate]]);
},
};

View File

@@ -0,0 +1,308 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
* @format
*/
'use strict';
const {getCppTypeForAnnotation} = require('./CppHelpers.js');
const {upperCaseFirst} = require('../Helpers.js');
import type {PropTypeShape, SchemaType} from '../CodegenSchema';
// File path -> contents
type FilesOutput = Map<string, string>;
type TypeAnnotation = $PropertyType<PropTypeShape, 'typeAnnotation'>;
const template = `
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
::_IMPORTS_::
namespace facebook {
namespace react {
::_COMPONENT_CLASSES_::
} // namespace react
} // namespace facebook
`;
const classTemplate = `
::_ENUMS_::
class ::_CLASSNAME_:: final::_EXTEND_CLASSES_:: {
public:
::_CLASSNAME_::() = default;
::_CLASSNAME_::(const ::_CLASSNAME_:: &sourceProps, const RawProps &rawProps);
#pragma mark - Props
::_PROPS_::
};
`.trim();
const enumTemplate = `
enum class ::_ENUM_NAME_:: { ::_VALUES_:: };
static inline void fromDynamic(const folly::dynamic &value, ::_ENUM_NAME_:: &result) {
auto string = value.asString();
::_FROM_CASES_::
abort();
}
static inline std::string toString(const ::_ENUM_NAME_:: &value) {
switch (value) {
::_TO_CASES_::
}
}
`.trim();
function getClassExtendString(component): string {
const extendString =
' : ' +
component.extendsProps
.map(extendProps => {
switch (extendProps.type) {
case 'ReactNativeBuiltInType':
switch (extendProps.knownTypeName) {
case 'ReactNativeCoreViewProps':
return 'public ViewProps';
default:
(extendProps.knownTypeName: empty);
throw new Error('Invalid knownTypeName');
}
default:
(extendProps.type: empty);
throw new Error('Invalid extended type');
}
})
.join(' ');
return extendString;
}
function getNativeTypeFromAnnotation(componentName: string, prop): string {
const typeAnnotation = prop.typeAnnotation;
switch (typeAnnotation.type) {
case 'BooleanTypeAnnotation':
case 'StringTypeAnnotation':
case 'Int32TypeAnnotation':
case 'FloatTypeAnnotation':
return getCppTypeForAnnotation(typeAnnotation.type);
case 'NativePrimitiveTypeAnnotation':
switch (typeAnnotation.name) {
case 'ColorPrimitive':
return 'SharedColor';
default:
(typeAnnotation.name: empty);
throw new Error('Receieved unknown NativePrimitiveTypeAnnotation');
}
case 'StringEnumTypeAnnotation':
return getEnumName(componentName, prop.name);
default:
(typeAnnotation: empty);
throw new Error('Receieved invalid typeAnnotation');
}
}
function convertDefaultTypeToString(componentName: string, prop): string {
const typeAnnotation = prop.typeAnnotation;
switch (typeAnnotation.type) {
case 'BooleanTypeAnnotation':
return String(typeAnnotation.default);
case 'StringTypeAnnotation':
return `"${typeAnnotation.default}"`;
case 'Int32TypeAnnotation':
return String(typeAnnotation.default);
case 'FloatTypeAnnotation':
const defaultVal = typeAnnotation.default;
return parseInt(defaultVal, 10) === defaultVal
? typeAnnotation.default.toFixed(1)
: String(typeAnnotation.default);
case 'NativePrimitiveTypeAnnotation':
switch (typeAnnotation.name) {
case 'ColorPrimitive':
return '';
default:
(typeAnnotation.name: empty);
throw new Error('Receieved unknown NativePrimitiveTypeAnnotation');
}
case 'StringEnumTypeAnnotation':
return `${getEnumName(componentName, prop.name)}::${
typeAnnotation.default
}`;
default:
(typeAnnotation: empty);
throw new Error('Receieved invalid typeAnnotation');
}
}
function getEnumName(componentName, propName): string {
const uppercasedPropName = upperCaseFirst(propName);
return `${componentName}${uppercasedPropName}`;
}
function convertValueToEnumOption(value: string): string {
return upperCaseFirst(value);
}
function generateEnumString(componentName: string, component): string {
return component.props
.map(prop => {
if (prop.typeAnnotation.type !== 'StringEnumTypeAnnotation') {
return;
}
const values = prop.typeAnnotation.options.map(option => option.name);
const enumName = getEnumName(componentName, prop.name);
const fromCases = values
.map(
value =>
`if (string == "${value}") { result = ${enumName}::${convertValueToEnumOption(
value,
)}; return; }`,
)
.join('\n');
const toCases = values
.map(
value =>
`case ${enumName}::${convertValueToEnumOption(
value,
)}: return "${value}";`,
)
.join('\n');
return enumTemplate
.replace(/::_ENUM_NAME_::/g, enumName)
.replace('::_VALUES_::', values.map(upperCaseFirst).join(', '))
.replace('::_FROM_CASES_::', fromCases)
.replace('::_TO_CASES_::', toCases);
})
.filter(Boolean)
.join('\n');
}
function generatePropsString(
componentName: string,
props: $ReadOnlyArray<PropTypeShape>,
) {
return props
.map(prop => {
const nativeType = getNativeTypeFromAnnotation(componentName, prop);
const defaultValue = convertDefaultTypeToString(componentName, prop);
return `const ${nativeType} ${prop.name}{${defaultValue}};`;
})
.join('\n');
}
function getImports(component): Set<string> {
const imports: Set<string> = new Set();
component.extendsProps.forEach(extendProps => {
switch (extendProps.type) {
case 'ReactNativeBuiltInType':
switch (extendProps.knownTypeName) {
case 'ReactNativeCoreViewProps':
imports.add('#include <react/components/view/ViewProps.h>');
return;
default:
(extendProps.knownTypeName: empty);
throw new Error('Invalid knownTypeName');
}
default:
(extendProps.type: empty);
throw new Error('Invalid extended type');
}
});
component.props.forEach(prop => {
const typeAnnotation = prop.typeAnnotation;
if (typeAnnotation.type === 'NativePrimitiveTypeAnnotation') {
switch (typeAnnotation.name) {
case 'ColorPrimitive':
imports.add('#include <react/graphics/Color.h>');
return;
default:
(typeAnnotation.name: empty);
throw new Error(
`Invalid NativePrimitiveTypeAnnotation name, got ${prop.name}`,
);
}
}
});
return imports;
}
module.exports = {
generate(libraryName: string, schema: SchemaType): FilesOutput {
const fileName = 'Props.h';
const allImports: Set<string> = new Set();
const componentClasses = Object.keys(schema.modules)
.map(moduleName => {
const components = schema.modules[moduleName].components;
// No components in this module
if (components == null) {
return null;
}
return Object.keys(components)
.map(componentName => {
const component = components[componentName];
const newName = `${componentName}Props`;
const enumString = generateEnumString(componentName, component);
const propsString = generatePropsString(
componentName,
component.props,
);
const extendString = getClassExtendString(component);
const imports = getImports(component);
imports.forEach(allImports.add, allImports);
const replacedTemplate = classTemplate
.replace('::_ENUMS_::', enumString)
.replace(/::_CLASSNAME_::/g, newName)
.replace('::_EXTEND_CLASSES_::', extendString)
.replace('::_PROPS_::', propsString)
.trim();
return replacedTemplate;
})
.join('\n\n');
})
.filter(Boolean)
.join('\n\n');
const replacedTemplate = template
.replace(/::_COMPONENT_CLASSES_::/g, componentClasses)
.replace(
'::_IMPORTS_::',
Array.from(allImports)
.sort()
.join('\n'),
);
return new Map([[fileName, replacedTemplate]]);
},
};

View File

@@ -0,0 +1,73 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
* @format
*/
'use strict';
import type {SchemaType} from '../CodegenSchema';
// File path -> contents
type FilesOutput = Map<string, string>;
const template = `
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/::_LIBRARY_::/ShadowNodes.h>
namespace facebook {
namespace react {
::_COMPONENT_NAMES_::
} // namespace react
} // namespace facebook
`;
const componentTemplate = `
extern const char ::_CLASSNAME_::ComponentName[] = "::_CLASSNAME_::";
`.trim();
module.exports = {
generate(libraryName: string, schema: SchemaType): FilesOutput {
const fileName = 'ShadowNodes.cpp';
const componentNames = Object.keys(schema.modules)
.map(moduleName => {
const components = schema.modules[moduleName].components;
// No components in this module
if (components == null) {
return null;
}
return Object.keys(components)
.map(componentName => {
const replacedTemplate = componentTemplate.replace(
/::_CLASSNAME_::/g,
componentName,
);
return replacedTemplate;
})
.join('\n');
})
.filter(Boolean)
.join('\n');
const replacedTemplate = template
.replace(/::_COMPONENT_NAMES_::/g, componentNames)
.replace('::_LIBRARY_::', libraryName);
return new Map([[fileName, replacedTemplate]]);
},
};

View File

@@ -0,0 +1,98 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
* @format
*/
'use strict';
import type {PropTypeShape, SchemaType} from '../CodegenSchema';
// File path -> contents
type FilesOutput = Map<string, string>;
const template = `
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
::_IMPORTS_::#include <react/components/::_LIBRARY_::/Props.h>
#include <react/components/view/ConcreteViewShadowNode.h>
namespace facebook {
namespace react {
::_COMPONENT_CLASSES_::
} // namespace react
} // namespace facebook
`;
const componentTemplate = `
extern const char ::_CLASSNAME_::ComponentName[];
/*
* \`ShadowNode\` for <::_CLASSNAME_::> component.
*/
using ::_CLASSNAME_::ShadowNode = ConcreteViewShadowNode<
::_CLASSNAME_::ComponentName,
::_CLASSNAME_::Props::_EVENT_EMITTER_::>;
`.trim();
module.exports = {
generate(libraryName: string, schema: SchemaType): FilesOutput {
const fileName = 'ShadowNodes.h';
let hasAnyEvents = false;
const moduleResults = Object.keys(schema.modules)
.map(moduleName => {
const components = schema.modules[moduleName].components;
// No components in this module
if (components == null) {
return null;
}
return Object.keys(components)
.map(componentName => {
const component = components[componentName];
const hasEvents = component.events.length > 0;
if (hasEvents) {
hasAnyEvents = true;
}
const eventEmitter = hasEvents
? `,\n${componentName}EventEmitter`
: '';
const replacedTemplate = componentTemplate
.replace(/::_CLASSNAME_::/g, componentName)
.replace('::_EVENT_EMITTER_::', eventEmitter);
return replacedTemplate;
})
.join('\n\n');
})
.filter(Boolean)
.join('\n\n');
const eventEmitterImport = `#include <react/components/${libraryName}/EventEmitters.h>\n`;
const replacedTemplate = template
.replace(/::_COMPONENT_CLASSES_::/g, moduleResults)
.replace('::_LIBRARY_::', libraryName)
.replace('::_IMPORTS_::', hasAnyEvents ? eventEmitterImport : '');
return new Map([[fileName, replacedTemplate]]);
},
};

View File

@@ -0,0 +1,247 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
* @format
*/
'use strict';
const j = require('jscodeshift');
import type {SchemaType} from '../CodegenSchema';
// File path -> contents
type FilesOutput = Map<string, string>;
const template = `
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
*/
'use strict';
::_IMPORTS_::
::_COMPONENT_CONFIG_::
`;
function getReactDiffProcessValue(prop) {
const typeAnnotation = prop.typeAnnotation;
switch (typeAnnotation.type) {
case 'BooleanTypeAnnotation':
case 'StringTypeAnnotation':
case 'Int32TypeAnnotation':
case 'FloatTypeAnnotation':
case 'StringEnumTypeAnnotation':
return j.literal(true);
case 'NativePrimitiveTypeAnnotation':
const nativeTypesString =
"require('react-native').__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.NativePrimitives";
switch (typeAnnotation.name) {
case 'ColorPrimitive':
return j.template.expression`${nativeTypesString}.ColorPrimitive`;
default:
(typeAnnotation.name: empty);
throw new Error('Receieved unknown NativePrimitiveTypeAnnotation');
}
default:
(typeAnnotation: empty);
throw new Error('Receieved invalid typeAnnotation');
}
}
const componentTemplate = `
const ::_COMPONENT_NAME_::ViewConfig = VIEW_CONFIG;
ReactNativeViewConfigRegistry.register(
'::_COMPONENT_NAME_::',
() => ::_COMPONENT_NAME_::ViewConfig,
);
`.trim();
function generateBubblingEventInfo(event) {
return j.property(
'init',
j.identifier(event.name),
j.objectExpression([
j.property(
'init',
j.identifier('phasedRegistrationNames'),
j.objectExpression([
j.property(
'init',
j.identifier('captured'),
j.literal(`${event.name}Capture`),
),
j.property('init', j.identifier('bubbled'), j.literal(event.name)),
]),
),
]),
);
}
function generateDirectEventInfo(event) {
return j.property(
'init',
j.identifier(event.name),
j.objectExpression([
j.property(
'init',
j.identifier('registrationName'),
j.literal(event.name),
),
]),
);
}
function buildViewConfig(
schema: SchemaType,
componentName: string,
component,
imports,
) {
const componentProps = component.props;
let styleAttribute = null;
component.extendsProps.forEach(extendProps => {
switch (extendProps.type) {
case 'ReactNativeBuiltInType':
switch (extendProps.knownTypeName) {
case 'ReactNativeCoreViewProps':
imports.add(
"const ReactNativeStyleAttributes = require('ReactNativeStyleAttributes');",
);
styleAttribute = j.property(
'init',
j.identifier('style'),
j.identifier('ReactNativeStyleAttributes'),
);
return;
default:
(extendProps.knownTypeName: empty);
throw new Error('Invalid knownTypeName');
}
default:
(extendProps.type: empty);
throw new Error('Invalid extended type');
}
});
const validAttributes = j.objectExpression([
...componentProps.map(schemaProp => {
return j.property(
'init',
j.identifier(schemaProp.name),
getReactDiffProcessValue(schemaProp),
);
}),
styleAttribute,
]);
const bubblingEventNames = component.events
.filter(event => event.bubblingType === 'bubble')
.map(generateBubblingEventInfo);
const bubblingEvents =
bubblingEventNames.length > 0
? j.property(
'init',
j.identifier('bubblingEventTypes'),
j.objectExpression(bubblingEventNames),
)
: null;
const directEventNames = component.events
.filter(event => event.bubblingType === 'direct')
.map(generateDirectEventInfo);
const directEvents =
directEventNames.length > 0
? j.property(
'init',
j.identifier('directEventTypes'),
j.objectExpression(directEventNames),
)
: null;
const properties = [
j.property(
'init',
j.identifier('uiViewClassName'),
j.literal(componentName),
),
bubblingEvents,
directEvents,
j.property('init', j.identifier('validAttributes'), validAttributes),
].filter(Boolean);
return j.objectExpression(properties);
}
module.exports = {
generate(libraryName: string, schema: SchemaType): FilesOutput {
const fileName = 'ViewConfigs.js';
const imports: Set<string> = new Set();
imports.add(
"const ReactNativeViewConfigRegistry = require('ReactNativeViewConfigRegistry');",
);
const moduleResults = Object.keys(schema.modules)
.map(moduleName => {
const components = schema.modules[moduleName].components;
// No components in this module
if (components == null) {
return null;
}
return Object.keys(components)
.map(componentName => {
const component = components[componentName];
const replacedTemplate = componentTemplate.replace(
/::_COMPONENT_NAME_::/g,
componentName,
);
const replacedSource: string = j
.withParser('flow')(replacedTemplate)
.find(j.Identifier, {
name: 'VIEW_CONFIG',
})
.replaceWith(
buildViewConfig(schema, componentName, component, imports),
)
.toSource({quote: 'single'});
return replacedSource;
})
.join('\n\n');
})
.filter(Boolean)
.join('\n\n');
const replacedTemplate = template
.replace(/::_COMPONENT_CONFIG_::/g, moduleResults)
.replace(
'::_IMPORTS_::',
Array.from(imports)
.sort()
.join('\n'),
);
return new Map([[fileName, replacedTemplate]]);
},
};

View File

@@ -0,0 +1,62 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @format
*/
'use strict';
/*
TODO:
- ViewConfigs should spread in View's valid attributes
*/
const fs = require('fs');
const generateComponentDescriptorH = require('./GenerateComponentDescriptorH.js');
const generateEventEmitterCpp = require('./GenerateEventEmitterCpp.js');
const generateEventEmitterH = require('./GenerateEventEmitterH.js');
const generatePropsCpp = require('./GeneratePropsCpp.js');
const generatePropsH = require('./GeneratePropsH.js');
const generateShadowNodeCpp = require('./GenerateShadowNodeCpp.js');
const generateShadowNodeH = require('./GenerateShadowNodeH.js');
const generateViewConfigJs = require('./GenerateViewConfigJs.js');
const path = require('path');
const schemaValidator = require('../SchemaValidator.js');
import type {SchemaType} from '../CodegenSchema';
type Options = $ReadOnly<{|
libraryName: string,
schema: SchemaType,
outputDirectory: string,
|}>;
function writeMapToFiles(map: Map<string, string>, outputDirectory: string) {
map.forEach((contents: string, fileName: string) => {
const location = path.join(outputDirectory, fileName);
fs.writeFileSync(location, contents);
});
}
module.exports = {
generate({libraryName, schema, outputDirectory}: Options) {
schemaValidator.validate(schema);
const generatedFiles: Map<string, string> = new Map([
...generateComponentDescriptorH.generate(libraryName, schema),
...generateEventEmitterCpp.generate(libraryName, schema),
...generateEventEmitterH.generate(libraryName, schema),
...generatePropsCpp.generate(libraryName, schema),
...generatePropsH.generate(libraryName, schema),
...generateShadowNodeCpp.generate(libraryName, schema),
...generateShadowNodeH.generate(libraryName, schema),
...generateViewConfigJs.generate(libraryName, schema),
]);
writeMapToFiles(generatedFiles, outputDirectory);
},
};

View File

@@ -0,0 +1,521 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @format
*/
'use strict';
import type {SchemaType} from '../../CodegenSchema.js';
const SINGLE_COMPONENT_WITH_BOOLEAN_PROP: SchemaType = {
modules: {
Switch: {
components: {
BooleanPropNativeComponent: {
extendsProps: [
{
type: 'ReactNativeBuiltInType',
knownTypeName: 'ReactNativeCoreViewProps',
},
],
events: [],
props: [
{
name: 'disabled',
optional: true,
typeAnnotation: {
type: 'BooleanTypeAnnotation',
default: false,
},
},
],
},
},
},
},
};
const SINGLE_COMPONENT_WITH_STRING_PROP: SchemaType = {
modules: {
Switch: {
components: {
StringPropComponent: {
extendsProps: [
{
type: 'ReactNativeBuiltInType',
knownTypeName: 'ReactNativeCoreViewProps',
},
],
events: [],
props: [
{
name: 'accessibilityHint',
optional: true,
typeAnnotation: {
type: 'StringTypeAnnotation',
default: '',
},
},
],
},
},
},
},
};
const SINGLE_COMPONENT_WITH_INTEGER_PROPS: SchemaType = {
modules: {
Switch: {
components: {
IntegerPropNativeComponent: {
extendsProps: [
{
type: 'ReactNativeBuiltInType',
knownTypeName: 'ReactNativeCoreViewProps',
},
],
events: [],
props: [
{
name: 'progress1',
optional: true,
typeAnnotation: {
type: 'Int32TypeAnnotation',
default: 0,
},
},
{
name: 'progress2',
optional: true,
typeAnnotation: {
type: 'Int32TypeAnnotation',
default: -1,
},
},
{
name: 'progress3',
optional: true,
typeAnnotation: {
type: 'Int32TypeAnnotation',
default: 10,
},
},
],
},
},
},
},
};
const SINGLE_COMPONENT_WITH_FLOAT_PROPS: SchemaType = {
modules: {
Switch: {
components: {
FloatPropNativeComponent: {
extendsProps: [
{
type: 'ReactNativeBuiltInType',
knownTypeName: 'ReactNativeCoreViewProps',
},
],
events: [],
props: [
{
name: 'blurRadius',
optional: true,
typeAnnotation: {
type: 'FloatTypeAnnotation',
default: 0.0,
},
},
{
name: 'blurRadius2',
optional: true,
typeAnnotation: {
type: 'FloatTypeAnnotation',
default: 0.001,
},
},
{
name: 'blurRadius3',
optional: true,
typeAnnotation: {
type: 'FloatTypeAnnotation',
default: 2.1,
},
},
{
name: 'blurRadius4',
optional: true,
typeAnnotation: {
type: 'FloatTypeAnnotation',
default: 0,
},
},
{
name: 'blurRadius5',
optional: true,
typeAnnotation: {
type: 'FloatTypeAnnotation',
default: 1,
},
},
],
},
},
},
},
};
const SINGLE_COMPONENT_WITH_COLOR_PROP: SchemaType = {
modules: {
Switch: {
components: {
ColorPropNativeComponent: {
extendsProps: [
{
type: 'ReactNativeBuiltInType',
knownTypeName: 'ReactNativeCoreViewProps',
},
],
events: [],
props: [
{
name: 'tintColor',
optional: true,
typeAnnotation: {
type: 'NativePrimitiveTypeAnnotation',
name: 'ColorPrimitive',
},
},
],
},
},
},
},
};
const SINGLE_COMPONENT_WITH_ENUM_PROP: SchemaType = {
modules: {
Switch: {
components: {
EnumPropsNativeComponent: {
extendsProps: [
{
type: 'ReactNativeBuiltInType',
knownTypeName: 'ReactNativeCoreViewProps',
},
],
events: [],
props: [
{
name: 'alignment',
optional: true,
typeAnnotation: {
type: 'StringEnumTypeAnnotation',
default: 'Center',
options: [
{
name: 'top',
},
{
name: 'center',
},
{
name: 'bottom',
},
],
},
},
],
},
},
},
},
};
const SINGLE_COMPONENT_WITH_EVENT_PROPS: SchemaType = {
modules: {
Switch: {
components: {
EventsNativeComponent: {
extendsProps: [
{
type: 'ReactNativeBuiltInType',
knownTypeName: 'ReactNativeCoreViewProps',
},
],
events: [
{
name: 'onChange',
optional: true,
bubblingType: 'bubble',
typeAnnotation: {
type: 'EventTypeAnnotation',
argument: {
type: 'ObjectTypeAnnotation',
properties: [
{
type: 'BooleanTypeAnnotation',
name: 'value',
optional: false,
},
{
type: 'StringTypeAnnotation',
name: 'source',
optional: true,
},
{
type: 'Int32TypeAnnotation',
name: 'progress',
optional: true,
},
{
type: 'FloatTypeAnnotation',
name: 'scale',
optional: true,
},
// {
// type: 'ObjectTypeAnnotation',
// name: 'location',
// optional: false,
// properties: [
// {
// type: 'IntegerTypeAnnotation',
// name: 'x',
// optional: false,
// },
// {
// type: 'IntegerTypeAnnotation',
// name: 'y',
// optional: false,
// },
// ],
// },
],
},
},
},
{
name: 'onEventDirect',
optional: true,
bubblingType: 'direct',
typeAnnotation: {
type: 'EventTypeAnnotation',
argument: {
type: 'ObjectTypeAnnotation',
properties: [
{
type: 'BooleanTypeAnnotation',
name: 'value',
optional: false,
},
],
},
},
},
],
props: [
{
name: 'disabled',
optional: true,
typeAnnotation: {
type: 'BooleanTypeAnnotation',
default: false,
},
},
],
},
},
},
},
};
const SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS: SchemaType = {
modules: {
Switch: {
components: {
EventsNestedObjectNativeComponent: {
extendsProps: [
{
type: 'ReactNativeBuiltInType',
knownTypeName: 'ReactNativeCoreViewProps',
},
],
events: [
{
name: 'onChange',
optional: true,
bubblingType: 'bubble',
typeAnnotation: {
type: 'EventTypeAnnotation',
argument: {
type: 'ObjectTypeAnnotation',
properties: [
{
type: 'ObjectTypeAnnotation',
name: 'location',
optional: false,
properties: [
{
type: 'ObjectTypeAnnotation',
name: 'source',
optional: false,
properties: [
{
type: 'StringTypeAnnotation',
name: 'url',
optional: false,
},
],
},
{
type: 'Int32TypeAnnotation',
name: 'x',
optional: false,
},
{
type: 'Int32TypeAnnotation',
name: 'y',
optional: false,
},
],
},
],
},
},
},
],
props: [
{
name: 'disabled',
optional: true,
typeAnnotation: {
type: 'BooleanTypeAnnotation',
default: false,
},
},
],
},
},
},
},
};
const TWO_COMPONENTS_SAME_FILE: SchemaType = {
modules: {
MyComponents: {
components: {
MultiComponent1NativeComponent: {
extendsProps: [
{
type: 'ReactNativeBuiltInType',
knownTypeName: 'ReactNativeCoreViewProps',
},
],
events: [],
props: [
{
name: 'disabled',
optional: true,
typeAnnotation: {
type: 'BooleanTypeAnnotation',
default: false,
},
},
],
},
MultiComponent2NativeComponent: {
extendsProps: [
{
type: 'ReactNativeBuiltInType',
knownTypeName: 'ReactNativeCoreViewProps',
},
],
events: [],
props: [
{
name: 'disabled',
optional: true,
typeAnnotation: {
type: 'BooleanTypeAnnotation',
default: true,
},
},
],
},
},
},
},
};
const TWO_COMPONENTS_DIFFERENT_FILES: SchemaType = {
modules: {
ComponentFile1: {
components: {
MultiFile1NativeComponent: {
extendsProps: [
{
type: 'ReactNativeBuiltInType',
knownTypeName: 'ReactNativeCoreViewProps',
},
],
events: [],
props: [
{
name: 'disabled',
optional: true,
typeAnnotation: {
type: 'BooleanTypeAnnotation',
default: false,
},
},
],
},
},
},
ComponentFile2: {
components: {
MultiFile2NativeComponent: {
extendsProps: [
{
type: 'ReactNativeBuiltInType',
knownTypeName: 'ReactNativeCoreViewProps',
},
],
events: [],
props: [
{
name: 'disabled',
optional: true,
typeAnnotation: {
type: 'BooleanTypeAnnotation',
default: true,
},
},
],
},
},
},
},
};
module.exports = {
SINGLE_COMPONENT_WITH_BOOLEAN_PROP,
SINGLE_COMPONENT_WITH_STRING_PROP,
SINGLE_COMPONENT_WITH_INTEGER_PROPS,
SINGLE_COMPONENT_WITH_FLOAT_PROPS,
SINGLE_COMPONENT_WITH_COLOR_PROP,
SINGLE_COMPONENT_WITH_ENUM_PROP,
SINGLE_COMPONENT_WITH_EVENT_PROPS,
SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS,
TWO_COMPONENTS_SAME_FILE,
TWO_COMPONENTS_DIFFERENT_FILES,
};

View File

@@ -0,0 +1,106 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @emails oncall+react_native
* @flow strict-local
* @format
*/
'use strict';
const generator = require('../GenerateComponentDescriptorH.js');
const {
SINGLE_COMPONENT_WITH_BOOLEAN_PROP,
SINGLE_COMPONENT_WITH_STRING_PROP,
SINGLE_COMPONENT_WITH_INTEGER_PROPS,
SINGLE_COMPONENT_WITH_FLOAT_PROPS,
SINGLE_COMPONENT_WITH_COLOR_PROP,
SINGLE_COMPONENT_WITH_ENUM_PROP,
SINGLE_COMPONENT_WITH_EVENT_PROPS,
TWO_COMPONENTS_SAME_FILE,
TWO_COMPONENTS_DIFFERENT_FILES,
} = require('../__test_fixtures__/fixtures.js');
describe('GenerateComponentDescriptorH', () => {
it('can generate a single boolean prop', () => {
expect(
generator.generate(
'SINGLE_COMPONENT_WITH_BOOLEAN_PROP',
SINGLE_COMPONENT_WITH_BOOLEAN_PROP,
),
).toMatchSnapshot();
});
it('can generate a single string prop', () => {
expect(
generator.generate(
'SINGLE_COMPONENT_WITH_STRING_PROPS',
SINGLE_COMPONENT_WITH_STRING_PROP,
),
).toMatchSnapshot();
});
it('can generate integer props', () => {
expect(
generator.generate(
'SINGLE_COMPONENT_WITH_INTEGER_PROPS',
SINGLE_COMPONENT_WITH_INTEGER_PROPS,
),
).toMatchSnapshot();
});
it('can generate float props', () => {
expect(
generator.generate(
'SINGLE_COMPONENT_WITH_FLOAT_PROPS',
SINGLE_COMPONENT_WITH_FLOAT_PROPS,
),
).toMatchSnapshot();
});
it('can generate a single native primitive prop', () => {
expect(
generator.generate(
'SINGLE_COMPONENT_WITH_COLOR_PROP',
SINGLE_COMPONENT_WITH_COLOR_PROP,
),
).toMatchSnapshot();
});
it('can generate enum props', () => {
expect(
generator.generate(
'SINGLE_COMPONENT_WITH_ENUM_PROP',
SINGLE_COMPONENT_WITH_ENUM_PROP,
),
).toMatchSnapshot();
});
it('can generate events', () => {
expect(
generator.generate(
'SINGLE_COMPONENT_WITH_EVENT_PROPS',
SINGLE_COMPONENT_WITH_EVENT_PROPS,
),
).toMatchSnapshot();
});
it('supports two components from same module', () => {
expect(
generator.generate('TWO_COMPONENTS_SAME_FILE', TWO_COMPONENTS_SAME_FILE),
).toMatchSnapshot();
});
it('supports two components from different modules', () => {
expect(
generator.generate(
'TWO_COMPONENTS_DIFFERENT_FILES',
TWO_COMPONENTS_DIFFERENT_FILES,
),
).toMatchSnapshot();
});
});

View File

@@ -0,0 +1,27 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @emails oncall+react_native
* @flow strict-local
* @format
*/
'use strict';
const fixtures = require('../__test_fixtures__/fixtures.js');
const generator = require('../GenerateEventEmitterCpp.js');
describe('GenerateEventEmitterCpp', () => {
Object.keys(fixtures)
.sort()
.forEach(fixtureName => {
const fixture = fixtures[fixtureName];
it(`can generate fixture ${fixtureName}`, () => {
expect(generator.generate(fixtureName, fixture)).toMatchSnapshot();
});
});
});

View File

@@ -0,0 +1,27 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @emails oncall+react_native
* @flow strict-local
* @format
*/
'use strict';
const fixtures = require('../__test_fixtures__/fixtures.js');
const generator = require('../GenerateEventEmitterH.js');
describe('GenerateEventEmitterH', () => {
Object.keys(fixtures)
.sort()
.forEach(fixtureName => {
const fixture = fixtures[fixtureName];
it(`can generate fixture ${fixtureName}`, () => {
expect(generator.generate(fixtureName, fixture)).toMatchSnapshot();
});
});
});

View File

@@ -0,0 +1,27 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @emails oncall+react_native
* @flow strict-local
* @format
*/
'use strict';
const fixtures = require('../__test_fixtures__/fixtures.js');
const generator = require('../GeneratePropsCpp.js');
describe('GeneratePropsCpp', () => {
Object.keys(fixtures)
.sort()
.forEach(fixtureName => {
const fixture = fixtures[fixtureName];
it(`can generate fixture ${fixtureName}`, () => {
expect(generator.generate(fixtureName, fixture)).toMatchSnapshot();
});
});
});

View File

@@ -0,0 +1,27 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @emails oncall+react_native
* @flow strict-local
* @format
*/
'use strict';
const fixtures = require('../__test_fixtures__/fixtures.js');
const generator = require('../GeneratePropsH.js');
describe('GeneratePropsH', () => {
Object.keys(fixtures)
.sort()
.forEach(fixtureName => {
const fixture = fixtures[fixtureName];
it(`can generate fixture ${fixtureName}`, () => {
expect(generator.generate(fixtureName, fixture)).toMatchSnapshot();
});
});
});

View File

@@ -0,0 +1,27 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @emails oncall+react_native
* @flow strict-local
* @format
*/
'use strict';
const fixtures = require('../__test_fixtures__/fixtures.js');
const generator = require('../GenerateShadowNodeCpp.js');
describe('GenerateShadowNodeCpp', () => {
Object.keys(fixtures)
.sort()
.forEach(fixtureName => {
const fixture = fixtures[fixtureName];
it(`can generate fixture ${fixtureName}`, () => {
expect(generator.generate(fixtureName, fixture)).toMatchSnapshot();
});
});
});

View File

@@ -0,0 +1,27 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @emails oncall+react_native
* @flow strict-local
* @format
*/
'use strict';
const fixtures = require('../__test_fixtures__/fixtures.js');
const generator = require('../GenerateShadowNodeH.js');
describe('GenerateShadowNodeH', () => {
Object.keys(fixtures)
.sort()
.forEach(fixtureName => {
const fixture = fixtures[fixtureName];
it(`can generate fixture ${fixtureName}`, () => {
expect(generator.generate(fixtureName, fixture)).toMatchSnapshot();
});
});
});

View File

@@ -0,0 +1,27 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @emails oncall+react_native
* @flow strict-local
* @format
*/
'use strict';
const fixtures = require('../__test_fixtures__/fixtures.js');
const generator = require('../GenerateViewConfigJs.js');
describe('GenerateViewConfigJs', () => {
Object.keys(fixtures)
.sort()
.forEach(fixtureName => {
const fixture = fixtures[fixtureName];
it(`can generate fixture ${fixtureName}`, () => {
expect(generator.generate(fixtureName, fixture)).toMatchSnapshot();
});
});
});

View File

@@ -0,0 +1,237 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`GenerateComponentDescriptorH can generate a single boolean prop 1`] = `
Map {
"ComponentDescriptors.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/components/SINGLE_COMPONENT_WITH_BOOLEAN_PROP/ShadowNodes.h>
#include <react/core/ConcreteComponentDescriptor.h>
namespace facebook {
namespace react {
using BooleanPropNativeComponentComponentDescriptor = ConcreteComponentDescriptor<BooleanPropNativeComponentShadowNode>;
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateComponentDescriptorH can generate a single native primitive prop 1`] = `
Map {
"ComponentDescriptors.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/components/SINGLE_COMPONENT_WITH_COLOR_PROP/ShadowNodes.h>
#include <react/core/ConcreteComponentDescriptor.h>
namespace facebook {
namespace react {
using ColorPropNativeComponentComponentDescriptor = ConcreteComponentDescriptor<ColorPropNativeComponentShadowNode>;
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateComponentDescriptorH can generate a single string prop 1`] = `
Map {
"ComponentDescriptors.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/components/SINGLE_COMPONENT_WITH_STRING_PROPS/ShadowNodes.h>
#include <react/core/ConcreteComponentDescriptor.h>
namespace facebook {
namespace react {
using StringPropComponentComponentDescriptor = ConcreteComponentDescriptor<StringPropComponentShadowNode>;
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateComponentDescriptorH can generate enum props 1`] = `
Map {
"ComponentDescriptors.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/components/SINGLE_COMPONENT_WITH_ENUM_PROP/ShadowNodes.h>
#include <react/core/ConcreteComponentDescriptor.h>
namespace facebook {
namespace react {
using EnumPropsNativeComponentComponentDescriptor = ConcreteComponentDescriptor<EnumPropsNativeComponentShadowNode>;
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateComponentDescriptorH can generate events 1`] = `
Map {
"ComponentDescriptors.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/components/SINGLE_COMPONENT_WITH_EVENT_PROPS/ShadowNodes.h>
#include <react/core/ConcreteComponentDescriptor.h>
namespace facebook {
namespace react {
using EventsNativeComponentComponentDescriptor = ConcreteComponentDescriptor<EventsNativeComponentShadowNode>;
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateComponentDescriptorH can generate float props 1`] = `
Map {
"ComponentDescriptors.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/components/SINGLE_COMPONENT_WITH_FLOAT_PROPS/ShadowNodes.h>
#include <react/core/ConcreteComponentDescriptor.h>
namespace facebook {
namespace react {
using FloatPropNativeComponentComponentDescriptor = ConcreteComponentDescriptor<FloatPropNativeComponentShadowNode>;
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateComponentDescriptorH can generate integer props 1`] = `
Map {
"ComponentDescriptors.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/components/SINGLE_COMPONENT_WITH_INTEGER_PROPS/ShadowNodes.h>
#include <react/core/ConcreteComponentDescriptor.h>
namespace facebook {
namespace react {
using IntegerPropNativeComponentComponentDescriptor = ConcreteComponentDescriptor<IntegerPropNativeComponentShadowNode>;
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateComponentDescriptorH supports two components from different modules 1`] = `
Map {
"ComponentDescriptors.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/components/TWO_COMPONENTS_DIFFERENT_FILES/ShadowNodes.h>
#include <react/core/ConcreteComponentDescriptor.h>
namespace facebook {
namespace react {
using MultiFile1NativeComponentComponentDescriptor = ConcreteComponentDescriptor<MultiFile1NativeComponentShadowNode>;
using MultiFile2NativeComponentComponentDescriptor = ConcreteComponentDescriptor<MultiFile2NativeComponentShadowNode>;
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateComponentDescriptorH supports two components from same module 1`] = `
Map {
"ComponentDescriptors.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/components/TWO_COMPONENTS_SAME_FILE/ShadowNodes.h>
#include <react/core/ConcreteComponentDescriptor.h>
namespace facebook {
namespace react {
using MultiComponent1NativeComponentComponentDescriptor = ConcreteComponentDescriptor<MultiComponent1NativeComponentShadowNode>;
using MultiComponent2NativeComponentComponentDescriptor = ConcreteComponentDescriptor<MultiComponent2NativeComponentShadowNode>;
} // namespace react
} // namespace facebook
",
}
`;

View File

@@ -0,0 +1,267 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`GenerateEventEmitterCpp can generate fixture SINGLE_COMPONENT_WITH_BOOLEAN_PROP 1`] = `
Map {
"EventEmitters.cpp" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_BOOLEAN_PROP/EventEmitters.h>
namespace facebook {
namespace react {
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateEventEmitterCpp can generate fixture SINGLE_COMPONENT_WITH_COLOR_PROP 1`] = `
Map {
"EventEmitters.cpp" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_COLOR_PROP/EventEmitters.h>
namespace facebook {
namespace react {
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateEventEmitterCpp can generate fixture SINGLE_COMPONENT_WITH_ENUM_PROP 1`] = `
Map {
"EventEmitters.cpp" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_ENUM_PROP/EventEmitters.h>
namespace facebook {
namespace react {
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateEventEmitterCpp can generate fixture SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS 1`] = `
Map {
"EventEmitters.cpp" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS/EventEmitters.h>
namespace facebook {
namespace react {
void EventsNestedObjectNativeComponentEventEmitter::onChange(EventsNestedObjectNativeComponentOnChangeStruct event) const {
dispatchEvent(\\"onChange\\", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
{
auto location = jsi::Object(runtime);
{
auto source = jsi::Object(runtime);
source.setProperty(runtime, \\"url\\", event.location.source.url);
location.setProperty(runtime, \\"source\\", source);
}
location.setProperty(runtime, \\"x\\", event.location.x);
location.setProperty(runtime, \\"y\\", event.location.y);
payload.setProperty(runtime, \\"location\\", location);
}
return payload;
});
}
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateEventEmitterCpp can generate fixture SINGLE_COMPONENT_WITH_EVENT_PROPS 1`] = `
Map {
"EventEmitters.cpp" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_EVENT_PROPS/EventEmitters.h>
namespace facebook {
namespace react {
void EventsNativeComponentEventEmitter::onChange(EventsNativeComponentOnChangeStruct event) const {
dispatchEvent(\\"onChange\\", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, \\"value\\", event.value);
payload.setProperty(runtime, \\"source\\", event.source);
payload.setProperty(runtime, \\"progress\\", event.progress);
payload.setProperty(runtime, \\"scale\\", event.scale);
return payload;
});
}
void EventsNativeComponentEventEmitter::onEventDirect(EventsNativeComponentOnEventDirectStruct event) const {
dispatchEvent(\\"onEventDirect\\", [event=std::move(event)](jsi::Runtime &runtime) {
auto payload = jsi::Object(runtime);
payload.setProperty(runtime, \\"value\\", event.value);
return payload;
});
}
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateEventEmitterCpp can generate fixture SINGLE_COMPONENT_WITH_FLOAT_PROPS 1`] = `
Map {
"EventEmitters.cpp" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_FLOAT_PROPS/EventEmitters.h>
namespace facebook {
namespace react {
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateEventEmitterCpp can generate fixture SINGLE_COMPONENT_WITH_INTEGER_PROPS 1`] = `
Map {
"EventEmitters.cpp" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_INTEGER_PROPS/EventEmitters.h>
namespace facebook {
namespace react {
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateEventEmitterCpp can generate fixture SINGLE_COMPONENT_WITH_STRING_PROP 1`] = `
Map {
"EventEmitters.cpp" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_STRING_PROP/EventEmitters.h>
namespace facebook {
namespace react {
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateEventEmitterCpp can generate fixture TWO_COMPONENTS_DIFFERENT_FILES 1`] = `
Map {
"EventEmitters.cpp" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/TWO_COMPONENTS_DIFFERENT_FILES/EventEmitters.h>
namespace facebook {
namespace react {
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateEventEmitterCpp can generate fixture TWO_COMPONENTS_SAME_FILE 1`] = `
Map {
"EventEmitters.cpp" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/TWO_COMPONENTS_SAME_FILE/EventEmitters.h>
namespace facebook {
namespace react {
} // namespace react
} // namespace facebook
",
}
`;

View File

@@ -0,0 +1,278 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`GenerateEventEmitterH can generate fixture SINGLE_COMPONENT_WITH_BOOLEAN_PROP 1`] = `
Map {
"EventEmitters.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/components/view/ViewEventEmitter.h>
namespace facebook {
namespace react {
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateEventEmitterH can generate fixture SINGLE_COMPONENT_WITH_COLOR_PROP 1`] = `
Map {
"EventEmitters.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/components/view/ViewEventEmitter.h>
namespace facebook {
namespace react {
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateEventEmitterH can generate fixture SINGLE_COMPONENT_WITH_ENUM_PROP 1`] = `
Map {
"EventEmitters.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/components/view/ViewEventEmitter.h>
namespace facebook {
namespace react {
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateEventEmitterH can generate fixture SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS 1`] = `
Map {
"EventEmitters.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/components/view/ViewEventEmitter.h>
namespace facebook {
namespace react {
struct EventsNestedObjectNativeComponentOnChangeLocationSourceStruct {
std::string url;
};
struct EventsNestedObjectNativeComponentOnChangeLocationStruct {
EventsNestedObjectNativeComponentOnChangeLocationSourceStruct source;
int x;
int y;
};
struct EventsNestedObjectNativeComponentOnChangeStruct {
EventsNestedObjectNativeComponentOnChangeLocationStruct location;
};
class EventsNestedObjectNativeComponentEventEmitter : public ViewEventEmitter {
public:
using ViewEventEmitter::ViewEventEmitter;
void onChange(EventsNestedObjectNativeComponentOnChangeStruct value) const;
};
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateEventEmitterH can generate fixture SINGLE_COMPONENT_WITH_EVENT_PROPS 1`] = `
Map {
"EventEmitters.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/components/view/ViewEventEmitter.h>
namespace facebook {
namespace react {
struct EventsNativeComponentOnChangeStruct {
bool value;
std::string source;
int progress;
Float scale;
};
struct EventsNativeComponentOnEventDirectStruct {
bool value;
};
class EventsNativeComponentEventEmitter : public ViewEventEmitter {
public:
using ViewEventEmitter::ViewEventEmitter;
void onChange(EventsNativeComponentOnChangeStruct value) const;
void onEventDirect(EventsNativeComponentOnEventDirectStruct value) const;
};
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateEventEmitterH can generate fixture SINGLE_COMPONENT_WITH_FLOAT_PROPS 1`] = `
Map {
"EventEmitters.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/components/view/ViewEventEmitter.h>
namespace facebook {
namespace react {
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateEventEmitterH can generate fixture SINGLE_COMPONENT_WITH_INTEGER_PROPS 1`] = `
Map {
"EventEmitters.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/components/view/ViewEventEmitter.h>
namespace facebook {
namespace react {
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateEventEmitterH can generate fixture SINGLE_COMPONENT_WITH_STRING_PROP 1`] = `
Map {
"EventEmitters.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/components/view/ViewEventEmitter.h>
namespace facebook {
namespace react {
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateEventEmitterH can generate fixture TWO_COMPONENTS_DIFFERENT_FILES 1`] = `
Map {
"EventEmitters.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/components/view/ViewEventEmitter.h>
namespace facebook {
namespace react {
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateEventEmitterH can generate fixture TWO_COMPONENTS_SAME_FILE 1`] = `
Map {
"EventEmitters.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/components/view/ViewEventEmitter.h>
namespace facebook {
namespace react {
} // namespace react
} // namespace facebook
",
}
`;

View File

@@ -0,0 +1,309 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`GeneratePropsCpp can generate fixture SINGLE_COMPONENT_WITH_BOOLEAN_PROP 1`] = `
Map {
"Props.cpp" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_BOOLEAN_PROP/Props.h>
#include <react/core/propsConversions.h>
namespace facebook {
namespace react {
BooleanPropNativeComponentProps::BooleanPropNativeComponentProps(
const BooleanPropNativeComponentProps &sourceProps,
const RawProps &rawProps): ViewProps(sourceProps, rawProps),
disabled(convertRawProp(rawProps, \\"disabled\\", sourceProps.disabled, disabled))
{}
} // namespace react
} // namespace facebook
",
}
`;
exports[`GeneratePropsCpp can generate fixture SINGLE_COMPONENT_WITH_COLOR_PROP 1`] = `
Map {
"Props.cpp" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_COLOR_PROP/Props.h>
#include <react/core/propsConversions.h>
namespace facebook {
namespace react {
ColorPropNativeComponentProps::ColorPropNativeComponentProps(
const ColorPropNativeComponentProps &sourceProps,
const RawProps &rawProps): ViewProps(sourceProps, rawProps),
tintColor(convertRawProp(rawProps, \\"tintColor\\", sourceProps.tintColor, tintColor))
{}
} // namespace react
} // namespace facebook
",
}
`;
exports[`GeneratePropsCpp can generate fixture SINGLE_COMPONENT_WITH_ENUM_PROP 1`] = `
Map {
"Props.cpp" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_ENUM_PROP/Props.h>
#include <react/core/propsConversions.h>
namespace facebook {
namespace react {
EnumPropsNativeComponentProps::EnumPropsNativeComponentProps(
const EnumPropsNativeComponentProps &sourceProps,
const RawProps &rawProps): ViewProps(sourceProps, rawProps),
alignment(convertRawProp(rawProps, \\"alignment\\", sourceProps.alignment, alignment))
{}
} // namespace react
} // namespace facebook
",
}
`;
exports[`GeneratePropsCpp can generate fixture SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS 1`] = `
Map {
"Props.cpp" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS/Props.h>
#include <react/core/propsConversions.h>
namespace facebook {
namespace react {
EventsNestedObjectNativeComponentProps::EventsNestedObjectNativeComponentProps(
const EventsNestedObjectNativeComponentProps &sourceProps,
const RawProps &rawProps): ViewProps(sourceProps, rawProps),
disabled(convertRawProp(rawProps, \\"disabled\\", sourceProps.disabled, disabled))
{}
} // namespace react
} // namespace facebook
",
}
`;
exports[`GeneratePropsCpp can generate fixture SINGLE_COMPONENT_WITH_EVENT_PROPS 1`] = `
Map {
"Props.cpp" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_EVENT_PROPS/Props.h>
#include <react/core/propsConversions.h>
namespace facebook {
namespace react {
EventsNativeComponentProps::EventsNativeComponentProps(
const EventsNativeComponentProps &sourceProps,
const RawProps &rawProps): ViewProps(sourceProps, rawProps),
disabled(convertRawProp(rawProps, \\"disabled\\", sourceProps.disabled, disabled))
{}
} // namespace react
} // namespace facebook
",
}
`;
exports[`GeneratePropsCpp can generate fixture SINGLE_COMPONENT_WITH_FLOAT_PROPS 1`] = `
Map {
"Props.cpp" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_FLOAT_PROPS/Props.h>
#include <react/core/propsConversions.h>
namespace facebook {
namespace react {
FloatPropNativeComponentProps::FloatPropNativeComponentProps(
const FloatPropNativeComponentProps &sourceProps,
const RawProps &rawProps): ViewProps(sourceProps, rawProps),
blurRadius(convertRawProp(rawProps, \\"blurRadius\\", sourceProps.blurRadius, blurRadius)),
blurRadius2(convertRawProp(rawProps, \\"blurRadius2\\", sourceProps.blurRadius2, blurRadius2)),
blurRadius3(convertRawProp(rawProps, \\"blurRadius3\\", sourceProps.blurRadius3, blurRadius3)),
blurRadius4(convertRawProp(rawProps, \\"blurRadius4\\", sourceProps.blurRadius4, blurRadius4)),
blurRadius5(convertRawProp(rawProps, \\"blurRadius5\\", sourceProps.blurRadius5, blurRadius5))
{}
} // namespace react
} // namespace facebook
",
}
`;
exports[`GeneratePropsCpp can generate fixture SINGLE_COMPONENT_WITH_INTEGER_PROPS 1`] = `
Map {
"Props.cpp" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_INTEGER_PROPS/Props.h>
#include <react/core/propsConversions.h>
namespace facebook {
namespace react {
IntegerPropNativeComponentProps::IntegerPropNativeComponentProps(
const IntegerPropNativeComponentProps &sourceProps,
const RawProps &rawProps): ViewProps(sourceProps, rawProps),
progress1(convertRawProp(rawProps, \\"progress1\\", sourceProps.progress1, progress1)),
progress2(convertRawProp(rawProps, \\"progress2\\", sourceProps.progress2, progress2)),
progress3(convertRawProp(rawProps, \\"progress3\\", sourceProps.progress3, progress3))
{}
} // namespace react
} // namespace facebook
",
}
`;
exports[`GeneratePropsCpp can generate fixture SINGLE_COMPONENT_WITH_STRING_PROP 1`] = `
Map {
"Props.cpp" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_STRING_PROP/Props.h>
#include <react/core/propsConversions.h>
namespace facebook {
namespace react {
StringPropComponentProps::StringPropComponentProps(
const StringPropComponentProps &sourceProps,
const RawProps &rawProps): ViewProps(sourceProps, rawProps),
accessibilityHint(convertRawProp(rawProps, \\"accessibilityHint\\", sourceProps.accessibilityHint, accessibilityHint))
{}
} // namespace react
} // namespace facebook
",
}
`;
exports[`GeneratePropsCpp can generate fixture TWO_COMPONENTS_DIFFERENT_FILES 1`] = `
Map {
"Props.cpp" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/TWO_COMPONENTS_DIFFERENT_FILES/Props.h>
#include <react/core/propsConversions.h>
namespace facebook {
namespace react {
MultiFile1NativeComponentProps::MultiFile1NativeComponentProps(
const MultiFile1NativeComponentProps &sourceProps,
const RawProps &rawProps): ViewProps(sourceProps, rawProps),
disabled(convertRawProp(rawProps, \\"disabled\\", sourceProps.disabled, disabled))
{}
MultiFile2NativeComponentProps::MultiFile2NativeComponentProps(
const MultiFile2NativeComponentProps &sourceProps,
const RawProps &rawProps): ViewProps(sourceProps, rawProps),
disabled(convertRawProp(rawProps, \\"disabled\\", sourceProps.disabled, disabled))
{}
} // namespace react
} // namespace facebook
",
}
`;
exports[`GeneratePropsCpp can generate fixture TWO_COMPONENTS_SAME_FILE 1`] = `
Map {
"Props.cpp" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/TWO_COMPONENTS_SAME_FILE/Props.h>
#include <react/core/propsConversions.h>
namespace facebook {
namespace react {
MultiComponent1NativeComponentProps::MultiComponent1NativeComponentProps(
const MultiComponent1NativeComponentProps &sourceProps,
const RawProps &rawProps): ViewProps(sourceProps, rawProps),
disabled(convertRawProp(rawProps, \\"disabled\\", sourceProps.disabled, disabled))
{}
MultiComponent2NativeComponentProps::MultiComponent2NativeComponentProps(
const MultiComponent2NativeComponentProps &sourceProps,
const RawProps &rawProps): ViewProps(sourceProps, rawProps),
disabled(convertRawProp(rawProps, \\"disabled\\", sourceProps.disabled, disabled))
{}
} // namespace react
} // namespace facebook
",
}
`;

View File

@@ -0,0 +1,356 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`GeneratePropsH can generate fixture SINGLE_COMPONENT_WITH_BOOLEAN_PROP 1`] = `
Map {
"Props.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/view/ViewProps.h>
namespace facebook {
namespace react {
class BooleanPropNativeComponentProps final : public ViewProps {
public:
BooleanPropNativeComponentProps() = default;
BooleanPropNativeComponentProps(const BooleanPropNativeComponentProps &sourceProps, const RawProps &rawProps);
#pragma mark - Props
const bool disabled{false};
};
} // namespace react
} // namespace facebook
",
}
`;
exports[`GeneratePropsH can generate fixture SINGLE_COMPONENT_WITH_COLOR_PROP 1`] = `
Map {
"Props.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/view/ViewProps.h>
#include <react/graphics/Color.h>
namespace facebook {
namespace react {
class ColorPropNativeComponentProps final : public ViewProps {
public:
ColorPropNativeComponentProps() = default;
ColorPropNativeComponentProps(const ColorPropNativeComponentProps &sourceProps, const RawProps &rawProps);
#pragma mark - Props
const SharedColor tintColor{};
};
} // namespace react
} // namespace facebook
",
}
`;
exports[`GeneratePropsH can generate fixture SINGLE_COMPONENT_WITH_ENUM_PROP 1`] = `
Map {
"Props.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/view/ViewProps.h>
namespace facebook {
namespace react {
enum class EnumPropsNativeComponentAlignment { Top, Center, Bottom };
static inline void fromDynamic(const folly::dynamic &value, EnumPropsNativeComponentAlignment &result) {
auto string = value.asString();
if (string == \\"top\\") { result = EnumPropsNativeComponentAlignment::Top; return; }
if (string == \\"center\\") { result = EnumPropsNativeComponentAlignment::Center; return; }
if (string == \\"bottom\\") { result = EnumPropsNativeComponentAlignment::Bottom; return; }
abort();
}
static inline std::string toString(const EnumPropsNativeComponentAlignment &value) {
switch (value) {
case EnumPropsNativeComponentAlignment::Top: return \\"top\\";
case EnumPropsNativeComponentAlignment::Center: return \\"center\\";
case EnumPropsNativeComponentAlignment::Bottom: return \\"bottom\\";
}
}
class EnumPropsNativeComponentProps final : public ViewProps {
public:
EnumPropsNativeComponentProps() = default;
EnumPropsNativeComponentProps(const EnumPropsNativeComponentProps &sourceProps, const RawProps &rawProps);
#pragma mark - Props
const EnumPropsNativeComponentAlignment alignment{EnumPropsNativeComponentAlignment::Center};
};
} // namespace react
} // namespace facebook
",
}
`;
exports[`GeneratePropsH can generate fixture SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS 1`] = `
Map {
"Props.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/view/ViewProps.h>
namespace facebook {
namespace react {
class EventsNestedObjectNativeComponentProps final : public ViewProps {
public:
EventsNestedObjectNativeComponentProps() = default;
EventsNestedObjectNativeComponentProps(const EventsNestedObjectNativeComponentProps &sourceProps, const RawProps &rawProps);
#pragma mark - Props
const bool disabled{false};
};
} // namespace react
} // namespace facebook
",
}
`;
exports[`GeneratePropsH can generate fixture SINGLE_COMPONENT_WITH_EVENT_PROPS 1`] = `
Map {
"Props.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/view/ViewProps.h>
namespace facebook {
namespace react {
class EventsNativeComponentProps final : public ViewProps {
public:
EventsNativeComponentProps() = default;
EventsNativeComponentProps(const EventsNativeComponentProps &sourceProps, const RawProps &rawProps);
#pragma mark - Props
const bool disabled{false};
};
} // namespace react
} // namespace facebook
",
}
`;
exports[`GeneratePropsH can generate fixture SINGLE_COMPONENT_WITH_FLOAT_PROPS 1`] = `
Map {
"Props.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/view/ViewProps.h>
namespace facebook {
namespace react {
class FloatPropNativeComponentProps final : public ViewProps {
public:
FloatPropNativeComponentProps() = default;
FloatPropNativeComponentProps(const FloatPropNativeComponentProps &sourceProps, const RawProps &rawProps);
#pragma mark - Props
const Float blurRadius{0.0};
const Float blurRadius2{0.001};
const Float blurRadius3{2.1};
const Float blurRadius4{0.0};
const Float blurRadius5{1.0};
};
} // namespace react
} // namespace facebook
",
}
`;
exports[`GeneratePropsH can generate fixture SINGLE_COMPONENT_WITH_INTEGER_PROPS 1`] = `
Map {
"Props.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/view/ViewProps.h>
namespace facebook {
namespace react {
class IntegerPropNativeComponentProps final : public ViewProps {
public:
IntegerPropNativeComponentProps() = default;
IntegerPropNativeComponentProps(const IntegerPropNativeComponentProps &sourceProps, const RawProps &rawProps);
#pragma mark - Props
const int progress1{0};
const int progress2{-1};
const int progress3{10};
};
} // namespace react
} // namespace facebook
",
}
`;
exports[`GeneratePropsH can generate fixture SINGLE_COMPONENT_WITH_STRING_PROP 1`] = `
Map {
"Props.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/view/ViewProps.h>
namespace facebook {
namespace react {
class StringPropComponentProps final : public ViewProps {
public:
StringPropComponentProps() = default;
StringPropComponentProps(const StringPropComponentProps &sourceProps, const RawProps &rawProps);
#pragma mark - Props
const std::string accessibilityHint{\\"\\"};
};
} // namespace react
} // namespace facebook
",
}
`;
exports[`GeneratePropsH can generate fixture TWO_COMPONENTS_DIFFERENT_FILES 1`] = `
Map {
"Props.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/view/ViewProps.h>
namespace facebook {
namespace react {
class MultiFile1NativeComponentProps final : public ViewProps {
public:
MultiFile1NativeComponentProps() = default;
MultiFile1NativeComponentProps(const MultiFile1NativeComponentProps &sourceProps, const RawProps &rawProps);
#pragma mark - Props
const bool disabled{false};
};
class MultiFile2NativeComponentProps final : public ViewProps {
public:
MultiFile2NativeComponentProps() = default;
MultiFile2NativeComponentProps(const MultiFile2NativeComponentProps &sourceProps, const RawProps &rawProps);
#pragma mark - Props
const bool disabled{true};
};
} // namespace react
} // namespace facebook
",
}
`;
exports[`GeneratePropsH can generate fixture TWO_COMPONENTS_SAME_FILE 1`] = `
Map {
"Props.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/view/ViewProps.h>
namespace facebook {
namespace react {
class MultiComponent1NativeComponentProps final : public ViewProps {
public:
MultiComponent1NativeComponentProps() = default;
MultiComponent1NativeComponentProps(const MultiComponent1NativeComponentProps &sourceProps, const RawProps &rawProps);
#pragma mark - Props
const bool disabled{false};
};
class MultiComponent2NativeComponentProps final : public ViewProps {
public:
MultiComponent2NativeComponentProps() = default;
MultiComponent2NativeComponentProps(const MultiComponent2NativeComponentProps &sourceProps, const RawProps &rawProps);
#pragma mark - Props
const bool disabled{true};
};
} // namespace react
} // namespace facebook
",
}
`;

View File

@@ -0,0 +1,233 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`GenerateShadowNodeCpp can generate fixture SINGLE_COMPONENT_WITH_BOOLEAN_PROP 1`] = `
Map {
"ShadowNodes.cpp" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_BOOLEAN_PROP/ShadowNodes.h>
namespace facebook {
namespace react {
extern const char BooleanPropNativeComponentComponentName[] = \\"BooleanPropNativeComponent\\";
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateShadowNodeCpp can generate fixture SINGLE_COMPONENT_WITH_COLOR_PROP 1`] = `
Map {
"ShadowNodes.cpp" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_COLOR_PROP/ShadowNodes.h>
namespace facebook {
namespace react {
extern const char ColorPropNativeComponentComponentName[] = \\"ColorPropNativeComponent\\";
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateShadowNodeCpp can generate fixture SINGLE_COMPONENT_WITH_ENUM_PROP 1`] = `
Map {
"ShadowNodes.cpp" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_ENUM_PROP/ShadowNodes.h>
namespace facebook {
namespace react {
extern const char EnumPropsNativeComponentComponentName[] = \\"EnumPropsNativeComponent\\";
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateShadowNodeCpp can generate fixture SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS 1`] = `
Map {
"ShadowNodes.cpp" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS/ShadowNodes.h>
namespace facebook {
namespace react {
extern const char EventsNestedObjectNativeComponentComponentName[] = \\"EventsNestedObjectNativeComponent\\";
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateShadowNodeCpp can generate fixture SINGLE_COMPONENT_WITH_EVENT_PROPS 1`] = `
Map {
"ShadowNodes.cpp" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_EVENT_PROPS/ShadowNodes.h>
namespace facebook {
namespace react {
extern const char EventsNativeComponentComponentName[] = \\"EventsNativeComponent\\";
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateShadowNodeCpp can generate fixture SINGLE_COMPONENT_WITH_FLOAT_PROPS 1`] = `
Map {
"ShadowNodes.cpp" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_FLOAT_PROPS/ShadowNodes.h>
namespace facebook {
namespace react {
extern const char FloatPropNativeComponentComponentName[] = \\"FloatPropNativeComponent\\";
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateShadowNodeCpp can generate fixture SINGLE_COMPONENT_WITH_INTEGER_PROPS 1`] = `
Map {
"ShadowNodes.cpp" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_INTEGER_PROPS/ShadowNodes.h>
namespace facebook {
namespace react {
extern const char IntegerPropNativeComponentComponentName[] = \\"IntegerPropNativeComponent\\";
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateShadowNodeCpp can generate fixture SINGLE_COMPONENT_WITH_STRING_PROP 1`] = `
Map {
"ShadowNodes.cpp" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/SINGLE_COMPONENT_WITH_STRING_PROP/ShadowNodes.h>
namespace facebook {
namespace react {
extern const char StringPropComponentComponentName[] = \\"StringPropComponent\\";
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateShadowNodeCpp can generate fixture TWO_COMPONENTS_DIFFERENT_FILES 1`] = `
Map {
"ShadowNodes.cpp" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/TWO_COMPONENTS_DIFFERENT_FILES/ShadowNodes.h>
namespace facebook {
namespace react {
extern const char MultiFile1NativeComponentComponentName[] = \\"MultiFile1NativeComponent\\";
extern const char MultiFile2NativeComponentComponentName[] = \\"MultiFile2NativeComponent\\";
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateShadowNodeCpp can generate fixture TWO_COMPONENTS_SAME_FILE 1`] = `
Map {
"ShadowNodes.cpp" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <react/components/TWO_COMPONENTS_SAME_FILE/ShadowNodes.h>
namespace facebook {
namespace react {
extern const char MultiComponent1NativeComponentComponentName[] = \\"MultiComponent1NativeComponent\\";
extern const char MultiComponent2NativeComponentComponentName[] = \\"MultiComponent2NativeComponent\\";
} // namespace react
} // namespace facebook
",
}
`;

View File

@@ -0,0 +1,353 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`GenerateShadowNodeH can generate fixture SINGLE_COMPONENT_WITH_BOOLEAN_PROP 1`] = `
Map {
"ShadowNodes.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/components/SINGLE_COMPONENT_WITH_BOOLEAN_PROP/Props.h>
#include <react/components/view/ConcreteViewShadowNode.h>
namespace facebook {
namespace react {
extern const char BooleanPropNativeComponentComponentName[];
/*
* \`ShadowNode\` for <BooleanPropNativeComponent> component.
*/
using BooleanPropNativeComponentShadowNode = ConcreteViewShadowNode<
BooleanPropNativeComponentComponentName,
BooleanPropNativeComponentProps>;
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateShadowNodeH can generate fixture SINGLE_COMPONENT_WITH_COLOR_PROP 1`] = `
Map {
"ShadowNodes.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/components/SINGLE_COMPONENT_WITH_COLOR_PROP/Props.h>
#include <react/components/view/ConcreteViewShadowNode.h>
namespace facebook {
namespace react {
extern const char ColorPropNativeComponentComponentName[];
/*
* \`ShadowNode\` for <ColorPropNativeComponent> component.
*/
using ColorPropNativeComponentShadowNode = ConcreteViewShadowNode<
ColorPropNativeComponentComponentName,
ColorPropNativeComponentProps>;
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateShadowNodeH can generate fixture SINGLE_COMPONENT_WITH_ENUM_PROP 1`] = `
Map {
"ShadowNodes.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/components/SINGLE_COMPONENT_WITH_ENUM_PROP/Props.h>
#include <react/components/view/ConcreteViewShadowNode.h>
namespace facebook {
namespace react {
extern const char EnumPropsNativeComponentComponentName[];
/*
* \`ShadowNode\` for <EnumPropsNativeComponent> component.
*/
using EnumPropsNativeComponentShadowNode = ConcreteViewShadowNode<
EnumPropsNativeComponentComponentName,
EnumPropsNativeComponentProps>;
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateShadowNodeH can generate fixture SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS 1`] = `
Map {
"ShadowNodes.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/components/SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS/EventEmitters.h>
#include <react/components/SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS/Props.h>
#include <react/components/view/ConcreteViewShadowNode.h>
namespace facebook {
namespace react {
extern const char EventsNestedObjectNativeComponentComponentName[];
/*
* \`ShadowNode\` for <EventsNestedObjectNativeComponent> component.
*/
using EventsNestedObjectNativeComponentShadowNode = ConcreteViewShadowNode<
EventsNestedObjectNativeComponentComponentName,
EventsNestedObjectNativeComponentProps,
EventsNestedObjectNativeComponentEventEmitter>;
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateShadowNodeH can generate fixture SINGLE_COMPONENT_WITH_EVENT_PROPS 1`] = `
Map {
"ShadowNodes.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/components/SINGLE_COMPONENT_WITH_EVENT_PROPS/EventEmitters.h>
#include <react/components/SINGLE_COMPONENT_WITH_EVENT_PROPS/Props.h>
#include <react/components/view/ConcreteViewShadowNode.h>
namespace facebook {
namespace react {
extern const char EventsNativeComponentComponentName[];
/*
* \`ShadowNode\` for <EventsNativeComponent> component.
*/
using EventsNativeComponentShadowNode = ConcreteViewShadowNode<
EventsNativeComponentComponentName,
EventsNativeComponentProps,
EventsNativeComponentEventEmitter>;
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateShadowNodeH can generate fixture SINGLE_COMPONENT_WITH_FLOAT_PROPS 1`] = `
Map {
"ShadowNodes.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/components/SINGLE_COMPONENT_WITH_FLOAT_PROPS/Props.h>
#include <react/components/view/ConcreteViewShadowNode.h>
namespace facebook {
namespace react {
extern const char FloatPropNativeComponentComponentName[];
/*
* \`ShadowNode\` for <FloatPropNativeComponent> component.
*/
using FloatPropNativeComponentShadowNode = ConcreteViewShadowNode<
FloatPropNativeComponentComponentName,
FloatPropNativeComponentProps>;
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateShadowNodeH can generate fixture SINGLE_COMPONENT_WITH_INTEGER_PROPS 1`] = `
Map {
"ShadowNodes.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/components/SINGLE_COMPONENT_WITH_INTEGER_PROPS/Props.h>
#include <react/components/view/ConcreteViewShadowNode.h>
namespace facebook {
namespace react {
extern const char IntegerPropNativeComponentComponentName[];
/*
* \`ShadowNode\` for <IntegerPropNativeComponent> component.
*/
using IntegerPropNativeComponentShadowNode = ConcreteViewShadowNode<
IntegerPropNativeComponentComponentName,
IntegerPropNativeComponentProps>;
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateShadowNodeH can generate fixture SINGLE_COMPONENT_WITH_STRING_PROP 1`] = `
Map {
"ShadowNodes.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/components/SINGLE_COMPONENT_WITH_STRING_PROP/Props.h>
#include <react/components/view/ConcreteViewShadowNode.h>
namespace facebook {
namespace react {
extern const char StringPropComponentComponentName[];
/*
* \`ShadowNode\` for <StringPropComponent> component.
*/
using StringPropComponentShadowNode = ConcreteViewShadowNode<
StringPropComponentComponentName,
StringPropComponentProps>;
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateShadowNodeH can generate fixture TWO_COMPONENTS_DIFFERENT_FILES 1`] = `
Map {
"ShadowNodes.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/components/TWO_COMPONENTS_DIFFERENT_FILES/Props.h>
#include <react/components/view/ConcreteViewShadowNode.h>
namespace facebook {
namespace react {
extern const char MultiFile1NativeComponentComponentName[];
/*
* \`ShadowNode\` for <MultiFile1NativeComponent> component.
*/
using MultiFile1NativeComponentShadowNode = ConcreteViewShadowNode<
MultiFile1NativeComponentComponentName,
MultiFile1NativeComponentProps>;
extern const char MultiFile2NativeComponentComponentName[];
/*
* \`ShadowNode\` for <MultiFile2NativeComponent> component.
*/
using MultiFile2NativeComponentShadowNode = ConcreteViewShadowNode<
MultiFile2NativeComponentComponentName,
MultiFile2NativeComponentProps>;
} // namespace react
} // namespace facebook
",
}
`;
exports[`GenerateShadowNodeH can generate fixture TWO_COMPONENTS_SAME_FILE 1`] = `
Map {
"ShadowNodes.h" => "
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/components/TWO_COMPONENTS_SAME_FILE/Props.h>
#include <react/components/view/ConcreteViewShadowNode.h>
namespace facebook {
namespace react {
extern const char MultiComponent1NativeComponentComponentName[];
/*
* \`ShadowNode\` for <MultiComponent1NativeComponent> component.
*/
using MultiComponent1NativeComponentShadowNode = ConcreteViewShadowNode<
MultiComponent1NativeComponentComponentName,
MultiComponent1NativeComponentProps>;
extern const char MultiComponent2NativeComponentComponentName[];
/*
* \`ShadowNode\` for <MultiComponent2NativeComponent> component.
*/
using MultiComponent2NativeComponentShadowNode = ConcreteViewShadowNode<
MultiComponent2NativeComponentComponentName,
MultiComponent2NativeComponentProps>;
} // namespace react
} // namespace facebook
",
}
`;

View File

@@ -0,0 +1,409 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`GenerateViewConfigJs can generate fixture SINGLE_COMPONENT_WITH_BOOLEAN_PROP 1`] = `
Map {
"ViewConfigs.js" => "
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
*/
'use strict';
const ReactNativeStyleAttributes = require('ReactNativeStyleAttributes');
const ReactNativeViewConfigRegistry = require('ReactNativeViewConfigRegistry');
const BooleanPropNativeComponentViewConfig = {
uiViewClassName: 'BooleanPropNativeComponent',
validAttributes: {
disabled: true,
style: ReactNativeStyleAttributes
}
};
ReactNativeViewConfigRegistry.register(
'BooleanPropNativeComponent',
() => BooleanPropNativeComponentViewConfig,
);
",
}
`;
exports[`GenerateViewConfigJs can generate fixture SINGLE_COMPONENT_WITH_COLOR_PROP 1`] = `
Map {
"ViewConfigs.js" => "
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
*/
'use strict';
const ReactNativeStyleAttributes = require('ReactNativeStyleAttributes');
const ReactNativeViewConfigRegistry = require('ReactNativeViewConfigRegistry');
const ColorPropNativeComponentViewConfig = {
uiViewClassName: 'ColorPropNativeComponent',
validAttributes: {
tintColor: require('react-native').__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.NativePrimitives.ColorPrimitive,
style: ReactNativeStyleAttributes
}
};
ReactNativeViewConfigRegistry.register(
'ColorPropNativeComponent',
() => ColorPropNativeComponentViewConfig,
);
",
}
`;
exports[`GenerateViewConfigJs can generate fixture SINGLE_COMPONENT_WITH_ENUM_PROP 1`] = `
Map {
"ViewConfigs.js" => "
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
*/
'use strict';
const ReactNativeStyleAttributes = require('ReactNativeStyleAttributes');
const ReactNativeViewConfigRegistry = require('ReactNativeViewConfigRegistry');
const EnumPropsNativeComponentViewConfig = {
uiViewClassName: 'EnumPropsNativeComponent',
validAttributes: {
alignment: true,
style: ReactNativeStyleAttributes
}
};
ReactNativeViewConfigRegistry.register(
'EnumPropsNativeComponent',
() => EnumPropsNativeComponentViewConfig,
);
",
}
`;
exports[`GenerateViewConfigJs can generate fixture SINGLE_COMPONENT_WITH_EVENT_NESTED_OBJECT_PROPS 1`] = `
Map {
"ViewConfigs.js" => "
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
*/
'use strict';
const ReactNativeStyleAttributes = require('ReactNativeStyleAttributes');
const ReactNativeViewConfigRegistry = require('ReactNativeViewConfigRegistry');
const EventsNestedObjectNativeComponentViewConfig = {
uiViewClassName: 'EventsNestedObjectNativeComponent',
bubblingEventTypes: {
onChange: {
phasedRegistrationNames: {
captured: 'onChangeCapture',
bubbled: 'onChange'
}
}
},
validAttributes: {
disabled: true,
style: ReactNativeStyleAttributes
}
};
ReactNativeViewConfigRegistry.register(
'EventsNestedObjectNativeComponent',
() => EventsNestedObjectNativeComponentViewConfig,
);
",
}
`;
exports[`GenerateViewConfigJs can generate fixture SINGLE_COMPONENT_WITH_EVENT_PROPS 1`] = `
Map {
"ViewConfigs.js" => "
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
*/
'use strict';
const ReactNativeStyleAttributes = require('ReactNativeStyleAttributes');
const ReactNativeViewConfigRegistry = require('ReactNativeViewConfigRegistry');
const EventsNativeComponentViewConfig = {
uiViewClassName: 'EventsNativeComponent',
bubblingEventTypes: {
onChange: {
phasedRegistrationNames: {
captured: 'onChangeCapture',
bubbled: 'onChange'
}
}
},
directEventTypes: {
onEventDirect: {
registrationName: 'onEventDirect'
}
},
validAttributes: {
disabled: true,
style: ReactNativeStyleAttributes
}
};
ReactNativeViewConfigRegistry.register(
'EventsNativeComponent',
() => EventsNativeComponentViewConfig,
);
",
}
`;
exports[`GenerateViewConfigJs can generate fixture SINGLE_COMPONENT_WITH_FLOAT_PROPS 1`] = `
Map {
"ViewConfigs.js" => "
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
*/
'use strict';
const ReactNativeStyleAttributes = require('ReactNativeStyleAttributes');
const ReactNativeViewConfigRegistry = require('ReactNativeViewConfigRegistry');
const FloatPropNativeComponentViewConfig = {
uiViewClassName: 'FloatPropNativeComponent',
validAttributes: {
blurRadius: true,
blurRadius2: true,
blurRadius3: true,
blurRadius4: true,
blurRadius5: true,
style: ReactNativeStyleAttributes
}
};
ReactNativeViewConfigRegistry.register(
'FloatPropNativeComponent',
() => FloatPropNativeComponentViewConfig,
);
",
}
`;
exports[`GenerateViewConfigJs can generate fixture SINGLE_COMPONENT_WITH_INTEGER_PROPS 1`] = `
Map {
"ViewConfigs.js" => "
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
*/
'use strict';
const ReactNativeStyleAttributes = require('ReactNativeStyleAttributes');
const ReactNativeViewConfigRegistry = require('ReactNativeViewConfigRegistry');
const IntegerPropNativeComponentViewConfig = {
uiViewClassName: 'IntegerPropNativeComponent',
validAttributes: {
progress1: true,
progress2: true,
progress3: true,
style: ReactNativeStyleAttributes
}
};
ReactNativeViewConfigRegistry.register(
'IntegerPropNativeComponent',
() => IntegerPropNativeComponentViewConfig,
);
",
}
`;
exports[`GenerateViewConfigJs can generate fixture SINGLE_COMPONENT_WITH_STRING_PROP 1`] = `
Map {
"ViewConfigs.js" => "
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
*/
'use strict';
const ReactNativeStyleAttributes = require('ReactNativeStyleAttributes');
const ReactNativeViewConfigRegistry = require('ReactNativeViewConfigRegistry');
const StringPropComponentViewConfig = {
uiViewClassName: 'StringPropComponent',
validAttributes: {
accessibilityHint: true,
style: ReactNativeStyleAttributes
}
};
ReactNativeViewConfigRegistry.register(
'StringPropComponent',
() => StringPropComponentViewConfig,
);
",
}
`;
exports[`GenerateViewConfigJs can generate fixture TWO_COMPONENTS_DIFFERENT_FILES 1`] = `
Map {
"ViewConfigs.js" => "
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
*/
'use strict';
const ReactNativeStyleAttributes = require('ReactNativeStyleAttributes');
const ReactNativeViewConfigRegistry = require('ReactNativeViewConfigRegistry');
const MultiFile1NativeComponentViewConfig = {
uiViewClassName: 'MultiFile1NativeComponent',
validAttributes: {
disabled: true,
style: ReactNativeStyleAttributes
}
};
ReactNativeViewConfigRegistry.register(
'MultiFile1NativeComponent',
() => MultiFile1NativeComponentViewConfig,
);
const MultiFile2NativeComponentViewConfig = {
uiViewClassName: 'MultiFile2NativeComponent',
validAttributes: {
disabled: true,
style: ReactNativeStyleAttributes
}
};
ReactNativeViewConfigRegistry.register(
'MultiFile2NativeComponent',
() => MultiFile2NativeComponentViewConfig,
);
",
}
`;
exports[`GenerateViewConfigJs can generate fixture TWO_COMPONENTS_SAME_FILE 1`] = `
Map {
"ViewConfigs.js" => "
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
*/
'use strict';
const ReactNativeStyleAttributes = require('ReactNativeStyleAttributes');
const ReactNativeViewConfigRegistry = require('ReactNativeViewConfigRegistry');
const MultiComponent1NativeComponentViewConfig = {
uiViewClassName: 'MultiComponent1NativeComponent',
validAttributes: {
disabled: true,
style: ReactNativeStyleAttributes
}
};
ReactNativeViewConfigRegistry.register(
'MultiComponent1NativeComponent',
() => MultiComponent1NativeComponentViewConfig,
);
const MultiComponent2NativeComponentViewConfig = {
uiViewClassName: 'MultiComponent2NativeComponent',
validAttributes: {
disabled: true,
style: ReactNativeStyleAttributes
}
};
ReactNativeViewConfigRegistry.register(
'MultiComponent2NativeComponent',
() => MultiComponent2NativeComponentViewConfig,
);
",
}
`;

1810
codegen/yarn.lock Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -227,6 +227,7 @@
"flow-bin": "^0.89.0",
"jest": "24.0.0-alpha.6",
"jest-junit": "5.2.0",
"jscodeshift": "^0.6.2",
"prettier": "1.13.6",
"react": "16.6.3",
"react-native-dummy": "0.1.0",

566
yarn.lock
View File

@@ -29,6 +29,26 @@
semver "^5.4.1"
source-map "^0.5.0"
"@babel/core@^7.1.6":
version "7.2.2"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.2.2.tgz#07adba6dde27bb5ad8d8672f15fde3e08184a687"
integrity sha512-59vB0RWt09cAct5EIe58+NzGP4TFSD3Bz//2/ELy3ZeTeKF6VTD1AXlH8BGGbCX0PuobZBsIzO7IAI9PH67eKw==
dependencies:
"@babel/code-frame" "^7.0.0"
"@babel/generator" "^7.2.2"
"@babel/helpers" "^7.2.0"
"@babel/parser" "^7.2.2"
"@babel/template" "^7.2.2"
"@babel/traverse" "^7.2.2"
"@babel/types" "^7.2.2"
convert-source-map "^1.1.0"
debug "^4.1.0"
json5 "^2.1.0"
lodash "^4.17.10"
resolve "^1.3.2"
semver "^5.4.1"
source-map "^0.5.0"
"@babel/generator@^7.0.0", "@babel/generator@^7.1.2", "@babel/generator@^7.1.3":
version "7.1.3"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.1.3.tgz#2103ec9c42d9bdad9190a6ad5ff2d456fd7b8673"
@@ -40,6 +60,17 @@
source-map "^0.5.0"
trim-right "^1.0.1"
"@babel/generator@^7.2.2":
version "7.2.2"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.2.2.tgz#18c816c70962640eab42fe8cae5f3947a5c65ccc"
integrity sha512-I4o675J/iS8k+P38dvJ3IBGqObLXyQLTxtrR4u9cSUJOURvafeEWb/pFMOTwtNrmq73mJzyF6ueTbO1BtN0Zeg==
dependencies:
"@babel/types" "^7.2.2"
jsesc "^2.5.1"
lodash "^4.17.10"
source-map "^0.5.0"
trim-right "^1.0.1"
"@babel/helper-annotate-as-pure@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32"
@@ -72,6 +103,17 @@
"@babel/traverse" "^7.1.0"
"@babel/types" "^7.0.0"
"@babel/helper-create-class-features-plugin@^7.2.3":
version "7.2.3"
resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.2.3.tgz#f6e719abb90cb7f4a69591e35fd5eb89047c4a7c"
integrity sha512-xO/3Gn+2C7/eOUeb0VRnSP1+yvWHNxlpAot1eMhtoKDCN7POsyQP5excuT5UsV5daHxMWBeIIOeI5cmB8vMRgQ==
dependencies:
"@babel/helper-function-name" "^7.1.0"
"@babel/helper-member-expression-to-functions" "^7.0.0"
"@babel/helper-optimise-call-expression" "^7.0.0"
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/helper-replace-supers" "^7.2.3"
"@babel/helper-define-map@^7.1.0":
version "7.1.0"
resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.1.0.tgz#3b74caec329b3c80c116290887c0dd9ae468c20c"
@@ -178,6 +220,16 @@
"@babel/traverse" "^7.1.0"
"@babel/types" "^7.0.0"
"@babel/helper-replace-supers@^7.2.3":
version "7.2.3"
resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.2.3.tgz#19970020cf22677d62b3a689561dbd9644d8c5e5"
integrity sha512-GyieIznGUfPXPWu0yLS6U55Mz67AZD9cUk0BfirOWlPrXlBcan9Gz+vHGz+cPfuoweZSnPzPIm67VtQM0OWZbA==
dependencies:
"@babel/helper-member-expression-to-functions" "^7.0.0"
"@babel/helper-optimise-call-expression" "^7.0.0"
"@babel/traverse" "^7.2.3"
"@babel/types" "^7.0.0"
"@babel/helper-simple-access@^7.1.0":
version "7.1.0"
resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz#65eeb954c8c245beaa4e859da6188f39d71e585c"
@@ -212,6 +264,15 @@
"@babel/traverse" "^7.1.0"
"@babel/types" "^7.1.2"
"@babel/helpers@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.2.0.tgz#8335f3140f3144270dc63c4732a4f8b0a50b7a21"
integrity sha512-Fr07N+ea0dMcMN8nFpuK6dUIT7/ivt9yKQdEEnjVS83tG2pHwPi03gYmk/tyuwONnZ+sY+GFFPlWGgCtW1hF9A==
dependencies:
"@babel/template" "^7.1.2"
"@babel/traverse" "^7.1.5"
"@babel/types" "^7.2.0"
"@babel/highlight@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4"
@@ -226,6 +287,11 @@
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.1.3.tgz#2c92469bac2b7fbff810b67fca07bd138b48af77"
integrity sha512-gqmspPZOMW3MIRb9HlrnbZHXI1/KHTOroBwN1NcLL6pWxzqzEKGvRTq0W/PxS45OtQGbaFikSQpkS5zbnsQm2w==
"@babel/parser@^7.1.6", "@babel/parser@^7.2.2", "@babel/parser@^7.2.3":
version "7.2.3"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.2.3.tgz#32f5df65744b70888d17872ec106b02434ba1489"
integrity sha512-0LyEcVlfCoFmci8mXx8A5oIkpkOgyo8dRHtxBnK9RRBwxO2+JZPNsqtVEZQ7mJFPxnXF9lfmU24mHOPI0qnlkA==
"@babel/plugin-check-constants@^7.0.0-beta.38":
version "7.0.0-beta.38"
resolved "https://registry.yarnpkg.com/@babel/plugin-check-constants/-/plugin-check-constants-7.0.0-beta.38.tgz#bbda6306d45a4f097ccb416c0b52d6503f6502cf"
@@ -247,6 +313,15 @@
"@babel/helper-remap-async-to-generator" "^7.1.0"
"@babel/plugin-syntax-async-generators" "^7.0.0"
"@babel/plugin-proposal-async-generator-functions@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz#b289b306669dce4ad20b0252889a15768c9d417e"
integrity sha512-+Dfo/SCQqrwx48ptLVGLdE39YtWRuKc/Y9I5Fy0P1DDBB9lsAHpjcEJQt+4IifuSOSTLBKJObJqMvaO1pIE8LQ==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/helper-remap-async-to-generator" "^7.1.0"
"@babel/plugin-syntax-async-generators" "^7.2.0"
"@babel/plugin-proposal-class-properties@^7.0.0":
version "7.1.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.1.0.tgz#9af01856b1241db60ec8838d84691aa0bd1e8df4"
@@ -259,6 +334,14 @@
"@babel/helper-replace-supers" "^7.1.0"
"@babel/plugin-syntax-class-properties" "^7.0.0"
"@babel/plugin-proposal-class-properties@^7.1.0":
version "7.2.3"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.2.3.tgz#c9e1294363b346cff333007a92080f3203698461"
integrity sha512-FVuQngLoN2iDrpW7LmhPZ2sO4DJxf35FOcwidwB9Ru9tMvI5URthnkVHuG14IStV+TzkMTyLMoOUlSTtrdVwqw==
dependencies:
"@babel/helper-create-class-features-plugin" "^7.2.3"
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-proposal-export-default-from@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.0.0.tgz#a057bbfd4649facfe39f33a537e18554bdd2b5da"
@@ -275,6 +358,14 @@
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-json-strings" "^7.0.0"
"@babel/plugin-proposal-json-strings@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.2.0.tgz#568ecc446c6148ae6b267f02551130891e29f317"
integrity sha512-MAFV1CA/YVmYwZG0fBQyXhmj0BHCB5egZHCKWIFVv/XCxAeVGIHfos3SwDck4LvCllENIAg7xMKOG5kH0dzyUg==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-json-strings" "^7.2.0"
"@babel/plugin-proposal-nullish-coalescing-operator@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.0.0.tgz#b72ec31adf612d062dc0348316246127a451e45f"
@@ -291,6 +382,14 @@
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-object-rest-spread" "^7.0.0"
"@babel/plugin-proposal-object-rest-spread@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.2.0.tgz#88f5fec3e7ad019014c97f7ee3c992f0adbf7fb8"
integrity sha512-1L5mWLSvR76XYUQJXkd/EEQgjq8HHRP6lQuZTTg0VA4tTGPpGemmCdAfQIz1rzEuWAm+ecP8PyyEm30jC1eQCg==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-object-rest-spread" "^7.2.0"
"@babel/plugin-proposal-optional-catch-binding@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.0.0.tgz#b610d928fe551ff7117d42c8bb410eec312a6425"
@@ -299,6 +398,14 @@
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-optional-catch-binding" "^7.0.0"
"@babel/plugin-proposal-optional-catch-binding@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.2.0.tgz#135d81edb68a081e55e56ec48541ece8065c38f5"
integrity sha512-mgYj3jCcxug6KUcX4OBoOJz3CMrwRfQELPQ5560F70YQUBZB7uac9fqaWamKR1iWUzGiK2t0ygzjTScZnVz75g==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-optional-catch-binding" "^7.2.0"
"@babel/plugin-proposal-optional-chaining@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.0.0.tgz#3d344d4152253379b8758e7d041148e8787c4a9d"
@@ -316,6 +423,15 @@
"@babel/helper-regex" "^7.0.0"
regexpu-core "^4.2.0"
"@babel/plugin-proposal-unicode-property-regex@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.2.0.tgz#abe7281fe46c95ddc143a65e5358647792039520"
integrity sha512-LvRVYb7kikuOtIoUeWTkOxQEV1kYvL5B6U3iWEGCzPNRus1MzJweFqORTj+0jkxozkTSYNJozPOddxmqdqsRpw==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/helper-regex" "^7.0.0"
regexpu-core "^4.2.0"
"@babel/plugin-syntax-async-generators@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.0.0.tgz#bf0891dcdbf59558359d0c626fdc9490e20bc13c"
@@ -323,6 +439,13 @@
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-async-generators@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.2.0.tgz#69e1f0db34c6f5a0cf7e2b3323bf159a76c8cb7f"
integrity sha512-1ZrIRBv2t0GSlcwVoQ6VgSLpLgiN/FVQUzt9znxo7v2Ov4jJrs8RY8tv0wvDmFN3qIdMKWrmMMW6yZ0G19MfGg==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-class-properties@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.0.0.tgz#e051af5d300cbfbcec4a7476e37a803489881634"
@@ -358,6 +481,13 @@
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-json-strings@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.2.0.tgz#72bd13f6ffe1d25938129d2a186b11fd62951470"
integrity sha512-5UGYnMSLRE1dqqZwug+1LISpA403HzlSfsg6P9VXU6TBjcSHeNlw4DxDx7LgpF+iKZoOG/+uzqoRHTdcUpiZNg==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-jsx@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.0.0.tgz#034d5e2b4e14ccaea2e4c137af7e4afb39375ffd"
@@ -379,6 +509,13 @@
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-object-rest-spread@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz#3b7a3e733510c57e820b9142a6579ac8b0dfad2e"
integrity sha512-t0JKGgqk2We+9may3t0xDdmneaXmyxq0xieYcKHxIsrJO64n1OiMWNUtc5gQK1PA0NpdCRrtZp4z+IUaKugrSA==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-optional-catch-binding@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.0.0.tgz#886f72008b3a8b185977f7cb70713b45e51ee475"
@@ -386,6 +523,13 @@
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-optional-catch-binding@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.2.0.tgz#a94013d6eda8908dfe6a477e7f9eda85656ecf5c"
integrity sha512-bDe4xKNhb0LI7IvZHiA13kff0KEfaGX/Hv4lMA9+7TEc63hMNvfKo6ZFpXhKuEp+II/q35Gc4NoMeDZyaUbj9w==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-optional-chaining@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.0.0.tgz#1e6ecba124310b5d3a8fc1e00d50b1c4c2e05e68"
@@ -400,6 +544,13 @@
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-typescript@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.2.0.tgz#55d240536bd314dcbbec70fd949c5cabaed1de29"
integrity sha512-WhKr6yu6yGpGcNMVgIBuI9MkredpVc7Y3YR4UzEZmDztHoL6wV56YBHLhWnjO1EvId1B32HrD3DRFc+zSoKI1g==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-arrow-functions@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.0.0.tgz#a6c14875848c68a3b4b3163a486535ef25c7e749"
@@ -407,6 +558,13 @@
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-arrow-functions@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz#9aeafbe4d6ffc6563bf8f8372091628f00779550"
integrity sha512-ER77Cax1+8/8jCB9fo4Ud161OZzWN5qawi4GusDuRLcDbDG+bIGYY20zb2dfAFdTRGzrfq2xZPvF0R64EHnimg==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-async-to-generator@^7.0.0", "@babel/plugin-transform-async-to-generator@^7.1.0":
version "7.1.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.1.0.tgz#109e036496c51dd65857e16acab3bafdf3c57811"
@@ -416,6 +574,15 @@
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/helper-remap-async-to-generator" "^7.1.0"
"@babel/plugin-transform-async-to-generator@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.2.0.tgz#68b8a438663e88519e65b776f8938f3445b1a2ff"
integrity sha512-CEHzg4g5UraReozI9D4fblBYABs7IM6UerAVG7EJVrTLC5keh00aEuLUT+O40+mJCEzaXkYfTCUKIyeDfMOFFQ==
dependencies:
"@babel/helper-module-imports" "^7.0.0"
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/helper-remap-async-to-generator" "^7.1.0"
"@babel/plugin-transform-block-scoped-functions@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.0.0.tgz#482b3f75103927e37288b3b67b65f848e2aa0d07"
@@ -423,6 +590,13 @@
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-block-scoped-functions@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.2.0.tgz#5d3cc11e8d5ddd752aa64c9148d0db6cb79fd190"
integrity sha512-ntQPR6q1/NKuphly49+QiQiTN0O63uOwjdD6dhIjSWBI5xlrbUFh720TIpzBhpnrLfv2tNH/BXvLIab1+BAI0w==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-block-scoping@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.0.0.tgz#1745075edffd7cdaf69fab2fb6f9694424b7e9bc"
@@ -439,6 +613,14 @@
"@babel/helper-plugin-utils" "^7.0.0"
lodash "^4.17.10"
"@babel/plugin-transform-block-scoping@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.2.0.tgz#f17c49d91eedbcdf5dd50597d16f5f2f770132d4"
integrity sha512-vDTgf19ZEV6mx35yiPJe4fS02mPQUUcBNwWQSZFXSzTSbsJFQvHt7DqyS3LK8oOWALFOsJ+8bbqBgkirZteD5Q==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
lodash "^4.17.10"
"@babel/plugin-transform-classes@^7.0.0", "@babel/plugin-transform-classes@^7.1.0":
version "7.1.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.1.0.tgz#ab3f8a564361800cbc8ab1ca6f21108038432249"
@@ -453,6 +635,20 @@
"@babel/helper-split-export-declaration" "^7.0.0"
globals "^11.1.0"
"@babel/plugin-transform-classes@^7.2.0":
version "7.2.2"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.2.2.tgz#6c90542f210ee975aa2aa8c8b5af7fa73a126953"
integrity sha512-gEZvgTy1VtcDOaQty1l10T3jQmJKlNVxLDCs+3rCVPr6nMkODLELxViq5X9l+rfxbie3XrfrMCYYY6eX3aOcOQ==
dependencies:
"@babel/helper-annotate-as-pure" "^7.0.0"
"@babel/helper-define-map" "^7.1.0"
"@babel/helper-function-name" "^7.1.0"
"@babel/helper-optimise-call-expression" "^7.0.0"
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/helper-replace-supers" "^7.1.0"
"@babel/helper-split-export-declaration" "^7.0.0"
globals "^11.1.0"
"@babel/plugin-transform-computed-properties@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.0.0.tgz#2fbb8900cd3e8258f2a2ede909b90e7556185e31"
@@ -460,6 +656,13 @@
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-computed-properties@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.2.0.tgz#83a7df6a658865b1c8f641d510c6f3af220216da"
integrity sha512-kP/drqTxY6Xt3NNpKiMomfgkNn4o7+vKxK2DDKcBG9sHj51vHqMBGy8wbDS/J4lMxnqs153/T3+DmCEAkC5cpA==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-destructuring@^7.0.0":
version "7.1.3"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.1.3.tgz#e69ff50ca01fac6cb72863c544e516c2b193012f"
@@ -467,6 +670,13 @@
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-destructuring@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.2.0.tgz#e75269b4b7889ec3a332cd0d0c8cff8fed0dc6f3"
integrity sha512-coVO2Ayv7g0qdDbrNiadE4bU7lvCd9H539m2gMknyVjjMdwF/iCOM7R+E8PkntoqLkltO0rk+3axhpp/0v68VQ==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-dotall-regex@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.0.0.tgz#73a24da69bc3c370251f43a3d048198546115e58"
@@ -476,6 +686,15 @@
"@babel/helper-regex" "^7.0.0"
regexpu-core "^4.1.3"
"@babel/plugin-transform-dotall-regex@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.2.0.tgz#f0aabb93d120a8ac61e925ea0ba440812dbe0e49"
integrity sha512-sKxnyHfizweTgKZf7XsXu/CNupKhzijptfTM+bozonIuyVrLWVUvYjE2bhuSBML8VQeMxq4Mm63Q9qvcvUcciQ==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/helper-regex" "^7.0.0"
regexpu-core "^4.1.3"
"@babel/plugin-transform-duplicate-keys@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.0.0.tgz#a0601e580991e7cace080e4cf919cfd58da74e86"
@@ -483,6 +702,13 @@
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-duplicate-keys@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.2.0.tgz#d952c4930f312a4dbfff18f0b2914e60c35530b3"
integrity sha512-q+yuxW4DsTjNceUiTzK0L+AfQ0zD9rWaTLiUqHA8p0gxx7lu1EylenfzjeIWNkPy6e/0VG/Wjw9uf9LueQwLOw==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-exponentiation-operator@^7.0.0", "@babel/plugin-transform-exponentiation-operator@^7.1.0":
version "7.1.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.1.0.tgz#9c34c2ee7fd77e02779cfa37e403a2e1003ccc73"
@@ -491,6 +717,14 @@
"@babel/helper-builder-binary-assignment-operator-visitor" "^7.1.0"
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-exponentiation-operator@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.2.0.tgz#a63868289e5b4007f7054d46491af51435766008"
integrity sha512-umh4hR6N7mu4Elq9GG8TOu9M0bakvlsREEC+ialrQN6ABS4oDQ69qJv1VtR3uxlKMCQMCvzk7vr17RHKcjx68A==
dependencies:
"@babel/helper-builder-binary-assignment-operator-visitor" "^7.1.0"
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-flow-strip-types@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.0.0.tgz#c40ced34c2783985d90d9f9ac77a13e6fb396a01"
@@ -506,6 +740,13 @@
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-for-of@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.2.0.tgz#ab7468befa80f764bb03d3cb5eef8cc998e1cad9"
integrity sha512-Kz7Mt0SsV2tQk6jG5bBv5phVbkd0gd27SgYD4hH1aLMJRchM0dzHaXvrWhVZ+WxAlDoAKZ7Uy3jVTW2mKXQ1WQ==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-function-name@^7.0.0", "@babel/plugin-transform-function-name@^7.1.0":
version "7.1.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.1.0.tgz#29c5550d5c46208e7f730516d41eeddd4affadbb"
@@ -514,6 +755,14 @@
"@babel/helper-function-name" "^7.1.0"
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-function-name@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.2.0.tgz#f7930362829ff99a3174c39f0afcc024ef59731a"
integrity sha512-kWgksow9lHdvBC2Z4mxTsvc7YdY7w/V6B2vy9cTIPtLEE9NhwoWivaxdNM/S37elu5bqlLP/qOY906LukO9lkQ==
dependencies:
"@babel/helper-function-name" "^7.1.0"
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-literals@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.0.0.tgz#2aec1d29cdd24c407359c930cdd89e914ee8ff86"
@@ -521,6 +770,13 @@
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-literals@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.2.0.tgz#690353e81f9267dad4fd8cfd77eafa86aba53ea1"
integrity sha512-2ThDhm4lI4oV7fVQ6pNNK+sx+c/GM5/SaML0w/r4ZB7sAneD/piDJtwdKlNckXeyGK7wlwg2E2w33C/Hh+VFCg==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-member-expression-literals@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.0.0.tgz#96a265bf61a9ed6f75c39db0c30d41ef7aabf072"
@@ -536,6 +792,14 @@
"@babel/helper-module-transforms" "^7.1.0"
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-modules-amd@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.2.0.tgz#82a9bce45b95441f617a24011dc89d12da7f4ee6"
integrity sha512-mK2A8ucqz1qhrdqjS9VMIDfIvvT2thrEsIQzbaTdc5QFzhDjQv2CkJJ5f6BXIkgbmaoax3zBr2RyvV/8zeoUZw==
dependencies:
"@babel/helper-module-transforms" "^7.1.0"
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-modules-commonjs@^7.0.0", "@babel/plugin-transform-modules-commonjs@^7.1.0":
version "7.1.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.1.0.tgz#0a9d86451cbbfb29bd15186306897c67f6f9a05c"
@@ -545,6 +809,15 @@
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/helper-simple-access" "^7.1.0"
"@babel/plugin-transform-modules-commonjs@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.2.0.tgz#c4f1933f5991d5145e9cfad1dfd848ea1727f404"
integrity sha512-V6y0uaUQrQPXUrmj+hgnks8va2L0zcZymeU7TtWEgdRLNkceafKXEduv7QzgQAE4lT+suwooG9dC7LFhdRAbVQ==
dependencies:
"@babel/helper-module-transforms" "^7.1.0"
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/helper-simple-access" "^7.1.0"
"@babel/plugin-transform-modules-systemjs@^7.0.0":
version "7.1.3"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.1.3.tgz#2119a3e3db612fd74a19d88652efbfe9613a5db0"
@@ -553,6 +826,14 @@
"@babel/helper-hoist-variables" "^7.0.0"
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-modules-systemjs@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.2.0.tgz#912bfe9e5ff982924c81d0937c92d24994bb9068"
integrity sha512-aYJwpAhoK9a+1+O625WIjvMY11wkB/ok0WClVwmeo3mCjcNRjt+/8gHWrB5i+00mUju0gWsBkQnPpdvQ7PImmQ==
dependencies:
"@babel/helper-hoist-variables" "^7.0.0"
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-modules-umd@^7.1.0":
version "7.1.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.1.0.tgz#a29a7d85d6f28c3561c33964442257cc6a21f2a8"
@@ -561,6 +842,14 @@
"@babel/helper-module-transforms" "^7.1.0"
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-modules-umd@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.2.0.tgz#7678ce75169f0877b8eb2235538c074268dd01ae"
integrity sha512-BV3bw6MyUH1iIsGhXlOK6sXhmSarZjtJ/vMiD9dNmpY8QXFFQTj+6v92pcfy1iqa8DeAfJFwoxcrS/TUZda6sw==
dependencies:
"@babel/helper-module-transforms" "^7.1.0"
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-new-target@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.0.0.tgz#ae8fbd89517fa7892d20e6564e641e8770c3aa4a"
@@ -583,6 +872,14 @@
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/helper-replace-supers" "^7.1.0"
"@babel/plugin-transform-object-super@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.2.0.tgz#b35d4c10f56bab5d650047dad0f1d8e8814b6598"
integrity sha512-VMyhPYZISFZAqAPVkiYb7dUe2AsVi2/wCT5+wZdsNO31FojQJa9ns40hzZ6U9f50Jlq4w6qwzdBB2uwqZ00ebg==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/helper-replace-supers" "^7.1.0"
"@babel/plugin-transform-parameters@^7.0.0", "@babel/plugin-transform-parameters@^7.1.0":
version "7.1.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.1.0.tgz#44f492f9d618c9124026e62301c296bf606a7aed"
@@ -592,6 +889,15 @@
"@babel/helper-get-function-arity" "^7.0.0"
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-parameters@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.2.0.tgz#0d5ad15dc805e2ea866df4dd6682bfe76d1408c2"
integrity sha512-kB9+hhUidIgUoBQ0MsxMewhzr8i60nMa2KgeJKQWYrqQpqcBYtnpR+JgkadZVZoaEZ/eKu9mclFaVwhRpLNSzA==
dependencies:
"@babel/helper-call-delegate" "^7.1.0"
"@babel/helper-get-function-arity" "^7.0.0"
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-property-literals@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.0.0.tgz#0b95a91dbd1f0be5b5a99ed86571ef5b5ae77009"
@@ -647,6 +953,13 @@
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-shorthand-properties@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.2.0.tgz#6333aee2f8d6ee7e28615457298934a3b46198f0"
integrity sha512-QP4eUM83ha9zmYtpbnyjTLAGKQritA5XW/iG9cjtuOI8s1RuL/3V6a3DeSHfKutJQ+ayUfeZJPcnCYEQzaPQqg==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-spread@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.0.0.tgz#93583ce48dd8c85e53f3a46056c856e4af30b49b"
@@ -654,6 +967,13 @@
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-spread@^7.2.0":
version "7.2.2"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.2.2.tgz#3103a9abe22f742b6d406ecd3cd49b774919b406"
integrity sha512-KWfky/58vubwtS0hLqEnrWJjsMGaOeSBn90Ezn5Jeg9Z8KKHmELbP1yGylMlm5N6TPKeY9A2+UaSYLdxahg01w==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-sticky-regex@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.0.0.tgz#30a9d64ac2ab46eec087b8530535becd90e73366"
@@ -662,6 +982,14 @@
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/helper-regex" "^7.0.0"
"@babel/plugin-transform-sticky-regex@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.2.0.tgz#a1e454b5995560a9c1e0d537dfc15061fd2687e1"
integrity sha512-KKYCoGaRAf+ckH8gEL3JHUaFVyNHKe3ASNsZ+AlktgHevvxGigoIttrEJb8iKN03Q7Eazlv1s6cx2B2cQ3Jabw==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/helper-regex" "^7.0.0"
"@babel/plugin-transform-template-literals@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.0.0.tgz#084f1952efe5b153ddae69eb8945f882c7a97c65"
@@ -670,6 +998,14 @@
"@babel/helper-annotate-as-pure" "^7.0.0"
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-template-literals@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.2.0.tgz#d87ed01b8eaac7a92473f608c97c089de2ba1e5b"
integrity sha512-FkPix00J9A/XWXv4VoKJBMeSkyY9x/TqIh76wzcdfl57RJJcf8CehQ08uwfhCDNtRQYtHQKBTwKZDEyjE13Lwg==
dependencies:
"@babel/helper-annotate-as-pure" "^7.0.0"
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-typeof-symbol@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.0.0.tgz#4dcf1e52e943e5267b7313bff347fdbe0f81cec9"
@@ -677,6 +1013,13 @@
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-typeof-symbol@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.2.0.tgz#117d2bcec2fbf64b4b59d1f9819894682d29f2b2"
integrity sha512-2LNhETWYxiYysBtrBTqL8+La0jIoQQnIScUJc74OYvUGRmkskNY4EzLCnjHBzdmb38wqtTaixpo1NctEcvMDZw==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-typescript@^7.0.0":
version "7.1.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.1.0.tgz#81e7b4be90e7317cbd04bf1163ebf06b2adee60b"
@@ -685,6 +1028,14 @@
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-typescript" "^7.0.0"
"@babel/plugin-transform-typescript@^7.1.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.2.0.tgz#bce7c06300434de6a860ae8acf6a442ef74a99d1"
integrity sha512-EnI7i2/gJ7ZNr2MuyvN2Hu+BHJENlxWte5XygPvfj/MbvtOkWor9zcnHpMMQL2YYaaCcqtIvJUyJ7QVfoGs7ew==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-typescript" "^7.2.0"
"@babel/plugin-transform-unicode-regex@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.0.0.tgz#c6780e5b1863a76fe792d90eded9fcd5b51d68fc"
@@ -694,6 +1045,15 @@
"@babel/helper-regex" "^7.0.0"
regexpu-core "^4.1.3"
"@babel/plugin-transform-unicode-regex@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.2.0.tgz#4eb8db16f972f8abb5062c161b8b115546ade08b"
integrity sha512-m48Y0lMhrbXEJnVUaYly29jRXbQ3ksxPrS1Tg8t+MHqzXhtBYAvI51euOBaoAlZLPHsieY9XPVMf80a5x0cPcA==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/helper-regex" "^7.0.0"
regexpu-core "^4.1.3"
"@babel/preset-env@^7.1.5":
version "7.1.6"
resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.1.6.tgz#a0bf4b96b6bfcf6e000afc5b72b4abe7cc13ae97"
@@ -741,6 +1101,53 @@
js-levenshtein "^1.1.3"
semver "^5.3.0"
"@babel/preset-env@^7.1.6":
version "7.2.3"
resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.2.3.tgz#948c8df4d4609c99c7e0130169f052ea6a7a8933"
integrity sha512-AuHzW7a9rbv5WXmvGaPX7wADxFkZIqKlbBh1dmZUQp4iwiPpkE/Qnrji6SC4UQCQzvWY/cpHET29eUhXS9cLPw==
dependencies:
"@babel/helper-module-imports" "^7.0.0"
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-proposal-async-generator-functions" "^7.2.0"
"@babel/plugin-proposal-json-strings" "^7.2.0"
"@babel/plugin-proposal-object-rest-spread" "^7.2.0"
"@babel/plugin-proposal-optional-catch-binding" "^7.2.0"
"@babel/plugin-proposal-unicode-property-regex" "^7.2.0"
"@babel/plugin-syntax-async-generators" "^7.2.0"
"@babel/plugin-syntax-object-rest-spread" "^7.2.0"
"@babel/plugin-syntax-optional-catch-binding" "^7.2.0"
"@babel/plugin-transform-arrow-functions" "^7.2.0"
"@babel/plugin-transform-async-to-generator" "^7.2.0"
"@babel/plugin-transform-block-scoped-functions" "^7.2.0"
"@babel/plugin-transform-block-scoping" "^7.2.0"
"@babel/plugin-transform-classes" "^7.2.0"
"@babel/plugin-transform-computed-properties" "^7.2.0"
"@babel/plugin-transform-destructuring" "^7.2.0"
"@babel/plugin-transform-dotall-regex" "^7.2.0"
"@babel/plugin-transform-duplicate-keys" "^7.2.0"
"@babel/plugin-transform-exponentiation-operator" "^7.2.0"
"@babel/plugin-transform-for-of" "^7.2.0"
"@babel/plugin-transform-function-name" "^7.2.0"
"@babel/plugin-transform-literals" "^7.2.0"
"@babel/plugin-transform-modules-amd" "^7.2.0"
"@babel/plugin-transform-modules-commonjs" "^7.2.0"
"@babel/plugin-transform-modules-systemjs" "^7.2.0"
"@babel/plugin-transform-modules-umd" "^7.2.0"
"@babel/plugin-transform-new-target" "^7.0.0"
"@babel/plugin-transform-object-super" "^7.2.0"
"@babel/plugin-transform-parameters" "^7.2.0"
"@babel/plugin-transform-regenerator" "^7.0.0"
"@babel/plugin-transform-shorthand-properties" "^7.2.0"
"@babel/plugin-transform-spread" "^7.2.0"
"@babel/plugin-transform-sticky-regex" "^7.2.0"
"@babel/plugin-transform-template-literals" "^7.2.0"
"@babel/plugin-transform-typeof-symbol" "^7.2.0"
"@babel/plugin-transform-unicode-regex" "^7.2.0"
browserslist "^4.3.4"
invariant "^2.2.2"
js-levenshtein "^1.1.3"
semver "^5.3.0"
"@babel/preset-flow@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/preset-flow/-/preset-flow-7.0.0.tgz#afd764835d9535ec63d8c7d4caf1c06457263da2"
@@ -749,6 +1156,14 @@
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-flow-strip-types" "^7.0.0"
"@babel/preset-typescript@^7.1.0":
version "7.1.0"
resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.1.0.tgz#49ad6e2084ff0bfb5f1f7fb3b5e76c434d442c7f"
integrity sha512-LYveByuF9AOM8WrsNne5+N79k1YxjNB6gmpCQsnuSBAcV8QUeB+ZUxQzL7Rz7HksPbahymKkq2qBR+o36ggFZA==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-typescript" "^7.1.0"
"@babel/register@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.0.0.tgz#fa634bae1bfa429f60615b754fc1f1d745edd827"
@@ -778,6 +1193,15 @@
"@babel/parser" "^7.1.2"
"@babel/types" "^7.1.2"
"@babel/template@^7.2.2":
version "7.2.2"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.2.2.tgz#005b3fdf0ed96e88041330379e0da9a708eb2907"
integrity sha512-zRL0IMM02AUDwghf5LMSSDEz7sBCO2YnNmpg3uWTZj/v1rcG2BmQUvaGU8GhU8BvfMh1k2KIAYZ7Ji9KXPUg7g==
dependencies:
"@babel/code-frame" "^7.0.0"
"@babel/parser" "^7.2.2"
"@babel/types" "^7.2.2"
"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0":
version "7.1.4"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.1.4.tgz#f4f83b93d649b4b2c91121a9087fa2fa949ec2b4"
@@ -793,6 +1217,21 @@
globals "^11.1.0"
lodash "^4.17.10"
"@babel/traverse@^7.1.5", "@babel/traverse@^7.2.2", "@babel/traverse@^7.2.3":
version "7.2.3"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.2.3.tgz#7ff50cefa9c7c0bd2d81231fdac122f3957748d8"
integrity sha512-Z31oUD/fJvEWVR0lNZtfgvVt512ForCTNKYcJBGbPb1QZfve4WGH8Wsy7+Mev33/45fhP/hwQtvgusNdcCMgSw==
dependencies:
"@babel/code-frame" "^7.0.0"
"@babel/generator" "^7.2.2"
"@babel/helper-function-name" "^7.1.0"
"@babel/helper-split-export-declaration" "^7.0.0"
"@babel/parser" "^7.2.3"
"@babel/types" "^7.2.2"
debug "^4.1.0"
globals "^11.1.0"
lodash "^4.17.10"
"@babel/types@^7.0.0", "@babel/types@^7.1.2", "@babel/types@^7.1.3":
version "7.1.3"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.1.3.tgz#3a767004567060c2f40fca49a304712c525ee37d"
@@ -802,6 +1241,15 @@
lodash "^4.17.10"
to-fast-properties "^2.0.0"
"@babel/types@^7.2.0", "@babel/types@^7.2.2":
version "7.2.2"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.2.2.tgz#44e10fc24e33af524488b716cdaee5360ea8ed1e"
integrity sha512-fKCuD6UFUMkR541eDWL+2ih/xFZBXPOg/7EQFeTluMDebfqR4jrpaCjLhkWlQS4hT6nRa2PMEgXKbRB5/H2fpg==
dependencies:
esutils "^2.0.2"
lodash "^4.17.10"
to-fast-properties "^2.0.0"
"@reactions/component@^2.0.2":
version "2.0.2"
resolved "https://registry.yarnpkg.com/@reactions/component/-/component-2.0.2.tgz#40f8c1c2c37baabe57a0c944edb9310dc1ec6642"
@@ -1111,6 +1559,11 @@ assign-symbols@^1.0.0:
resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367"
integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=
ast-types@0.11.6:
version "0.11.6"
resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.11.6.tgz#4e2266c2658829aef3b40cc33ad599c4e9eb89ef"
integrity sha512-nHiuV14upVGl7MWwFUYbzJ6YlfwWS084CU9EA8HajfYQjMSli5TQi3UTRygGF58LFWVkXxS1rbgRhROEqlQkXg==
astral-regex@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9"
@@ -1182,6 +1635,11 @@ babel-core@^6.0.0, babel-core@^6.26.0:
slash "^1.0.0"
source-map "^0.5.7"
babel-core@^7.0.0-bridge.0:
version "7.0.0-bridge.0"
resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece"
integrity sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg==
babel-eslint@9.0.0:
version "9.0.0"
resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-9.0.0.tgz#7d9445f81ed9f60aff38115f838970df9f2b6220"
@@ -1501,6 +1959,15 @@ browserslist@^4.1.0:
electron-to-chromium "^1.3.86"
node-releases "^1.0.5"
browserslist@^4.3.4:
version "4.3.6"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.3.6.tgz#0f9d9081afc66b36f477c6bdf3813f784f42396a"
integrity sha512-kMGKs4BTzRWviZ8yru18xBpx+CyHG9eqgRbj9XbE3IMgtczf4aiA0Y1YCpVdvUieKGZ03kolSPXqTcscBCb9qw==
dependencies:
caniuse-lite "^1.0.30000921"
electron-to-chromium "^1.3.92"
node-releases "^1.1.1"
bser@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719"
@@ -1588,6 +2055,11 @@ caniuse-lite@^1.0.30000912:
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000912.tgz#08e650d4090a9c0ab06bfd2b46b7d3ad6dcaea28"
integrity sha512-M3zAtV36U+xw5mMROlTXpAHClmPAor6GPKAMD5Yi7glCB5sbMPFtnQ3rGpk4XqPdUrrTIaVYSJZxREZWNy8QJg==
caniuse-lite@^1.0.30000921:
version "1.0.30000923"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000923.tgz#148f9bda508024b5ce957b463ae2e8302b451bb2"
integrity sha512-j5ur7eeluOFjjPUkydtXP4KFAsmH3XaQNch5tvWSO+dLHYt5PE+VgJZLWtbVOodfWij6m6zas28T4gB/cLYq1w==
capture-exit@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-1.2.0.tgz#1c5fcc489fd0ab00d4f1ac7ae1072e3173fbab6f"
@@ -1729,6 +2201,11 @@ colors@^1.0.3:
resolved "https://registry.yarnpkg.com/colors/-/colors-1.3.2.tgz#2df8ff573dfbf255af562f8ce7181d6b971a359b"
integrity sha512-rhP0JSBGYvpcNQj4s5AdShMeE5ahMop96cTeDl/v9qQQm2fYClE2QXZRi8wLzc+GmXSxdIqqbOIAhyObEXDbfQ==
colors@^1.1.2:
version "1.3.3"
resolved "https://registry.yarnpkg.com/colors/-/colors-1.3.3.tgz#39e005d546afe01e01f9c4ca8fa50f686a01205d"
integrity sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg==
combined-stream@1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818"
@@ -1945,6 +2422,13 @@ debug@^3.1.0:
dependencies:
ms "^2.1.1"
debug@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.0.tgz#373687bffa678b38b1cd91f861b63850035ddc87"
integrity sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==
dependencies:
ms "^2.1.1"
decamelize@^1.1.1:
version "1.2.0"
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
@@ -2134,6 +2618,11 @@ electron-to-chromium@^1.3.86:
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.87.tgz#f0481ca84824752bced51673396e9a6c74fe5ec7"
integrity sha512-EV5FZ68Hu+n9fHVhOc9AcG3Lvf+E1YqR36ulJUpwaQTkf4LwdvBqmGIazaIrt4kt6J8Gw3Kv7r9F+PQjAkjWeA==
electron-to-chromium@^1.3.92:
version "1.3.95"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.95.tgz#79fac438813ca7f3db182a525c2ab432934f6484"
integrity sha512-0JZEDKOQAE05EO/4rk3vLAE+PYFI9OLCVLAS4QAq1y+Bb2y1N6MyQJz62ynzHN/y0Ka/nO5jVJcahbCEdfiXLQ==
encodeurl@~1.0.1, encodeurl@~1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
@@ -2366,7 +2855,7 @@ esprima@^3.1.3:
resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633"
integrity sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=
esprima@^4.0.0:
esprima@^4.0.0, esprima@~4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
@@ -2783,6 +3272,11 @@ flow-bin@^0.89.0:
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.89.0.tgz#6bd29c2af7e0f429797f820662f33749105c32fa"
integrity sha512-DkO4PsXYrl53V6G5+t5HbRMC5ajYUQej2LEGPUZ+j9okTb41Sn5j9vfxsCpXMEAslYnQoysHhYu4GUZsQX/DrQ==
flow-parser@0.*:
version "0.89.0"
resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.89.0.tgz#c87bf45831644733dd576983ab12e75a3546573b"
integrity sha512-vC8YuwhAPE+tbkz49DA/TjtFyfhcqM48occMdRQiZ/HL+Wg97IcuebMZUGVB4oBq7aHw0iJJtnvmlnmOQF7Ydg==
for-in@^1.0.1, for-in@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
@@ -4157,6 +4651,30 @@ jsbn@~0.1.0:
resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM=
jscodeshift@^0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/jscodeshift/-/jscodeshift-0.6.2.tgz#bb648e6bce717a597d165781158b0d73b7fa99c3"
integrity sha512-AXboSyuFiCS+vLym7fyBexc3JlmZjrwl+fupBA/bxMGONmyXE51BrF5nxePZwv2YUze/1PfOTBTVvKiZhKnHLg==
dependencies:
"@babel/core" "^7.1.6"
"@babel/parser" "^7.1.6"
"@babel/plugin-proposal-class-properties" "^7.1.0"
"@babel/plugin-proposal-object-rest-spread" "^7.0.0"
"@babel/preset-env" "^7.1.6"
"@babel/preset-flow" "^7.0.0"
"@babel/preset-typescript" "^7.1.0"
"@babel/register" "^7.0.0"
babel-core "^7.0.0-bridge.0"
colors "^1.1.2"
flow-parser "0.*"
graceful-fs "^4.1.11"
micromatch "^3.1.10"
neo-async "^2.5.0"
node-dir "^0.1.17"
recast "^0.16.1"
temp "^0.8.1"
write-file-atomic "^2.3.0"
jsdom@^11.5.1:
version "11.12.0"
resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.12.0.tgz#1a80d40ddd378a1de59656e9e6dc5a3ba8657bc8"
@@ -4246,6 +4764,13 @@ json5@^0.5.0, json5@^0.5.1:
resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821"
integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=
json5@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.0.tgz#e7a0c62c48285c628d20a10b85c89bb807c32850"
integrity sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==
dependencies:
minimist "^1.2.0"
jsonfile@^2.1.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8"
@@ -4775,7 +5300,7 @@ micromatch@^2.3.11:
parse-glob "^3.0.4"
regex-cache "^0.4.2"
micromatch@^3.1.4:
micromatch@^3.1.10, micromatch@^3.1.4:
version "3.1.10"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23"
integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==
@@ -4840,7 +5365,7 @@ min-document@^2.19.0:
dependencies:
dom-walk "^0.1.0"
"minimatch@2 || 3", minimatch@^3.0.3, minimatch@^3.0.4:
"minimatch@2 || 3", minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
@@ -4978,11 +5503,23 @@ negotiator@0.6.1:
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9"
integrity sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=
neo-async@^2.5.0:
version "2.6.0"
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.0.tgz#b9d15e4d71c6762908654b5183ed38b753340835"
integrity sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA==
nice-try@^1.0.4:
version "1.0.5"
resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
node-dir@^0.1.17:
version "0.1.17"
resolved "https://registry.yarnpkg.com/node-dir/-/node-dir-0.1.17.tgz#5f5665d93351335caabef8f1c554516cf5f1e4e5"
integrity sha1-X1Zl2TNRM1yqvvjxxVRRbPXx5OU=
dependencies:
minimatch "^3.0.2"
node-fetch@^1.0.1:
version "1.7.3"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef"
@@ -5039,6 +5576,13 @@ node-releases@^1.0.5:
dependencies:
semver "^5.3.0"
node-releases@^1.1.1:
version "1.1.2"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.2.tgz#93c17fba5eec8650ad908de5433fa8763baebe4d"
integrity sha512-j1gEV/zX821yxdWp/1vBMN0pSUjuH9oGUdLCb4PfUko6ZW7KdRs3Z+QGGwDUhYtSpQvdVVyLd2V0YvLsmdg5jQ==
dependencies:
semver "^5.3.0"
node-version@^1.0.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/node-version/-/node-version-1.2.0.tgz#34fde3ffa8e1149bd323983479dda620e1b5060d"
@@ -5540,7 +6084,7 @@ pretty-format@^23.4.1, pretty-format@^23.6.0:
ansi-regex "^3.0.0"
ansi-styles "^3.2.0"
private@^0.1.6, private@^0.1.8:
private@^0.1.6, private@^0.1.8, private@~0.1.5:
version "0.1.8"
resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"
integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==
@@ -5816,6 +6360,16 @@ realpath-native@^1.0.0:
dependencies:
util.promisify "^1.0.0"
recast@^0.16.1:
version "0.16.1"
resolved "https://registry.yarnpkg.com/recast/-/recast-0.16.1.tgz#865f1800ef76e42e5d0375763b80f4d6a05f2069"
integrity sha512-ZUQm94F3AHozRaTo4Vz6yIgkSEZIL7p+BsWeGZ23rx+ZVRoqX+bvBA8br0xmCOU0DSR4qYGtV7Y5HxTsC4V78A==
dependencies:
ast-types "0.11.6"
esprima "~4.0.0"
private "~0.1.5"
source-map "~0.6.1"
rechoir@^0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
@@ -6641,7 +7195,7 @@ temp-dir@^1.0.0:
resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d"
integrity sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0=
temp@0.8.3:
temp@0.8.3, temp@^0.8.1:
version "0.8.3"
resolved "https://registry.yarnpkg.com/temp/-/temp-0.8.3.tgz#e0c6bc4d26b903124410e4fed81103014dfc1f59"
integrity sha1-4Ma8TSa5AxJEEOT+2BEDAU38H1k=
@@ -7061,7 +7615,7 @@ write-file-atomic@^1.2.0:
imurmurhash "^0.1.4"
slide "^1.1.5"
write-file-atomic@^2.1.0:
write-file-atomic@^2.1.0, write-file-atomic@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab"
integrity sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==