Issue #3214412 by bnjmnm, tedbow: Build + prettier not run after yarn dependency update 3210633

(cherry picked from commit 8db131bd38)
merge-requests/688/head
catch 2021-05-17 21:30:23 +01:00
parent be844d5838
commit ce9a79e647
19 changed files with 143 additions and 169 deletions

View File

@ -74,7 +74,8 @@
attach(context) {
const $detailsElements = $(context).find('details').once('details');
DetailsSummarizedContent.instances = DetailsSummarizedContent.instances.concat(
DetailsSummarizedContent.instances =
DetailsSummarizedContent.instances.concat(
$detailsElements
.map((index, details) => new DetailsSummarizedContent(details))
.get(),

View File

@ -128,9 +128,8 @@
// Move the buttons to the jQuery UI dialog buttons area.
if (!response.dialogOptions.buttons) {
response.dialogOptions.drupalAutoButtons = true;
response.dialogOptions.buttons = Drupal.behaviors.dialog.prepareDialogButtons(
$dialog,
);
response.dialogOptions.buttons =
Drupal.behaviors.dialog.prepareDialogButtons($dialog);
}
// Bind dialogButtonsChange.

View File

@ -218,9 +218,8 @@
const $context = $(context);
const contextIsForm = $context.is('form');
if (trigger === 'unload') {
const $forms = (contextIsForm
? $context
: $context.find('form')
const $forms = (
contextIsForm ? $context : $context.find('form')
).removeOnce('form-updated');
if ($forms.length) {
$.makeArray($forms).forEach((form) => {

View File

@ -144,7 +144,8 @@
*
* @ignore
*/
'columnschange.TableHeader drupalToolbarTrayChange': tableHeaderResizeHandler,
'columnschange.TableHeader drupalToolbarTrayChange':
tableHeaderResizeHandler,
/**
* Recalculate TableHeader.topOffset when viewport is resized.

View File

@ -257,9 +257,8 @@
: [];
classes.push('ui-dialog--narrow');
dialogSettings.dialogClass = classes.join(' ');
dialogSettings.autoResize = window.matchMedia(
'(min-width: 600px)',
).matches;
dialogSettings.autoResize =
window.matchMedia('(min-width: 600px)').matches;
dialogSettings.width = 'auto';
// Add a "Loading…" message, hide it underneath the CKEditor toolbar,

View File

@ -141,7 +141,8 @@
// CKEDITOR.style is an immutable object: we cannot modify its
// definition to extend requiredContent. Hence we get the definition,
// modify it, and pass it to a new CKEDITOR.style instance.
const requiredContent = widgetDefinition.requiredContent.getDefinition();
const requiredContent =
widgetDefinition.requiredContent.getDefinition();
requiredContent.attributes['data-entity-type'] = '';
requiredContent.attributes['data-entity-uuid'] = '';
widgetDefinition.requiredContent = new CKEDITOR.style(requiredContent);
@ -156,12 +157,10 @@
// the element is already correct. We only need to update the element's
// data-entity-uuid attribute.
widgetDefinition.downcast = function (element) {
element.attributes['data-entity-type'] = this.data[
'data-entity-type'
];
element.attributes['data-entity-uuid'] = this.data[
'data-entity-uuid'
];
element.attributes['data-entity-type'] =
this.data['data-entity-type'];
element.attributes['data-entity-uuid'] =
this.data['data-entity-uuid'];
};
// We want to upcast <img> elements to a DOM structure required by the

View File

@ -90,7 +90,8 @@
// CKEDITOR.style is an immutable object: we cannot modify its
// definition to extend requiredContent. Hence we get the definition,
// modify it, and pass it to a new CKEDITOR.style instance.
const requiredContent = widgetDefinition.requiredContent.getDefinition();
const requiredContent =
widgetDefinition.requiredContent.getDefinition();
requiredContent.attributes['data-align'] = '';
requiredContent.attributes['data-caption'] = '';
widgetDefinition.requiredContent = new CKEDITOR.style(
@ -284,8 +285,8 @@
// widget.data.hasCaption as "changed" (e.g. when hasCaption === 0
// instead of hasCaption === false). This causes image2's "state
// shifter" to enter the wrong branch of the algorithm and blow up.
dialogReturnValues.attributes.hasCaption = !!dialogReturnValues
.attributes.hasCaption;
dialogReturnValues.attributes.hasCaption =
!!dialogReturnValues.attributes.hasCaption;
const actualWidget = saveCallback(dialogReturnValues);

View File

@ -244,9 +244,8 @@
// Get a Drupal.editorFeature object that contains all metadata for
// the feature that was just added or removed. Not every feature has
// such metadata.
let featureName = this.model.get('buttonsToFeatures')[
button.toLowerCase()
];
let featureName =
this.model.get('buttonsToFeatures')[button.toLowerCase()];
// Features without an associated command do not have a 'feature name' by
// default, so we use the lowercased button name instead.
if (!featureName) {

View File

@ -649,9 +649,8 @@
// If any filter's current status forbids the editor feature, return
// false.
Drupal.filterConfiguration.update();
return Object.keys(
Drupal.filterConfiguration.statuses,
).every((filterID) =>
return Object.keys(Drupal.filterConfiguration.statuses).every(
(filterID) =>
filterStatusAllowsFeature(
Drupal.filterConfiguration.statuses[filterID],
feature,
@ -920,24 +919,18 @@
clone.tags = this.tags.slice(0);
clone.allow = this.allow;
clone.restrictedTags.tags = this.restrictedTags.tags.slice(0);
clone.restrictedTags.allowed.attributes = this.restrictedTags.allowed.attributes.slice(
0,
);
clone.restrictedTags.allowed.styles = this.restrictedTags.allowed.styles.slice(
0,
);
clone.restrictedTags.allowed.classes = this.restrictedTags.allowed.classes.slice(
0,
);
clone.restrictedTags.forbidden.attributes = this.restrictedTags.forbidden.attributes.slice(
0,
);
clone.restrictedTags.forbidden.styles = this.restrictedTags.forbidden.styles.slice(
0,
);
clone.restrictedTags.forbidden.classes = this.restrictedTags.forbidden.classes.slice(
0,
);
clone.restrictedTags.allowed.attributes =
this.restrictedTags.allowed.attributes.slice(0);
clone.restrictedTags.allowed.styles =
this.restrictedTags.allowed.styles.slice(0);
clone.restrictedTags.allowed.classes =
this.restrictedTags.allowed.classes.slice(0);
clone.restrictedTags.forbidden.attributes =
this.restrictedTags.forbidden.attributes.slice(0);
clone.restrictedTags.forbidden.styles =
this.restrictedTags.forbidden.styles.slice(0);
clone.restrictedTags.forbidden.classes =
this.restrictedTags.forbidden.classes.slice(0);
return clone;
};
@ -989,9 +982,8 @@
// Update current rules.
if (Drupal.filterConfiguration.liveSettingParsers[filterID]) {
Drupal.filterConfiguration.statuses[
filterID
].rules = Drupal.filterConfiguration.liveSettingParsers[
Drupal.filterConfiguration.statuses[filterID].rules =
Drupal.filterConfiguration.liveSettingParsers[
filterID
].getRules();
}
@ -1029,9 +1021,8 @@
// Create a Drupal.FilterStatus object to track the state (whether it's
// active or not and its current settings, if any) of each filter.
Drupal.filterConfiguration.statuses[
filterID
] = new Drupal.FilterStatus(filterID);
Drupal.filterConfiguration.statuses[filterID] =
new Drupal.FilterStatus(filterID);
});
},
};

View File

@ -20,9 +20,8 @@
const currentValue = $(
'#edit-filters-filter-html-settings-allowed-html',
).val();
const rules = Drupal.behaviors.filterFilterHtmlUpdating._parseSetting(
currentValue,
);
const rules =
Drupal.behaviors.filterFilterHtmlUpdating._parseSetting(currentValue);
// Build a FilterHTMLRule that reflects the hard-coded behavior that
// strips all "style" attribute and all "on*" attributes.
@ -181,12 +180,10 @@
// always disallows the "style" attribute, so we only need to
// support "class" attribute value restrictions. Fix once
// https://www.drupal.org/node/2567801 lands.
filterRule.restrictedTags.allowed.attributes = featureRule.required.attributes.slice(
0,
);
filterRule.restrictedTags.allowed.classes = featureRule.required.classes.slice(
0,
);
filterRule.restrictedTags.allowed.attributes =
featureRule.required.attributes.slice(0);
filterRule.restrictedTags.allowed.classes =
featureRule.required.classes.slice(0);
editorRequiredTags[tag] = filterRule;
}
// The tag is already allowed, add any additionally allowed
@ -362,9 +359,8 @@
*/
Drupal.theme.filterFilterHTMLUpdateMessage = function (tags) {
let html = '';
const tagList = Drupal.behaviors.filterFilterHtmlUpdating._generateSetting(
tags,
);
const tagList =
Drupal.behaviors.filterFilterHtmlUpdating._generateSetting(tags);
html += '<p class="editor-update-message">';
html += Drupal.t(
'Based on the text editor configuration, these tags have automatically been added: <strong>@tag-list</strong>.',

View File

@ -324,9 +324,8 @@
const $layoutBuilderContentPreview = $('#layout-builder-content-preview');
// data-content-preview-id specifies the layout being edited.
const contentPreviewId = $layoutBuilderContentPreview.data(
'content-preview-id',
);
const contentPreviewId =
$layoutBuilderContentPreview.data('content-preview-id');
/**
* Tracks if content preview is enabled for this layout. Defaults to true

View File

@ -68,8 +68,10 @@
* This document's body element.
*/
function initQuickEdit(bodyElement) {
Drupal.quickedit.collections.entities = new Drupal.quickedit.EntityCollection();
Drupal.quickedit.collections.fields = new Drupal.quickedit.FieldCollection();
Drupal.quickedit.collections.entities =
new Drupal.quickedit.EntityCollection();
Drupal.quickedit.collections.fields =
new Drupal.quickedit.FieldCollection();
// Instantiate AppModel (application state) and AppView, which is the
// controller of the whole in-place editing experience.
@ -701,9 +703,8 @@
// Clear the Quick Edit metadata cache whenever the current user's set of
// permissions changes.
const permissionsHashKey = Drupal.quickedit.metadata._prefixFieldID(
'permissionsHash',
);
const permissionsHashKey =
Drupal.quickedit.metadata._prefixFieldID('permissionsHash');
const permissionsHashValue = storage.getItem(permissionsHashKey);
const permissionsHash = drupalSettings.user.permissionsHash;
if (permissionsHashValue !== permissionsHash) {

View File

@ -269,11 +269,8 @@
};
// Unsuccessfully saved; validation errors.
self.formSaveAjax.commands.quickeditFieldFormValidationErrors = function (
ajax,
response,
status,
) {
self.formSaveAjax.commands.quickeditFieldFormValidationErrors =
function (ajax, response, status) {
removeHiddenForm();
editorModel.set('validationErrors', response.data);
fieldModel.set('state', 'invalid');

View File

@ -258,9 +258,8 @@
case 3:
// Position against a highlighted field.
highlightedField = Drupal.quickedit.app.model.get(
'highlightedField',
);
highlightedField =
Drupal.quickedit.app.model.get('highlightedField');
of =
highlightedField &&
highlightedField.editorView &&
@ -274,8 +273,9 @@
let topMostField = null;
// Position against the topmost field.
for (let i = 0; i < fieldModels.length; i++) {
const pos = fieldModels[i].get('el').getBoundingClientRect()
.top;
const pos = fieldModels[i]
.get('el')
.getBoundingClientRect().top;
if (pos < topMostPosition) {
topMostPosition = pos;
topMostField = fieldModels[i];
@ -496,9 +496,8 @@
const activeFieldLabel =
activeField && activeField.get('metadata').label;
// Label of a highlighted field, if it exists.
const highlightedField = Drupal.quickedit.app.model.get(
'highlightedField',
);
const highlightedField =
Drupal.quickedit.app.model.get('highlightedField');
const highlightedFieldLabel =
highlightedField && highlightedField.get('metadata').label;
// The label is constructed in a priority order.

View File

@ -82,26 +82,23 @@
);
});
Drupal.toolbar.views.toolbarVisualView = new Drupal.toolbar.ToolbarVisualView(
{
Drupal.toolbar.views.toolbarVisualView =
new Drupal.toolbar.ToolbarVisualView({
el: this,
model,
strings: options.strings,
},
);
Drupal.toolbar.views.toolbarAuralView = new Drupal.toolbar.ToolbarAuralView(
{
});
Drupal.toolbar.views.toolbarAuralView =
new Drupal.toolbar.ToolbarAuralView({
el: this,
model,
strings: options.strings,
},
);
Drupal.toolbar.views.bodyVisualView = new Drupal.toolbar.BodyVisualView(
{
});
Drupal.toolbar.views.bodyVisualView =
new Drupal.toolbar.BodyVisualView({
el: this,
model,
},
);
});
// Force layout render to fix mobile view. Only needed on load, not
// for every media query match.
@ -111,13 +108,12 @@
// Render collapsible menus.
const menuModel = new Drupal.toolbar.MenuModel();
Drupal.toolbar.models.menuModel = menuModel;
Drupal.toolbar.views.menuVisualView = new Drupal.toolbar.MenuVisualView(
{
Drupal.toolbar.views.menuVisualView =
new Drupal.toolbar.MenuVisualView({
el: $(this).find('.toolbar-menu-administration').get(0),
model: menuModel,
strings: options.strings,
},
);
});
// Handle the resolution of Drupal.toolbar.setSubtrees.
// This is handled with a deferred so that the function may be invoked

View File

@ -62,9 +62,8 @@
return;
}
const action = tray === null ? Drupal.t('closed') : Drupal.t('opened');
const trayNameElement = relevantTray.querySelector(
'.toolbar-tray-name',
);
const trayNameElement =
relevantTray.querySelector('.toolbar-tray-name');
let text;
if (trayNameElement !== null) {
text = Drupal.t('Tray "@tray" @action.', {

View File

@ -30,9 +30,8 @@
pair = pairs[i].split('=');
// Ignore the 'q' path argument, if present.
if (pair[0] !== 'q' && pair[1]) {
args[
decodeURIComponent(pair[0].replace(/\+/g, ' '))
] = decodeURIComponent(pair[1].replace(/\+/g, ' '));
args[decodeURIComponent(pair[0].replace(/\+/g, ' '))] =
decodeURIComponent(pair[1].replace(/\+/g, ' '));
}
}
return args;

View File

@ -534,9 +534,9 @@
$description = $option.find('.description');
options[i] = {
// Search on the lowercase version of the title text + description.
searchText: `${$title
searchText: `${$title.text().toLowerCase()} ${$description
.text()
.toLowerCase()} ${$description.text().toLowerCase()}`,
.toLowerCase()}`,
// Maintain a reference to the jQuery object for each row, so we don't
// have to create a new object inside the performance-sensitive keyup
// handler.

View File

@ -189,9 +189,8 @@ module.exports = {
})
.drupalLogAndEnd({ onlyOnError: false });
},
'Test jquery.cookie Shim Read all when there are cookies or return empty object': (
browser,
) => {
'Test jquery.cookie Shim Read all when there are cookies or return empty object':
(browser) => {
browser
.getCookie('SIMPLETEST_USER_AGENT', (simpletestCookie) => {
const simpletestCookieValue = simpletestCookie.value;