@swmansion/argent 0.33.1-next.13 → 0.33.1-next.14

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-cmds.mjs CHANGED
@@ -9093,7 +9093,7 @@ function spawnToolsServer(paths, port, options = {}) {
9093
9093
  "error",
9094
9094
  (err) => reject(
9095
9095
  new Error(
9096
- err.code === "ENOENT" && nodeBin === "node" ? "Could not start the argent tool-server: `node` was not found on PATH. Install Node.js 20+ or add it to PATH." : `Could not start the argent tool-server: ${err.message}`
9096
+ err.code === "ENOENT" && nodeBin === "node" ? "Could not start the argent tool-server: `node` was not found on PATH. Install Node.js 22.18+ or add it to PATH." : `Could not start the argent tool-server: ${err.message}`
9097
9097
  )
9098
9098
  )
9099
9099
  );
@@ -35877,7 +35877,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
35877
35877
  var SESSION_ID2 = randomUUID5();
35878
35878
  function readCliVersion() {
35879
35879
  if (true) {
35880
- return "0.33.1-next.13";
35880
+ return "0.33.1-next.14";
35881
35881
  }
35882
35882
  return "0.0.0";
35883
35883
  }
package/dist/client.js CHANGED
@@ -8432,7 +8432,7 @@ function spawnToolsServer(paths, port, options = {}) {
8432
8432
  "error",
8433
8433
  (err) => reject(
8434
8434
  new Error(
8435
- err.code === "ENOENT" && nodeBin === "node" ? "Could not start the argent tool-server: `node` was not found on PATH. Install Node.js 20+ or add it to PATH." : `Could not start the argent tool-server: ${err.message}`
8435
+ err.code === "ENOENT" && nodeBin === "node" ? "Could not start the argent tool-server: `node` was not found on PATH. Install Node.js 22.18+ or add it to PATH." : `Could not start the argent tool-server: ${err.message}`
8436
8436
  )
8437
8437
  )
8438
8438
  );
@@ -16986,7 +16986,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
16986
16986
  var SESSION_ID = randomUUID4();
16987
16987
  function readCliVersion() {
16988
16988
  if (true) {
16989
- return "0.33.1-next.13";
16989
+ return "0.33.1-next.14";
16990
16990
  }
16991
16991
  return "0.0.0";
16992
16992
  }
@@ -24574,7 +24574,7 @@ function spawnToolsServer(paths, port, options = {}) {
24574
24574
  "error",
24575
24575
  (err) => reject(
24576
24576
  new Error(
24577
- err.code === "ENOENT" && nodeBin === "node" ? "Could not start the argent tool-server: `node` was not found on PATH. Install Node.js 20+ or add it to PATH." : `Could not start the argent tool-server: ${err.message}`
24577
+ err.code === "ENOENT" && nodeBin === "node" ? "Could not start the argent tool-server: `node` was not found on PATH. Install Node.js 22.18+ or add it to PATH." : `Could not start the argent tool-server: ${err.message}`
24578
24578
  )
24579
24579
  )
24580
24580
  );
@@ -101278,7 +101278,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
101278
101278
  var SESSION_ID = (0, import_node_crypto3.randomUUID)();
101279
101279
  function readCliVersion() {
101280
101280
  if (true) {
101281
- return "0.33.1-next.13";
101281
+ return "0.33.1-next.14";
101282
101282
  }
101283
101283
  return "0.0.0";
101284
101284
  }
