Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated CheckBox module. #801

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion IntegrationTests/AsyncStorageTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,10 @@ function testMerge() {
}

function testOptimizedMultiGet() {
let batch = [[KEY_1, VAL_1], [KEY_2, VAL_2]];
let batch = [
[KEY_1, VAL_1],
[KEY_2, VAL_2],
];
let keys = batch.map(([key, value]) => key);
AsyncStorage.multiSet(batch, err1 => {
// yes, twice on purpose
Expand Down
4 changes: 1 addition & 3 deletions Libraries/Animated/src/NativeAnimatedHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,7 @@ function validateTransform(
configs.forEach(config => {
if (!TRANSFORM_WHITELIST.hasOwnProperty(config.property)) {
throw new Error(
`Property '${
config.property
}' is not supported by native animated module`,
`Property '${config.property}' is not supported by native animated module`,
);
}
});
Expand Down
60 changes: 50 additions & 10 deletions Libraries/Animated/src/__tests__/AnimatedNative-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,11 +357,19 @@ describe('Native Animated', () => {
expect(additionConnectionCalls.length).toBe(2);
expect(NativeAnimatedModule.createAnimatedNode).toBeCalledWith(
additionCall[1].input[0],
{type: 'value', value: 1, offset: 0},
{
type: 'value',
value: 1,
offset: 0,
},
);
expect(NativeAnimatedModule.createAnimatedNode).toBeCalledWith(
additionCall[1].input[1],
{type: 'value', value: 2, offset: 0},
{
type: 'value',
value: 2,
offset: 0,
},
);
});

Expand Down Expand Up @@ -391,11 +399,19 @@ describe('Native Animated', () => {
expect(subtractionConnectionCalls.length).toBe(2);
expect(NativeAnimatedModule.createAnimatedNode).toBeCalledWith(
subtractionCall[1].input[0],
{type: 'value', value: 2, offset: 0},
{
type: 'value',
value: 2,
offset: 0,
},
);
expect(NativeAnimatedModule.createAnimatedNode).toBeCalledWith(
subtractionCall[1].input[1],
{type: 'value', value: 1, offset: 0},
{
type: 'value',
value: 1,
offset: 0,
},
);
});

Expand Down Expand Up @@ -425,11 +441,19 @@ describe('Native Animated', () => {
expect(multiplicationConnectionCalls.length).toBe(2);
expect(NativeAnimatedModule.createAnimatedNode).toBeCalledWith(
multiplicationCall[1].input[0],
{type: 'value', value: 2, offset: 0},
{
type: 'value',
value: 2,
offset: 0,
},
);
expect(NativeAnimatedModule.createAnimatedNode).toBeCalledWith(
multiplicationCall[1].input[1],
{type: 'value', value: 1, offset: 0},
{
type: 'value',
value: 1,
offset: 0,
},
);
});

Expand Down Expand Up @@ -459,11 +483,19 @@ describe('Native Animated', () => {
expect(divisionConnectionCalls.length).toBe(2);
expect(NativeAnimatedModule.createAnimatedNode).toBeCalledWith(
divisionCall[1].input[0],
{type: 'value', value: 4, offset: 0},
{
type: 'value',
value: 4,
offset: 0,
},
);
expect(NativeAnimatedModule.createAnimatedNode).toBeCalledWith(
divisionCall[1].input[1],
{type: 'value', value: 2, offset: 0},
{
type: 'value',
value: 2,
offset: 0,
},
);
});

Expand Down Expand Up @@ -491,7 +523,11 @@ describe('Native Animated', () => {
expect(moduloConnectionCalls.length).toBe(1);
expect(NativeAnimatedModule.createAnimatedNode).toBeCalledWith(
moduloCall[1].input,
{type: 'value', value: 4, offset: 0},
{
type: 'value',
value: 4,
offset: 0,
},
);
});

Expand Down Expand Up @@ -588,7 +624,11 @@ describe('Native Animated', () => {
expect(diffClampConnectionCalls.length).toBe(1);
expect(NativeAnimatedModule.createAnimatedNode).toBeCalledWith(
diffClampCall[1].input,
{type: 'value', value: 2, offset: 0},
{
type: 'value',
value: 2,
offset: 0,
},
);
});

Expand Down
16 changes: 14 additions & 2 deletions Libraries/BatchedBridge/__tests__/MessageQueue-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,25 @@ describe('MessageQueue', function() {
});

it('should throw when calling the same callback twice', () => {
queue.enqueueNativeCall(0, 1, [], () => {}, () => {});
queue.enqueueNativeCall(
0,
1,
[],
() => {},
() => {},
);
queue.__invokeCallback(1, []);
expect(() => queue.__invokeCallback(1, [])).toThrow();
});

it('should throw when calling both success and failure callback', () => {
queue.enqueueNativeCall(0, 1, [], () => {}, () => {});
queue.enqueueNativeCall(
0,
1,
[],
() => {},
() => {},
);
queue.__invokeCallback(1, []);
expect(() => queue.__invokeCallback(0, [])).toThrow();
});
Expand Down
4 changes: 1 addition & 3 deletions Libraries/Blob/URL.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,7 @@ export class URL {
if (BLOB_URL_PREFIX === null) {
throw new Error('Cannot create URL for blob!');
}
return `${BLOB_URL_PREFIX}${blob.data.blobId}?offset=${
blob.data.offset
}&size=${blob.size}`;
return `${BLOB_URL_PREFIX}${blob.data.blobId}?offset=${blob.data.offset}&size=${blob.size}`;
}

static revokeObjectURL(url: string) {
Expand Down
5 changes: 1 addition & 4 deletions Libraries/Components/ActivityIndicator/ActivityIndicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,7 @@ const ActivityIndicator = (props: Props, forwardedRef?: any) => {
return (
<View
onLayout={onLayout}
style={StyleSheet.compose(
styles.container,
style,
)}>
style={StyleSheet.compose(styles.container, style)}>
{Platform.OS === 'android' ? (
// $FlowFixMe Flow doesn't know when this is the android component
<PlatformActivityIndicator {...nativeProps} {...androidProps} />
Expand Down
74 changes: 0 additions & 74 deletions Libraries/Components/CheckBox/AndroidCheckBoxNativeComponent.js

This file was deleted.

Loading