azdo-cli 0.5.0-032-fix-code-generics.570 → 0.5.0-032-fix-code-generics.572

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +5 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1234,19 +1234,19 @@ var PLT = "@@PLT@@";
1234
1234
  var PGT = "@@PGT@@";
1235
1235
  function escapeAnglesInCodeElements(html) {
1236
1236
  return html.replace(/<code([^>]*)>([\s\S]*?)<\/code>/gi, (_, attrs, content) => {
1237
- const safe = content.split("&lt;").join(PLT).split("&gt;").join(PGT).replace(/</g, "&lt;").replace(/>/g, "&gt;").split(PLT).join("&lt;").split(PGT).join("&gt;");
1237
+ const safe = content.split("&lt;").join(PLT).split("&gt;").join(PGT).replaceAll("<", "&lt;").replaceAll(">", "&gt;").split(PLT).join("&lt;").split(PGT).join("&gt;");
1238
1238
  return `<code${attrs}>${safe}</code>`;
1239
1239
  });
1240
1240
  }
1241
1241
  function escapeAnglesInMarkdownCodeSpans(markdown) {
1242
1242
  return markdown.replace(/(?<!`)`([^`\n]+)`(?!`)/g, (_, inner) => {
1243
- const safe = inner.split("&lt;").join(PLT).split("&gt;").join(PGT).replace(/</g, "&lt;").replace(/>/g, "&gt;").split(PLT).join("&lt;").split(PGT).join("&gt;");
1243
+ const safe = inner.split("&lt;").join(PLT).split("&gt;").join(PGT).replaceAll("<", "&lt;").replaceAll(">", "&gt;").split(PLT).join("&lt;").split(PGT).join("&gt;");
1244
1244
  return "`" + safe + "`";
1245
1245
  });
1246
1246
  }
1247
1247
  function decodeEntitiesInMarkdownCodeSpans(text) {
1248
1248
  return text.replace(/(?<!`)`([^`\n]+)`(?!`)/g, (_, inner) => {
1249
- const decoded = inner.replace(/&lt;/g, "<").replace(/&gt;/g, ">");
1249
+ const decoded = inner.replaceAll("&lt;", "<").replaceAll("&gt;", ">");
1250
1250
  return "`" + decoded + "`";
1251
1251
  });
1252
1252
  }
@@ -5095,10 +5095,10 @@ async function addWorkItemRelation(context, cred, type, id1, id2) {
5095
5095
  const relType = await resolveRelationType(context, cred, type);
5096
5096
  const workItem = await getWorkItemWithRelations(context, cred, id1);
5097
5097
  const targetUrl = `https://dev.azure.com/${encodeURIComponent(context.org)}/_apis/wit/workItems/${id2}`;
5098
- const existing = (workItem.relations ?? []).find(
5098
+ const exists = (workItem.relations ?? []).some(
5099
5099
  (r) => r.rel === relType.referenceName && parseTargetId(r.url) === id2
5100
5100
  );
5101
- if (existing) {
5101
+ if (exists) {
5102
5102
  return { status: "already_exists", type: relType.name, referenceName: relType.referenceName, id1, id2 };
5103
5103
  }
5104
5104
  const patchUrl = buildWorkItemUrl2(context, id1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "azdo-cli",
3
- "version": "0.5.0-032-fix-code-generics.570",
3
+ "version": "0.5.0-032-fix-code-generics.572",
4
4
  "description": "Azure DevOps CLI tool",
5
5
  "type": "module",
6
6
  "bin": {