chore(deps): update dependency prettier to v1.19.1 (#2893)
* chore(deps): update dependency prettier to v1.19.1 * style: format files after prettier upgrade
This commit is contained in:
@ -57,7 +57,10 @@ describe('entries', () => {
|
||||
{
|
||||
name: 'images',
|
||||
widget: 'list',
|
||||
fields: [{ name: 'title', widget: 'text' }, { name: 'url', widget: 'text' }],
|
||||
fields: [
|
||||
{ name: 'title', widget: 'text' },
|
||||
{ name: 'url', widget: 'text' },
|
||||
],
|
||||
},
|
||||
]);
|
||||
expect(createEmptyDraftData(fields)).toEqual({});
|
||||
@ -95,7 +98,10 @@ describe('entries', () => {
|
||||
{
|
||||
name: 'post',
|
||||
widget: 'object',
|
||||
fields: [{ name: 'title', widget: 'text' }, { name: 'url', widget: 'text' }],
|
||||
fields: [
|
||||
{ name: 'title', widget: 'text' },
|
||||
{ name: 'url', widget: 'text' },
|
||||
],
|
||||
},
|
||||
]);
|
||||
expect(createEmptyDraftData(fields)).toEqual({});
|
||||
|
@ -407,9 +407,10 @@ export class Backend {
|
||||
const { raw, path, mediaFiles = [], assets = [] } = backup;
|
||||
|
||||
const label = selectFileEntryLabel(collection, slug);
|
||||
const entry = this.entryWithFormat(collection, slug)(
|
||||
createEntry(collection.get('name'), slug, path, { raw, label }),
|
||||
);
|
||||
const entry = this.entryWithFormat(
|
||||
collection,
|
||||
slug,
|
||||
)(createEntry(collection.get('name'), slug, path, { raw, label }));
|
||||
|
||||
return { entry, mediaFiles, assets };
|
||||
}
|
||||
@ -446,7 +447,10 @@ export class Backend {
|
||||
const path = selectEntryPath(collection, slug);
|
||||
const label = selectFileEntryLabel(collection, slug);
|
||||
return this.implementation.getEntry(collection, slug, path).then(loadedEntry =>
|
||||
this.entryWithFormat(collection, slug)(
|
||||
this.entryWithFormat(
|
||||
collection,
|
||||
slug,
|
||||
)(
|
||||
createEntry(collection.get('name'), slug, loadedEntry.file.path, {
|
||||
raw: loadedEntry.data,
|
||||
label,
|
||||
|
@ -237,9 +237,4 @@ const mapDispatchToProps = {
|
||||
logoutUser,
|
||||
};
|
||||
|
||||
export default hot(module)(
|
||||
connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps,
|
||||
)(translate()(App)),
|
||||
);
|
||||
export default hot(module)(connect(mapStateToProps, mapDispatchToProps)(translate()(App)));
|
||||
|
@ -83,7 +83,4 @@ const mapDispatchToProps = {
|
||||
traverseCollectionCursor: actionTraverseCollectionCursor,
|
||||
};
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps,
|
||||
)(EntriesCollection);
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(EntriesCollection);
|
||||
|
@ -83,7 +83,4 @@ const mapDispatchToProps = {
|
||||
clearSearch: actionClearSearch,
|
||||
};
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps,
|
||||
)(EntriesSearch);
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(EntriesSearch);
|
||||
|
@ -464,26 +464,23 @@ function mapStateToProps(state, ownProps) {
|
||||
};
|
||||
}
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
{
|
||||
changeDraftField,
|
||||
changeDraftFieldValidation,
|
||||
loadEntry,
|
||||
loadEntries,
|
||||
loadDeployPreview,
|
||||
loadLocalBackup,
|
||||
retrieveLocalBackup,
|
||||
persistLocalBackup,
|
||||
deleteLocalBackup,
|
||||
createDraftFromEntry,
|
||||
createEmptyDraft,
|
||||
discardDraft,
|
||||
persistEntry,
|
||||
deleteEntry,
|
||||
updateUnpublishedEntryStatus,
|
||||
publishUnpublishedEntry,
|
||||
deleteUnpublishedEntry,
|
||||
logoutUser,
|
||||
},
|
||||
)(withWorkflow(translate()(Editor)));
|
||||
export default connect(mapStateToProps, {
|
||||
changeDraftField,
|
||||
changeDraftFieldValidation,
|
||||
loadEntry,
|
||||
loadEntries,
|
||||
loadDeployPreview,
|
||||
loadLocalBackup,
|
||||
retrieveLocalBackup,
|
||||
persistLocalBackup,
|
||||
deleteLocalBackup,
|
||||
createDraftFromEntry,
|
||||
createEmptyDraft,
|
||||
discardDraft,
|
||||
persistEntry,
|
||||
deleteEntry,
|
||||
updateUnpublishedEntryStatus,
|
||||
publishUnpublishedEntry,
|
||||
deleteUnpublishedEntry,
|
||||
logoutUser,
|
||||
})(withWorkflow(translate()(Editor)));
|
||||
|
@ -325,11 +325,8 @@ const mapDispatchToProps = {
|
||||
clearFieldErrors,
|
||||
};
|
||||
|
||||
const ConnectedEditorControl = connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps,
|
||||
null,
|
||||
{ withRef: false },
|
||||
)(translate()(EditorControl));
|
||||
const ConnectedEditorControl = connect(mapStateToProps, mapDispatchToProps, null, {
|
||||
withRef: false,
|
||||
})(translate()(EditorControl));
|
||||
|
||||
export default ConnectedEditorControl;
|
||||
|
@ -348,7 +348,4 @@ const mapDispatchToProps = {
|
||||
closeMediaLibrary: closeMediaLibraryAction,
|
||||
};
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps,
|
||||
)(translate()(MediaLibrary));
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(translate()(MediaLibrary));
|
||||
|
@ -156,12 +156,9 @@ function mapStateToProps(state) {
|
||||
return returnObj;
|
||||
}
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
{
|
||||
loadUnpublishedEntries,
|
||||
updateUnpublishedEntryStatus,
|
||||
publishUnpublishedEntry,
|
||||
deleteUnpublishedEntry,
|
||||
},
|
||||
)(translate()(Workflow));
|
||||
export default connect(mapStateToProps, {
|
||||
loadUnpublishedEntries,
|
||||
updateUnpublishedEntryStatus,
|
||||
publishUnpublishedEntry,
|
||||
deleteUnpublishedEntry,
|
||||
})(translate()(Workflow));
|
||||
|
@ -35,7 +35,10 @@ const runSerializer = (values, fields, method) => {
|
||||
|
||||
// Call recursively for fields within lists
|
||||
if (nestedFields && List.isList(value)) {
|
||||
return acc.set(fieldName, value.map(val => runSerializer(val, nestedFields, method)));
|
||||
return acc.set(
|
||||
fieldName,
|
||||
value.map(val => runSerializer(val, nestedFields, method)),
|
||||
);
|
||||
}
|
||||
|
||||
// Call recursively for fields within objects
|
||||
|
@ -21,7 +21,10 @@ describe('entries', () => {
|
||||
});
|
||||
|
||||
it('should handle loaded entries', () => {
|
||||
const entries = [{ slug: 'a', path: '' }, { slug: 'b', title: 'B' }];
|
||||
const entries = [
|
||||
{ slug: 'a', path: '' },
|
||||
{ slug: 'b', title: 'B' },
|
||||
];
|
||||
expect(
|
||||
reducer(initialState, actions.entriesLoaded(Map({ name: 'posts' }), entries, 0)),
|
||||
).toEqual(
|
||||
|
@ -51,13 +51,11 @@ export function createAssetProxy(value, fileObj, uploaded = false, privateUpload
|
||||
currentBackend(state.config).getToken,
|
||||
integration,
|
||||
);
|
||||
return provider
|
||||
.upload(fileObj, privateUpload)
|
||||
.then(
|
||||
response =>
|
||||
new AssetProxy(response.asset.url.replace(/^(https?):/, ''), null, true, response.asset),
|
||||
() => new AssetProxy(value, fileObj, false),
|
||||
);
|
||||
return provider.upload(fileObj, privateUpload).then(
|
||||
response =>
|
||||
new AssetProxy(response.asset.url.replace(/^(https?):/, ''), null, true, response.asset),
|
||||
() => new AssetProxy(value, fileObj, false),
|
||||
);
|
||||
} else if (privateUpload) {
|
||||
throw new Error('The Private Upload option is only available for Asset Store Integration');
|
||||
}
|
||||
|
Reference in New Issue
Block a user