@cucumber/cucumber 8.0.0-rc.2 → 8.1.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 +82 -51
- package/api/index.d.ts +6 -0
- package/bin/{cucumber-js → cucumber.js} +0 -0
- package/lib/api/convert_configuration.d.ts +4 -0
- package/lib/api/convert_configuration.js +65 -0
- package/lib/api/convert_configuration.js.map +1 -0
- package/lib/api/environment.d.ts +2 -0
- package/lib/api/environment.js +13 -0
- package/lib/api/environment.js.map +1 -0
- package/lib/{run → api}/formatters.d.ts +5 -3
- package/lib/{run → api}/formatters.js +13 -17
- package/lib/api/formatters.js.map +1 -0
- package/lib/api/gherkin.d.ts +21 -0
- package/lib/api/gherkin.js +65 -0
- package/lib/api/gherkin.js.map +1 -0
- package/lib/api/index.d.ts +11 -0
- package/lib/api/index.js +28 -0
- package/lib/api/index.js.map +1 -0
- package/lib/api/load_configuration.d.ts +9 -0
- package/lib/api/load_configuration.js +32 -0
- package/lib/api/load_configuration.js.map +1 -0
- package/lib/api/load_sources.d.ts +9 -0
- package/lib/api/load_sources.js +53 -0
- package/lib/api/load_sources.js.map +1 -0
- package/lib/api/load_support.d.ts +10 -0
- package/lib/api/load_support.js +28 -0
- package/lib/api/load_support.js.map +1 -0
- package/lib/api/paths.d.ts +7 -0
- package/lib/{run → api}/paths.js +25 -9
- package/lib/api/paths.js.map +1 -0
- package/lib/api/run_cucumber.d.ts +11 -0
- package/lib/api/run_cucumber.js +108 -0
- package/lib/api/run_cucumber.js.map +1 -0
- package/lib/{run → api}/runtime.d.ts +8 -7
- package/lib/api/runtime.js +36 -0
- package/lib/api/runtime.js.map +1 -0
- package/lib/{run → api}/support.d.ts +4 -3
- package/lib/{run → api}/support.js +5 -10
- package/lib/api/support.js.map +1 -0
- package/lib/api/types.d.ts +168 -0
- package/lib/{run → api}/types.js +0 -0
- package/lib/api/types.js.map +1 -0
- package/lib/api/wrapper.mjs +6 -0
- package/lib/cli/helpers.d.ts +16 -11
- package/lib/cli/helpers.js +25 -30
- package/lib/cli/helpers.js.map +1 -1
- package/lib/cli/index.d.ts +3 -1
- package/lib/cli/index.js +35 -19
- package/lib/cli/index.js.map +1 -1
- package/lib/cli/publish_banner.js +6 -6
- package/lib/cli/publish_banner.js.map +1 -1
- package/lib/cli/run.js +12 -3
- package/lib/cli/run.js.map +1 -1
- package/lib/cli/validate_node_engine_version.d.ts +10 -0
- package/lib/cli/validate_node_engine_version.js +24 -0
- package/lib/cli/validate_node_engine_version.js.map +1 -0
- package/lib/configuration/argv_parser.d.ts +20 -0
- package/lib/{cli → configuration}/argv_parser.js +45 -47
- package/lib/configuration/argv_parser.js.map +1 -0
- package/lib/configuration/check_schema.d.ts +2 -0
- package/lib/configuration/check_schema.js +60 -0
- package/lib/configuration/check_schema.js.map +1 -0
- package/lib/configuration/default_configuration.d.ts +2 -0
- package/lib/configuration/default_configuration.js +27 -0
- package/lib/configuration/default_configuration.js.map +1 -0
- package/lib/configuration/from_file.d.ts +2 -0
- package/lib/configuration/from_file.js +68 -0
- package/lib/configuration/from_file.js.map +1 -0
- package/lib/configuration/helpers.d.ts +1 -0
- package/lib/configuration/helpers.js +11 -0
- package/lib/configuration/helpers.js.map +1 -0
- package/lib/configuration/index.d.ts +6 -0
- package/lib/configuration/index.js +16 -1
- package/lib/configuration/index.js.map +1 -1
- package/lib/configuration/locate_file.d.ts +1 -0
- package/lib/configuration/locate_file.js +19 -0
- package/lib/configuration/locate_file.js.map +1 -0
- package/lib/configuration/merge_configurations.d.ts +2 -0
- package/lib/configuration/merge_configurations.js +48 -0
- package/lib/configuration/merge_configurations.js.map +1 -0
- package/lib/configuration/option_splitter.d.ts +3 -0
- package/lib/{cli → configuration}/option_splitter.js +3 -3
- package/lib/configuration/option_splitter.js.map +1 -0
- package/lib/configuration/types.d.ts +24 -28
- package/lib/configuration/types.js.map +1 -1
- package/lib/configuration/validate_configuration.d.ts +2 -0
- package/lib/configuration/validate_configuration.js +10 -0
- package/lib/configuration/validate_configuration.js.map +1 -0
- package/lib/formatter/builder.d.ts +3 -3
- package/lib/formatter/builder.js +30 -4
- package/lib/formatter/builder.js.map +1 -1
- package/lib/formatter/fixtures/typescript.d.ts +2 -0
- package/lib/formatter/fixtures/typescript.js +6 -0
- package/lib/formatter/fixtures/typescript.js.map +1 -0
- package/lib/formatter/get_color_fns.js +15 -16
- package/lib/formatter/get_color_fns.js.map +1 -1
- package/lib/formatter/helpers/event_data_collector.js +5 -1
- package/lib/formatter/helpers/event_data_collector.js.map +1 -1
- package/lib/formatter/helpers/index.js +5 -1
- package/lib/formatter/helpers/index.js.map +1 -1
- package/lib/formatter/helpers/issue_helpers.d.ts +2 -2
- package/lib/formatter/helpers/issue_helpers.js +2 -2
- package/lib/formatter/helpers/issue_helpers.js.map +1 -1
- package/lib/formatter/helpers/summary_helpers.js +5 -1
- package/lib/formatter/helpers/summary_helpers.js.map +1 -1
- package/lib/formatter/helpers/test_case_attempt_formatter.d.ts +2 -2
- package/lib/formatter/helpers/test_case_attempt_formatter.js +18 -10
- package/lib/formatter/helpers/test_case_attempt_formatter.js.map +1 -1
- package/lib/formatter/helpers/test_case_attempt_parser.d.ts +2 -2
- package/lib/formatter/helpers/test_case_attempt_parser.js +7 -2
- package/lib/formatter/helpers/test_case_attempt_parser.js.map +1 -1
- package/lib/formatter/helpers/usage_helpers/index.d.ts +1 -2
- package/lib/formatter/helpers/usage_helpers/index.js +8 -4
- package/lib/formatter/helpers/usage_helpers/index.js.map +1 -1
- package/lib/formatter/index.d.ts +14 -2
- package/lib/formatter/index.js +2 -0
- package/lib/formatter/index.js.map +1 -1
- package/lib/formatter/json_formatter.js +5 -1
- package/lib/formatter/json_formatter.js.map +1 -1
- package/lib/formatter/progress_bar_formatter.js +1 -1
- package/lib/formatter/progress_bar_formatter.js.map +1 -1
- package/lib/formatter/progress_formatter.js +5 -1
- package/lib/formatter/progress_formatter.js.map +1 -1
- package/lib/formatter/rerun_formatter.js +5 -1
- package/lib/formatter/rerun_formatter.js.map +1 -1
- package/lib/formatter/snippets_formatter.js +5 -2
- package/lib/formatter/snippets_formatter.js.map +1 -1
- package/lib/formatter/step_definition_snippet_builder/javascript_snippet_syntax.d.ts +1 -0
- package/lib/formatter/step_definition_snippet_builder/javascript_snippet_syntax.js +9 -1
- package/lib/formatter/step_definition_snippet_builder/javascript_snippet_syntax.js.map +1 -1
- package/lib/formatter/summary_formatter.js +1 -1
- package/lib/formatter/summary_formatter.js.map +1 -1
- package/lib/formatter/usage_formatter.js +5 -2
- package/lib/formatter/usage_formatter.js.map +1 -1
- package/lib/formatter/usage_json_formatter.js +0 -1
- package/lib/formatter/usage_json_formatter.js.map +1 -1
- package/lib/index.d.ts +12 -8
- package/lib/index.js +11 -2
- package/lib/index.js.map +1 -1
- package/lib/models/definition.d.ts +1 -0
- package/lib/models/definition.js.map +1 -1
- package/lib/models/pickle_order.d.ts +1 -0
- package/lib/models/pickle_order.js +3 -0
- package/lib/models/pickle_order.js.map +1 -0
- package/lib/models/test_case_hook_definition.d.ts +1 -0
- package/lib/models/test_case_hook_definition.js +1 -0
- package/lib/models/test_case_hook_definition.js.map +1 -1
- package/lib/runtime/attachment_manager/index.js +5 -1
- package/lib/runtime/attachment_manager/index.js.map +1 -1
- package/lib/runtime/helpers.js +5 -1
- package/lib/runtime/helpers.js.map +1 -1
- package/lib/runtime/index.d.ts +3 -5
- package/lib/runtime/index.js +7 -36
- package/lib/runtime/index.js.map +1 -1
- package/lib/runtime/parallel/command_types.d.ts +3 -2
- package/lib/runtime/parallel/command_types.js.map +1 -1
- package/lib/runtime/parallel/coordinator.d.ts +27 -8
- package/lib/runtime/parallel/coordinator.js +71 -20
- package/lib/runtime/parallel/coordinator.js.map +1 -1
- package/lib/runtime/parallel/worker.d.ts +2 -4
- package/lib/runtime/parallel/worker.js +11 -34
- package/lib/runtime/parallel/worker.js.map +1 -1
- package/lib/runtime/run_test_run_hooks.d.ts +3 -0
- package/lib/runtime/run_test_run_hooks.js +28 -0
- package/lib/runtime/run_test_run_hooks.js.map +1 -0
- package/lib/runtime/step_runner.js +5 -1
- package/lib/runtime/step_runner.js.map +1 -1
- package/lib/runtime/stopwatch.js +5 -1
- package/lib/runtime/stopwatch.js.map +1 -1
- package/lib/runtime/test_case_runner.js +5 -1
- package/lib/runtime/test_case_runner.js.map +1 -1
- package/lib/support_code_library_builder/index.d.ts +4 -2
- package/lib/support_code_library_builder/index.js +25 -2
- package/lib/support_code_library_builder/index.js.map +1 -1
- package/lib/support_code_library_builder/parallel_can_assign_helpers.d.ts +2 -0
- package/lib/support_code_library_builder/parallel_can_assign_helpers.js +16 -0
- package/lib/support_code_library_builder/parallel_can_assign_helpers.js.map +1 -0
- package/lib/support_code_library_builder/types.d.ts +10 -0
- package/lib/support_code_library_builder/types.js.map +1 -1
- package/lib/support_code_library_builder/world.d.ts +7 -7
- package/lib/support_code_library_builder/world.js.map +1 -1
- package/lib/time.js +5 -1
- package/lib/time.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/lib/wrapper.mjs +5 -1
- package/package.json +61 -38
- package/lib/cli/argv_parser.d.ts +0 -51
- package/lib/cli/argv_parser.js.map +0 -1
- package/lib/cli/configuration_builder.d.ts +0 -5
- package/lib/cli/configuration_builder.js +0 -71
- package/lib/cli/configuration_builder.js.map +0 -1
- package/lib/cli/option_splitter.d.ts +0 -4
- package/lib/cli/option_splitter.js.map +0 -1
- package/lib/cli/profile_loader.d.ts +0 -7
- package/lib/cli/profile_loader.js +0 -49
- package/lib/cli/profile_loader.js.map +0 -1
- package/lib/run/formatters.js.map +0 -1
- package/lib/run/index.d.ts +0 -2
- package/lib/run/index.js +0 -15
- package/lib/run/index.js.map +0 -1
- package/lib/run/paths.d.ts +0 -6
- package/lib/run/paths.js.map +0 -1
- package/lib/run/runCucumber.d.ts +0 -3
- package/lib/run/runCucumber.js +0 -88
- package/lib/run/runCucumber.js.map +0 -1
- package/lib/run/runtime.js +0 -58
- package/lib/run/runtime.js.map +0 -1
- package/lib/run/support.js.map +0 -1
- package/lib/run/types.d.ts +0 -12
- package/lib/run/types.js.map +0 -1
package/lib/run/runtime.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
|
-
};
|
|
24
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.makeRuntime = void 0;
|
|
26
|
-
const runtime_1 = __importStar(require("../runtime"));
|
|
27
|
-
const coordinator_1 = __importDefault(require("../runtime/parallel/coordinator"));
|
|
28
|
-
function makeRuntime({ cwd, eventBroadcaster, eventDataCollector, pickleIds, newId, supportCodeLibrary, supportCodePaths, supportCodeRequiredModules, options: { parallel = 0, ...runtimeOptions } = {}, }) {
|
|
29
|
-
// sprinkle specified runtime options over the defaults
|
|
30
|
-
const options = {
|
|
31
|
-
...runtime_1.DEFAULT_RUNTIME_OPTIONS,
|
|
32
|
-
...runtimeOptions,
|
|
33
|
-
};
|
|
34
|
-
if (parallel > 0) {
|
|
35
|
-
return new coordinator_1.default({
|
|
36
|
-
cwd,
|
|
37
|
-
eventBroadcaster,
|
|
38
|
-
eventDataCollector,
|
|
39
|
-
pickleIds,
|
|
40
|
-
options,
|
|
41
|
-
newId,
|
|
42
|
-
supportCodeLibrary,
|
|
43
|
-
supportCodePaths,
|
|
44
|
-
supportCodeRequiredModules,
|
|
45
|
-
numberOfWorkers: parallel,
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
return new runtime_1.default({
|
|
49
|
-
eventBroadcaster,
|
|
50
|
-
eventDataCollector,
|
|
51
|
-
newId,
|
|
52
|
-
pickleIds,
|
|
53
|
-
supportCodeLibrary,
|
|
54
|
-
options,
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
exports.makeRuntime = makeRuntime;
|
|
58
|
-
//# sourceMappingURL=runtime.js.map
|
package/lib/run/runtime.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/run/runtime.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sDAImB;AAKnB,kFAAyD;AAEzD,SAAgB,WAAW,CAAC,EAC1B,GAAG,EACH,gBAAgB,EAChB,kBAAkB,EAClB,SAAS,EACT,KAAK,EACL,kBAAkB,EAClB,gBAAgB,EAChB,0BAA0B,EAC1B,OAAO,EAAE,EAAE,QAAQ,GAAG,CAAC,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,GAWlD;IACC,uDAAuD;IACvD,MAAM,OAAO,GAAG;QACd,GAAG,iCAAuB;QAC1B,GAAG,cAAc;KAClB,CAAA;IACD,IAAI,QAAQ,GAAG,CAAC,EAAE;QAChB,OAAO,IAAI,qBAAW,CAAC;YACrB,GAAG;YACH,gBAAgB;YAChB,kBAAkB;YAClB,SAAS;YACT,OAAO;YACP,KAAK;YACL,kBAAkB;YAClB,gBAAgB;YAChB,0BAA0B;YAC1B,eAAe,EAAE,QAAQ;SAC1B,CAAC,CAAA;KACH;IACD,OAAO,IAAI,iBAAO,CAAC;QACjB,gBAAgB;QAChB,kBAAkB;QAClB,KAAK;QACL,SAAS;QACT,kBAAkB;QAClB,OAAO;KACR,CAAC,CAAA;AACJ,CAAC;AAhDD,kCAgDC","sourcesContent":["import Runtime, {\n DEFAULT_RUNTIME_OPTIONS,\n IRuntime,\n IRuntimeOptions,\n} from '../runtime'\nimport { EventEmitter } from 'events'\nimport { EventDataCollector } from '../formatter/helpers'\nimport { IdGenerator } from '@cucumber/messages'\nimport { ISupportCodeLibrary } from '../support_code_library_builder/types'\nimport Coordinator from '../runtime/parallel/coordinator'\n\nexport function makeRuntime({\n cwd,\n eventBroadcaster,\n eventDataCollector,\n pickleIds,\n newId,\n supportCodeLibrary,\n supportCodePaths,\n supportCodeRequiredModules,\n options: { parallel = 0, ...runtimeOptions } = {},\n}: {\n cwd: string\n eventBroadcaster: EventEmitter\n eventDataCollector: EventDataCollector\n newId: IdGenerator.NewId\n pickleIds: string[]\n supportCodeLibrary: ISupportCodeLibrary\n supportCodePaths: string[]\n supportCodeRequiredModules: string[]\n options: Partial<IRuntimeOptions> & { parallel?: number }\n}): IRuntime {\n // sprinkle specified runtime options over the defaults\n const options = {\n ...DEFAULT_RUNTIME_OPTIONS,\n ...runtimeOptions,\n }\n if (parallel > 0) {\n return new Coordinator({\n cwd,\n eventBroadcaster,\n eventDataCollector,\n pickleIds,\n options,\n newId,\n supportCodeLibrary,\n supportCodePaths,\n supportCodeRequiredModules,\n numberOfWorkers: parallel,\n })\n }\n return new Runtime({\n eventBroadcaster,\n eventDataCollector,\n newId,\n pickleIds,\n supportCodeLibrary,\n options,\n })\n}\n"]}
|
package/lib/run/support.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"support.js","sourceRoot":"","sources":["../../src/run/support.ts"],"names":[],"mappings":";;;;;;AAEA,mGAAuE;AACvE,6BAAmC;AACnC,4CAA6C;AAE7C,8DAA8D;AAC9D,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC,CAAA;AAEpC,KAAK,UAAU,qBAAqB,CAAC,EAC1C,GAAG,EACH,KAAK,EACL,0BAA0B,EAC1B,gBAAgB,GAMjB;IACC,sCAAyB,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IAC3C,0BAA0B,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAA;IAC3D,KAAK,MAAM,QAAQ,IAAI,gBAAgB,EAAE;QACvC,IAAI,0BAA0B,CAAC,MAAM,IAAI,CAAC,IAAA,sBAAY,EAAC,QAAQ,CAAC,EAAE;YAChE,OAAO,CAAC,QAAQ,CAAC,CAAA;SAClB;aAAM;YACL,MAAM,QAAQ,CAAC,IAAA,mBAAa,EAAC,QAAQ,CAAC,CAAC,CAAA;SACxC;KACF;IACD,OAAO,sCAAyB,CAAC,QAAQ,EAAE,CAAA;AAC7C,CAAC;AArBD,sDAqBC","sourcesContent":["import { IdGenerator } from '@cucumber/messages'\nimport { ISupportCodeLibrary } from '../support_code_library_builder/types'\nimport supportCodeLibraryBuilder from '../support_code_library_builder'\nimport { pathToFileURL } from 'url'\nimport { isJavaScript } from '../cli/helpers'\n\n// eslint-disable-next-line @typescript-eslint/no-var-requires\nconst { importer } = require('../importer')\n\nexport async function getSupportCodeLibrary({\n cwd,\n newId,\n supportCodeRequiredModules,\n supportCodePaths,\n}: {\n cwd: string\n newId: IdGenerator.NewId\n supportCodeRequiredModules: string[]\n supportCodePaths: string[]\n}): Promise<ISupportCodeLibrary> {\n supportCodeLibraryBuilder.reset(cwd, newId)\n supportCodeRequiredModules.map((module) => require(module))\n for (const codePath of supportCodePaths) {\n if (supportCodeRequiredModules.length || !isJavaScript(codePath)) {\n require(codePath)\n } else {\n await importer(pathToFileURL(codePath))\n }\n }\n return supportCodeLibraryBuilder.finalize()\n}\n"]}
|
package/lib/run/types.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { ISupportCodeLibrary } from '../support_code_library_builder/types';
|
|
3
|
-
import { IFormatterStream } from '../formatter';
|
|
4
|
-
export interface IRunEnvironment {
|
|
5
|
-
cwd: string;
|
|
6
|
-
stdout: IFormatterStream;
|
|
7
|
-
env: NodeJS.ProcessEnv;
|
|
8
|
-
}
|
|
9
|
-
export interface IRunResult {
|
|
10
|
-
success: boolean;
|
|
11
|
-
support: ISupportCodeLibrary;
|
|
12
|
-
}
|
package/lib/run/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/run/types.ts"],"names":[],"mappings":"","sourcesContent":["import { ISupportCodeLibrary } from '../support_code_library_builder/types'\nimport { IFormatterStream } from '../formatter'\n\nexport interface IRunEnvironment {\n cwd: string\n stdout: IFormatterStream\n env: NodeJS.ProcessEnv\n}\n\nexport interface IRunResult {\n success: boolean\n support: ISupportCodeLibrary\n}\n"]}
|