@@ -180075,7 +180075,7 @@ var FlowScriptExecutor = class {
180075
180075
  * life of the process.
180076
180076
  */
180077
180077
  stripsTypes() {
180078
- this.typeStripping ??= probeTypeStripping();
180078
+ this.typeStripping ??= probeTypeStripping(this.options.nodeOptions ?? []);
180079
180079
  return this.typeStripping;
180080
180080
  }
180081
180081
  async execute(request3) {
@@ -180234,7 +180234,8 @@ var FlowScriptExecutor = class {
180234
180234
  `--max-old-space-size=${bounds.heapLimitMb}`,
180235
180235
  "--import",
180236
180236
  (0, import_node_url3.pathToFileURL)(runnerPath).href,
180237
- ...typelessPackageWarningFlags()
180237
+ TYPELESS_PACKAGE_WARNING_FLAG,
180238
+ ...this.options.nodeOptions ?? []
180238
180239
  ],
180239
180240
  // Index 3 is a sink, and the protocol channel sits above it. The
180240
180241
  // channel is inherited by the script, Node parses it inside its own
@@ -180616,9 +180617,7 @@ function realPathOrSelf(candidate) {
180616
180617
  return candidate;
180617
180618
  }
180618
180619
  }
180619
- function typelessPackageWarningFlags() {
180620
- return process.allowedNodeEnvironmentFlags.has("--disable-warning") ? ["--disable-warning=MODULE_TYPELESS_PACKAGE_JSON"] : [];
180621
- }
180620
+ var TYPELESS_PACKAGE_WARNING_FLAG = "--disable-warning=MODULE_TYPELESS_PACKAGE_JSON";
180622
180621
  function resolveRunnerPath(runnerDir) {
180623
180622
  const dir = runnerDir ?? __dirname;
180624
180623
  const runner = path53.join(dir, RUNNER_FILE);
@@ -180630,7 +180629,7 @@ function resolveRunnerPath(runnerDir) {
180630
180629
  }
180631
180630
  return runner;
180632
180631
  }
180633
- function probeTypeStripping() {
180632
+ function probeTypeStripping(nodeOptions) {
180634
180633
  return new Promise((resolve19) => {
180635
180634
  let env;
180636
180635
  try {
@@ -180643,7 +180642,7 @@ function probeTypeStripping() {
180643
180642
  try {
180644
180643
  (0, import_node_child_process48.execFile)(
180645
180644
  process.execPath,
180646
- ["-p", "process.features.typescript"],
180645
+ [...nodeOptions, "-p", "process.features.typescript"],
180647
180646
  { env, timeout: TYPE_STRIPPING_PROBE_TIMEOUT_MS, windowsHide: true },
180648
180647
  (err, stdout) => {
180649
180648
  const answer = err ? "" : stdout.trim();
@@ -181099,28 +181098,17 @@ function cjsRenameNote(failure2, canonical) {
181099
181098
  return " A script step does not accept a .cjs file: use import in the script instead.";
181100
181099
  }
181101
181100
  var NODE_CJS_RENAME_ADVICE = /rename it to use the '\.cjs' file extension/;
181102
- var TYPESCRIPT_MIN_NODE = "22.18";
181103
- function nodeStripsTypes(version3 = process.versions.node) {
181104
- const [major2 = 0, minor = 0] = version3.split(".").map(Number);
181105
- if (major2 >= 24) return true;
181106
- if (major2 === 23) return minor >= 6;
181107
- return major2 === 22 && minor >= 18;
181108
- }
181109
- function typeScriptGap(strips, version3 = process.versions.node) {
181110
- if (strips === true) return void 0;
181111
- if (!nodeStripsTypes(version3)) return "release";
181112
- return strips === false ? "build" : void 0;
181113
- }
181114
- function typeScriptRefusalReason(subject2, gap, version3 = process.versions.node, javaScript = ".mjs") {
181115
- const host = gap === "release" ? `the tool-server runs on Node.js ${version3}, which cannot run it. Node.js runs TypeScript from ${TYPESCRIPT_MIN_NODE}, except on 23.0 to 23.5. Stop the tool-server with \`argent server stop\`, then run Argent on such a Node.js,` : `the tool-server runs on a build of Node.js ${version3} that cannot run it: the build has no TypeScript support, like the nodejs package of Debian and Ubuntu. Stop the tool-server with \`argent server stop\`, then run Argent on a Node.js from nodejs.org,`;
181116
- return `${subject2}, and ${host} or use JavaScript (${javaScript}) for the script and for the files it imports.`;
181101
+ function cannotRunTypeScript(strips) {
181102
+ return strips === false;
181103
+ }
181104
+ function typeScriptRefusalReason(subject2, version3 = process.versions.node, javaScript = ".mjs") {
181105
+ return `${subject2}, and the tool-server runs on Node.js ${version3}, which cannot run it: this Node.js has no TypeScript support. A release older than Argent supports has none, and neither has the nodejs package of Debian and Ubuntu. Stop the tool-server with \`argent server stop\`, then run Argent on a current Node.js from nodejs.org, or use JavaScript (${javaScript}) for the script and for the files it imports.`;
181117
181106
  }
181118
181107
  async function typeScriptScriptRefusal(target) {
181119
181108
  if (!isTypeScriptScript(path54.posix.basename(target))) return void 0;
181120
- const gap = typeScriptGap(await flowScriptExecutor().stripsTypes());
181121
- return gap && typeScriptRefusalReason(
181109
+ if (!cannotRunTypeScript(await flowScriptExecutor().stripsTypes())) return void 0;
181110
+ return typeScriptRefusalReason(
181122
181111
  `Script "${target}" is TypeScript`,
181123
- gap,
181124
181112
  void 0,
181125
181113
  javaScriptSpelling(target)
181126
181114
  );
@@ -181130,10 +181118,9 @@ async function typeScriptLoadRefusal(target, result, roots) {
181130
181118
  if (result.ok || !result.failure) return void 0;
181131
181119
  const file2 = unloadedTypeScriptFile(result.failure);
181132
181120
  if (file2 === void 0) return void 0;
181133
- const gap = typeScriptGap(await flowScriptExecutor().stripsTypes());
181134
- return gap && typeScriptRefusalReason(
181121
+ if (!cannotRunTypeScript(await flowScriptExecutor().stripsTypes())) return void 0;
181122
+ return typeScriptRefusalReason(
181135
181123
  `Script "${target}" loads the TypeScript file "${readablePath(file2, roots)}"`,
181136
- gap,
181137
181124
  void 0,
181138
181125
  javaScriptSpelling(target)
181139
181126
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swmansion/argent",
3
- "version": "0.33.1-next.13",
3
+ "version": "0.33.1-next.14",
4
4
  "mcpName": "io.github.software-mansion/argent",
5
5
  "description": "MCP server for iOS Simulator, Android Emulator, Chromium app and Mac app control",
6
6
  "license": "Apache-2.0",
@@ -51,7 +51,7 @@
51
51
  },
52
52
  "private": false,
53
53
  "engines": {
54
- "node": ">=20.12.0"
54
+ "node": "^22.18.0 || >=23.8.0"
55
55
  },
56
56
  "publishConfig": {
57
57
  "registry": "https://registry.npmjs.org",
@@ -254,7 +254,7 @@ Use the map form shown above. A bare `script: scripts/seed.mjs` is invalid.
254
254
 
255
255
  `path` is relative to the test file that contains the step. Use an `.mjs` or `.js` file, or an `.mts` or `.ts` file for TypeScript, and match the file name's letter case. `timeout` is in milliseconds, as in `e2e-add-script`.
256
256
 
257
- `.mjs` and `.mts` are always ES modules. `.js` and `.ts` take their module type from the project's `package.json` `type` field; with no `type`, Node 20.19+ and 22.7+ read a file with `import`, `export` or top-level `await` as an ES module, and older Node reads every such file as CommonJS. So prefer `.mjs` or `.mts` for a new script and use `.js` or `.ts` for a script the project already has. `.cjs` and `.cts` are invalid: under `"type": "module"`, use `import` in the script, not `require`.
257
+ `.mjs` and `.mts` are always ES modules. `.js` and `.ts` take their module type from the project's `package.json` `type` field; with no `type`, Node reads a file with `import`, `export` or top-level `await` as an ES module, and each other file as CommonJS. So prefer `.mjs` or `.mts` for a new script and use `.js` or `.ts` for a script the project already has. `.cjs` and `.cts` are invalid: under `"type": "module"`, use `import` in the script, not `require`.
258
258
 
259
259
  Node runs `.mts` and `.ts` by removing the types, and it does not read `tsconfig.json`. In an `.mts` or `.ts` script:
260
260