@zuplo/cli 6.35.13 → 6.38.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"invoke-test.d.ts","sourceRoot":"","sources":["../../src/test/invoke-test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,eAAe,EAAE,MAAM,OAAO,CAAC;AAG/C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AASzC,wBAAsB,QAAQ,CAC5B,IAAI,EAAE,SAAS,GACd,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,CAAC,CAyBpD"}
1
+ {"version":3,"file":"invoke-test.d.ts","sourceRoot":"","sources":["../../src/test/invoke-test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,eAAe,EAAE,MAAM,OAAO,CAAC;AAG/C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AASzC,wBAAsB,QAAQ,CAC5B,IAAI,EAAE,SAAS,GACd,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,CAAC,CAkCpD"}
@@ -14,7 +14,11 @@ export async function runTests(argv) {
14
14
  if (argv.filter) {
15
15
  args.push("--test-name-pattern", argv.filter);
16
16
  }
17
- args.push(`${argv.dir}/${TEST_OUT_FOLDER}`);
17
+ const nodeVersion = parseInt(process.versions.node.split(".")[0], 10);
18
+ const globPattern = nodeVersion >= 21
19
+ ? `${argv.dir}/${TEST_OUT_FOLDER}/**/*.test.mjs`
20
+ : `${argv.dir}/${TEST_OUT_FOLDER}`;
21
+ args.push(globPattern);
18
22
  const nodeProcess = execa(nodeExecutable, args);
19
23
  nodeProcess.stdout?.pipe(process.stdout);
20
24
  nodeProcess.stderr?.pipe(process.stderr);
@@ -1 +1 @@
1
- {"version":3,"file":"invoke-test.js","sourceRoot":"","sources":["../../src/test/invoke-test.ts"],"names":[],"m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AE,CAAC;QACpC,CAAC;IACH,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,0BAA0B,EAAE,CAAC;IACzC,CAAC;AACH,CAAC","sourcesContent":["import { execa, ExecaReturnBase } from \"execa\";\nimport { TEST_OUT_FOLDER } from \"../common/constants.js\";\nimport { logger } from \"../common/logger.js\";\nimport { Arguments } from \"./handler.js\";\n\nclass MissingNodeExecutableError extends Error {\n constructor() {\n super(\"Missing executable: Cannot locate node executable\");\n Object.setPrototypeOf(this, MissingNodeExecutableError.prototype);\n }\n}\n\nexport async function runTests(\n argv: Arguments\n): Promise<Pick<ExecaReturnBase<string>, \"exitCode\">> {\n // Assume that \"node\" is in the path\n const nodeExecutable = process.platform === \"win32\" ? \"node.exe\" : \"node\";\n if (nodeExecutable) {\n const args = [\"--test\", \"--test-reporter=spec\"];\n if (argv.filter) {\n args.push(\"--test-name-pattern\", argv.filter);\n }\n args.push(`${argv.dir}/${TEST_OUT_FOLDER}`);\n\n const nodeProcess = execa(nodeExecutable, args);\n nodeProcess.stdout?.pipe(process.stdout);\n nodeProcess.stderr?.pipe(process.stderr);\n try {\n const result = await nodeProcess;\n return result;\n } catch (err) {\n // We do not want to output the err by default since it could be a test failure\n // Test failures are already reported by piping stdout and stderr above\n logger.debug(err);\n return { exitCode: err.exitCode };\n }\n } else {\n throw new MissingNodeExecutableError();\n }\n}\n"]}
1
+ {"version":3,"file":"invoke-test.js","sourceRoot":"","sources":["../../src/test/invoke-test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAmB,MAAM,OAAO,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG7C,MAAM,0BAA2B,SAAQ,KAAK;IAC5C;QACE,KAAK,CAAC,mDAAmD,CAAC,CAAC;QAC3D,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,0BAA0B,CAAC,SAAS,CAAC,CAAC;I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CAAC;QACN,MAAM,IAAI,0BAA0B,EAAE,CAAC;IACzC,CAAC;AACH,CAAC","sourcesContent":["import { execa, ExecaReturnBase } from \"execa\";\nimport { TEST_OUT_FOLDER } from \"../common/constants.js\";\nimport { logger } from \"../common/logger.js\";\nimport { Arguments } from \"./handler.js\";\n\nclass MissingNodeExecutableError extends Error {\n constructor() {\n super(\"Missing executable: Cannot locate node executable\");\n Object.setPrototypeOf(this, MissingNodeExecutableError.prototype);\n }\n}\n\nexport async function runTests(\n argv: Arguments\n): Promise<Pick<ExecaReturnBase<string>, \"exitCode\">> {\n // Assume that \"node\" is in the path\n const nodeExecutable = process.platform === \"win32\" ? \"node.exe\" : \"node\";\n if (nodeExecutable) {\n const args = [\"--test\", \"--test-reporter=spec\"];\n if (argv.filter) {\n args.push(\"--test-name-pattern\", argv.filter);\n }\n\n // Check Node.js version to determine glob pattern\n // See https://github.com/nodejs/node/pull/47653#issuecomment-1692984053\n const nodeVersion = parseInt(process.versions.node.split(\".\")[0], 10);\n const globPattern =\n nodeVersion >= 21\n ? `${argv.dir}/${TEST_OUT_FOLDER}/**/*.test.mjs`\n : `${argv.dir}/${TEST_OUT_FOLDER}`;\n\n args.push(globPattern);\n\n const nodeProcess = execa(nodeExecutable, args);\n nodeProcess.stdout?.pipe(process.stdout);\n nodeProcess.stderr?.pipe(process.stderr);\n try {\n const result = await nodeProcess;\n return result;\n } catch (err) {\n // We do not want to output the err by default since it could be a test failure\n // Test failures are already reported by piping stdout and stderr above\n logger.debug(err);\n return { exitCode: err.exitCode };\n }\n } else {\n throw new MissingNodeExecutableError();\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zuplo/cli",
3
- "version": "6.35.13",
3
+ "version": "6.38.0",
4
4
  "repository": "https://github.com/zuplo/zuplo",
5
5
  "author": "Zuplo, Inc.",
6
6
  "type": "module",
@@ -29,8 +29,8 @@
29
29
  "@opentelemetry/api": "^1.8.0",
30
30
  "@sentry/node": "^8.50.0",
31
31
  "@swc/core": "1.7.22",
32
- "@zuplo/core": "^6.35.13",
33
- "@zuplo/runtime": "^6.35.13",
32
+ "@zuplo/core": "^6.38.0",
33
+ "@zuplo/runtime": "^6.38.0",
34
34
  "as-table": "^1.0.55",
35
35
  "chalk": "^5.3.0",
36
36
  "chokidar": "^3.5.3",