Comparing version 2.4.3 to 2.4.4
@@ -93,5 +93,5 @@ "use strict"; | ||
write_js_1.Write.log(`${(0, format_js_1.format)('Watching:').bold()} ${(0, format_js_1.format)(dirs.join(', ')).underline()}`); | ||
node_process_1.default.stdin.setEncoding('utf-8'); | ||
node_process_1.default.stdin.setEncoding('utf8'); | ||
node_process_1.default.stdin.on('data', listenStdin); | ||
}; | ||
exports.startWatch = startWatch; |
import type { ProcessAssertionOptions } from '../@types/assert.js'; | ||
import type assert from 'node:assert'; | ||
import type { AssertPredicate } from 'node:assert'; | ||
import type assert from "assert"; | ||
import type { AssertPredicate } from "assert"; | ||
export declare const createAssert: (nodeAssert: typeof assert) => ((value: unknown, message?: ProcessAssertionOptions["message"]) => void) & { | ||
@@ -5,0 +5,0 @@ ok: (value: unknown, message?: ProcessAssertionOptions["message"]) => void; |
@@ -10,2 +10,2 @@ "use strict"; | ||
}; | ||
exports.VERSION = '2.4.3'; | ||
exports.VERSION = '2.4.4'; |
@@ -1,2 +0,2 @@ | ||
import nodeAssert from 'node:assert'; | ||
import nodeAssert from "assert"; | ||
export declare const assert: ((value: unknown, message?: import("../../@types/assert.js").ProcessAssertionOptions["message"]) => void) & { | ||
@@ -3,0 +3,0 @@ ok: (value: unknown, message?: import("../../@types/assert.js").ProcessAssertionOptions["message"]) => void; |
@@ -28,2 +28,4 @@ "use strict"; | ||
const PID = service.pid; | ||
service.stdout.setEncoding('utf8'); | ||
service.stderr.setEncoding('utf8'); | ||
let portBackup; | ||
@@ -30,0 +32,0 @@ const end = (port) => new Promise((resolve) => { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.envFile = void 0; | ||
const node_process_1 = require("process"); | ||
const fs_js_1 = require("../../polyfills/fs.js"); | ||
@@ -22,9 +23,9 @@ const list_files_js_1 = require("./list-files.js"); | ||
const { arg, value } = parsedLine; | ||
mapEnv.set(arg, value ? (0, env_js_1.resolveEnvVariables)(value, process.env) : value); | ||
mapEnv.set(arg, value ? (0, env_js_1.resolveEnvVariables)(value, node_process_1.env) : value); | ||
} | ||
} | ||
for (const [arg, value] of mapEnv) { | ||
process.env[arg] = value; | ||
node_process_1.env[arg] = value; | ||
} | ||
}; | ||
exports.envFile = envFile; |
@@ -24,3 +24,3 @@ "use strict"; | ||
} | ||
const configsFile = await (0, fs_js_1.readFile)(filePath, 'utf-8'); | ||
const configsFile = await (0, fs_js_1.readFile)(filePath, 'utf8'); | ||
return jsonc_js_1.JSONC.parse(configsFile); | ||
@@ -27,0 +27,0 @@ } |
@@ -1,4 +0,4 @@ | ||
import { stat as nodeStat, readdir as nodeReaddir, readFile as nodeReadFile } from 'node:fs'; | ||
import { stat as nodeStat, readdir as nodeReaddir, readFile as nodeReadFile } from "fs"; | ||
export declare const readdir: typeof nodeReaddir.__promisify__; | ||
export declare const stat: typeof nodeStat.__promisify__; | ||
export declare const readFile: typeof nodeReadFile.__promisify__; |
@@ -15,2 +15,4 @@ "use strict"; | ||
if (verbose) { | ||
dockerProcess.stdout.setEncoding('utf8'); | ||
dockerProcess.stderr.setEncoding('utf8'); | ||
dockerProcess.stdout.on('data', write_js_1.Write.log); | ||
@@ -17,0 +19,0 @@ dockerProcess.stderr.on('data', write_js_1.Write.log); |
@@ -89,6 +89,7 @@ "use strict"; | ||
write_js_1.Write.hr(); | ||
if (files_js_1.fileResults.success.size > 0) { | ||
if (files_js_1.fileResults.success.size > 0 && files_js_1.fileResults.fail.size === 0) { | ||
write_js_1.Write.log(Array.from(files_js_1.fileResults.success) | ||
.map(([file, time]) => `${indentation_js_1.indentation.test}${(0, exports.format)('✔').success()} ${(0, exports.format)(`${file} ${(0, exports.format)(`› ${time}ms`).success()}`).dim()}`) | ||
.join('\n')); | ||
return; | ||
} | ||
@@ -95,0 +96,0 @@ if (files_js_1.fileResults.fail.size > 0) { |
@@ -75,3 +75,3 @@ "use strict"; | ||
processedFiles.add(srcFile); | ||
const srcContent = await (0, fs_js_1.readFile)(srcFile, 'utf-8'); | ||
const srcContent = await (0, fs_js_1.readFile)(srcFile, 'utf8'); | ||
const deepImports = (0, exports.getDeepImports)(srcContent); | ||
@@ -92,3 +92,3 @@ const matchingFiles = (0, exports.findMatchingFiles)(deepImports, intersectedSrcFiles); | ||
var _a; | ||
const content = await (0, fs_js_1.readFile)(testFile, 'utf-8'); | ||
const content = await (0, fs_js_1.readFile)(testFile, 'utf8'); | ||
for (const srcFile of intersectedSrcFiles) { | ||
@@ -95,0 +95,0 @@ const relativePath = (0, exports.normalizePath)((0, node_path_1.relative)((0, node_path_1.dirname)(testFile), srcFile)); |
@@ -53,2 +53,4 @@ "use strict"; | ||
}); | ||
child.stdout.setEncoding('utf8'); | ||
child.stderr.setEncoding('utf8'); | ||
child.stdout.on('data', stdOut); | ||
@@ -55,0 +57,0 @@ child.stderr.on('data', stdOut); |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.runTestsParallel = exports.runTests = void 0; | ||
const node_process_1 = require("process"); | ||
const node_process_1 = __importDefault(require("process")); | ||
const node_path_1 = require("path"); | ||
@@ -15,3 +18,3 @@ const get_runner_js_1 = require("../parsers/get-runner.js"); | ||
const cpus_js_1 = require("../polyfills/cpus.js"); | ||
const cwd = (0, node_process_1.cwd)(); | ||
const cwd = node_process_1.default.cwd(); | ||
const runTests = async (dir, configs) => { | ||
@@ -32,5 +35,5 @@ const testDir = (0, node_path_1.join)(cwd, dir); | ||
const fileRelative = (0, node_path_1.relative)(cwd, filePath); | ||
const start = (0, node_process_1.hrtime)(); | ||
const start = node_process_1.default.hrtime(); | ||
const testPassed = await (0, run_test_file_js_1.runTestFile)(filePath, configs); | ||
const end = (0, node_process_1.hrtime)(start); | ||
const end = node_process_1.default.hrtime(start); | ||
const total = (end[0] * 1e3 + end[1] / 1e6).toFixed(6); | ||
@@ -54,2 +57,3 @@ const testNumber = i + 1; | ||
if (configs === null || configs === void 0 ? void 0 : configs.failFast) { | ||
node_process_1.default.exitCode = 1; | ||
if (showLogs) { | ||
@@ -89,2 +93,3 @@ write_js_1.Write.hr(); | ||
if (configs === null || configs === void 0 ? void 0 : configs.failFast) { | ||
node_process_1.default.exitCode = 1; | ||
throw new Error(` ${(0, format_js_1.format)('ℹ').fail()} ${(0, format_js_1.format)('fail-fast').bold()} is enabled`); | ||
@@ -91,0 +96,0 @@ } |
{ | ||
"name": "poku", | ||
"version": "2.4.3", | ||
"version": "2.4.4", | ||
"description": "🐷 Poku makes testing easy for Node.js, Bun, Deno, and you at the same time.", | ||
@@ -40,17 +40,12 @@ "main": "./lib/modules/index.js", | ||
"test:bun:parallel": "bun src/bin/index.ts --bun -p test/unit test/integration test/e2e", | ||
"test:deno:sequential": "tsx src/bin/index.ts --deno --deno-allow=all --deno-cjs ci/test/unit ci/test/integration ci/test/e2e", | ||
"test:deno:parallel": "tsx src/bin/index.ts --deno --deno-allow=all --deno-cjs -p ci/test/unit ci/test/integration ci/test/e2e", | ||
"test:deno:sequential": "tsx src/bin/index.ts --deno --deno-allow=all test/unit test/integration test/e2e", | ||
"test:deno:parallel": "tsx src/bin/index.ts --deno --deno-allow=all -p test/unit test/integration test/e2e", | ||
"pretest:c8": "tsx tools/build/c8-file.ts", | ||
"test:c8": "c8 --experimental-monocart tsx test/c8.test.ts", | ||
"posttest:c8": "rm -rf ./.nycrc.json", | ||
"test:ci": "tsx test/ci.test.ts", | ||
"test:ci:node": "FILTER='node-' npm run test:ci", | ||
"test:ci:bun": "FILTER='bun-' npm run test:ci", | ||
"test:ci:deno": "FILTER='deno-' npm run test:ci", | ||
"predocker:deno": "docker compose -f test/docker/playground/deno/docker-compose.yml down", | ||
"docker:deno": "docker compose -f test/docker/playground/deno/docker-compose.yml up --build", | ||
"test:docker:node": "tsx test/ci.test.ts", | ||
"clear": "rm -rf lib ci coverage .temp test-src test-tests", | ||
"prebuild": "npm run clear", | ||
"build": "tsc && tsc -p tsconfig.test.json", | ||
"postbuild": "tsx tools/compatibility/node.ts && tsx tools/compatibility/comments.ts && tsx tools/build/version.ts && cp fixtures/server/package.json ci/fixtures/server/package.json && rm -f ./lib/@types/*.js ./lib/bin/*.ts && npm run build:deno && chmod +x lib/bin/index.js", | ||
"build": "tsc && cd test && tsc", | ||
"postbuild": "tsx tools/compatibility/node.ts && tsx tools/compatibility/comments.ts && tsx tools/build/version.ts && cp test/__fixtures__/e2e/server/package.json ci/test/__fixtures__/e2e/server/package.json && rm -f ./lib/@types/*.js ./lib/bin/*.ts && npm run build:deno && chmod +x lib/bin/index.js", | ||
"build:deno": "tsc -p tsconfig.mjs.json", | ||
@@ -66,3 +61,3 @@ "postbuild:deno": "tsx tools/build/check-deno-polyfill.ts", | ||
"@biomejs/biome": "1.8.3", | ||
"@types/node": "^22.1.0", | ||
"@types/node": "^22.2.0", | ||
"c8": "^10.1.2", | ||
@@ -69,0 +64,0 @@ "jsonc.min": "^1.0.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
162966
3498
5