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

chore(deps-dev): bump xo from 0.56.0 to 0.57.0 #373

Closed
wants to merge 2 commits into from
Closed
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
3 changes: 2 additions & 1 deletion lib/body.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@
this.grippers = {};

for (const [partName, part] of Object.entries(parameter_)) {
if (Object.prototype.hasOwnProperty.call(part, 'joint_names')) {

Check failure on line 37 in lib/body.js

View workflow job for this annotation

GitHub Actions / build (16)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.

Check failure on line 37 in lib/body.js

View workflow job for this annotation

GitHub Actions / build (18)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.

Check failure on line 37 in lib/body.js

View workflow job for this annotation

GitHub Actions / build (16)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.

Check failure on line 37 in lib/body.js

View workflow job for this annotation

GitHub Actions / build (18)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.
this.jointNames[partName] = part.joint_names;
}

if (Object.prototype.hasOwnProperty.call(part, 'default_configurations')) {

Check failure on line 41 in lib/body.js

View workflow job for this annotation

GitHub Actions / build (16)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.

Check failure on line 41 in lib/body.js

View workflow job for this annotation

GitHub Actions / build (18)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.

Check failure on line 41 in lib/body.js

View workflow job for this annotation

GitHub Actions / build (16)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.

Check failure on line 41 in lib/body.js

View workflow job for this annotation

GitHub Actions / build (18)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.
this.defaultConfigurations[partName] = part.default_configurations;
}

if (Object.prototype.hasOwnProperty.call(part, 'ac_gripper')) {

Check failure on line 45 in lib/body.js

View workflow job for this annotation

GitHub Actions / build (16)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.

Check failure on line 45 in lib/body.js

View workflow job for this annotation

GitHub Actions / build (18)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.

Check failure on line 45 in lib/body.js

View workflow job for this annotation

GitHub Actions / build (16)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.

Check failure on line 45 in lib/body.js

View workflow job for this annotation

GitHub Actions / build (18)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.
this.grippers[partName] = new ActionClient({
ros,
serverName: part.ac_gripper,
Expand Down Expand Up @@ -93,7 +93,7 @@
sendGripperGoal(cmd) {
console.log('Robot body: gripper goal:', cmd);

if (!Object.prototype.hasOwnProperty.call(this.grippers, cmd.side)) {

Check failure on line 96 in lib/body.js

View workflow job for this annotation

GitHub Actions / build (16)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.

Check failure on line 96 in lib/body.js

View workflow job for this annotation

GitHub Actions / build (18)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.

Check failure on line 96 in lib/body.js

View workflow job for this annotation

GitHub Actions / build (16)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.

Check failure on line 96 in lib/body.js

View workflow job for this annotation

GitHub Actions / build (18)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.
console.error(`Gripper command side must be one of [${Object.keys(this.grippers)}]. Right now, it is '${cmd.side}'`);
return;
}
Expand All @@ -120,7 +120,8 @@
command: {
/* eslint camelcase:0 */
direction,
max_torque: 10},
max_torque: 10,
},
},
});

Expand Down
2 changes: 1 addition & 1 deletion lib/ed-robocup.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default class EdRobocup extends Ed {
}

create_walls(callback) {
callback = callback || _.noop;
callback ||= _.noop;
this.createWallsService.callService({}, () => {
callback();
});
Expand Down
9 changes: 5 additions & 4 deletions lib/ed.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
// update object
const oldObject = this.entities.get(id);

if (Object.prototype.hasOwnProperty.call(entity, 'pose')) {

Check failure on line 92 in lib/ed.js

View workflow job for this annotation

GitHub Actions / build (16)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.

Check failure on line 92 in lib/ed.js

View workflow job for this annotation

GitHub Actions / build (18)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.

Check failure on line 92 in lib/ed.js

View workflow job for this annotation

GitHub Actions / build (16)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.

Check failure on line 92 in lib/ed.js

View workflow job for this annotation

GitHub Actions / build (18)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.
const {position, quaternion} = parseEdPosition(entity.pose);
newObject.position = position;
newObject.quaternion = quaternion;
Expand All @@ -99,11 +99,11 @@
oldObject.quaternion && (newObject.quaternion = oldObject.quaternion);
}

if (Object.prototype.hasOwnProperty.call(entity, 'mesh')) {

Check failure on line 102 in lib/ed.js

View workflow job for this annotation

GitHub Actions / build (16)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.

Check failure on line 102 in lib/ed.js

View workflow job for this annotation

GitHub Actions / build (18)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.

Check failure on line 102 in lib/ed.js

View workflow job for this annotation

GitHub Actions / build (16)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.

Check failure on line 102 in lib/ed.js

View workflow job for this annotation

GitHub Actions / build (18)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.
const {vertices, faces} = parseEdMesh(entity.mesh);
newObject.vertices = vertices;
newObject.faces = faces;
} else if (Object.prototype.hasOwnProperty.call(entity, 'convex_hull')) {

Check failure on line 106 in lib/ed.js

View workflow job for this annotation

GitHub Actions / build (16)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.

Check failure on line 106 in lib/ed.js

View workflow job for this annotation

GitHub Actions / build (18)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.

Check failure on line 106 in lib/ed.js

View workflow job for this annotation

GitHub Actions / build (16)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.

Check failure on line 106 in lib/ed.js

View workflow job for this annotation

GitHub Actions / build (18)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.
const {vertices, faces} = parseEdConvexHull(entity.convex_hull);
newObject.vertices = vertices;
newObject.faces = faces;
Expand All @@ -116,24 +116,24 @@
this.entities.set(id, newObject);

// only queue full objects for update
const props = ['position', 'quaternion', 'vertices', 'faces'];
if (props.every(key => key in newObject)) {
const properties = ['position', 'quaternion', 'vertices', 'faces'];
if (properties.every(key => key in newObject)) {
update.push([newObject, oldObject]);
}
} else {
// add object

if (Object.prototype.hasOwnProperty.call(entity, 'pose')) {

Check failure on line 126 in lib/ed.js

View workflow job for this annotation

GitHub Actions / build (16)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.

Check failure on line 126 in lib/ed.js

View workflow job for this annotation

GitHub Actions / build (18)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.

Check failure on line 126 in lib/ed.js

View workflow job for this annotation

GitHub Actions / build (16)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.

Check failure on line 126 in lib/ed.js

View workflow job for this annotation

GitHub Actions / build (18)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.
const {position, quaternion} = parseEdPosition(entity.pose);
newObject.position = position;
newObject.quaternion = quaternion;
}

if (Object.prototype.hasOwnProperty.call(entity, 'mesh')) {

Check failure on line 132 in lib/ed.js

View workflow job for this annotation

GitHub Actions / build (16)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.

Check failure on line 132 in lib/ed.js

View workflow job for this annotation

GitHub Actions / build (18)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.

Check failure on line 132 in lib/ed.js

View workflow job for this annotation

GitHub Actions / build (16)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.

Check failure on line 132 in lib/ed.js

View workflow job for this annotation

GitHub Actions / build (18)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.
const {vertices, faces} = parseEdMesh(entity.mesh);
newObject.vertices = vertices;
newObject.faces = faces;
} else if (Object.prototype.hasOwnProperty.call(entity, 'convex_hull')) {

Check failure on line 136 in lib/ed.js

View workflow job for this annotation

GitHub Actions / build (16)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.

Check failure on line 136 in lib/ed.js

View workflow job for this annotation

GitHub Actions / build (18)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.

Check failure on line 136 in lib/ed.js

View workflow job for this annotation

GitHub Actions / build (16)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.

Check failure on line 136 in lib/ed.js

View workflow job for this annotation

GitHub Actions / build (18)

Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'.
const {vertices, faces} = parseEdConvexHull(entity.convex_hull);
newObject.vertices = vertices;
newObject.faces = faces;
Expand All @@ -142,8 +142,8 @@
this.entities.set(id, newObject);

// only queue full objects for update
const props = ['position', 'quaternion', 'vertices', 'faces'];
if (props.every(key => key in newObject)) {
const properties = ['position', 'quaternion', 'vertices', 'faces'];
if (properties.every(key => key in newObject)) {
add.push(newObject);
}
}
Expand Down Expand Up @@ -192,6 +192,7 @@

// Calculate side triangles
for (let i = 0; i < chull.points.length; i++) {
// eslint-disable-next-line unicorn/prevent-abbreviations
const j = (i + 1) % chull.points.length;
faces.push([j * 2, (i * 2) + 1, i * 2], [j * 2, (j * 2) + 1, (i * 2) + 1]);
}
Expand Down
12 changes: 6 additions & 6 deletions lib/hardware.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ function diagnosticMessageToStatus(message) {

// return all possible actions for a hardware part
function getActions(name, part) {
const props = properties[name];
if (!props) {
const properties_ = properties[name];
if (!properties_) {
return null;
}

Expand All @@ -233,7 +233,7 @@ function getActions(name, part) {
const actions = {};

// only show the home action if homeable
if (props.homeable) {
if (properties_.homeable) {
actions.home = {
enabled: level === levels.IDLE,
warning: homed
Expand All @@ -243,8 +243,8 @@ function getActions(name, part) {

// always show start action
actions.start = {
enabled: level === levels.IDLE && (homed || !props.homeable_mandatory),
warning: props.homeable && !homed
enabled: level === levels.IDLE && (homed || !properties_.homeable_mandatory),
warning: properties_.homeable && !homed
? 'This part is not yet homed, Are you sure you want to proceed?' : false,
};

Expand All @@ -260,7 +260,7 @@ function getActions(name, part) {
};

// only show reset action if resetable
if (props.resetable) {
if (properties_.resetable) {
actions.reset = {
enabled: level === levels.ERROR,
};
Expand Down
Loading