poku 4.3.0 → 4.3.1-canary.bb9d437f

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.
@@ -21,7 +21,7 @@ exports.results = {
21
21
  skipped: 0,
22
22
  todo: 0,
23
23
  };
24
- exports.VERSION = '4.3.0';
24
+ exports.VERSION = '4.3.1-canary.bb9d437f';
25
25
  exports.deepOptions = [];
26
26
  exports.GLOBAL = {
27
27
  cwd: (0, node_process_1.cwd)(),
@@ -28,7 +28,6 @@ const backgroundProcess = (runtime, args, file, options) => new Promise((resolve
28
28
  const PID = service.pid;
29
29
  service.stdout.setEncoding('utf8');
30
30
  service.stderr.setEncoding('utf8');
31
- let portBackup;
32
31
  const end = (port) => new Promise((resolve) => {
33
32
  try {
34
33
  runningProcesses.delete(PID);
@@ -58,7 +57,7 @@ const backgroundProcess = (runtime, args, file, options) => new Promise((resolve
58
57
  return;
59
58
  }
60
59
  });
61
- runningProcesses.set(PID, { end, port: portBackup });
60
+ runningProcesses.set(PID, end);
62
61
  service.stdout.on('data', (data) => {
63
62
  if (!isResolved && typeof options?.startAfter !== 'number') {
64
63
  const stringData = JSON.stringify(String(data));
@@ -86,7 +85,7 @@ const backgroundProcess = (runtime, args, file, options) => new Promise((resolve
86
85
  options?.verbose && (0, write_js_1.log)(data);
87
86
  });
88
87
  service.on('error', (err) => {
89
- end(portBackup);
88
+ end();
90
89
  reject(`Service failed to start: ${err}`);
91
90
  });
92
91
  service.on('close', (code) => {
@@ -95,7 +94,7 @@ const backgroundProcess = (runtime, args, file, options) => new Promise((resolve
95
94
  });
96
95
  const timeout = setTimeout(() => {
97
96
  if (!isResolved) {
98
- end(portBackup);
97
+ end();
99
98
  reject(`createService: Timeout\nFile: ${file}`);
100
99
  }
101
100
  }, options?.timeout || 60000);
@@ -138,6 +137,6 @@ const startScript = (script, options) => {
138
137
  };
139
138
  exports.startScript = startScript;
140
139
  node_process_1.default.once('SIGINT', async () => {
141
- for (const { end, port } of runningProcesses.values())
142
- await end(port);
140
+ for (const end of runningProcesses.values())
141
+ await end();
143
142
  });
@@ -112,10 +112,6 @@ async function itCore(titleOrCb, cb) {
112
112
  if (get_arg_js_1.hasOnly) {
113
113
  if (!poku_js_1.GLOBAL.runAsOnly)
114
114
  return;
115
- if (typeof titleOrCb === 'string' && typeof cb === 'function')
116
- return (0, exports.itBase)(titleOrCb, cb);
117
- if (typeof titleOrCb === 'function')
118
- return (0, exports.itBase)(titleOrCb);
119
115
  }
120
116
  if (typeof titleOrCb === 'string' && cb)
121
117
  return (0, exports.itBase)(titleOrCb, cb);
@@ -6,7 +6,7 @@ const node_path_1 = require("node:path");
6
6
  const list_files_js_1 = require("../modules/helpers/list-files.js");
7
7
  const regex = {
8
8
  extFilter: /\.(js|cjs|mjs|ts|cts|mts)$/,
9
- dependecy: /['"](\.{1,2}\/[^'"]+)['"]/,
9
+ dependency: /['"`](\.{1,2}\/[^'"`]+)['"`]/,
10
10
  dotBar: /(\.\/)/g,
11
11
  sep: /[/\\]+/g,
12
12
  dot: /^\.+/,
@@ -23,7 +23,7 @@ const getDeepImports = (content) => {
23
23
  if (line.indexOf('import') !== -1 ||
24
24
  line.indexOf('require') !== -1 ||
25
25
  line.indexOf(' from ') !== -1) {
26
- const path = line.match(regex.dependecy);
26
+ const path = line.match(regex.dependency);
27
27
  if (path)
28
28
  paths.add((0, exports.normalizePath)(path[1].replace(regex.extFilter, '')));
29
29
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "poku",
3
- "version": "4.3.0",
3
+ "version": "4.3.1-canary.bb9d437f",
4
4
  "description": "🐷 Poku makes testing easy for Node.js, Bun, Deno, and you at the same time.",
5
5
  "main": "./lib/modules/index.js",
6
6
  "exports": {