@cucumber/cucumber 7.3.2 → 8.0.0-rc.1
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 +11 -4
- package/lib/cli/argv_parser.d.ts +1 -2
- package/lib/cli/argv_parser.js +8 -12
- package/lib/cli/argv_parser.js.map +1 -1
- package/lib/cli/configuration_builder.d.ts +0 -1
- package/lib/cli/configuration_builder.js +18 -20
- package/lib/cli/configuration_builder.js.map +1 -1
- package/lib/cli/helpers.d.ts +1 -0
- package/lib/cli/helpers.js +9 -4
- package/lib/cli/helpers.js.map +1 -1
- package/lib/cli/i18n.js +6 -6
- package/lib/cli/i18n.js.map +1 -1
- package/lib/cli/index.d.ts +1 -1
- package/lib/cli/index.js +18 -20
- package/lib/cli/index.js.map +1 -1
- package/lib/cli/profile_loader.d.ts +3 -2
- package/lib/cli/profile_loader.js +17 -10
- package/lib/cli/profile_loader.js.map +1 -1
- package/lib/formatter/builder.d.ts +5 -4
- package/lib/formatter/builder.js +38 -52
- package/lib/formatter/builder.js.map +1 -1
- package/lib/formatter/helpers/event_data_collector.d.ts +2 -1
- package/lib/formatter/helpers/event_data_collector.js +6 -5
- package/lib/formatter/helpers/event_data_collector.js.map +1 -1
- package/lib/formatter/helpers/formatters.d.ts +6 -0
- package/lib/formatter/helpers/formatters.js +41 -0
- package/lib/formatter/helpers/formatters.js.map +1 -0
- package/lib/formatter/helpers/gherkin_document_parser.js +24 -37
- package/lib/formatter/helpers/gherkin_document_parser.js.map +1 -1
- package/lib/formatter/helpers/issue_helpers.d.ts +2 -2
- package/lib/formatter/helpers/issue_helpers.js +4 -5
- package/lib/formatter/helpers/issue_helpers.js.map +1 -1
- package/lib/formatter/helpers/keyword_type.js +1 -5
- package/lib/formatter/helpers/keyword_type.js.map +1 -1
- package/lib/formatter/helpers/pickle_parser.js +8 -17
- package/lib/formatter/helpers/pickle_parser.js.map +1 -1
- package/lib/formatter/helpers/summary_helpers.js +7 -6
- package/lib/formatter/helpers/summary_helpers.js.map +1 -1
- package/lib/formatter/helpers/test_case_attempt_formatter.js +1 -1
- package/lib/formatter/helpers/test_case_attempt_formatter.js.map +1 -1
- package/lib/formatter/helpers/test_case_attempt_parser.js +4 -7
- package/lib/formatter/helpers/test_case_attempt_parser.js.map +1 -1
- package/lib/formatter/helpers/usage_helpers/index.js +21 -35
- package/lib/formatter/helpers/usage_helpers/index.js.map +1 -1
- package/lib/formatter/html_formatter.d.ts +1 -0
- package/lib/formatter/html_formatter.js +1 -0
- package/lib/formatter/html_formatter.js.map +1 -1
- package/lib/formatter/http_stream.js +1 -1
- package/lib/formatter/http_stream.js.map +1 -1
- package/lib/formatter/index.d.ts +1 -0
- package/lib/formatter/index.js.map +1 -1
- package/lib/formatter/json_formatter.d.ts +1 -0
- package/lib/formatter/json_formatter.js +12 -7
- package/lib/formatter/json_formatter.js.map +1 -1
- package/lib/formatter/message_formatter.d.ts +1 -0
- package/lib/formatter/message_formatter.js +1 -0
- package/lib/formatter/message_formatter.js.map +1 -1
- package/lib/formatter/progress_bar_formatter.d.ts +1 -0
- package/lib/formatter/progress_bar_formatter.js +2 -1
- package/lib/formatter/progress_bar_formatter.js.map +1 -1
- package/lib/formatter/progress_formatter.d.ts +1 -0
- package/lib/formatter/progress_formatter.js +1 -0
- package/lib/formatter/progress_formatter.js.map +1 -1
- package/lib/formatter/rerun_formatter.d.ts +1 -0
- package/lib/formatter/rerun_formatter.js +11 -7
- package/lib/formatter/rerun_formatter.js.map +1 -1
- package/lib/formatter/snippets_formatter.d.ts +1 -0
- package/lib/formatter/snippets_formatter.js +1 -0
- package/lib/formatter/snippets_formatter.js.map +1 -1
- package/lib/formatter/step_definition_snippet_builder/javascript_snippet_syntax.js +3 -0
- package/lib/formatter/step_definition_snippet_builder/javascript_snippet_syntax.js.map +1 -1
- package/lib/formatter/step_definition_snippet_builder/snippet_syntax.d.ts +1 -1
- package/lib/formatter/step_definition_snippet_builder/snippet_syntax.js.map +1 -1
- package/lib/formatter/summary_formatter.d.ts +1 -0
- package/lib/formatter/summary_formatter.js +4 -4
- package/lib/formatter/summary_formatter.js.map +1 -1
- package/lib/formatter/usage_formatter.d.ts +1 -0
- package/lib/formatter/usage_formatter.js +3 -3
- package/lib/formatter/usage_formatter.js.map +1 -1
- package/lib/formatter/usage_json_formatter.d.ts +1 -0
- package/lib/formatter/usage_json_formatter.js +1 -0
- package/lib/formatter/usage_json_formatter.js.map +1 -1
- package/lib/importer.js +13 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +4 -1
- package/lib/index.js.map +1 -1
- package/lib/models/data_table.js +9 -7
- package/lib/models/data_table.js.map +1 -1
- package/lib/models/step_definition.js +1 -2
- package/lib/models/step_definition.js.map +1 -1
- package/lib/pickle_filter.js +5 -5
- package/lib/pickle_filter.js.map +1 -1
- package/lib/runtime/assemble_test_cases.js +2 -2
- package/lib/runtime/assemble_test_cases.js.map +1 -1
- package/lib/runtime/helpers.d.ts +1 -0
- package/lib/runtime/helpers.js +36 -1
- package/lib/runtime/helpers.js.map +1 -1
- package/lib/runtime/index.d.ts +0 -2
- package/lib/runtime/index.js +7 -41
- package/lib/runtime/index.js.map +1 -1
- package/lib/runtime/parallel/coordinator.d.ts +0 -1
- package/lib/runtime/parallel/coordinator.js +11 -15
- package/lib/runtime/parallel/coordinator.js.map +1 -1
- package/lib/runtime/parallel/worker.js +15 -7
- package/lib/runtime/parallel/worker.js.map +1 -1
- package/lib/runtime/step_runner.js +1 -3
- package/lib/runtime/step_runner.js.map +1 -1
- package/lib/runtime/test_case_runner.d.ts +3 -3
- package/lib/runtime/test_case_runner.js +13 -22
- package/lib/runtime/test_case_runner.js.map +1 -1
- package/lib/stack_trace_filter.js +4 -5
- package/lib/stack_trace_filter.js.map +1 -1
- package/lib/support_code_library_builder/build_helpers.js +14 -10
- package/lib/support_code_library_builder/build_helpers.js.map +1 -1
- package/lib/support_code_library_builder/index.js +0 -15
- package/lib/support_code_library_builder/index.js.map +1 -1
- package/lib/support_code_library_builder/types.d.ts +1 -0
- package/lib/support_code_library_builder/types.js.map +1 -1
- package/lib/support_code_library_builder/validate_arguments.js +14 -19
- package/lib/support_code_library_builder/validate_arguments.js.map +1 -1
- package/lib/time.d.ts +1 -0
- package/lib/time.js +17 -2
- package/lib/time.js.map +1 -1
- package/lib/user_code_runner.js +7 -14
- package/lib/user_code_runner.js.map +1 -1
- package/lib/value_checker.d.ts +2 -2
- package/lib/value_checker.js.map +1 -1
- package/lib/wrapper.mjs +38 -0
- package/package.json +71 -63
- package/lib/support_code_library_builder/finalize_helpers.d.ts +0 -10
- package/lib/support_code_library_builder/finalize_helpers.js +0 -26
- package/lib/support_code_library_builder/finalize_helpers.js.map +0 -1
package/lib/user_code_runner.js
CHANGED
|
@@ -3,8 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const
|
|
7
|
-
const time_1 = __importDefault(require("./time"));
|
|
6
|
+
const time_1 = require("./time");
|
|
8
7
|
const uncaught_exception_manager_1 = __importDefault(require("./uncaught_exception_manager"));
|
|
9
8
|
const util_1 = __importDefault(require("util"));
|
|
10
9
|
const value_checker_1 = require("./value_checker");
|
|
@@ -53,21 +52,16 @@ const UserCodeRunner = {
|
|
|
53
52
|
uncaught_exception_manager_1.default.registerHandler(exceptionHandler);
|
|
54
53
|
});
|
|
55
54
|
racingPromises.push(uncaughtExceptionPromise);
|
|
56
|
-
let
|
|
55
|
+
let finalPromise = Promise.race(racingPromises);
|
|
57
56
|
if (timeoutInMilliseconds >= 0) {
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
` within ${timeoutInMilliseconds.toString()} milliseconds`;
|
|
63
|
-
reject(new Error(timeoutMessage));
|
|
64
|
-
}, timeoutInMilliseconds);
|
|
65
|
-
});
|
|
66
|
-
racingPromises.push(timeoutPromise);
|
|
57
|
+
const timeoutMessage = 'function timed out, ensure the ' +
|
|
58
|
+
(callbackInterface ? 'callback is executed' : 'promise resolves') +
|
|
59
|
+
` within ${timeoutInMilliseconds.toString()} milliseconds`;
|
|
60
|
+
finalPromise = time_1.wrapPromiseWithTimeout(finalPromise, timeoutInMilliseconds, timeoutMessage);
|
|
67
61
|
}
|
|
68
62
|
let error, result;
|
|
69
63
|
try {
|
|
70
|
-
result = await
|
|
64
|
+
result = await finalPromise;
|
|
71
65
|
}
|
|
72
66
|
catch (e) {
|
|
73
67
|
if (e instanceof Error) {
|
|
@@ -80,7 +74,6 @@ const UserCodeRunner = {
|
|
|
80
74
|
error = new Error('Promise rejected without a reason');
|
|
81
75
|
}
|
|
82
76
|
}
|
|
83
|
-
time_1.default.clearTimeout(timeoutId);
|
|
84
77
|
uncaught_exception_manager_1.default.unregisterHandler(exceptionHandler);
|
|
85
78
|
return { error, result };
|
|
86
79
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user_code_runner.js","sourceRoot":"","sources":["../src/user_code_runner.ts"],"names":[],"mappings":";;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"user_code_runner.js","sourceRoot":"","sources":["../src/user_code_runner.ts"],"names":[],"mappings":"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","sourcesContent":["import { wrapPromiseWithTimeout } from './time'\nimport UncaughtExceptionManager from './uncaught_exception_manager'\nimport util from 'util'\nimport { doesHaveValue } from './value_checker'\n\nexport interface IRunRequest {\n argsArray: any[]\n thisArg: any\n fn: Function\n timeoutInMilliseconds: number\n}\n\nexport interface IRunResponse {\n error?: any\n result?: any\n}\n\nconst UserCodeRunner = {\n async run({\n argsArray,\n thisArg,\n fn,\n timeoutInMilliseconds,\n }: IRunRequest): Promise<IRunResponse> {\n const callbackPromise = new Promise((resolve, reject) => {\n argsArray.push((error: Error, result: IRunResponse) => {\n if (doesHaveValue(error)) {\n reject(error)\n } else {\n resolve(result)\n }\n })\n })\n\n let fnReturn\n try {\n fnReturn = fn.apply(thisArg, argsArray)\n } catch (e) {\n const error = e instanceof Error ? e : util.format(e)\n return { error }\n }\n\n const racingPromises = []\n const callbackInterface = fn.length === argsArray.length\n const promiseInterface =\n doesHaveValue(fnReturn) && typeof fnReturn.then === 'function'\n\n if (callbackInterface && promiseInterface) {\n return {\n error: new Error(\n 'function uses multiple asynchronous interfaces: callback and promise\\n' +\n 'to use the callback interface: do not return a promise\\n' +\n 'to use the promise interface: remove the last argument to the function'\n ),\n }\n } else if (callbackInterface) {\n racingPromises.push(callbackPromise)\n } else if (promiseInterface) {\n racingPromises.push(fnReturn)\n } else {\n return { result: fnReturn }\n }\n\n let exceptionHandler\n const uncaughtExceptionPromise = new Promise((resolve, reject) => {\n exceptionHandler = reject\n UncaughtExceptionManager.registerHandler(exceptionHandler)\n })\n racingPromises.push(uncaughtExceptionPromise)\n\n let finalPromise = Promise.race(racingPromises)\n if (timeoutInMilliseconds >= 0) {\n const timeoutMessage =\n 'function timed out, ensure the ' +\n (callbackInterface ? 'callback is executed' : 'promise resolves') +\n ` within ${timeoutInMilliseconds.toString()} milliseconds`\n finalPromise = wrapPromiseWithTimeout(\n finalPromise,\n timeoutInMilliseconds,\n timeoutMessage\n )\n }\n\n let error, result\n try {\n result = await finalPromise\n } catch (e) {\n if (e instanceof Error) {\n error = e\n } else if (doesHaveValue(e)) {\n error = util.format(e)\n } else {\n error = new Error('Promise rejected without a reason')\n }\n }\n\n UncaughtExceptionManager.unregisterHandler(exceptionHandler)\n\n return { error, result }\n },\n}\n\nexport default UserCodeRunner\n"]}
|
package/lib/value_checker.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare function doesHaveValue(value:
|
|
2
|
-
export declare function doesNotHaveValue(value:
|
|
1
|
+
export declare function doesHaveValue<T>(value: T): boolean;
|
|
2
|
+
export declare function doesNotHaveValue<T>(value: T): boolean;
|
|
3
3
|
export declare function valueOrDefault<T>(value: T, defaultValue: T): T;
|
package/lib/value_checker.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"value_checker.js","sourceRoot":"","sources":["../src/value_checker.ts"],"names":[],"mappings":";;;AAAA,SAAgB,aAAa,
|
|
1
|
+
{"version":3,"file":"value_checker.js","sourceRoot":"","sources":["../src/value_checker.ts"],"names":[],"mappings":";;;AAAA,SAAgB,aAAa,CAAI,KAAQ;IACvC,OAAO,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAA;AACjC,CAAC;AAFD,sCAEC;AAED,SAAgB,gBAAgB,CAAI,KAAQ;IAC1C,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAA;AAC9C,CAAC;AAFD,4CAEC;AAED,SAAgB,cAAc,CAAI,KAAQ,EAAE,YAAe;IACzD,IAAI,aAAa,CAAC,KAAK,CAAC,EAAE;QACxB,OAAO,KAAK,CAAA;KACb;IACD,OAAO,YAAY,CAAA;AACrB,CAAC;AALD,wCAKC","sourcesContent":["export function doesHaveValue<T>(value: T): boolean {\n return !doesNotHaveValue(value)\n}\n\nexport function doesNotHaveValue<T>(value: T): boolean {\n return value === null || value === undefined\n}\n\nexport function valueOrDefault<T>(value: T, defaultValue: T): T {\n if (doesHaveValue(value)) {\n return value\n }\n return defaultValue\n}\n"]}
|
package/lib/wrapper.mjs
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import cucumber from './index.js'
|
|
2
|
+
|
|
3
|
+
export const Cli = cucumber.Cli
|
|
4
|
+
export const parseGherkinMessageStream = cucumber.parseGherkinMessageStream
|
|
5
|
+
export const PickleFilter = cucumber.PickleFilter
|
|
6
|
+
export const Runtime = cucumber.Runtime
|
|
7
|
+
export const supportCodeLibraryBuilder = cucumber.supportCodeLibraryBuilder
|
|
8
|
+
export const Status = cucumber.Status
|
|
9
|
+
export const DataTable = cucumber.DataTable
|
|
10
|
+
|
|
11
|
+
export const Formatter = cucumber.Formatter
|
|
12
|
+
export const FormatterBuilder = cucumber.FormatterBuilder
|
|
13
|
+
export const JsonFormatter = cucumber.JsonFormatter
|
|
14
|
+
export const ProgressFormatter = cucumber.ProgressFormatter
|
|
15
|
+
export const RerunFormatter = cucumber.RerunFormatter
|
|
16
|
+
export const SnippetsFormatter = cucumber.SnippetsFormatter
|
|
17
|
+
export const SummaryFormatter = cucumber.SummaryFormatter
|
|
18
|
+
export const UsageFormatter = cucumber.UsageFormatter
|
|
19
|
+
export const UsageJsonFormatter = cucumber.UsageJsonFormatter
|
|
20
|
+
export const formatterHelpers = cucumber.formatterHelpers
|
|
21
|
+
|
|
22
|
+
export const After = cucumber.After
|
|
23
|
+
export const AfterAll = cucumber.AfterAll
|
|
24
|
+
export const AfterStep = cucumber.AfterStep
|
|
25
|
+
export const Before = cucumber.Before
|
|
26
|
+
export const BeforeAll = cucumber.BeforeAll
|
|
27
|
+
export const BeforeStep = cucumber.BeforeStep
|
|
28
|
+
export const defineParameterType = cucumber.defineParameterType
|
|
29
|
+
export const defineStep = cucumber.defineStep
|
|
30
|
+
export const Given = cucumber.Given
|
|
31
|
+
export const setDefaultTimeout = cucumber.setDefaultTimeout
|
|
32
|
+
export const setDefinitionFunctionWrapper = cucumber.setDefinitionFunctionWrapper
|
|
33
|
+
export const setWorldConstructor = cucumber.setWorldConstructor
|
|
34
|
+
export const Then = cucumber.Then
|
|
35
|
+
export const When = cucumber.When
|
|
36
|
+
|
|
37
|
+
export const World = cucumber.World
|
|
38
|
+
|
package/package.json
CHANGED
|
@@ -8,11 +8,12 @@
|
|
|
8
8
|
"gherkin",
|
|
9
9
|
"tests"
|
|
10
10
|
],
|
|
11
|
-
"version": "
|
|
11
|
+
"version": "8.0.0-rc.1",
|
|
12
12
|
"homepage": "https://github.com/cucumber/cucumber-js",
|
|
13
13
|
"author": "Julien Biezemans <jb@jbpros.com>",
|
|
14
14
|
"contributors": [
|
|
15
15
|
"Aaron Garvey",
|
|
16
|
+
"abelalmeida <abelalmeida@u.boisestate.edu>",
|
|
16
17
|
"Adam Ark <Adam-ARK@users.noreply.github.com>",
|
|
17
18
|
"Ádám Gólya <adam.golya@lab.coop>",
|
|
18
19
|
"ahulab <alexbaluha@gmail.com>",
|
|
@@ -23,6 +24,7 @@
|
|
|
23
24
|
"Artur Neumann <artur@jankaritech.com>",
|
|
24
25
|
"Artur Pomadowski <artur.pomadowski@gmail.com>",
|
|
25
26
|
"Aslak Hellesøy <aslak.hellesoy@gmail.com>",
|
|
27
|
+
"Aurélien Reeves <aurelien.reeves@smartbear.com>",
|
|
26
28
|
"basemmerink <bas.emmerink@gmail.com>",
|
|
27
29
|
"Ben Van Treese <vantreeseba@gmail.com>",
|
|
28
30
|
"Benjamín Eidelman <beneidel+gh@gmail.com>",
|
|
@@ -65,6 +67,7 @@
|
|
|
65
67
|
"Jayson Smith <github@nes.33mail.com>",
|
|
66
68
|
"Jesse Harlin <harlinjesse@gmail.com>",
|
|
67
69
|
"João Guilherme Farias Duda <jgfd@cin.ufpe.br>",
|
|
70
|
+
"Joaquín Sorianello <joac@users.noreply.github.com>",
|
|
68
71
|
"Joey Jan <OverFlow636@users.noreply.github.com>",
|
|
69
72
|
"John Krull <astrom.flux@gmail.com>",
|
|
70
73
|
"John McLaughlin <john.mjhm@gmail.com>",
|
|
@@ -92,10 +95,10 @@
|
|
|
92
95
|
"Leonardo <mondloslp@gmail.com>",
|
|
93
96
|
"lopesc <lopesc@users.noreply.github.com>",
|
|
94
97
|
"Lucas Cimon <lucas.cimon@gmail.com>",
|
|
98
|
+
"Ludek",
|
|
95
99
|
"Lukas Degener <l.degener@tarent.de>",
|
|
96
100
|
"Łukasz Gandecki <lgandecki@css.edu>",
|
|
97
101
|
"M.P. Korstanje <mpkorstanje@users.noreply.github.com>",
|
|
98
|
-
"mannyluvstacos <mannyis@typingona.computer>",
|
|
99
102
|
"Marat Dyatko <vectart@gmail.com>",
|
|
100
103
|
"Marc Burton <marc.burton@first-utility.com>",
|
|
101
104
|
"Marcel Hoyer <mhoyer@pixelplastic.de>",
|
|
@@ -139,6 +142,7 @@
|
|
|
139
142
|
"temyers <temyers@users.noreply.github.com>",
|
|
140
143
|
"Tim Perry <tim.perry@softwire.com>",
|
|
141
144
|
"Tom V <tom@toc.com>",
|
|
145
|
+
"Tomer Ben-Rachel <tomerpacific@gmail.com>",
|
|
142
146
|
"Tristan Dunn <tristanzdunn@gmail.com>",
|
|
143
147
|
"unknown <jharlin@NormanDev2.telogical.com>",
|
|
144
148
|
"Valerio Innocenti Sedili <valerio.innocenti.ext@yoox.com>",
|
|
@@ -164,34 +168,39 @@
|
|
|
164
168
|
"lib": "./lib"
|
|
165
169
|
},
|
|
166
170
|
"main": "./lib/index.js",
|
|
171
|
+
"exports": {
|
|
172
|
+
".": {
|
|
173
|
+
"import": "./lib/wrapper.mjs",
|
|
174
|
+
"require": "./lib/index.js"
|
|
175
|
+
},
|
|
176
|
+
"./lib/*": {
|
|
177
|
+
"require": "./lib/*.js"
|
|
178
|
+
}
|
|
179
|
+
},
|
|
167
180
|
"types": "./lib/index.d.ts",
|
|
168
181
|
"engines": {
|
|
169
|
-
"node": ">=
|
|
182
|
+
"node": ">=12"
|
|
170
183
|
},
|
|
171
184
|
"dependencies": {
|
|
172
|
-
"@cucumber/create-meta": "
|
|
173
|
-
"@cucumber/cucumber-expressions": "^
|
|
174
|
-
"@cucumber/gherkin": "^
|
|
175
|
-
"@cucumber/gherkin-streams": "^
|
|
176
|
-
"@cucumber/html-formatter": "^
|
|
177
|
-
"@cucumber/messages": "^
|
|
178
|
-
"@cucumber/tag-expressions": "^
|
|
185
|
+
"@cucumber/create-meta": "6.0.1",
|
|
186
|
+
"@cucumber/cucumber-expressions": "^14.0.0",
|
|
187
|
+
"@cucumber/gherkin": "^22.0.0",
|
|
188
|
+
"@cucumber/gherkin-streams": "^4.0.0",
|
|
189
|
+
"@cucumber/html-formatter": "^17.0.0",
|
|
190
|
+
"@cucumber/messages": "^17.1.1",
|
|
191
|
+
"@cucumber/tag-expressions": "^4.1.0",
|
|
179
192
|
"assertion-error-formatter": "^3.0.0",
|
|
180
|
-
"bluebird": "^3.7.2",
|
|
181
193
|
"capital-case": "^1.0.4",
|
|
182
|
-
"cli-table3": "0.6.
|
|
183
|
-
"colors": "1.4.0",
|
|
184
|
-
"commander": "^
|
|
185
|
-
"create-require": "^1.1.1",
|
|
194
|
+
"cli-table3": "^0.6.0",
|
|
195
|
+
"colors": "^1.4.0",
|
|
196
|
+
"commander": "^8.0.0",
|
|
186
197
|
"duration": "^0.2.2",
|
|
187
198
|
"durations": "^3.4.2",
|
|
188
199
|
"figures": "^3.2.0",
|
|
189
200
|
"glob": "^7.1.6",
|
|
190
201
|
"indent-string": "^4.0.0",
|
|
191
|
-
"is-generator": "^1.0.3",
|
|
192
202
|
"is-stream": "^2.0.0",
|
|
193
203
|
"knuth-shuffle-seeded": "^1.0.6",
|
|
194
|
-
"lodash": "^4.17.21",
|
|
195
204
|
"mz": "^2.7.0",
|
|
196
205
|
"progress": "^2.0.3",
|
|
197
206
|
"resolve": "^1.19.0",
|
|
@@ -204,77 +213,76 @@
|
|
|
204
213
|
"verror": "^1.10.0"
|
|
205
214
|
},
|
|
206
215
|
"devDependencies": {
|
|
207
|
-
"@cucumber/compatibility-kit": "
|
|
208
|
-
"@cucumber/message-streams": "
|
|
209
|
-
"@cucumber/query": "
|
|
210
|
-
"@sinonjs/fake-timers": "
|
|
211
|
-
"@types/
|
|
212
|
-
"@types/chai": "4.2.18",
|
|
216
|
+
"@cucumber/compatibility-kit": "^9.0.0",
|
|
217
|
+
"@cucumber/message-streams": "^3.0.0",
|
|
218
|
+
"@cucumber/query": "^11.0.0",
|
|
219
|
+
"@sinonjs/fake-timers": "8.0.1",
|
|
220
|
+
"@types/chai": "4.2.22",
|
|
213
221
|
"@types/dirty-chai": "2.0.2",
|
|
214
|
-
"@types/express": "4.17.
|
|
215
|
-
"@types/fs-extra": "9.0.
|
|
216
|
-
"@types/glob": "7.1.
|
|
217
|
-
"@types/
|
|
218
|
-
"@types/
|
|
219
|
-
"@types/
|
|
220
|
-
"@types/
|
|
221
|
-
"@types/
|
|
222
|
-
"@types/
|
|
223
|
-
"@types/
|
|
224
|
-
"@types/semver": "7.3.6",
|
|
222
|
+
"@types/express": "4.17.13",
|
|
223
|
+
"@types/fs-extra": "9.0.13",
|
|
224
|
+
"@types/glob": "7.1.4",
|
|
225
|
+
"@types/mocha": "9.0.0",
|
|
226
|
+
"@types/mustache": "4.1.2",
|
|
227
|
+
"@types/mz": "2.7.4",
|
|
228
|
+
"@types/node": "14.17.20",
|
|
229
|
+
"@types/progress": "2.0.5",
|
|
230
|
+
"@types/resolve": "1.20.1",
|
|
231
|
+
"@types/semver": "7.3.8",
|
|
225
232
|
"@types/sinon-chai": "3.2.5",
|
|
226
|
-
"@types/sinonjs__fake-timers": "6.0.
|
|
227
|
-
"@types/stream-buffers": "3.0.
|
|
228
|
-
"@types/tmp": "0.2.
|
|
229
|
-
"@types/verror": "1.10.
|
|
230
|
-
"@typescript-eslint/eslint-plugin": "4.
|
|
231
|
-
"@typescript-eslint/parser": "4.
|
|
233
|
+
"@types/sinonjs__fake-timers": "6.0.4",
|
|
234
|
+
"@types/stream-buffers": "3.0.4",
|
|
235
|
+
"@types/tmp": "0.2.1",
|
|
236
|
+
"@types/verror": "1.10.5",
|
|
237
|
+
"@typescript-eslint/eslint-plugin": "4.32.0",
|
|
238
|
+
"@typescript-eslint/parser": "4.32.0",
|
|
232
239
|
"chai": "4.3.4",
|
|
233
|
-
"chai-exclude": "2.0
|
|
234
|
-
"coffeescript": "2.
|
|
235
|
-
"dependency-lint": "
|
|
240
|
+
"chai-exclude": "2.1.0",
|
|
241
|
+
"coffeescript": "2.6.0",
|
|
242
|
+
"dependency-lint": "7.1.0",
|
|
236
243
|
"dirty-chai": "2.0.1",
|
|
237
|
-
"eslint": "7.
|
|
244
|
+
"eslint": "7.32.0",
|
|
238
245
|
"eslint-config-prettier": "8.3.0",
|
|
239
|
-
"eslint-config-standard-with-typescript": "
|
|
240
|
-
"eslint-plugin-import": "2.
|
|
246
|
+
"eslint-config-standard-with-typescript": "21.0.1",
|
|
247
|
+
"eslint-plugin-import": "2.24.2",
|
|
241
248
|
"eslint-plugin-node": "11.1.0",
|
|
242
|
-
"eslint-plugin-prettier": "
|
|
249
|
+
"eslint-plugin-prettier": "4.0.0",
|
|
243
250
|
"eslint-plugin-promise": "5.1.0",
|
|
244
251
|
"eslint-plugin-standard": "4.1.0",
|
|
245
252
|
"express": "4.17.1",
|
|
246
|
-
"fs-extra": "
|
|
247
|
-
"mocha": "
|
|
253
|
+
"fs-extra": "10.0.0",
|
|
254
|
+
"mocha": "^9.1.3",
|
|
248
255
|
"mustache": "4.2.0",
|
|
249
256
|
"nyc": "15.1.0",
|
|
250
|
-
"prettier": "2.
|
|
257
|
+
"prettier": "2.4.1",
|
|
258
|
+
"reindent-template-literals": "1.1.0",
|
|
251
259
|
"semver": "7.3.5",
|
|
252
|
-
"sinon": "11.1.
|
|
260
|
+
"sinon": "11.1.2",
|
|
253
261
|
"sinon-chai": "3.7.0",
|
|
254
262
|
"stream-buffers": "3.0.2",
|
|
255
263
|
"stream-to-string": "1.2.0",
|
|
256
|
-
"ts-node": "
|
|
257
|
-
"tsd": "0.
|
|
258
|
-
"typescript": "4.
|
|
264
|
+
"ts-node": "^10.3.0",
|
|
265
|
+
"tsd": "0.17.0",
|
|
266
|
+
"typescript": "^4.4.4"
|
|
259
267
|
},
|
|
260
268
|
"scripts": {
|
|
261
|
-
"build-local": "tsc
|
|
269
|
+
"build-local": "tsc --build tsconfig.node.json && cp src/importer.js lib/ && cp src/wrapper.mjs lib/",
|
|
262
270
|
"cck-test": "mocha 'compatibility/**/*_spec.ts'",
|
|
263
271
|
"feature-test": "node ./bin/cucumber-js",
|
|
264
272
|
"html-formatter": "node ./bin/cucumber-js --profile htmlFormatter",
|
|
265
273
|
"lint-autofix": "eslint --fix \"{compatibility,example,features,scripts,src,test}/**/*.ts\"",
|
|
266
274
|
"lint-code": "eslint \"{compatibility,example,features,scripts,src,test}/**/*.ts\"",
|
|
267
275
|
"lint-dependencies": "dependency-lint",
|
|
268
|
-
"lint": "
|
|
269
|
-
"prelint-autofix": "
|
|
270
|
-
"prelint-code": "
|
|
271
|
-
"precck-test": "
|
|
272
|
-
"prefeature-test": "
|
|
276
|
+
"lint": "npm run lint-code && npm run lint-dependencies",
|
|
277
|
+
"prelint-autofix": "npm run build-local",
|
|
278
|
+
"prelint-code": "npm run build-local",
|
|
279
|
+
"precck-test": "npm run build-local",
|
|
280
|
+
"prefeature-test": "npm run build-local",
|
|
273
281
|
"prepublishOnly": "rm -rf lib && npm run build-local",
|
|
274
|
-
"pretest-coverage": "
|
|
275
|
-
"pretypes-test": "
|
|
282
|
+
"pretest-coverage": "npm run build-local",
|
|
283
|
+
"pretypes-test": "npm run build-local",
|
|
276
284
|
"test-coverage": "nyc --silent mocha 'src/**/*_spec.ts' 'compatibility/**/*_spec.ts' && nyc --silent --no-clean node ./bin/cucumber-js && nyc report --reporter=lcov",
|
|
277
|
-
"test": "
|
|
285
|
+
"test": "npm run lint && npm run types-test && npm run unit-test && npm run cck-test && npm run feature-test",
|
|
278
286
|
"types-test": "tsd",
|
|
279
287
|
"unit-test": "mocha 'src/**/*_spec.ts'",
|
|
280
288
|
"update-dependencies": "npx npm-check-updates --upgrade"
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export interface IDefinitionConfig {
|
|
2
|
-
code: any;
|
|
3
|
-
line: number;
|
|
4
|
-
uri: string;
|
|
5
|
-
}
|
|
6
|
-
export interface IValidateNoGeneratorFunctionsRequest {
|
|
7
|
-
cwd: string;
|
|
8
|
-
definitionConfigs: IDefinitionConfig[];
|
|
9
|
-
}
|
|
10
|
-
export declare function validateNoGeneratorFunctions({ cwd, definitionConfigs, }: IValidateNoGeneratorFunctionsRequest): void;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.validateNoGeneratorFunctions = void 0;
|
|
7
|
-
const is_generator_1 = __importDefault(require("is-generator"));
|
|
8
|
-
const path_1 = __importDefault(require("path"));
|
|
9
|
-
function validateNoGeneratorFunctions({ cwd, definitionConfigs, }) {
|
|
10
|
-
const generatorDefinitionConfigs = definitionConfigs.filter((definitionConfig) => is_generator_1.default.fn(definitionConfig.code));
|
|
11
|
-
if (generatorDefinitionConfigs.length > 0) {
|
|
12
|
-
const references = generatorDefinitionConfigs
|
|
13
|
-
.map((definitionConfig) => `${path_1.default.relative(cwd, definitionConfig.uri)}:${definitionConfig.line.toString()}`)
|
|
14
|
-
.join('\n ');
|
|
15
|
-
const message = `
|
|
16
|
-
The following hook/step definitions use generator functions:
|
|
17
|
-
|
|
18
|
-
${references}
|
|
19
|
-
|
|
20
|
-
Use 'this.setDefinitionFunctionWrapper(fn)' to wrap them in a function that returns a promise.
|
|
21
|
-
`;
|
|
22
|
-
throw new Error(message);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
exports.validateNoGeneratorFunctions = validateNoGeneratorFunctions;
|
|
26
|
-
//# sourceMappingURL=finalize_helpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"finalize_helpers.js","sourceRoot":"","sources":["../../src/support_code_library_builder/finalize_helpers.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAsC;AACtC,gDAAuB;AAavB,SAAgB,4BAA4B,CAAC,EAC3C,GAAG,EACH,iBAAiB,GACoB;IACrC,MAAM,0BAA0B,GAAG,iBAAiB,CAAC,MAAM,CACzD,CAAC,gBAAgB,EAAE,EAAE,CAAC,sBAAW,CAAC,EAAE,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAC5D,CAAA;IACD,IAAI,0BAA0B,CAAC,MAAM,GAAG,CAAC,EAAE;QACzC,MAAM,UAAU,GAAG,0BAA0B;aAC1C,GAAG,CACF,CAAC,gBAAgB,EAAE,EAAE,CACnB,GAAG,cAAI,CAAC,QAAQ,CACd,GAAG,EACH,gBAAgB,CAAC,GAAG,CACrB,IAAI,gBAAgB,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAC1C;aACA,IAAI,CAAC,MAAM,CAAC,CAAA;QACf,MAAM,OAAO,GAAG;;;UAGV,UAAU;;;OAGb,CAAA;QACH,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAA;KACzB;AACH,CAAC;AA1BD,oEA0BC","sourcesContent":["import isGenerator from 'is-generator'\nimport path from 'path'\n\nexport interface IDefinitionConfig {\n code: any\n line: number\n uri: string\n}\n\nexport interface IValidateNoGeneratorFunctionsRequest {\n cwd: string\n definitionConfigs: IDefinitionConfig[]\n}\n\nexport function validateNoGeneratorFunctions({\n cwd,\n definitionConfigs,\n}: IValidateNoGeneratorFunctionsRequest): void {\n const generatorDefinitionConfigs = definitionConfigs.filter(\n (definitionConfig) => isGenerator.fn(definitionConfig.code)\n )\n if (generatorDefinitionConfigs.length > 0) {\n const references = generatorDefinitionConfigs\n .map(\n (definitionConfig) =>\n `${path.relative(\n cwd,\n definitionConfig.uri\n )}:${definitionConfig.line.toString()}`\n )\n .join('\\n ')\n const message = `\n The following hook/step definitions use generator functions:\n\n ${references}\n\n Use 'this.setDefinitionFunctionWrapper(fn)' to wrap them in a function that returns a promise.\n `\n throw new Error(message)\n }\n}\n"]}
|