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:
parent
e00aab2a8b
commit
ead46af194
@ -119,7 +119,7 @@
|
||||
"nock": "^11.0.0",
|
||||
"node-fetch": "^2.3.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"prettier": "1.18.2",
|
||||
"prettier": "^1.19.1",
|
||||
"react-test-renderer": "^16.8.4",
|
||||
"rimraf": "^3.0.0",
|
||||
"simple-git": "^1.124.0",
|
||||
|
@ -627,9 +627,11 @@ export default class API {
|
||||
const metadata = await this.retrieveMetadata(contentKey);
|
||||
// mark media files to remove
|
||||
const metadataMediaFiles = get(metadata, 'objects.files', []);
|
||||
const mediaFilesToRemove = differenceBy(metadataMediaFiles, mediaFilesList, 'path').map(
|
||||
file => ({ ...file, remove: true }),
|
||||
);
|
||||
const mediaFilesToRemove = differenceBy(
|
||||
metadataMediaFiles,
|
||||
mediaFilesList,
|
||||
'path',
|
||||
).map(file => ({ ...file, remove: true }));
|
||||
const branchData = await this.getBranch(branchName);
|
||||
const changeTree = await this.updateTree(
|
||||
branchData.commit.sha,
|
||||
|
@ -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');
|
||||
}
|
||||
|
@ -30,7 +30,8 @@ export default class ImplicitAuthenticator {
|
||||
document.location.protocol !== 'https:' &&
|
||||
// TODO: Is insecure localhost a bad idea as well? I don't think it is, since you are not actually
|
||||
// sending the token over the internet in this case, assuming the auth URL is secure.
|
||||
(document.location.hostname !== 'localhost' && document.location.hostname !== '127.0.0.1')
|
||||
document.location.hostname !== 'localhost' &&
|
||||
document.location.hostname !== '127.0.0.1'
|
||||
) {
|
||||
return cb(new Error('Cannot authenticate over insecure protocol!'));
|
||||
}
|
||||
|
@ -38,7 +38,12 @@ function onKeyDown(event, change) {
|
||||
.collapseToStartOf(newBlock);
|
||||
}
|
||||
|
||||
const marks = [['b', 'bold'], ['i', 'italic'], ['s', 'strikethrough'], ['`', 'code']];
|
||||
const marks = [
|
||||
['b', 'bold'],
|
||||
['i', 'italic'],
|
||||
['s', 'strikethrough'],
|
||||
['`', 'code'],
|
||||
];
|
||||
|
||||
const [, markName] = marks.find(([key]) => isHotkey(`mod+${key}`, event)) || [];
|
||||
|
||||
|
@ -10126,10 +10126,10 @@ prelude-ls@~1.1.2:
|
||||
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
|
||||
integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=
|
||||
|
||||
prettier@1.18.2:
|
||||
version "1.18.2"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.18.2.tgz#6823e7c5900017b4bd3acf46fe9ac4b4d7bda9ea"
|
||||
integrity sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw==
|
||||
prettier@^1.19.1:
|
||||
version "1.19.1"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"
|
||||
integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==
|
||||
|
||||
pretty-format@^24.0.0, pretty-format@^24.3.0, pretty-format@^24.7.0, pretty-format@^24.9.0:
|
||||
version "24.9.0"
|
||||
|
Loading…
x
Reference in New Issue
Block a user