Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

poku

Package Overview
Dependencies
Maintainers
0
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

poku - npm Package Compare versions

Comparing version 2.6.2 to 2.6.3-canary.7658609

lib/bin/help.js

3

lib/bin/enforce.js

@@ -17,2 +17,3 @@ "use strict";

'--denoDeny',
'--describeOnly',
'--enforce',

@@ -23,2 +24,3 @@ '--envFile',

'--filter',
'--itOnly',
'--killPid',

@@ -28,2 +30,3 @@ '--killPort',

'--node',
'--only',
'--parallel',

@@ -30,0 +33,0 @@ '--platform',

@@ -21,2 +21,7 @@ #! /usr/bin/env node

}
if ((0, get_arg_js_1.hasArg)('help') || (0, get_arg_js_1.hasArg)('h', '-')) {
const { help } = require('./help.js');
help();
return;
}
const enforce = (0, get_arg_js_1.hasArg)('enforce') || (0, get_arg_js_1.hasArg)('x', '-');

@@ -23,0 +28,0 @@ const configFile = (0, get_arg_js_1.getArg)('config') || (0, get_arg_js_1.getArg)('c', '-');

@@ -8,1 +8,2 @@ export declare const results: {

export declare const VERSION = "";
export declare const deepOptions: string[];

5

lib/configs/poku.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.VERSION = exports.results = void 0;
exports.deepOptions = exports.VERSION = exports.results = void 0;
exports.results = {

@@ -10,2 +10,3 @@ success: 0,

};
exports.VERSION = '2.6.2';
exports.VERSION = '2.6.3-canary.7658609';
exports.deepOptions = [];
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.strict = void 0;
const strict_1 = __importDefault(require("assert/strict"));
const assert_js_1 = require("../../builders/assert.js");
exports.strict = (0, assert_js_1.createAssert)(strict_1.default);
const get_runtime_js_1 = require("../../parsers/get-runtime.js");
const nodeAssert = !get_runtime_js_1.nodeVersion || get_runtime_js_1.nodeVersion >= 16
? require("assert/strict")
: require("assert");
exports.strict = (0, assert_js_1.createAssert)(nodeAssert);
import type { DescribeOptions } from '../../@types/describe.js';
import { todo, skip } from './modifiers.js';
declare function describeCore(title: string, cb: () => Promise<unknown>): Promise<void>;
declare function describeCore(title: string, cb: () => unknown): void;
import { todo, skip, onlyDescribe } from './modifiers.js';
export declare function describeBase(arg1: string | (() => unknown | Promise<unknown>), arg2?: (() => unknown | Promise<unknown>) | DescribeOptions): Promise<void>;
declare function describeCore(message: string, cb: () => Promise<unknown>): Promise<void>;
declare function describeCore(message: string, cb: () => unknown): void;
declare function describeCore(message: string, options: DescribeOptions): void;
declare function describeCore(message: string, options?: DescribeOptions): void;
declare function describeCore(cb: () => Promise<unknown>): Promise<void>;
declare function describeCore(cb: () => unknown): unknown;
declare function describeCore(title: string, options?: DescribeOptions): void;
declare function describeCore(cb: () => unknown): void;
export declare const describe: typeof describeCore & {
todo: typeof todo;
skip: typeof skip;
only: typeof onlyDescribe;
};
export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.describe = void 0;
exports.describeBase = describeBase;
const node_process_1 = require("process");

@@ -9,3 +10,4 @@ const format_js_1 = require("../../services/format.js");

const modifiers_js_1 = require("./modifiers.js");
async function describeCore(arg1, arg2) {
const get_arg_js_1 = require("../../parsers/get-arg.js");
async function describeBase(arg1, arg2) {
let title;

@@ -50,5 +52,16 @@ let cb;

}
async function describeCore(messageOrCb, cbOrOptions) {
if (typeof messageOrCb === 'string' && typeof cbOrOptions !== 'function')
return describeBase(messageOrCb, cbOrOptions);
if (get_arg_js_1.hasOnly || get_arg_js_1.hasDescribeOnly)
return;
if (typeof messageOrCb === 'string' && typeof cbOrOptions === 'function')
return describeBase(messageOrCb, cbOrOptions);
if (typeof messageOrCb === 'function')
return describeBase(messageOrCb);
}
exports.describe = Object.assign(describeCore, {
todo: modifiers_js_1.todo,
skip: modifiers_js_1.skip,
only: modifiers_js_1.onlyDescribe,
});

@@ -1,2 +0,6 @@

import { todo, skip } from '../modifiers.js';
import { todo, skip, onlyIt } from '../modifiers.js';
export declare function itBase(...args: [
string | (() => unknown | Promise<unknown>),
(() => unknown | Promise<unknown>)?
]): Promise<void>;
declare function itCore(message: string, cb: () => Promise<unknown>): Promise<void>;

@@ -9,3 +13,4 @@ declare function itCore(message: string, cb: () => unknown): void;

skip: typeof skip;
only: typeof onlyIt;
};
export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.it = void 0;
exports.itBase = itBase;
const node_process_1 = require("process");

@@ -10,3 +11,4 @@ const each_js_1 = require("../../../configs/each.js");

const modifiers_js_1 = require("../modifiers.js");
async function itCore(...args) {
const get_arg_js_1 = require("../../../parsers/get-arg.js");
async function itBase(...args) {
try {

@@ -60,5 +62,14 @@ let message;

}
async function itCore(messageOrCb, cb) {
if (get_arg_js_1.hasOnly || get_arg_js_1.hasItOnly)
return;
if (typeof messageOrCb === 'string' && cb)
return itBase(messageOrCb, cb);
if (typeof messageOrCb === 'function')
return itBase(messageOrCb);
}
exports.it = Object.assign(itCore, {
todo: modifiers_js_1.todo,
skip: modifiers_js_1.skip,
only: modifiers_js_1.onlyIt,
});
export declare function todo(message: string): void;
export declare function todo(message: string, _cb?: () => Promise<unknown>): Promise<void>;
export declare function todo(message: string, _cb?: () => unknown): void;
export declare function skip(message: string, _cb: () => Promise<unknown>): Promise<void>;
export declare function skip(message: string, _cb: () => unknown): void;
export declare function skip(_cb: () => Promise<unknown>): Promise<void>;
export declare function skip(_cb: () => unknown): void;
export declare function todo(message: string, cb?: () => Promise<unknown>): Promise<void>;
export declare function todo(message: string, cb?: () => unknown): void;
export declare function skip(message: string, cb: () => Promise<unknown>): Promise<void>;
export declare function skip(message: string, cb: () => unknown): void;
export declare function skip(cb: () => Promise<unknown>): Promise<void>;
export declare function skip(cb: () => unknown): void;
export declare function onlyDescribe(message: string, cb: () => Promise<unknown>): Promise<void>;
export declare function onlyDescribe(message: string, cb: () => unknown): void;
export declare function onlyDescribe(cb: () => Promise<unknown>): Promise<void>;
export declare function onlyDescribe(cb: () => unknown): void;
export declare function onlyIt(message: string, cb: () => Promise<unknown>): Promise<void>;
export declare function onlyIt(message: string, cb: () => unknown): void;
export declare function onlyIt(cb: () => Promise<unknown>): Promise<void>;
export declare function onlyIt(cb: () => unknown): void;

@@ -5,33 +5,37 @@ "use strict";

exports.skip = skip;
exports.onlyDescribe = onlyDescribe;
exports.onlyIt = onlyIt;
const write_js_1 = require("../../services/write.js");
const indentation_js_1 = require("../../configs/indentation.js");
const format_js_1 = require("../../services/format.js");
const core_js_1 = require("./it/core.js");
const describe_js_1 = require("./describe.js");
const get_arg_js_1 = require("../../parsers/get-arg.js");
const node_process_1 = require("process");
async function todo(message, _cb) {
write_js_1.Write.log(`${indentation_js_1.indentation.hasDescribe ? ' ' : ''}${(0, format_js_1.format)(`● ${message}`).cyan().bold()}`);
if (typeof _cb === 'function') {
const isAsync = _cb.constructor.name === 'AsyncFunction';
if (isAsync)
return await Promise.resolve();
return;
}
}
async function skip(messageOrCb, _cb) {
const message = (typeof messageOrCb === 'string' && messageOrCb) || 'Skipping';
const message = typeof messageOrCb === 'string' ? messageOrCb : 'Skipping';
write_js_1.Write.log(`${indentation_js_1.indentation.hasDescribe ? ' ' : ''}${(0, format_js_1.format)(`◯ ${message}`).info().bold()}`);
if (typeof messageOrCb === 'function') {
const isAsync = messageOrCb.constructor.name === 'AsyncFunction';
if (isAsync)
return await Promise.resolve();
return;
}
async function onlyDescribe(messageOrCb, cb) {
if (!(get_arg_js_1.hasOnly || get_arg_js_1.hasDescribeOnly)) {
write_js_1.Write.log((0, format_js_1.format)("Can't run `describe.only` tests without `--only` or `--describeOnly` flags").fail());
(0, node_process_1.exit)(1);
}
if (typeof _cb === 'function') {
const isAsync = _cb.constructor.name === 'AsyncFunction';
if (isAsync)
return await Promise.resolve();
return;
if (typeof messageOrCb === 'string' && cb)
return (0, describe_js_1.describeBase)(messageOrCb, cb);
if (typeof messageOrCb === 'function')
return (0, describe_js_1.describeBase)(messageOrCb);
}
async function onlyIt(messageOrCb, cb) {
if (!(get_arg_js_1.hasOnly || get_arg_js_1.hasItOnly)) {
write_js_1.Write.log((0, format_js_1.format)("Can't run `it.only` and `test.only` tests without `--only`, `--itOnly` or `--testOnly` flags").fail());
(0, node_process_1.exit)(1);
}
if (typeof messageOrCb === 'string' && cb)
return (0, core_js_1.itBase)(messageOrCb, cb);
if (typeof messageOrCb === 'function')
return (0, core_js_1.itBase)(messageOrCb);
}

@@ -9,2 +9,3 @@ export declare const test: {

skip: typeof import("./modifiers.js").skip;
only: typeof import("./modifiers.js").onlyIt;
};

@@ -5,1 +5,4 @@ export declare const getArg: (arg: string, prefix?: string, baseArgs?: string[]) => string | undefined;

export declare const argToArray: (arg: string, prefix?: string, baseArgs?: string[]) => string[] | undefined;
export declare const hasOnly: boolean;
export declare const hasItOnly: boolean;
export declare const hasDescribeOnly: boolean;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.argToArray = exports.getPaths = exports.hasArg = exports.getArg = void 0;
exports.hasDescribeOnly = exports.hasItOnly = exports.hasOnly = exports.argToArray = exports.getPaths = exports.hasArg = exports.getArg = void 0;
const node_process_1 = require("process");

@@ -46,1 +46,4 @@ const to_dynamic_case_js_1 = require("./to-dynamic-case.js");

exports.argToArray = argToArray;
exports.hasOnly = (0, exports.hasArg)('only');
exports.hasItOnly = (0, exports.hasArg)('itonly') || (0, exports.hasArg)('testonly');
exports.hasDescribeOnly = (0, exports.hasArg)('describeonly');

@@ -14,2 +14,3 @@ "use strict";

const write_js_1 = require("./write.js");
const poku_js_1 = require("../configs/poku.js");
const cwd = (0, node_process_1.cwd)();

@@ -45,3 +46,3 @@ const runTestFile = async (filePath, configs) => {

var _a;
const child = (0, node_child_process_1.spawn)(runtime, runtimeArguments, {
const child = (0, node_child_process_1.spawn)(runtime, [...runtimeArguments, ...poku_js_1.deepOptions], {
stdio: ['inherit', 'pipe', 'pipe'],

@@ -48,0 +49,0 @@ shell: get_runner_js_1.isWindows,

@@ -18,3 +18,10 @@ "use strict";

const os_js_1 = require("../polyfills/os.js");
const get_arg_js_1 = require("../parsers/get-arg.js");
const cwd = node_process_1.default.cwd();
if (get_arg_js_1.hasOnly)
poku_js_1.deepOptions.push('--only');
if (get_arg_js_1.hasDescribeOnly)
poku_js_1.deepOptions.push('--describeOnly');
if (get_arg_js_1.hasItOnly)
poku_js_1.deepOptions.push('--itOnly');
const runTests = async (dir, configs) => {

@@ -21,0 +28,0 @@ const testDir = (0, node_path_1.join)(cwd, dir);

{
"name": "poku",
"version": "2.6.2",
"version": "2.6.3-canary.7658609",
"description": "🐷 Poku makes testing easy for Node.js, Bun, Deno, and you at the same time.",

@@ -67,3 +67,3 @@ "main": "./lib/modules/index.js",

"tsx": "4.19.0",
"typescript": "^5.5.4"
"typescript": "^5.6.2"
},

@@ -70,0 +70,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc