@japa/runner 4.3.1 → 5.0.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.
@@ -0,0 +1,336 @@
1
+ import { d as BaseReporter, n as icons, t as colors } from "./helpers-BlHaYYTh.js";
2
+ import { ErrorsPrinter } from "@japa/errors-printer";
3
+ import { stripVTControlCharacters } from "node:util";
4
+ import { relative } from "node:path";
5
+ import string from "@poppinss/string";
6
+ var DotReporter = class extends BaseReporter {
7
+ onTestEnd(payload) {
8
+ let output = "";
9
+ if (payload.isTodo) output = colors.cyan(icons.info);
10
+ else if (payload.hasError) output = colors.red(icons.cross);
11
+ else if (payload.isSkipped) output = colors.yellow(icons.bullet);
12
+ else if (payload.isFailing) output = colors.magenta(icons.squareSmallFilled);
13
+ else output = colors.green(icons.tick);
14
+ process.stdout.write(`${output}`);
15
+ }
16
+ async end() {
17
+ console.log("");
18
+ await this.printSummary(this.runner.getSummary());
19
+ }
20
+ };
21
+ var SpecReporter = class extends BaseReporter {
22
+ #isFirstLoneTest = true;
23
+ #getTestIcon(payload) {
24
+ if (payload.isTodo) return colors.cyan(icons.info);
25
+ if (payload.hasError) return colors.red(icons.cross);
26
+ if (payload.isSkipped) return colors.yellow(icons.bullet);
27
+ if (payload.isFailing) return colors.magenta(icons.squareSmallFilled);
28
+ return colors.green(icons.tick);
29
+ }
30
+ #getTestMessage(payload) {
31
+ const message = payload.title.expanded;
32
+ if (payload.isTodo) return colors.blue(message);
33
+ if (payload.hasError) return colors.red(message);
34
+ if (payload.isSkipped) return colors.yellow(message);
35
+ if (payload.isFailing) return colors.magenta(message);
36
+ return colors.grey(message);
37
+ }
38
+ #getSubText(payload) {
39
+ if (payload.isSkipped && payload.skipReason) return colors.dim(`${icons.branch} ${colors.italic(payload.skipReason)}`);
40
+ if (!payload.isFailing) return;
41
+ if (payload.hasError) {
42
+ const message = payload.errors.find((error) => error.phase === "test")?.error.message ?? `Test marked with ".fails()" must finish with an error`;
43
+ return colors.dim(`${icons.branch} ${colors.italic(message)}`);
44
+ }
45
+ if (payload.failReason) return colors.dim(`${icons.branch} ${colors.italic(payload.failReason)}`);
46
+ const testErrorMessage = payload.errors.find((error) => error.phase === "test");
47
+ if (testErrorMessage && testErrorMessage.error) return colors.dim(`${icons.branch} ${colors.italic(testErrorMessage.error.message)}`);
48
+ }
49
+ #getRelativeFilename(fileName) {
50
+ return relative(process.cwd(), fileName);
51
+ }
52
+ #printTest(payload) {
53
+ const icon = this.#getTestIcon(payload);
54
+ const message = this.#getTestMessage(payload);
55
+ const prefix = payload.isPinned ? colors.yellow("[PINNED] ") : "";
56
+ const indentation = this.currentFileName || this.currentGroupName ? " " : "";
57
+ const duration = colors.dim(`(${string.milliseconds.format(Number(payload.duration.toFixed(2)))})`);
58
+ const retries = payload.retryAttempt && payload.retryAttempt > 1 ? colors.dim(`(x${payload.retryAttempt}) `) : "";
59
+ let subText = this.#getSubText(payload);
60
+ subText = subText ? `\n${indentation} ${subText}` : "";
61
+ console.log(`${indentation}${icon} ${prefix}${retries}${message} ${duration}${subText}`);
62
+ }
63
+ #printGroup(payload) {
64
+ const title = this.currentSuiteName !== "default" ? `${this.currentSuiteName} / ${payload.title}` : payload.title;
65
+ const suffix = this.currentFileName ? colors.dim(` (${this.#getRelativeFilename(this.currentFileName)})`) : "";
66
+ console.log(`\n${title}${suffix}`);
67
+ }
68
+ onTestStart() {
69
+ if (this.currentFileName && this.#isFirstLoneTest) console.log(`\n${colors.dim(this.#getRelativeFilename(this.currentFileName))}`);
70
+ this.#isFirstLoneTest = false;
71
+ }
72
+ onTestEnd(payload) {
73
+ this.#printTest(payload);
74
+ }
75
+ onGroupStart(payload) {
76
+ this.#isFirstLoneTest = false;
77
+ this.#printGroup(payload);
78
+ }
79
+ onGroupEnd() {
80
+ this.#isFirstLoneTest = true;
81
+ }
82
+ async end() {
83
+ const summary = this.runner.getSummary();
84
+ await this.printSummary(summary);
85
+ }
86
+ };
87
+ const list = [
88
+ Error,
89
+ EvalError,
90
+ RangeError,
91
+ ReferenceError,
92
+ SyntaxError,
93
+ TypeError,
94
+ URIError,
95
+ AggregateError,
96
+ globalThis.DOMException,
97
+ globalThis.AssertionError,
98
+ globalThis.SystemError
99
+ ].filter(Boolean).map((constructor) => [constructor.name, constructor]);
100
+ const errorConstructors = new Map(list);
101
+ Error;
102
+ const errorProperties = [
103
+ {
104
+ property: "name",
105
+ enumerable: false
106
+ },
107
+ {
108
+ property: "message",
109
+ enumerable: false
110
+ },
111
+ {
112
+ property: "stack",
113
+ enumerable: false
114
+ },
115
+ {
116
+ property: "code",
117
+ enumerable: true
118
+ },
119
+ {
120
+ property: "cause",
121
+ enumerable: false
122
+ },
123
+ {
124
+ property: "errors",
125
+ enumerable: false
126
+ }
127
+ ];
128
+ const toJsonWasCalled = /* @__PURE__ */ new WeakSet();
129
+ const toJSON = (from) => {
130
+ toJsonWasCalled.add(from);
131
+ const json = from.toJSON();
132
+ toJsonWasCalled.delete(from);
133
+ return json;
134
+ };
135
+ const newError = (name) => {
136
+ const ErrorConstructor = errorConstructors.get(name) ?? Error;
137
+ return ErrorConstructor === AggregateError ? new ErrorConstructor([]) : new ErrorConstructor();
138
+ };
139
+ const destroyCircular = ({ from, seen, to, forceEnumerable, maxDepth, depth, useToJSON, serialize }) => {
140
+ if (!to) if (Array.isArray(from)) to = [];
141
+ else if (!serialize && isErrorLike(from)) to = newError(from.name);
142
+ else to = {};
143
+ seen.push(from);
144
+ if (depth >= maxDepth) return to;
145
+ if (useToJSON && typeof from.toJSON === "function" && !toJsonWasCalled.has(from)) return toJSON(from);
146
+ const continueDestroyCircular = (value) => destroyCircular({
147
+ from: value,
148
+ seen: [...seen],
149
+ forceEnumerable,
150
+ maxDepth,
151
+ depth,
152
+ useToJSON,
153
+ serialize
154
+ });
155
+ for (const [key, value] of Object.entries(from)) {
156
+ if (value && value instanceof Uint8Array && value.constructor.name === "Buffer") {
157
+ to[key] = "[object Buffer]";
158
+ continue;
159
+ }
160
+ if (value !== null && typeof value === "object" && typeof value.pipe === "function") {
161
+ to[key] = "[object Stream]";
162
+ continue;
163
+ }
164
+ if (typeof value === "function") continue;
165
+ if (!value || typeof value !== "object") {
166
+ try {
167
+ to[key] = value;
168
+ } catch {}
169
+ continue;
170
+ }
171
+ if (!seen.includes(from[key])) {
172
+ depth++;
173
+ to[key] = continueDestroyCircular(from[key]);
174
+ continue;
175
+ }
176
+ to[key] = "[Circular]";
177
+ }
178
+ if (serialize || to instanceof Error) {
179
+ for (const { property, enumerable } of errorProperties) if (from[property] !== void 0 && from[property] !== null) Object.defineProperty(to, property, {
180
+ value: isErrorLike(from[property]) || Array.isArray(from[property]) ? continueDestroyCircular(from[property]) : from[property],
181
+ enumerable: forceEnumerable ? true : enumerable,
182
+ configurable: true,
183
+ writable: true
184
+ });
185
+ }
186
+ return to;
187
+ };
188
+ function serializeError(value, options = {}) {
189
+ const { maxDepth = Number.POSITIVE_INFINITY, useToJSON = true } = options;
190
+ if (typeof value === "object" && value !== null) return destroyCircular({
191
+ from: value,
192
+ seen: [],
193
+ forceEnumerable: true,
194
+ maxDepth,
195
+ depth: 0,
196
+ useToJSON,
197
+ serialize: true
198
+ });
199
+ if (typeof value === "function") return `[Function: ${value.name || "anonymous"}]`;
200
+ return value;
201
+ }
202
+ function isErrorLike(value) {
203
+ return Boolean(value) && typeof value === "object" && typeof value.name === "string" && typeof value.message === "string" && typeof value.stack === "string";
204
+ }
205
+ var NdJSONReporter = class extends BaseReporter {
206
+ #getRelativeFilename(fileName) {
207
+ return relative(process.cwd(), fileName);
208
+ }
209
+ #serializeErrors(errors) {
210
+ return errors.map((error) => ({
211
+ phase: error.phase,
212
+ error: serializeError(error.error)
213
+ }));
214
+ }
215
+ onTestEnd(payload) {
216
+ console.log(JSON.stringify({
217
+ event: "test:end",
218
+ filePath: this.currentFileName,
219
+ relativePath: this.currentFileName ? this.#getRelativeFilename(this.currentFileName) : void 0,
220
+ title: payload.title,
221
+ duration: payload.duration,
222
+ failReason: payload.failReason,
223
+ isFailing: payload.isFailing,
224
+ skipReason: payload.skipReason,
225
+ isSkipped: payload.isSkipped,
226
+ isTodo: payload.isTodo,
227
+ isPinned: payload.isPinned,
228
+ retryAttempt: payload.retryAttempt,
229
+ retries: payload.retries,
230
+ errors: this.#serializeErrors(payload.errors)
231
+ }));
232
+ }
233
+ onGroupStart(payload) {
234
+ console.log(JSON.stringify({
235
+ event: "group:start",
236
+ title: payload.title
237
+ }));
238
+ }
239
+ onGroupEnd(payload) {
240
+ JSON.stringify({
241
+ event: "group:end",
242
+ title: payload.title,
243
+ errors: this.#serializeErrors(payload.errors)
244
+ });
245
+ }
246
+ onSuiteStart(payload) {
247
+ console.log(JSON.stringify({
248
+ event: "suite:start",
249
+ ...payload
250
+ }));
251
+ }
252
+ onSuiteEnd(payload) {
253
+ console.log(JSON.stringify({
254
+ event: "suite:end",
255
+ name: payload.name,
256
+ hasError: payload.hasError,
257
+ errors: this.#serializeErrors(payload.errors)
258
+ }));
259
+ }
260
+ async end() {
261
+ const summary = this.runner.getSummary();
262
+ console.log(JSON.stringify({
263
+ aggregates: summary.aggregates,
264
+ duration: summary.duration,
265
+ failedTestsTitles: summary.failedTestsTitles,
266
+ hasError: summary.hasError
267
+ }));
268
+ }
269
+ };
270
+ var GithubReporter = class extends BaseReporter {
271
+ escapeMessage(value) {
272
+ return value.replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A");
273
+ }
274
+ escapeProperty(value) {
275
+ return value.replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C");
276
+ }
277
+ formatMessage({ command, properties, message }) {
278
+ let result = `::${command}`;
279
+ Object.entries(properties).forEach(([k, v], i) => {
280
+ result += i === 0 ? " " : ",";
281
+ result += `${k}=${this.escapeProperty(v)}`;
282
+ });
283
+ result += `::${this.escapeMessage(message)}`;
284
+ return result;
285
+ }
286
+ async getErrorAnnotation(printer, error) {
287
+ const parsedError = await printer.parseError(error.error);
288
+ if (!("frames" in parsedError)) return;
289
+ const mainFrame = parsedError.frames.find((frame) => frame.type === "app");
290
+ if (!mainFrame) return;
291
+ return this.formatMessage({
292
+ command: "error",
293
+ properties: {
294
+ file: string.toUnixSlash(relative(process.cwd(), mainFrame.fileName)),
295
+ title: error.title,
296
+ line: String(mainFrame.lineNumber),
297
+ column: String(mainFrame.columnNumber)
298
+ },
299
+ message: stripVTControlCharacters(parsedError.message)
300
+ });
301
+ }
302
+ async end() {
303
+ const summary = this.runner.getSummary();
304
+ const errorsList = this.aggregateErrors(summary);
305
+ const errorPrinter = new ErrorsPrinter(this.options);
306
+ for (let error of errorsList) {
307
+ const formatted = await this.getErrorAnnotation(errorPrinter, error);
308
+ if (formatted) console.log(`\n${formatted}`);
309
+ }
310
+ }
311
+ };
312
+ const spec = (options) => {
313
+ return {
314
+ name: "spec",
315
+ handler: (...args) => new SpecReporter(options).boot(...args)
316
+ };
317
+ };
318
+ const dot = (options) => {
319
+ return {
320
+ name: "dot",
321
+ handler: (...args) => new DotReporter(options).boot(...args)
322
+ };
323
+ };
324
+ const ndjson = (options) => {
325
+ return {
326
+ name: "ndjson",
327
+ handler: (...args) => new NdJSONReporter(options).boot(...args)
328
+ };
329
+ };
330
+ const github = (options) => {
331
+ return {
332
+ name: "github",
333
+ handler: (...args) => new GithubReporter(options).boot(...args)
334
+ };
335
+ };
336
+ export { spec as i, github as n, ndjson as r, dot as t };
@@ -1,21 +1,2 @@
1
- import {
2
- BaseReporter,
3
- Emitter,
4
- Group,
5
- Refiner,
6
- Runner,
7
- Suite,
8
- Test,
9
- TestContext
10
- } from "../../chunk-PCBL2VZP.js";
11
- import "../../chunk-2KG3PWR4.js";
12
- export {
13
- BaseReporter,
14
- Emitter,
15
- Group,
16
- Refiner,
17
- Runner,
18
- Suite,
19
- Test,
20
- TestContext
21
- };
1
+ import { a as Group, c as Suite, d as BaseReporter, i as Emitter, l as Test, o as Refiner, s as Runner, u as TestContext } from "../../helpers-BlHaYYTh.js";
2
+ export { BaseReporter, Emitter, Group, Refiner, Runner, Suite, Test, TestContext };
@@ -1,4 +1,4 @@
1
- import { Emitter, Runner } from '../main.js';
1
+ import { type Emitter, type Runner } from '../main.js';
2
2
  import type { TestEndNode, SuiteEndNode, GroupEndNode, TestStartNode, RunnerSummary, RunnerEndNode, GroupStartNode, SuiteStartNode, RunnerStartNode, BaseReporterOptions } from '../types.js';
