poku 1.8.0 → 1.8.1

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.
@@ -12,7 +12,7 @@ const sanitizePath = (input, ensureTarget) => {
12
12
  const sanitizedPath = input
13
13
  .replace(/[/\\]+/g, node_path_1.default.sep) // adapting slashes according to OS
14
14
  .replace(/(\.\.(\/|\\|$))+/g, '') // ensure the current path level
15
- .replace(/[<>:|^?*]+/g, ''); // removing unusual path characters
15
+ .replace(/[<>|^?*]+/g, ''); // removing unusual path characters
16
16
  // Preventing absolute path access
17
17
  return ensureTarget ? sanitizedPath.replace(/^[/\\]/, './') : sanitizedPath;
18
18
  };
@@ -29,8 +29,13 @@ exports.fileResults = {
29
29
  };
30
30
  const runTestFile = (filePath, configs) => new Promise((resolve) => __awaiter(void 0, void 0, void 0, function* () {
31
31
  const runtimeOptions = (0, runner_js_1.runner)(filePath, configs);
32
- const runtime = runtimeOptions.shift();
33
- const runtimeArguments = runtimeOptions.length > 1 ? [...runtimeOptions, filePath] : [filePath];
32
+ const originalRuntime = runtimeOptions.shift();
33
+ let runtime = originalRuntime;
34
+ let runtimeArguments = runtimeOptions.length > 1 ? [...runtimeOptions, filePath] : [filePath];
35
+ if (node_process_1.default.platform === 'win32' && originalRuntime === 'tsx') {
36
+ runtime = 'npx.cmd';
37
+ runtimeArguments = ['tsx', ...runtimeArguments];
38
+ }
34
39
  const fileRelative = node_path_1.default.relative(node_process_1.default.cwd(), filePath);
35
40
  const showLogs = !(0, logs_js_1.isQuiet)(configs);
36
41
  const showSuccess = (0, logs_js_1.isDebug)(configs);
package/package.json CHANGED
@@ -1,29 +1,29 @@
1
1
  {
2
2
  "name": "poku",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "description": "🐷 Poku makes testing easy for Node.js, Bun & Deno at the same time.",
5
5
  "main": "./lib/index.js",
6
6
  "scripts": {
7
- "test": "npx tsx --tsconfig ./tsconfig.test.json ./test/run.test.ts",
7
+ "test": "tsx --tsconfig ./tsconfig.test.json ./test/run.test.ts",
8
8
  "pretest:c8": "npm run build",
9
9
  "test:c8": "docker compose -f test/docker/docker-compose.c8.yml up",
10
- "test:ci:c8": "npx c8 --include 'src/**' --exclude 'src/@types/**' --reporter=text --reporter=lcov npx tsx test/run.test.ts",
10
+ "test:ci:c8": "c8 --include 'src/**' --exclude 'src/@types/**' --reporter=text --reporter=lcov tsx test/run.test.ts",
11
11
  "test:ci": "tsx ./test/ci.test.ts",
12
12
  "test:node": "FILTER='node-' npm run test:ci",
13
13
  "test:deno": "FILTER='deno-' npm run test:ci",
14
14
  "test:bun": "FILTER='bun-' npm run test:ci",
15
- "prebuild": "rm -rf ./lib ./ci",
16
15
  "predocker:deno": "docker compose -f ./test/docker/playground/deno/docker-compose.yml down",
17
16
  "docker:deno": "docker compose -f ./test/docker/playground/deno/docker-compose.yml up --build",
18
- "build": "npx tsc; npx tsc -p tsconfig.test.json",
19
- "postbuild": "npx tsx ./tools/compatibility/node.ts; chmod +x lib/bin/index.js; npm audit",
20
- "eslint:checker": "npx eslint . --ext .js,.ts",
21
- "eslint:fix": "npx eslint . --fix --config ./.eslintrc.json",
22
- "lint:checker": "npm run eslint:checker; npm run prettier:checker",
23
- "lint:fix": "npm run eslint:fix; npm run prettier:fix",
24
- "prettier:checker": "npx prettier --check .",
25
- "prettier:fix": "npx prettier --write .github/workflows/*.yml .",
26
- "update": "npx npu; npm i; npm run lint:fix; npm audit"
17
+ "prebuild": "rm -rf ./lib ./ci",
18
+ "build": "tsc && tsc -p tsconfig.test.json",
19
+ "postbuild": "tsx ./tools/compatibility/node.ts && chmod +x lib/bin/index.js && npm audit",
20
+ "eslint:checker": "eslint . --ext .js,.ts",
21
+ "eslint:fix": "eslint . --fix --config ./.eslintrc.json",
22
+ "lint:checker": "npm run eslint:checker && npm run prettier:checker",
23
+ "lint:fix": "npm run eslint:fix && npm run prettier:fix",
24
+ "prettier:checker": "prettier --check .",
25
+ "prettier:fix": "prettier --write .github/workflows/*.yml .",
26
+ "update": "npu && npm i && npm run lint:fix && npm audit"
27
27
  },
28
28
  "license": "MIT",
29
29
  "repository": {