mirror of
https://github.com/google/blockly.git
synced 2026-01-08 09:30:06 +01:00
chore(deps): Bump prettier from 2.8.8 to 3.0.0 (#7322)
* chore(deps): Bump prettier from 2.8.8 to 3.0.0 Bumps [prettier](https://github.com/prettier/prettier) from 2.8.8 to 3.0.0. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/2.8.8...3.0.0) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * chore: Reformat using Prettier v3.0 defaults The main change is to add trailing commas to the last line of block-formatted function calls. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Christopher Allen <cpcallen+git@google.com>
This commit is contained in:
@@ -136,7 +136,7 @@ export class InsertionMarkerManager {
|
||||
|
||||
if (this.lastOnStack) {
|
||||
this.lastMarker = this.createMarkerBlock(
|
||||
this.lastOnStack.getSourceBlock()
|
||||
this.lastOnStack.getSourceBlock(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -311,7 +311,7 @@ export class InsertionMarkerManager {
|
||||
*/
|
||||
private shouldUpdatePreviews(
|
||||
newCandidate: CandidateConnection | null,
|
||||
dxy: Coordinate
|
||||
dxy: Coordinate,
|
||||
): boolean {
|
||||
// Only need to update if we were showing a preview before.
|
||||
if (!newCandidate) return !!this.activeCandidate;
|
||||
@@ -404,18 +404,18 @@ export class InsertionMarkerManager {
|
||||
*/
|
||||
private shouldDelete(
|
||||
newCandidate: boolean,
|
||||
dragTarget: IDragTarget | null
|
||||
dragTarget: IDragTarget | null,
|
||||
): boolean {
|
||||
if (dragTarget) {
|
||||
const componentManager = this.workspace.getComponentManager();
|
||||
const isDeleteArea = componentManager.hasCapability(
|
||||
dragTarget.id,
|
||||
ComponentManager.Capability.DELETE_AREA
|
||||
ComponentManager.Capability.DELETE_AREA,
|
||||
);
|
||||
if (isDeleteArea) {
|
||||
return (dragTarget as IDeleteArea).wouldDelete(
|
||||
this.topBlock,
|
||||
newCandidate
|
||||
newCandidate,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -462,7 +462,7 @@ export class InsertionMarkerManager {
|
||||
const method = renderer.getConnectionPreviewMethod(
|
||||
activeCandidate.closest,
|
||||
activeCandidate.local,
|
||||
this.topBlock
|
||||
this.topBlock,
|
||||
);
|
||||
|
||||
switch (method) {
|
||||
@@ -552,14 +552,14 @@ export class InsertionMarkerManager {
|
||||
if (!insertionMarker) {
|
||||
throw new Error(
|
||||
'Cannot show the insertion marker because there is no insertion ' +
|
||||
'marker block'
|
||||
'marker block',
|
||||
);
|
||||
}
|
||||
let imConn;
|
||||
try {
|
||||
imConn = insertionMarker.getMatchingConnection(
|
||||
local.getSourceBlock(),
|
||||
local
|
||||
local,
|
||||
);
|
||||
} catch (e) {
|
||||
// It's possible that the number of connections on the local block has
|
||||
@@ -571,7 +571,7 @@ export class InsertionMarkerManager {
|
||||
if (isLastInStack && this.lastOnStack) {
|
||||
this.disposeInsertionMarker(this.lastMarker);
|
||||
this.lastMarker = this.createMarkerBlock(
|
||||
this.lastOnStack.getSourceBlock()
|
||||
this.lastOnStack.getSourceBlock(),
|
||||
);
|
||||
insertionMarker = this.lastMarker;
|
||||
} else {
|
||||
@@ -583,26 +583,26 @@ export class InsertionMarkerManager {
|
||||
if (!insertionMarker) {
|
||||
throw new Error(
|
||||
'Cannot show the insertion marker because there is no insertion ' +
|
||||
'marker block'
|
||||
'marker block',
|
||||
);
|
||||
}
|
||||
imConn = insertionMarker.getMatchingConnection(
|
||||
local.getSourceBlock(),
|
||||
local
|
||||
local,
|
||||
);
|
||||
}
|
||||
|
||||
if (!imConn) {
|
||||
throw new Error(
|
||||
'Cannot show the insertion marker because there is no ' +
|
||||
'associated connection'
|
||||
'associated connection',
|
||||
);
|
||||
}
|
||||
|
||||
if (imConn === this.markerConnection) {
|
||||
throw new Error(
|
||||
"Made it to showInsertionMarker_ even though the marker isn't " +
|
||||
'changing'
|
||||
'changing',
|
||||
);
|
||||
}
|
||||
|
||||
@@ -648,7 +648,7 @@ export class InsertionMarkerManager {
|
||||
if (markerConn.targetConnection) {
|
||||
throw Error(
|
||||
'markerConnection still connected at the end of ' +
|
||||
'disconnectInsertionMarker'
|
||||
'disconnectInsertionMarker',
|
||||
);
|
||||
}
|
||||
|
||||
@@ -678,12 +678,12 @@ export class InsertionMarkerManager {
|
||||
if (!this.activeCandidate) {
|
||||
throw new Error(
|
||||
'Cannot hide the insertion marker outline because ' +
|
||||
'there is no active candidate'
|
||||
'there is no active candidate',
|
||||
);
|
||||
}
|
||||
this.highlightedBlock.highlightShapeForInput(
|
||||
this.activeCandidate.closest,
|
||||
false
|
||||
false,
|
||||
);
|
||||
this.highlightedBlock = null;
|
||||
}
|
||||
@@ -700,7 +700,7 @@ export class InsertionMarkerManager {
|
||||
if (!this.fadedBlock) {
|
||||
throw new Error(
|
||||
'Cannot show the replacement fade because the ' +
|
||||
'closest connection does not have a target block'
|
||||
'closest connection does not have a target block',
|
||||
);
|
||||
}
|
||||
this.fadedBlock.fadeForReplacement(true);
|
||||
|
||||
Reference in New Issue
Block a user