3
3
  /**
4
4
  * Base reporter to build custom reporters on top of
@@ -1,8 +1,8 @@
1
- import { Emitter, Group, Refiner, Suite, Test } from '../modules/core/main.js';
1
+ import { type Emitter, Group, type Refiner, type Suite, Test } from '../modules/core/main.js';
2
2
  /**
3
3
  * Create a new instance of the Test
4
4
  */
5
- export declare function createTest(title: string, emitter: Emitter, refiner: Refiner, options: {
5
+ export declare function createTest(title: string, emitter: Emitter, refiner: Refiner, debuggingError: Error, options: {
6
6
  group?: Group;
7
7
  suite?: Suite;
8
8
  file?: string;
@@ -1,2 +1,2 @@
1
- declare const _default: import("util").DebugLogger;
1
+ declare const _default: import("node:util").DebugLogger;
2
2
  export default _default;
@@ -1,4 +1,5 @@
1
- import { Colors } from '@poppinss/colors/types';
1
+ import { type Colors } from '@poppinss/colors/types';
2
+ import { type Runner, type Test } from '../modules/core/main.js';
2
3
  export declare const colors: Colors;
3
4
  /**
4
5
  * A collection of platform specific icons
@@ -14,3 +15,12 @@ export declare const icons: {
14
15
  branch: string;
15
16
  squareSmallFilled: string;
16
17
  };
18
+ /**
19
+ * Returns a formatted string to print the information about
20
+ * a pinned test
21
+ */
22
+ export declare function formatPinnedTest(test: Test): string;
23
+ /**
24
+ * Prints a summary of all the pinned tests
25
+ */
26
+ export declare function printPinnedTests(runner: Runner): void;
@@ -1,4 +1,4 @@
1
- import { Runner } from '../modules/core/main.js';
1
+ import { type Runner } from '../modules/core/main.js';
2
2
  import type { NormalizedConfig } from './types.js';
3
3
  /**
4
4
  * Exposes API for working with global hooks
@@ -0,0 +1,9 @@
1
+ import type { PluginFn } from '../types.js';
2
+ /**
3
+ * Disallows pinned tests by throwing an error before the runner
4
+ * starts executing the tests.
5
+ */
6
+ export declare function disallowPinnedTests(options?: {
7
+ disallow?: boolean;
8
+ errorMessage?: string;
9
+ }): PluginFn;
@@ -0,0 +1 @@
1
+ export { disallowPinnedTests } from './disallow_pinned_tests.js';
@@ -0,0 +1,23 @@
1
+ import string from "@poppinss/string";
2
+ function disallowPinnedTests(options) {
3
+ const disallow = options?.disallow ?? true;
4
+ const errorMessage = options?.errorMessage ?? "Pinning tests are disallowed by the \"disallowPinnedTests\" plugin. Use the \"--list-pinned\" flag to list pinned tests";
5
+ return async function disallowPinnedTestsPluginFn({ runner, emitter }) {
6
+ if (!disallow) return;
7
+ function disallowPinned(test) {
8
+ if (test.isPinned) {
9
+ test.options.meta.abort(string.interpolate(errorMessage, { test: test.title }));
10
+ process.exitCode = 1;
11
+ }
12
+ }
13
+ emitter.on("runner:start", () => {
14
+ runner.onSuite((suite) => {
15
+ suite.onGroup((group) => {
16
+ group.tap(disallowPinned);
17
+ });
18
+ suite.onTest(disallowPinned);
19
+ });
20
+ });
21
+ };
22
+ }
23
+ export { disallowPinnedTests };
@@ -1,14 +1,3 @@
1
- import {
2
- dot,
3
- github,
4
- ndjson,
5
- spec
6
- } from "../../chunk-U3BSXCEH.js";
7
- import "../../chunk-PCBL2VZP.js";
8
- import "../../chunk-2KG3PWR4.js";
9
- export {
10
- dot,
11
- github,
12
- ndjson,
13
- spec
14
- };
1
+ import "../../helpers-BlHaYYTh.js";
2
+ import { i as spec, n as github, r as ndjson, t as dot } from "../../main-CB1nhl6c.js";
3
+ export { dot, github, ndjson, spec };
@@ -1,5 +1,5 @@
1
1
  import { BaseReporter } from '../../modules/core/main.js';
2
- import { GroupStartNode, TestEndNode } from '../../modules/core/types.js';
2
+ import { type GroupStartNode, type TestEndNode } from '../../modules/core/types.js';
3
3
  /**
4
4
  * Pretty prints the tests on the console
5
5
  */
@@ -35,6 +35,7 @@ export type CLIArgs = {
35
35
  failed?: boolean;
36
36
  help?: boolean;
37
37
  matchAll?: boolean;
38
+ listPinned?: boolean;
38
39
  bail?: boolean;
39
40
  bailLayer?: string;
40
41
  } & Record<string, string | string[] | boolean>;
@@ -1,14 +1,7 @@
1
- import {
2
- __reExport
3
- } from "../chunk-2KG3PWR4.js";
4
-
5
- // src/types.ts
6
- var types_exports2 = {};
7
-
8
- // modules/core/types.ts
9
- var types_exports = {};
10
- __reExport(types_exports, types_star);
11
- import * as types_star from "@japa/core/types";
12
-
13
- // src/types.ts
14
- __reExport(types_exports2, types_exports);
1
+ import "node:module";
2
+ export * from "@japa/core/types";
3
+ Object.defineProperty;
4
+ Object.getOwnPropertyDescriptor;
5
+ Object.getOwnPropertyNames;
6
+ Object.prototype.hasOwnProperty;
7
+ export {};
@@ -1,4 +1,4 @@
1
- import { NormalizedConfig } from './types.js';
1
+ import { type NormalizedConfig } from './types.js';
2
2
  /**
3
3
  * Validator encapsulates the validations to perform before running
4
4
  * the tests
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@japa/runner",
3
3
  "description": "A simple yet powerful testing framework for Node.js",
4
- "version": "4.3.1",
4
+ "version": "5.0.0",
5
5
  "engines": {
6
6
  "node": ">=18.16.0"
7
7
  },
@@ -16,6 +16,7 @@
16
16
  ".": "./build/index.js",
17
17
  "./types": "./build/src/types.js",
18
18
  "./reporters": "./build/src/reporters/main.js",
19
+ "./plugins": "./build/src/plugins/main.js",
19
20
  "./factories": "./build/factories/main.js",
20
21
  "./core": "./build/modules/core/main.js"
21
22
  },
@@ -27,46 +28,42 @@
27
28
  "typecheck": "tsc --noEmit",
28
29
  "clean": "del-cli build",
29
30
  "precompile": "npm run lint && npm run clean",
30
- "compile": "tsup-node && tsc --emitDeclarationOnly --declaration",
31
+ "compile": "tsdown && tsc --emitDeclarationOnly --declaration",
31
32
  "build": "npm run compile",
32
33
  "version": "npm run build",
33
34
  "prepublishOnly": "npm run build",
34
35
  "release": "release-it",
35
- "quick:test": "glob -c \"node --import=ts-node-maintained/register/esm --enable-source-maps --test-reporter=spec --test\" \"tests/*.spec.ts\""
36
+ "quick:test": "node --import=@poppinss/ts-exec --enable-source-maps --test-reporter=spec --test tests/*.spec.ts"
36
37
  },
37
38
  "devDependencies": {
38
- "@adonisjs/eslint-config": "^2.1.0",
39
+ "@adonisjs/eslint-config": "^3.0.0-next.5",
39
40
  "@adonisjs/prettier-config": "^1.4.5",
40
- "@adonisjs/tsconfig": "^1.4.1",
41
- "@release-it/conventional-changelog": "^10.0.1",
42
- "@swc/core": "1.13.1",
43
- "@types/chai": "^5.2.2",
44
- "@types/ms": "^2.1.0",
45
- "@types/node": "^24.0.15",
41
+ "@adonisjs/tsconfig": "^2.0.0-next.3",
42
+ "@poppinss/ts-exec": "^1.4.1",
43
+ "@release-it/conventional-changelog": "^10.0.3",
44
+ "@types/chai": "^5.2.3",
45
+ "@types/node": "^25.0.1",
46
46
  "c8": "^10.1.3",
47
- "chai": "^5.2.1",
48
- "cross-env": "^7.0.3",
49
- "del-cli": "^6.0.0",
50
- "eslint": "^9.31.0",
51
- "glob": "^11.0.3",
52
- "prettier": "^3.6.2",
53
- "release-it": "^19.0.4",
54
- "ts-node-maintained": "^10.9.5",
55
- "tsup": "^8.5.0",
56
- "typescript": "^5.8.3"
47
+ "chai": "^6.2.1",
48
+ "cross-env": "^10.1.0",
49
+ "del-cli": "^7.0.0",
50
+ "eslint": "^9.39.2",
51
+ "prettier": "^3.7.4",
52
+ "release-it": "^19.1.0",
53
+ "serialize-error": "^12.0.0",
54
+ "tsdown": "^0.17.3",
55
+ "typescript": "^5.9.3"
57
56
  },
58
57
  "dependencies": {
59
- "@japa/core": "^10.3.0",
60
- "@japa/errors-printer": "^4.1.2",
61
- "@poppinss/colors": "^4.1.5",
62
- "@poppinss/hooks": "^7.2.6",
63
- "fast-glob": "^3.3.3",
58
+ "@japa/core": "^10.4.0",
59
+ "@japa/errors-printer": "^4.1.4",
60
+ "@poppinss/colors": "^4.1.6",
61
+ "@poppinss/hooks": "^7.3.0",
62
+ "@poppinss/string": "^1.7.1",
63
+ "error-stack-parser-es": "^1.0.5",
64
64
  "find-cache-directory": "^6.0.0",
65
65
  "getopts": "^2.3.0",
66
- "ms": "^2.1.3",
67
- "serialize-error": "^12.0.0",
68
- "slash": "^5.1.0",
69
- "supports-color": "^10.0.0"
66
+ "supports-color": "^10.2.2"
70
67
  },
71
68
  "homepage": "https://github.com/japa/runner#readme",
72
69
  "repository": {
@@ -87,10 +84,11 @@
87
84
  "access": "public",
88
85
  "provenance": true
89
86
  },
90
- "tsup": {
87
+ "tsdown": {
91
88
  "entry": [
92
89
  "./index.ts",
93
90
  "./src/types.ts",
91
+ "./src/plugins/main.ts",
94
92
  "./src/reporters/main.ts",
95
93
  "./factories/main.ts",
96
94
  "./modules/core/main.ts"
@@ -98,8 +96,11 @@
98
96
  "outDir": "./build",
99
97
  "clean": true,
100
98
  "format": "esm",
99
+ "minify": "dce-only",
100
+ "fixedExtension": false,
101
101
  "dts": false,
102
- "sourcemap": false,
102
+ "treeshake": false,
103
+ "sourcemaps": false,
103
104
  "target": "esnext"
104
105
  },
105
106
  "release-it": {
@@ -1,17 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from === "object" || typeof from === "function") {
7
- for (let key of __getOwnPropNames(from))
8
- if (!__hasOwnProp.call(to, key) && key !== except)
9
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
- }
11
- return to;
12
- };
13
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
14
-
15
- export {
16
- __reExport
17
- };