poku 2.1.0 → 2.2.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.
- package/README.md +3 -2
- package/lib/bin/index.js +16 -10
- package/lib/modules/helpers/it.d.ts +1 -1
- package/lib/modules/helpers/test.d.ts +1 -1
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -28,8 +28,8 @@ Enjoying **Poku**? Give him a star to show your support 🌟
|
|
|
28
28
|
</span><img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> **Performant** and **lightweight**<br />
|
|
29
29
|
<img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> Run **CommonJS** files directly with [**Deno**][deno-version-url]<br />
|
|
30
30
|
<img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> Auto detect **ESM**, **CJS**, and **TypeScript** files<br />
|
|
31
|
-
<img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> Run the same test suite for [**Node.js**][node-version-url], [**Bun**][bun-version-url], and [**Deno**][deno-version-url]<br />
|
|
32
|
-
<img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> Easily handle **servers**, **processes**, **ports**, and **containers
|
|
31
|
+
<img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> Run the **same test suite** for [**Node.js**][node-version-url], [**Bun**][bun-version-url], and [**Deno**][deno-version-url]<br />
|
|
32
|
+
<img width="16" height="16" alt="check" src="https://raw.githubusercontent.com/wellwelwel/poku/main/.github/assets/readme/check.svg"> Easily handle **servers**, **processes**, **ports**, and **containers** ✨
|
|
33
33
|
|
|
34
34
|
---
|
|
35
35
|
|
|
@@ -221,6 +221,7 @@ To see the detailed documentation, please visit the [**Documentation**](https://
|
|
|
221
221
|
- [Avoiding conflicts in environments with multiple platforms installed](https://poku.io/docs/tutorials/cross-platform#recommendations).
|
|
222
222
|
- [Properly running asynchronous tests on the same file](https://poku.io/docs/examples/promises).
|
|
223
223
|
- [Migrating from version **1.x** to version **2.x**](https://github.com/wellwelwel/poku/issues/533).
|
|
224
|
+
- [Using **Poku** with **Deno** and approaches to **JSR**](https://github.com/wellwelwel/poku/discussions/565).
|
|
224
225
|
|
|
225
226
|
---
|
|
226
227
|
|
package/lib/bin/index.js
CHANGED
|
@@ -19,15 +19,15 @@ const write_js_1 = require("../services/write.js");
|
|
|
19
19
|
const options_js_1 = require("../parsers/options.js");
|
|
20
20
|
(async () => {
|
|
21
21
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
22
|
-
const configFile = (0, get_arg_js_1.getArg)('config');
|
|
22
|
+
const configFile = (0, get_arg_js_1.getArg)('config') || (0, get_arg_js_1.getArg)('c', '-');
|
|
23
23
|
const defaultConfigs = await (0, options_js_1.getConfigs)(configFile);
|
|
24
24
|
const dirs = (() => {
|
|
25
25
|
var _a;
|
|
26
|
-
const includeArg = (0, get_arg_js_1.getArg)('include');
|
|
26
|
+
const includeArg = (0, get_arg_js_1.getArg)('include'); // deprecated
|
|
27
27
|
if (includeArg !== undefined) {
|
|
28
28
|
return includeArg.split(',');
|
|
29
29
|
}
|
|
30
|
-
return ((_a = (0, get_arg_js_1.getPaths)()) !== null && _a !== void 0 ? _a : ((defaultConfigs === null || defaultConfigs === void 0 ? void 0 : defaultConfigs.include)
|
|
30
|
+
return ((_a = (0, get_arg_js_1.getPaths)('-')) !== null && _a !== void 0 ? _a : ((defaultConfigs === null || defaultConfigs === void 0 ? void 0 : defaultConfigs.include)
|
|
31
31
|
? Array.prototype.concat(defaultConfigs === null || defaultConfigs === void 0 ? void 0 : defaultConfigs.include)
|
|
32
32
|
: ['.']));
|
|
33
33
|
})();
|
|
@@ -42,11 +42,11 @@ const options_js_1 = require("../parsers/options.js");
|
|
|
42
42
|
const denoCJS = ((_g = (0, get_arg_js_1.getArg)('deno-cjs')) === null || _g === void 0 ? void 0 : _g.split(',').map((a) => a.trim()).filter((a) => a)) ||
|
|
43
43
|
(0, get_arg_js_1.hasArg)('deno-cjs') ||
|
|
44
44
|
((_h = defaultConfigs === null || defaultConfigs === void 0 ? void 0 : defaultConfigs.deno) === null || _h === void 0 ? void 0 : _h.cjs);
|
|
45
|
-
const parallel = (0, get_arg_js_1.hasArg)('parallel') || (defaultConfigs === null || defaultConfigs === void 0 ? void 0 : defaultConfigs.parallel);
|
|
46
|
-
const quiet = (0, get_arg_js_1.hasArg)('quiet') || (defaultConfigs === null || defaultConfigs === void 0 ? void 0 : defaultConfigs.quiet);
|
|
47
|
-
const debug = (0, get_arg_js_1.hasArg)('debug') || (defaultConfigs === null || defaultConfigs === void 0 ? void 0 : defaultConfigs.debug);
|
|
45
|
+
const parallel = (0, get_arg_js_1.hasArg)('parallel') || (0, get_arg_js_1.hasArg)('p', '-') || (defaultConfigs === null || defaultConfigs === void 0 ? void 0 : defaultConfigs.parallel);
|
|
46
|
+
const quiet = (0, get_arg_js_1.hasArg)('quiet') || (0, get_arg_js_1.hasArg)('q', '-') || (defaultConfigs === null || defaultConfigs === void 0 ? void 0 : defaultConfigs.quiet);
|
|
47
|
+
const debug = (0, get_arg_js_1.hasArg)('debug') || (0, get_arg_js_1.hasArg)('d', '-') || (defaultConfigs === null || defaultConfigs === void 0 ? void 0 : defaultConfigs.debug);
|
|
48
48
|
const failFast = (0, get_arg_js_1.hasArg)('fail-fast') || (defaultConfigs === null || defaultConfigs === void 0 ? void 0 : defaultConfigs.failFast);
|
|
49
|
-
const watchMode = (0, get_arg_js_1.hasArg)('watch');
|
|
49
|
+
const watchMode = (0, get_arg_js_1.hasArg)('watch') || (0, get_arg_js_1.hasArg)('w', '-');
|
|
50
50
|
const hasEnvFile = (0, get_arg_js_1.hasArg)('env-file');
|
|
51
51
|
const concurrency = (() => {
|
|
52
52
|
if (!(parallel || (defaultConfigs === null || defaultConfigs === void 0 ? void 0 : defaultConfigs.parallel))) {
|
|
@@ -82,9 +82,15 @@ const options_js_1 = require("../parsers/options.js");
|
|
|
82
82
|
const options = {
|
|
83
83
|
platform: (0, get_runtime_js_1.platformIsValid)(platform)
|
|
84
84
|
? platform
|
|
85
|
-
: (0,
|
|
86
|
-
?
|
|
87
|
-
:
|
|
85
|
+
: (0, get_arg_js_1.hasArg)('node')
|
|
86
|
+
? 'node'
|
|
87
|
+
: (0, get_arg_js_1.hasArg)('bun')
|
|
88
|
+
? 'bun'
|
|
89
|
+
: (0, get_arg_js_1.hasArg)('deno')
|
|
90
|
+
? 'deno'
|
|
91
|
+
: (0, get_runtime_js_1.platformIsValid)(defaultConfigs === null || defaultConfigs === void 0 ? void 0 : defaultConfigs.platform)
|
|
92
|
+
? defaultConfigs === null || defaultConfigs === void 0 ? void 0 : defaultConfigs.platform
|
|
93
|
+
: undefined,
|
|
88
94
|
filter: typeof filter === 'string' ? new RegExp((0, list_files_js_1.escapeRegExp)(filter)) : filter,
|
|
89
95
|
exclude: typeof exclude === 'string' ? new RegExp((0, list_files_js_1.escapeRegExp)(exclude)) : exclude,
|
|
90
96
|
parallel,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare function it(message: string, cb: () => Promise<unknown>): Promise<void>;
|
|
2
|
-
export declare function it(message: string, cb: () => unknown):
|
|
2
|
+
export declare function it(message: string, cb: () => unknown): void;
|
|
3
3
|
export declare function it(cb: () => Promise<unknown>): Promise<void>;
|
|
4
4
|
export declare function it(cb: () => unknown): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare function test(message: string, cb: () => Promise<unknown>): Promise<void>;
|
|
2
|
-
export declare function test(message: string, cb: () => unknown):
|
|
2
|
+
export declare function test(message: string, cb: () => unknown): void;
|
|
3
3
|
export declare function test(cb: () => Promise<unknown>): Promise<void>;
|
|
4
4
|
export declare function test(cb: () => unknown): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "poku",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
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
|
"license": "MIT",
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
"test": "npm run test:parallel && npm run test:sequential",
|
|
34
34
|
"test:bun": "npm run test:bun:parallel && npm run test:bun:sequential",
|
|
35
35
|
"test:deno": "npm run test:deno:parallel && npm run test:deno:sequential",
|
|
36
|
-
"test:sequential": "tsx src/bin/index.ts
|
|
37
|
-
"test:parallel": "tsx src/bin/index.ts
|
|
38
|
-
"test:bun:sequential": "bun src/bin/index.ts --
|
|
39
|
-
"test:bun:parallel": "bun src/bin/index.ts --
|
|
40
|
-
"test:deno:sequential": "tsx src/bin/index.ts --
|
|
41
|
-
"test:deno:parallel": "tsx src/bin/index.ts --
|
|
36
|
+
"test:sequential": "tsx src/bin/index.ts test/unit test/integration test/e2e",
|
|
37
|
+
"test:parallel": "tsx src/bin/index.ts -p test/unit test/integration test/e2e",
|
|
38
|
+
"test:bun:sequential": "bun src/bin/index.ts --bun test/unit test/integration test/e2e",
|
|
39
|
+
"test:bun:parallel": "bun src/bin/index.ts --bun -p test/unit test/integration test/e2e",
|
|
40
|
+
"test:deno:sequential": "tsx src/bin/index.ts --deno --deno-allow=all --deno-cjs ci/test/unit ci/test/integration ci/test/e2e",
|
|
41
|
+
"test:deno:parallel": "tsx src/bin/index.ts --deno --deno-allow=all --deno-cjs -p ci/test/unit ci/test/integration ci/test/e2e",
|
|
42
42
|
"test:c8": "c8 tsx test/c8.test.ts",
|
|
43
43
|
"test:ci": "tsx test/ci.test.ts",
|
|
44
44
|
"test:ci:node": "FILTER='node-' npm run test:ci",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"test:ci:deno": "FILTER='deno-' npm run test:ci",
|
|
47
47
|
"predocker:deno": "docker compose -f test/docker/playground/deno/docker-compose.yml down",
|
|
48
48
|
"docker:deno": "docker compose -f test/docker/playground/deno/docker-compose.yml up --build",
|
|
49
|
-
"clear": "rm -rf lib ci coverage",
|
|
49
|
+
"clear": "rm -rf lib ci coverage .temp test-src test-tests",
|
|
50
50
|
"prebuild": "npm run clear",
|
|
51
51
|
"build": "tsc && tsc -p tsconfig.test.json",
|
|
52
52
|
"postbuild": "tsx tools/compatibility/node.ts && cp fixtures/server/package.json ci/fixtures/server/package.json && npm run build:deno && chmod +x lib/bin/index.js",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@biomejs/biome": "1.8.3",
|
|
63
|
-
"@types/node": "^20.14.
|
|
63
|
+
"@types/node": "^20.14.11",
|
|
64
64
|
"c8": "^10.1.2",
|
|
65
65
|
"packages-update": "^2.0.0",
|
|
66
66
|
"prettier": "^3.3.3",
|