@eclipse-glsp/cli 2.9.0-next.2 → 2.9.0-next.4

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.
package/dist/cli.js CHANGED
@@ -4073,7 +4073,7 @@ var require_stringify = __commonJS({
4073
4073
  "use strict";
4074
4074
  var utils = require_utils();
4075
4075
  module2.exports = (ast, options = {}) => {
4076
- const stringify2 = (node, parent = {}) => {
4076
+ const stringify = (node, parent = {}) => {
4077
4077
  const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
4078
4078
  const invalidNode = node.invalid === true && options.escapeInvalid === true;
4079
4079
  let output = "";
@@ -4088,12 +4088,12 @@ var require_stringify = __commonJS({
4088
4088
  }
4089
4089
  if (node.nodes) {
4090
4090
  for (const child2 of node.nodes) {
4091
- output += stringify2(child2);
4091
+ output += stringify(child2);
4092
4092
  }
4093
4093
  }
4094
4094
  return output;
4095
4095
  };
4096
- return stringify2(ast);
4096
+ return stringify(ast);
4097
4097
  };
4098
4098
  }
4099
4099
  });
@@ -4347,7 +4347,7 @@ var require_fill_range = __commonJS({
4347
4347
  while (value[++index] === "0") ;
4348
4348
  return index > 0;
4349
4349
  };
4350
- var stringify2 = (start, end, options) => {
4350
+ var stringify = (start, end, options) => {
4351
4351
  if (typeof start === "string" || typeof end === "string") {
4352
4352
  return true;
4353
4353
  }
@@ -4442,7 +4442,7 @@ var require_fill_range = __commonJS({
4442
4442
  step = Math.max(Math.abs(step), 1);
4443
4443
  let padded = zeros(startString) || zeros(endString) || zeros(stepString);
4444
4444
  let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
4445
- let toNumber = padded === false && stringify2(start, end, options) === false;
4445
+ let toNumber = padded === false && stringify(start, end, options) === false;
4446
4446
  let format = options.transform || transform(toNumber);
4447
4447
  if (options.toRegex && step === 1) {
4448
4448
  return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
@@ -4576,7 +4576,7 @@ var require_expand = __commonJS({
4576
4576
  "../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/expand.js"(exports2, module2) {
4577
4577
  "use strict";
4578
4578
  var fill = require_fill_range();
4579
- var stringify2 = require_stringify();
4579
+ var stringify = require_stringify();
4580
4580
  var utils = require_utils();
4581
4581
  var append = (queue = "", stash = "", enclose = false) => {
4582
4582
  const result = [];
@@ -4611,7 +4611,7 @@ var require_expand = __commonJS({
4611
4611
  q = p.queue;
4612
4612
  }
4613
4613
  if (node.invalid || node.dollar) {
4614
- q.push(append(q.pop(), stringify2(node, options)));
4614
+ q.push(append(q.pop(), stringify(node, options)));
4615
4615
  return;
4616
4616
  }
4617
4617
  if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) {
@@ -4625,7 +4625,7 @@ var require_expand = __commonJS({
4625
4625
  }
4626
4626
  let range2 = fill(...args, options);
4627
4627
  if (range2.length === 0) {
4628
- range2 = stringify2(node, options);
4628
+ range2 = stringify(node, options);
4629
4629
  }
4630
4630
  q.push(append(q.pop(), range2));
4631
4631
  node.nodes = [];
@@ -4770,7 +4770,7 @@ var require_constants = __commonJS({
4770
4770
  var require_parse = __commonJS({
4771
4771
  "../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/parse.js"(exports2, module2) {
4772
4772
  "use strict";
4773
- var stringify2 = require_stringify();
4773
+ var stringify = require_stringify();
4774
4774
  var {
4775
4775
  MAX_LENGTH,
4776
4776
  CHAR_BACKSLASH,
@@ -4800,7 +4800,7 @@ var require_parse = __commonJS({
4800
4800
  CHAR_NO_BREAK_SPACE,
4801
4801
  CHAR_ZERO_WIDTH_NOBREAK_SPACE
4802
4802
  } = require_constants();
4803
- var parse3 = (input, options = {}) => {
4803
+ var parse2 = (input, options = {}) => {
4804
4804
  if (typeof input !== "string") {
4805
4805
  throw new TypeError("Expected a string");
4806
4806
  }
@@ -4942,7 +4942,7 @@ var require_parse = __commonJS({
4942
4942
  if (block.ranges > 0) {
4943
4943
  block.ranges = 0;
4944
4944
  const open2 = block.nodes.shift();
4945
- block.nodes = [open2, { type: "text", value: stringify2(block) }];
4945
+ block.nodes = [open2, { type: "text", value: stringify(block) }];
4946
4946
  }
4947
4947
  push({ type: "comma", value });
4948
4948
  block.commas++;
@@ -5000,7 +5000,7 @@ var require_parse = __commonJS({
5000
5000
  push({ type: "eos" });
5001
5001
  return ast;
5002
5002
  };
5003
- module2.exports = parse3;
5003
+ module2.exports = parse2;
5004
5004
  }
5005
5005
  });
5006
5006
 
@@ -5008,10 +5008,10 @@ var require_parse = __commonJS({
5008
5008
  var require_braces = __commonJS({
5009
5009
  "../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/index.js"(exports2, module2) {
5010
5010
  "use strict";
5011
- var stringify2 = require_stringify();
5011
+ var stringify = require_stringify();
5012
5012
  var compile = require_compile();
5013
5013
  var expand2 = require_expand();
5014
- var parse3 = require_parse();
5014
+ var parse2 = require_parse();
5015
5015
  var braces = (input, options = {}) => {
5016
5016
  let output = [];
5017
5017
  if (Array.isArray(input)) {
@@ -5031,12 +5031,12 @@ var require_braces = __commonJS({
5031
5031
  }
5032
5032
  return output;
5033
5033
  };
5034
- braces.parse = (input, options = {}) => parse3(input, options);
5034
+ braces.parse = (input, options = {}) => parse2(input, options);
5035
5035
  braces.stringify = (input, options = {}) => {
5036
5036
  if (typeof input === "string") {
5037
- return stringify2(braces.parse(input, options), options);
5037
+ return stringify(braces.parse(input, options), options);
5038
5038
  }
5039
- return stringify2(input, options);
5039
+ return stringify(input, options);
5040
5040
  };
5041
5041
  braces.compile = (input, options = {}) => {
5042
5042
  if (typeof input === "string") {
@@ -5895,7 +5895,7 @@ var require_parse2 = __commonJS({
5895
5895
  }
5896
5896
  return { risky: false };
5897
5897
  };
5898
- var parse3 = (input, options) => {
5898
+ var parse2 = (input, options) => {
5899
5899
  if (typeof input !== "string") {
5900
5900
  throw new TypeError("Expected a string");
5901
5901
  }
@@ -6066,7 +6066,7 @@ var require_parse2 = __commonJS({
6066
6066
  output = token.close = `)$))${extglobStar}`;
6067
6067
  }
6068
6068
  if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
6069
- const expression = parse3(rest, { ...options, fastpaths: false }).output;
6069
+ const expression = parse2(rest, { ...options, fastpaths: false }).output;
6070
6070
  output = token.close = `)${expression})${extglobStar})`;
6071
6071
  }
6072
6072
  if (token.prev.type === "bos") {
@@ -6591,7 +6591,7 @@ var require_parse2 = __commonJS({
6591
6591
  }
6592
6592
  return state;
6593
6593
  };
6594
- parse3.fastpaths = (input, options) => {
6594
+ parse2.fastpaths = (input, options) => {
6595
6595
  const opts = { ...options };
6596
6596
  const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
6597
6597
  const len = input.length;
@@ -6657,7 +6657,7 @@ var require_parse2 = __commonJS({
6657
6657
  }
6658
6658
  return source;
6659
6659
  };
6660
- module2.exports = parse3;
6660
+ module2.exports = parse2;
6661
6661
  }
6662
6662
  });
6663
6663
 
@@ -6667,7 +6667,7 @@ var require_picomatch = __commonJS({
6667
6667
  "use strict";
6668
6668
  var path29 = require("path");
6669
6669
  var scan = require_scan();
6670
- var parse3 = require_parse2();
6670
+ var parse2 = require_parse2();
6671
6671
  var utils = require_utils2();
6672
6672
  var constants = require_constants2();
6673
6673
  var isObject = (val) => val && typeof val === "object" && !Array.isArray(val);
@@ -6755,7 +6755,7 @@ var require_picomatch = __commonJS({
6755
6755
  picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
6756
6756
  picomatch.parse = (pattern, options) => {
6757
6757
  if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options));
6758
- return parse3(pattern, { ...options, fastpaths: false });
6758
+ return parse2(pattern, { ...options, fastpaths: false });
6759
6759
  };
6760
6760
  picomatch.scan = (input, options) => scan(input, options);
6761
6761
  picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
@@ -6781,10 +6781,10 @@ var require_picomatch = __commonJS({
6781
6781
  }
6782
6782
  let parsed = { negated: false, fastpaths: true };
6783
6783
  if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) {
6784
- parsed.output = parse3.fastpaths(input, options);
6784
+ parsed.output = parse2.fastpaths(input, options);
6785
6785
  }
6786
6786
  if (!parsed.output) {
6787
- parsed = parse3(input, options);
6787
+ parsed = parse2(input, options);
6788
6788
  }
6789
6789
  return picomatch.compileRe(parsed, options, returnOutput, returnState);
6790
6790
  };
@@ -11729,7 +11729,7 @@ var require_parse3 = __commonJS({
11729
11729
  "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/parse.js"(exports2, module2) {
11730
11730
  "use strict";
11731
11731
  var SemVer = require_semver();
11732
- var parse3 = (version2, options, throwErrors = false) => {
11732
+ var parse2 = (version2, options, throwErrors = false) => {
11733
11733
  if (version2 instanceof SemVer) {
11734
11734
  return version2;
11735
11735
  }
@@ -11742,7 +11742,7 @@ var require_parse3 = __commonJS({
11742
11742
  throw er;
11743
11743
  }
11744
11744
  };
11745
- module2.exports = parse3;
11745
+ module2.exports = parse2;
11746
11746
  }
11747
11747
  });
11748
11748
 
@@ -11750,9 +11750,9 @@ var require_parse3 = __commonJS({
11750
11750
  var require_valid = __commonJS({
11751
11751
  "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/valid.js"(exports2, module2) {
11752
11752
  "use strict";
11753
- var parse3 = require_parse3();
11753
+ var parse2 = require_parse3();
11754
11754
  var valid2 = (version2, options) => {
11755
- const v = parse3(version2, options);
11755
+ const v = parse2(version2, options);
11756
11756
  return v ? v.version : null;
11757
11757
  };
11758
11758
  module2.exports = valid2;
@@ -11763,9 +11763,9 @@ var require_valid = __commonJS({
11763
11763
  var require_clean = __commonJS({
11764
11764
  "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/clean.js"(exports2, module2) {
11765
11765
  "use strict";
11766
- var parse3 = require_parse3();
11766
+ var parse2 = require_parse3();
11767
11767
  var clean = (version2, options) => {
11768
- const s = parse3(version2.trim().replace(/^[=v]+/, ""), options);
11768
+ const s = parse2(version2.trim().replace(/^[=v]+/, ""), options);
11769
11769
  return s ? s.version : null;
11770
11770
  };
11771
11771
  module2.exports = clean;
@@ -11800,10 +11800,10 @@ var require_inc = __commonJS({
11800
11800
  var require_diff = __commonJS({
11801
11801
  "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/diff.js"(exports2, module2) {
11802
11802
  "use strict";
11803
- var parse3 = require_parse3();
11803
+ var parse2 = require_parse3();
11804
11804
  var diff = (version1, version2) => {
11805
- const v1 = parse3(version1, null, true);
11806
- const v2 = parse3(version2, null, true);
11805
+ const v1 = parse2(version1, null, true);
11806
+ const v2 = parse2(version2, null, true);
11807
11807
  const comparison = v1.compare(v2);
11808
11808
  if (comparison === 0) {
11809
11809
  return null;
@@ -11874,9 +11874,9 @@ var require_patch = __commonJS({
11874
11874
  var require_prerelease = __commonJS({
11875
11875
  "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/prerelease.js"(exports2, module2) {
11876
11876
  "use strict";
11877
- var parse3 = require_parse3();
11877
+ var parse2 = require_parse3();
11878
11878
  var prerelease2 = (version2, options) => {
11879
- const parsed = parse3(version2, options);
11879
+ const parsed = parse2(version2, options);
11880
11880
  return parsed && parsed.prerelease.length ? parsed.prerelease : null;
11881
11881
  };
11882
11882
  module2.exports = prerelease2;
@@ -12062,7 +12062,7 @@ var require_coerce = __commonJS({
12062
12062
  "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/coerce.js"(exports2, module2) {
12063
12063
  "use strict";
12064
12064
  var SemVer = require_semver();
12065
- var parse3 = require_parse3();
12065
+ var parse2 = require_parse3();
12066
12066
  var { safeRe: re, t } = require_re();
12067
12067
  var coerce = (version2, options) => {
12068
12068
  if (version2 instanceof SemVer) {
@@ -12097,7 +12097,7 @@ var require_coerce = __commonJS({
12097
12097
  const patch = match2[4] || "0";
12098
12098
  const prerelease2 = options.includePrerelease && match2[5] ? `-${match2[5]}` : "";
12099
12099
  const build2 = options.includePrerelease && match2[6] ? `+${match2[6]}` : "";
12100
- return parse3(`${major2}.${minor2}.${patch}${prerelease2}${build2}`, options);
12100
+ return parse2(`${major2}.${minor2}.${patch}${prerelease2}${build2}`, options);
12101
12101
  };
12102
12102
  module2.exports = coerce;
12103
12103
  }
@@ -12107,7 +12107,7 @@ var require_coerce = __commonJS({
12107
12107
  var require_truncate = __commonJS({
12108
12108
  "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/truncate.js"(exports2, module2) {
12109
12109
  "use strict";
12110
- var parse3 = require_parse3();
12110
+ var parse2 = require_parse3();
12111
12111
  var constants = require_constants4();
12112
12112
  var SemVer = require_semver();
12113
12113
  var truncate = (version2, truncation, options) => {
@@ -12119,7 +12119,7 @@ var require_truncate = __commonJS({
12119
12119
  };
12120
12120
  var cloneInputVersion = (version2, options) => {
12121
12121
  const versionStringToParse = version2 instanceof SemVer ? version2.version : version2;
12122
- return parse3(versionStringToParse, options);
12122
+ return parse2(versionStringToParse, options);
12123
12123
  };
12124
12124
  var doTruncation = (version2, truncation) => {
12125
12125
  if (isPrerelease(truncation)) {
@@ -13163,7 +13163,7 @@ var require_semver2 = __commonJS({
13163
13163
  var constants = require_constants4();
13164
13164
  var SemVer = require_semver();
13165
13165
  var identifiers = require_identifiers();
13166
- var parse3 = require_parse3();
13166
+ var parse2 = require_parse3();
13167
13167
  var valid2 = require_valid();
13168
13168
  var clean = require_clean();
13169
13169
  var inc2 = require_inc();
@@ -13202,7 +13202,7 @@ var require_semver2 = __commonJS({
13202
13202
  var simplifyRange = require_simplify();
13203
13203
  var subset = require_subset();
13204
13204
  module2.exports = {
13205
- parse: parse3,
13205
+ parse: parse2,
13206
13206
  valid: valid2,
13207
13207
  clean,
13208
13208
  inc: inc2,
@@ -14720,7 +14720,7 @@ var require_stringify2 = __commonJS({
14720
14720
  props.push(doc.directives.tagString(tag));
14721
14721
  return props.join(" ");
14722
14722
  }
14723
- function stringify2(item, ctx, onComment, onChompKeep) {
14723
+ function stringify(item, ctx, onComment, onChompKeep) {
14724
14724
  if (identity.isPair(item))
14725
14725
  return item.toString(ctx, onComment, onChompKeep);
14726
14726
  if (identity.isAlias(item)) {
@@ -14749,7 +14749,7 @@ var require_stringify2 = __commonJS({
14749
14749
  ${ctx.indent}${str}`;
14750
14750
  }
14751
14751
  exports2.createStringifyContext = createStringifyContext;
14752
- exports2.stringify = stringify2;
14752
+ exports2.stringify = stringify;
14753
14753
  }
14754
14754
  });
14755
14755
 
@@ -14759,7 +14759,7 @@ var require_stringifyPair = __commonJS({
14759
14759
  "use strict";
14760
14760
  var identity = require_identity();
14761
14761
  var Scalar = require_Scalar();
14762
- var stringify2 = require_stringify2();
14762
+ var stringify = require_stringify2();
14763
14763
  var stringifyComment = require_stringifyComment();
14764
14764
  function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
14765
14765
  const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
@@ -14781,7 +14781,7 @@ var require_stringifyPair = __commonJS({
14781
14781
  });
14782
14782
  let keyCommentDone = false;
14783
14783
  let chompKeep = false;
14784
- let str = stringify2.stringify(key, ctx, () => keyCommentDone = true, () => chompKeep = true);
14784
+ let str = stringify.stringify(key, ctx, () => keyCommentDone = true, () => chompKeep = true);
14785
14785
  if (!explicitKey && !ctx.inFlow && str.length > 1024) {
14786
14786
  if (simpleKeys)
14787
14787
  throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
@@ -14833,7 +14833,7 @@ ${indent}:`;
14833
14833
  ctx.indent = ctx.indent.substring(2);
14834
14834
  }
14835
14835
  let valueCommentDone = false;
14836
- const valueStr = stringify2.stringify(value, ctx, () => valueCommentDone = true, () => chompKeep = true);
14836
+ const valueStr = stringify.stringify(value, ctx, () => valueCommentDone = true, () => chompKeep = true);
14837
14837
  let ws = " ";
14838
14838
  if (keyComment || vsb || vcb) {
14839
14839
  ws = vsb ? "\n" : "";
@@ -14974,7 +14974,7 @@ var require_addPairToJSMap = __commonJS({
14974
14974
  "use strict";
14975
14975
  var log2 = require_log();
14976
14976
  var merge = require_merge();
14977
- var stringify2 = require_stringify2();
14977
+ var stringify = require_stringify2();
14978
14978
  var identity = require_identity();
14979
14979
  var toJS = require_toJS();
14980
14980
  function addPairToJSMap(ctx, map, { key, value }) {
@@ -15010,7 +15010,7 @@ var require_addPairToJSMap = __commonJS({
15010
15010
  if (typeof jsKey !== "object")
15011
15011
  return String(jsKey);
15012
15012
  if (identity.isNode(key) && ctx?.doc) {
15013
- const strCtx = stringify2.createStringifyContext(ctx.doc, {});
15013
+ const strCtx = stringify.createStringifyContext(ctx.doc, {});
15014
15014
  strCtx.anchors = /* @__PURE__ */ new Set();
15015
15015
  for (const node of ctx.anchors.keys())
15016
15016
  strCtx.anchors.add(node.anchor);
@@ -15077,12 +15077,12 @@ var require_stringifyCollection = __commonJS({
15077
15077
  "../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/stringify/stringifyCollection.js"(exports2) {
15078
15078
  "use strict";
15079
15079
  var identity = require_identity();
15080
- var stringify2 = require_stringify2();
15080
+ var stringify = require_stringify2();
15081
15081
  var stringifyComment = require_stringifyComment();
15082
15082
  function stringifyCollection(collection, ctx, options) {
15083
15083
  const flow = ctx.inFlow ?? collection.flow;
15084
- const stringify3 = flow ? stringifyFlowCollection : stringifyBlockCollection;
15085
- return stringify3(collection, ctx, options);
15084
+ const stringify2 = flow ? stringifyFlowCollection : stringifyBlockCollection;
15085
+ return stringify2(collection, ctx, options);
15086
15086
  }
15087
15087
  function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) {
15088
15088
  const { indent, options: { commentString } } = ctx;
@@ -15107,7 +15107,7 @@ var require_stringifyCollection = __commonJS({
15107
15107
  }
15108
15108
  }
15109
15109
  chompKeep = false;
15110
- let str2 = stringify2.stringify(item, itemCtx, () => comment2 = null, () => chompKeep = true);
15110
+ let str2 = stringify.stringify(item, itemCtx, () => comment2 = null, () => chompKeep = true);
15111
15111
  if (comment2)
15112
15112
  str2 += stringifyComment.lineComment(str2, itemIndent, commentString(comment2));
15113
15113
  if (chompKeep && comment2)
@@ -15174,7 +15174,7 @@ ${indent}${line}` : "\n";
15174
15174
  }
15175
15175
  if (comment)
15176
15176
  reqNewline = true;
15177
- let str = stringify2.stringify(item, itemCtx, () => comment = null);
15177
+ let str = stringify.stringify(item, itemCtx, () => comment = null);
15178
15178
  reqNewline || (reqNewline = lines.length > linesAtValue || str.includes("\n"));
15179
15179
  if (i < items.length - 1) {
15180
15180
  str += ",";
@@ -16535,7 +16535,7 @@ var require_stringifyDocument = __commonJS({
16535
16535
  "../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/stringify/stringifyDocument.js"(exports2) {
16536
16536
  "use strict";
16537
16537
  var identity = require_identity();
16538
- var stringify2 = require_stringify2();
16538
+ var stringify = require_stringify2();
16539
16539
  var stringifyComment = require_stringifyComment();
16540
16540
  function stringifyDocument(doc, options) {
16541
16541
  const lines = [];
@@ -16550,7 +16550,7 @@ var require_stringifyDocument = __commonJS({
16550
16550
  }
16551
16551
  if (hasDirectives)
16552
16552
  lines.push("---");
16553
- const ctx = stringify2.createStringifyContext(doc, options);
16553
+ const ctx = stringify.createStringifyContext(doc, options);
16554
16554
  const { commentString } = ctx.options;
16555
16555
  if (doc.commentBefore) {
16556
16556
  if (lines.length !== 1)
@@ -16572,7 +16572,7 @@ var require_stringifyDocument = __commonJS({
16572
16572
  contentComment = doc.contents.comment;
16573
16573
  }
16574
16574
  const onChompKeep = contentComment ? void 0 : () => chompKeep = true;
16575
- let body = stringify2.stringify(doc.contents, ctx, () => contentComment = null, onChompKeep);
16575
+ let body = stringify.stringify(doc.contents, ctx, () => contentComment = null, onChompKeep);
16576
16576
  if (contentComment)
16577
16577
  body += stringifyComment.lineComment(body, "", commentString(contentComment));
16578
16578
  if ((body[0] === "|" || body[0] === ">") && lines[lines.length - 1] === "---") {
@@ -16580,7 +16580,7 @@ var require_stringifyDocument = __commonJS({
16580
16580
  } else
16581
16581
  lines.push(body);
16582
16582
  } else {
16583
- lines.push(stringify2.stringify(doc.contents, ctx));
16583
+ lines.push(stringify.stringify(doc.contents, ctx));
16584
16584
  }
16585
16585
  if (doc.directives?.docEnd) {
16586
16586
  if (doc.comment) {
@@ -18715,7 +18715,7 @@ var require_cst_scalar = __commonJS({
18715
18715
  var require_cst_stringify = __commonJS({
18716
18716
  "../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/parse/cst-stringify.js"(exports2) {
18717
18717
  "use strict";
18718
- var stringify2 = (cst) => "type" in cst ? stringifyToken(cst) : stringifyItem(cst);
18718
+ var stringify = (cst) => "type" in cst ? stringifyToken(cst) : stringifyItem(cst);
18719
18719
  function stringifyToken(token) {
18720
18720
  switch (token.type) {
18721
18721
  case "block-scalar": {
@@ -18768,7 +18768,7 @@ var require_cst_stringify = __commonJS({
18768
18768
  res += stringifyToken(value);
18769
18769
  return res;
18770
18770
  }
18771
- exports2.stringify = stringify2;
18771
+ exports2.stringify = stringify;
18772
18772
  }
18773
18773
  });
18774
18774
 
@@ -20479,7 +20479,7 @@ var require_public_api = __commonJS({
20479
20479
  }
20480
20480
  return doc;
20481
20481
  }
20482
- function parse3(src, reviver, options) {
20482
+ function parse2(src, reviver, options) {
20483
20483
  let _reviver = void 0;
20484
20484
  if (typeof reviver === "function") {
20485
20485
  _reviver = reviver;
@@ -20498,7 +20498,7 @@ var require_public_api = __commonJS({
20498
20498
  }
20499
20499
  return doc.toJS(Object.assign({ reviver: _reviver }, options));
20500
20500
  }
20501
- function stringify2(value, replacer, options) {
20501
+ function stringify(value, replacer, options) {
20502
20502
  let _replacer = null;
20503
20503
  if (typeof replacer === "function" || Array.isArray(replacer)) {
20504
20504
  _replacer = replacer;
@@ -20520,10 +20520,10 @@ var require_public_api = __commonJS({
20520
20520
  return value.toString(options);
20521
20521
  return new Document2.Document(value, _replacer, options).toString(options);
20522
20522
  }
20523
- exports2.parse = parse3;
20523
+ exports2.parse = parse2;
20524
20524
  exports2.parseAllDocuments = parseAllDocuments;
20525
20525
  exports2.parseDocument = parseDocument2;
20526
- exports2.stringify = stringify2;
20526
+ exports2.stringify = stringify;
20527
20527
  }
20528
20528
  });
20529
20529
 
@@ -23252,7 +23252,7 @@ var child = __toESM(require("child_process"));
23252
23252
  var path6 = __toESM(require("path"));
23253
23253
 
23254
23254
  // package.json
23255
- var version = "2.9.0-next.2";
23255
+ var version = "2.9.0-next.4";
23256
23256
 
23257
23257
  // src/util/logger.ts
23258
23258
  var levels = {
@@ -24027,9 +24027,10 @@ var VersionType;
24027
24027
  }
24028
24028
  VersionType2.deriveVersion = deriveVersion;
24029
24029
  })(VersionType || (VersionType = {}));
24030
- function npmVersionExists(packageName, version2) {
24030
+ function npmVersionExists(packageName, version2, registry) {
24031
+ const registryArg = registry ? ` --registry ${registry}` : "";
24031
24032
  try {
24032
- const result = exec(`npm view ${packageName}@${version2} version`, { silent: true }).trim();
24033
+ const result = exec(`npm view ${packageName}@${version2} version${registryArg}`, { silent: true }).trim();
24033
24034
  return result.trim() === version2;
24034
24035
  } catch {
24035
24036
  return false;
@@ -24559,6 +24560,21 @@ async function publishNext(options) {
24559
24560
  publishNames = void 0;
24560
24561
  }
24561
24562
  }
24563
+ const candidates = publishNames ?? packages.filter((pkg) => !pkg.content.private).map((pkg) => pkg.name);
24564
+ const toPublish = candidates.filter((name) => {
24565
+ if (npmVersionExists(name, canary.version, options.registry)) {
24566
+ LOGGER.info(`Skipping ${name}@${canary.version} - already published`);
24567
+ return false;
24568
+ }
24569
+ return true;
24570
+ });
24571
+ if (toPublish.length === 0) {
24572
+ LOGGER.info("All affected package versions are already published. Nothing to publish.");
24573
+ return;
24574
+ }
24575
+ if (toPublish.length < candidates.length) {
24576
+ publishNames = toPublish;
24577
+ }
24562
24578
  applyVersions(packages, canary, pinnedVersions, options);
24563
24579
  await pnpmPublish("next", options, publishNames);
24564
24580
  }
@@ -24638,7 +24654,7 @@ async function publishLatest(options) {
24638
24654
  }
24639
24655
  const publicPackages = getWorkspacePackages(options.repoDir).filter((pkg) => !pkg.content.private);
24640
24656
  const unpublished = publicPackages.filter((pkg) => {
24641
- if (npmVersionExists(pkg.name, pkg.content.version)) {
24657
+ if (npmVersionExists(pkg.name, pkg.content.version, options.registry)) {
24642
24658
  LOGGER.info(`Skipping ${pkg.name}@${pkg.content.version} - already published`);
24643
24659
  return false;
24644
24660
  }
@@ -25987,50 +26003,69 @@ for (const repo of GLSPRepo.choices) {
25987
26003
 
25988
26004
  // src/commands/update-next.ts
25989
26005
  var path28 = __toESM(require("path"));
25990
- var YAML2 = __toESM(require_dist());
25991
- var UpdateNextCommand = baseCommand().name("updateNext").alias("u").description("Updates all `next` dependencies in GLSP project to the latest version").argument("[rootDir]", "The repository root", validateGitDirectory, process.cwd()).option("-v, --verbose", "Enable verbose (debug) log output", false).action(updateNext);
26006
+ var GLSP_SCOPES = ["@eclipse-glsp/", "@eclipse-glsp-examples/"];
26007
+ var NEXT_VERSION_PATTERN = /^\d+\.\d+\.\d+-next(\.\d+)?$/;
26008
+ var UpdateNextCommand = baseCommand().name("updateNext").alias("u").description("Updates all pinned `next` dependencies in a GLSP project to the currently published 'next' versions").argument("[rootDir]", "The repository root", validateGitDirectory, process.cwd()).option("-v, --verbose", "Enable verbose (debug) log output", false).action(updateNext);
25992
26009
  async function updateNext(rootDir, options) {
25993
26010
  configureLogger(options.verbose);
25994
- const rootPkgPath = path28.join(rootDir, "package.json");
25995
- if (getUncommittedChanges(rootDir).includes(rootPkgPath)) {
25996
- LOGGER.warn("Uncommitted changes in root `package.json`. Please commit or stash them before running this command.");
26011
+ rootDir = path28.resolve(rootDir);
26012
+ const packages = getWorkspacePackages(rootDir, true);
26013
+ const manifestPaths = new Set(packages.map((pkg) => pkg.filePath));
26014
+ if (getUncommittedChanges(rootDir).some((file) => manifestPaths.has(file))) {
26015
+ LOGGER.warn("Uncommitted changes in workspace `package.json` files. Please commit or stash them before running this command.");
25997
26016
  return;
25998
26017
  }
25999
26018
  configureExec({ silent: false, fatal: true });
26000
26019
  LOGGER.info("Updating next dependencies ...");
26001
- rootDir = path28.resolve(rootDir);
26002
- const packages = getWorkspacePackages(rootDir, true);
26003
26020
  LOGGER.debug(`Scanning ${packages.length} packages for 'next' dependencies`, packages);
26004
26021
  const versions = resolveNextVersions(getNextDependencies(packages));
26005
26022
  if (Object.keys(versions).length === 0) {
26006
26023
  LOGGER.info("No next dependencies found");
26007
26024
  return;
26008
26025
  }
26009
- LOGGER.info("Upgrade and rebuild packages ...");
26010
- LOGGER.debug("Pinning next dependencies via pnpm-workspace.yaml overrides", versions);
26011
- const workspaceYamlPath = path28.join(rootDir, "pnpm-workspace.yaml");
26012
- const originalYaml = readFile(workspaceYamlPath);
26013
- const workspace = YAML2.parse(originalYaml) ?? {};
26014
- workspace.overrides = { ...workspace.overrides, ...versions };
26015
- writeFile(workspaceYamlPath, YAML2.stringify(workspace));
26016
- try {
26017
- await execAsync("pnpm install", { silent: false, cwd: rootDir });
26018
- } finally {
26019
- LOGGER.debug("Restoring pnpm-workspace.yaml");
26020
- writeFile(workspaceYamlPath, originalYaml);
26026
+ let updates = 0;
26027
+ for (const pkg of packages) {
26028
+ let pkgChanged = false;
26029
+ for (const deps of dependencySections(pkg)) {
26030
+ for (const [dep, range2] of Object.entries(deps)) {
26031
+ const version2 = versions[dep];
26032
+ if (version2 && isNextDependency(dep, range2) && range2 !== version2) {
26033
+ LOGGER.info(`${pkg.name}: ${dep} ${range2} -> ${version2}`);
26034
+ deps[dep] = version2;
26035
+ pkgChanged = true;
26036
+ updates++;
26037
+ }
26038
+ }
26039
+ }
26040
+ if (pkgChanged) {
26041
+ pkg.write();
26042
+ }
26043
+ }
26044
+ if (updates === 0) {
26045
+ LOGGER.info("All next dependencies are already up to date");
26046
+ return;
26021
26047
  }
26048
+ LOGGER.info(`Updated ${updates} next dependencies. Installing ...`);
26022
26049
  await execAsync("pnpm install", { silent: false, cwd: rootDir });
26023
26050
  LOGGER.info("Upgrade successfully completed");
26024
26051
  }
26052
+ function dependencySections(pkg) {
26053
+ return [pkg.content.dependencies, pkg.content.devDependencies, pkg.content.peerDependencies].filter(
26054
+ (deps) => deps !== void 0
26055
+ );
26056
+ }
26057
+ function isNextDependency(name, range2) {
26058
+ if (range2 === "next") {
26059
+ return true;
26060
+ }
26061
+ return NEXT_VERSION_PATTERN.test(range2) && GLSP_SCOPES.some((scope) => name.startsWith(scope));
26062
+ }
26025
26063
  function getNextDependencies(packages) {
26026
26064
  const dependencies = [];
26027
26065
  for (const pkg of packages) {
26028
- const allDeps = {
26029
- ...pkg.content.dependencies || {},
26030
- ...pkg.content.devDependencies || {},
26031
- ...pkg.content.peerDependencies || {}
26032
- };
26033
- dependencies.push(...Object.keys(allDeps).filter((dep) => allDeps[dep] === "next"));
26066
+ for (const deps of dependencySections(pkg)) {
26067
+ dependencies.push(...Object.keys(deps).filter((dep) => isNextDependency(dep, deps[dep])));
26068
+ }
26034
26069
  }
26035
26070
  const nextDeps = [...new Set(dependencies)];
26036
26071
  LOGGER.debug(`Found ${nextDeps.length} 'next' dependencies`, nextDeps);