From d64c4be52988568ac1c0ceecc296a02283619fa7 Mon Sep 17 00:00:00 2001 From: David Goss Date: Mon, 14 Mar 2022 17:15:23 +0000 Subject: [PATCH 01/24] test generated docs --- docs/api/cucumber.irunenvironment.cwd.md | 11 ++++++++++ docs/api/cucumber.irunenvironment.env.md | 11 ++++++++++ docs/api/cucumber.irunenvironment.md | 21 ++++++++++++++++++ docs/api/cucumber.irunenvironment.stderr.md | 11 ++++++++++ docs/api/cucumber.irunenvironment.stdout.md | 11 ++++++++++ docs/api/cucumber.irunresult.md | 19 ++++++++++++++++ docs/api/cucumber.irunresult.success.md | 11 ++++++++++ docs/api/cucumber.irunresult.support.md | 11 ++++++++++ docs/api/cucumber.loadsupport.md | 23 ++++++++++++++++++++ docs/api/cucumber.md | 20 +++++++++++++++++ docs/api/cucumber.runcucumber.md | 24 +++++++++++++++++++++ docs/api/index.md | 12 +++++++++++ 12 files changed, 185 insertions(+) create mode 100644 docs/api/cucumber.irunenvironment.cwd.md create mode 100644 docs/api/cucumber.irunenvironment.env.md create mode 100644 docs/api/cucumber.irunenvironment.md create mode 100644 docs/api/cucumber.irunenvironment.stderr.md create mode 100644 docs/api/cucumber.irunenvironment.stdout.md create mode 100644 docs/api/cucumber.irunresult.md create mode 100644 docs/api/cucumber.irunresult.success.md create mode 100644 docs/api/cucumber.irunresult.support.md create mode 100644 docs/api/cucumber.loadsupport.md create mode 100644 docs/api/cucumber.md create mode 100644 docs/api/cucumber.runcucumber.md create mode 100644 docs/api/index.md diff --git a/docs/api/cucumber.irunenvironment.cwd.md b/docs/api/cucumber.irunenvironment.cwd.md new file mode 100644 index 000000000..d89041674 --- /dev/null +++ b/docs/api/cucumber.irunenvironment.cwd.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunEnvironment](./cucumber.irunenvironment.md) > [cwd](./cucumber.irunenvironment.cwd.md) + +## IRunEnvironment.cwd property + +Signature: + +```typescript +cwd: string; +``` diff --git a/docs/api/cucumber.irunenvironment.env.md b/docs/api/cucumber.irunenvironment.env.md new file mode 100644 index 000000000..a2633cd30 --- /dev/null +++ b/docs/api/cucumber.irunenvironment.env.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunEnvironment](./cucumber.irunenvironment.md) > [env](./cucumber.irunenvironment.env.md) + +## IRunEnvironment.env property + +Signature: + +```typescript +env: NodeJS.ProcessEnv; +``` diff --git a/docs/api/cucumber.irunenvironment.md b/docs/api/cucumber.irunenvironment.md new file mode 100644 index 000000000..5631de472 --- /dev/null +++ b/docs/api/cucumber.irunenvironment.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunEnvironment](./cucumber.irunenvironment.md) + +## IRunEnvironment interface + +Signature: + +```typescript +export interface IRunEnvironment +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [cwd](./cucumber.irunenvironment.cwd.md) | string | | +| [env](./cucumber.irunenvironment.env.md) | NodeJS.ProcessEnv | | +| [stderr](./cucumber.irunenvironment.stderr.md) | IFormatterStream | | +| [stdout](./cucumber.irunenvironment.stdout.md) | IFormatterStream | | + diff --git a/docs/api/cucumber.irunenvironment.stderr.md b/docs/api/cucumber.irunenvironment.stderr.md new file mode 100644 index 000000000..a7c1b13da --- /dev/null +++ b/docs/api/cucumber.irunenvironment.stderr.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunEnvironment](./cucumber.irunenvironment.md) > [stderr](./cucumber.irunenvironment.stderr.md) + +## IRunEnvironment.stderr property + +Signature: + +```typescript +stderr: IFormatterStream; +``` diff --git a/docs/api/cucumber.irunenvironment.stdout.md b/docs/api/cucumber.irunenvironment.stdout.md new file mode 100644 index 000000000..d546e8799 --- /dev/null +++ b/docs/api/cucumber.irunenvironment.stdout.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunEnvironment](./cucumber.irunenvironment.md) > [stdout](./cucumber.irunenvironment.stdout.md) + +## IRunEnvironment.stdout property + +Signature: + +```typescript +stdout: IFormatterStream; +``` diff --git a/docs/api/cucumber.irunresult.md b/docs/api/cucumber.irunresult.md new file mode 100644 index 000000000..2640e53d0 --- /dev/null +++ b/docs/api/cucumber.irunresult.md @@ -0,0 +1,19 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunResult](./cucumber.irunresult.md) + +## IRunResult interface + +Signature: + +```typescript +export interface IRunResult +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [success](./cucumber.irunresult.success.md) | boolean | | +| [support](./cucumber.irunresult.support.md) | ISupportCodeLibrary | | + diff --git a/docs/api/cucumber.irunresult.success.md b/docs/api/cucumber.irunresult.success.md new file mode 100644 index 000000000..4fff79d6c --- /dev/null +++ b/docs/api/cucumber.irunresult.success.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunResult](./cucumber.irunresult.md) > [success](./cucumber.irunresult.success.md) + +## IRunResult.success property + +Signature: + +```typescript +success: boolean; +``` diff --git a/docs/api/cucumber.irunresult.support.md b/docs/api/cucumber.irunresult.support.md new file mode 100644 index 000000000..13c84d3fa --- /dev/null +++ b/docs/api/cucumber.irunresult.support.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunResult](./cucumber.irunresult.md) > [support](./cucumber.irunresult.support.md) + +## IRunResult.support property + +Signature: + +```typescript +support: ISupportCodeLibrary; +``` diff --git a/docs/api/cucumber.loadsupport.md b/docs/api/cucumber.loadsupport.md new file mode 100644 index 000000000..6bdeee51c --- /dev/null +++ b/docs/api/cucumber.loadsupport.md @@ -0,0 +1,23 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [loadSupport](./cucumber.loadsupport.md) + +## loadSupport() function + +Signature: + +```typescript +export declare function loadSupport(configuration: Pick, { cwd }: Partial): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| configuration | Pick<IUserConfiguration, 'sources' \| 'support'> | | +| { cwd } | Partial<[IRunEnvironment](./cucumber.irunenvironment.md)> | | + +Returns: + +Promise<import("../support\_code\_library\_builder/types").ISupportCodeLibrary> + diff --git a/docs/api/cucumber.md b/docs/api/cucumber.md new file mode 100644 index 000000000..13e7b94a3 --- /dev/null +++ b/docs/api/cucumber.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) + +## cucumber package + +## Functions + +| Function | Description | +| --- | --- | +| [loadSupport(configuration, { cwd })](./cucumber.loadsupport.md) | | +| [runCucumber(configuration, { cwd, stdout, stderr, env, }, onMessage)](./cucumber.runcucumber.md) | | + +## Interfaces + +| Interface | Description | +| --- | --- | +| [IRunEnvironment](./cucumber.irunenvironment.md) | | +| [IRunResult](./cucumber.irunresult.md) | | + diff --git a/docs/api/cucumber.runcucumber.md b/docs/api/cucumber.runcucumber.md new file mode 100644 index 000000000..29c63d261 --- /dev/null +++ b/docs/api/cucumber.runcucumber.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [runCucumber](./cucumber.runcucumber.md) + +## runCucumber() function + +Signature: + +```typescript +export declare function runCucumber(configuration: IRunConfiguration, { cwd, stdout, stderr, env, }: Partial, onMessage?: (message: Envelope) => void): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| configuration | IRunConfiguration | | +| { cwd, stdout, stderr, env, } | Partial<[IRunEnvironment](./cucumber.irunenvironment.md)> | | +| onMessage | (message: Envelope) => void | | + +Returns: + +Promise<[IRunResult](./cucumber.irunresult.md)> + diff --git a/docs/api/index.md b/docs/api/index.md new file mode 100644 index 000000000..8cfd8bec7 --- /dev/null +++ b/docs/api/index.md @@ -0,0 +1,12 @@ + + +[Home](./index.md) + +## API Reference + +## Packages + +| Package | Description | +| --- | --- | +| [@cucumber/cucumber](./cucumber.md) | | + From 58f14a8db073a70f71f0681dbe590570865cbed4 Mon Sep 17 00:00:00 2001 From: David Goss Date: Tue, 15 Mar 2022 09:10:31 +0000 Subject: [PATCH 02/24] add metadata to entry point, regenerate --- docs/api/cucumber.md | 6 ++++++ docs/api/index.md | 2 +- src/api/index.ts | 8 ++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/api/cucumber.md b/docs/api/cucumber.md index 13e7b94a3..c91e66b7e 100644 --- a/docs/api/cucumber.md +++ b/docs/api/cucumber.md @@ -4,6 +4,12 @@ ## cucumber package +Cucumber for JavaScript. + +## Remarks + +These docs cover the API used for running Cucumber programmatically. The entry point is `@cucumber/cucumber/api`. + ## Functions | Function | Description | diff --git a/docs/api/index.md b/docs/api/index.md index 8cfd8bec7..47e647035 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -8,5 +8,5 @@ | Package | Description | | --- | --- | -| [@cucumber/cucumber](./cucumber.md) | | +| [@cucumber/cucumber](./cucumber.md) | Cucumber for JavaScript. | diff --git a/src/api/index.ts b/src/api/index.ts index 85bc4109b..ab0b023ed 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -1,3 +1,11 @@ +/** + * Cucumber for JavaScript + * + * @remarks These docs cover the API used for running Cucumber programmatically. The entry point is `@cucumber/cucumber/api`. + * + * @packageDocumentation + */ + export * from './loadSupport' export * from './runCucumber' export * from './types' From f76777c003e480446a1151cb1dba9956533ab87d Mon Sep 17 00:00:00 2001 From: David Goss Date: Tue, 15 Mar 2022 09:10:39 +0000 Subject: [PATCH 03/24] add tooling --- api-extractor.json | 16 ++ docs/.gitignore | 1 + package-lock.json | 646 +++++++++++++++++++++++++++++++++++++++++++++ package.json | 4 + 4 files changed, 667 insertions(+) create mode 100644 api-extractor.json create mode 100644 docs/.gitignore diff --git a/api-extractor.json b/api-extractor.json new file mode 100644 index 000000000..8927f0336 --- /dev/null +++ b/api-extractor.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "mainEntryPointFilePath": "/lib/api/index.d.ts", + "compiler": { + }, + "apiReport": { + "enabled": false + }, + "docModel": { + "enabled": true, + "apiJsonFilePath": "/docs/temp/cucumber.api.json" + }, + "dtsRollup": { + "enabled": false + } +} diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 000000000..9c595a6fb --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1 @@ +temp diff --git a/package-lock.json b/package-lock.json index 485f48aeb..8a1c97fd4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,6 +47,8 @@ "@cucumber/compatibility-kit": "9.1.2", "@cucumber/message-streams": "3.0.0", "@cucumber/query": "11.0.0", + "@microsoft/api-documenter": "^7.15.3", + "@microsoft/api-extractor": "^7.19.4", "@sinonjs/fake-timers": "9.1.0", "@types/chai": "4.3.0", "@types/dirty-chai": "2.0.2", @@ -814,6 +816,166 @@ "node": ">=8" } }, + "node_modules/@microsoft/api-documenter": { + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@microsoft/api-documenter/-/api-documenter-7.15.3.tgz", + "integrity": "sha512-tehv1f/aKwGBQp0sheQofz5NQfa61mvTdAe4IHQnVavsyyK71r+P+CVXWewznPYkqFzzVXaTdrCuNGPU5Yd3mg==", + "dev": true, + "dependencies": { + "@microsoft/api-extractor-model": "7.15.3", + "@microsoft/tsdoc": "0.13.2", + "@rushstack/node-core-library": "3.45.0", + "@rushstack/ts-command-line": "4.10.6", + "colors": "~1.2.1", + "js-yaml": "~3.13.1", + "resolve": "~1.17.0" + }, + "bin": { + "api-documenter": "bin/api-documenter" + } + }, + "node_modules/@microsoft/api-documenter/node_modules/colors": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.2.5.tgz", + "integrity": "sha512-erNRLao/Y3Fv54qUa0LBB+//Uf3YwMUmdJinN20yMXm9zdKKqH9wt7R9IIVZ+K7ShzfpLV/Zg8+VyrBJYB4lpg==", + "dev": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/@microsoft/api-documenter/node_modules/js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@microsoft/api-documenter/node_modules/resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "dev": true, + "dependencies": { + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/@microsoft/api-extractor": { + "version": "7.19.4", + "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.19.4.tgz", + "integrity": "sha512-iehC6YA3DGJvxTUaK7HUtQmP6hAQU07+Q/OR8TG4dVR6KpqCi9UPEVk8AgCvQkiK+6FbVEFQTx0qLuYk4EeuHg==", + "dev": true, + "dependencies": { + "@microsoft/api-extractor-model": "7.15.3", + "@microsoft/tsdoc": "0.13.2", + "@microsoft/tsdoc-config": "~0.15.2", + "@rushstack/node-core-library": "3.45.0", + "@rushstack/rig-package": "0.3.7", + "@rushstack/ts-command-line": "4.10.6", + "colors": "~1.2.1", + "lodash": "~4.17.15", + "resolve": "~1.17.0", + "semver": "~7.3.0", + "source-map": "~0.6.1", + "typescript": "~4.5.2" + }, + "bin": { + "api-extractor": "bin/api-extractor" + } + }, + "node_modules/@microsoft/api-extractor-model": { + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@microsoft/api-extractor-model/-/api-extractor-model-7.15.3.tgz", + "integrity": "sha512-NkSjolmSI7NGvbdz0Y7kjQfdpD+j9E5CwXTxEyjDqxd10MI7GXV8DnAsQ57GFJcgHKgTjf2aUnYfMJ9w3aMicw==", + "dev": true, + "dependencies": { + "@microsoft/tsdoc": "0.13.2", + "@microsoft/tsdoc-config": "~0.15.2", + "@rushstack/node-core-library": "3.45.0" + } + }, + "node_modules/@microsoft/api-extractor/node_modules/colors": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.2.5.tgz", + "integrity": "sha512-erNRLao/Y3Fv54qUa0LBB+//Uf3YwMUmdJinN20yMXm9zdKKqH9wt7R9IIVZ+K7ShzfpLV/Zg8+VyrBJYB4lpg==", + "dev": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/@microsoft/api-extractor/node_modules/resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "dev": true, + "dependencies": { + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/@microsoft/api-extractor/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@microsoft/api-extractor/node_modules/typescript": { + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", + "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/@microsoft/tsdoc": { + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.13.2.tgz", + "integrity": "sha512-WrHvO8PDL8wd8T2+zBGKrMwVL5IyzR3ryWUsl0PXgEV0QHup4mTLi0QcATefGI6Gx9Anu7vthPyyyLpY0EpiQg==", + "dev": true + }, + "node_modules/@microsoft/tsdoc-config": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@microsoft/tsdoc-config/-/tsdoc-config-0.15.2.tgz", + "integrity": "sha512-mK19b2wJHSdNf8znXSMYVShAHktVr/ib0Ck2FA3lsVBSEhSI/TfXT7DJQkAYgcztTuwazGcg58ZjYdk0hTCVrA==", + "dev": true, + "dependencies": { + "@microsoft/tsdoc": "0.13.2", + "ajv": "~6.12.6", + "jju": "~1.4.0", + "resolve": "~1.19.0" + } + }, + "node_modules/@microsoft/tsdoc-config/node_modules/resolve": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", + "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", + "dev": true, + "dependencies": { + "is-core-module": "^2.1.0", + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -849,6 +1011,125 @@ "node": ">= 8" } }, + "node_modules/@rushstack/node-core-library": { + "version": "3.45.0", + "resolved": "https://registry.npmjs.org/@rushstack/node-core-library/-/node-core-library-3.45.0.tgz", + "integrity": "sha512-YMuIJl19vQT1+g/OU9mLY6T5ZBT9uDlmeXExDQACpGuxTJW+LHNbk/lRX+eCApQI2eLBlaL4U68r3kZlqwbdmw==", + "dev": true, + "dependencies": { + "@types/node": "12.20.24", + "colors": "~1.2.1", + "fs-extra": "~7.0.1", + "import-lazy": "~4.0.0", + "jju": "~1.4.0", + "resolve": "~1.17.0", + "semver": "~7.3.0", + "timsort": "~0.3.0", + "z-schema": "~5.0.2" + } + }, + "node_modules/@rushstack/node-core-library/node_modules/@types/node": { + "version": "12.20.24", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.24.tgz", + "integrity": "sha512-yxDeaQIAJlMav7fH5AQqPH1u8YIuhYJXYBzxaQ4PifsU0GDO38MSdmEDeRlIxrKbC6NbEaaEHDanWb+y30U8SQ==", + "dev": true + }, + "node_modules/@rushstack/node-core-library/node_modules/colors": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.2.5.tgz", + "integrity": "sha512-erNRLao/Y3Fv54qUa0LBB+//Uf3YwMUmdJinN20yMXm9zdKKqH9wt7R9IIVZ+K7ShzfpLV/Zg8+VyrBJYB4lpg==", + "dev": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/@rushstack/node-core-library/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/@rushstack/node-core-library/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@rushstack/node-core-library/node_modules/resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "dev": true, + "dependencies": { + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/@rushstack/node-core-library/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/@rushstack/rig-package": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/@rushstack/rig-package/-/rig-package-0.3.7.tgz", + "integrity": "sha512-pzMsTSeTC8IiZ6EJLr53gGMvhT4oLWH+hxD7907cHyWuIUlEXFtu/2pK25vUQT13nKp5DJCWxXyYoGRk/h6rtA==", + "dev": true, + "dependencies": { + "resolve": "~1.17.0", + "strip-json-comments": "~3.1.1" + } + }, + "node_modules/@rushstack/rig-package/node_modules/resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "dev": true, + "dependencies": { + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/@rushstack/ts-command-line": { + "version": "4.10.6", + "resolved": "https://registry.npmjs.org/@rushstack/ts-command-line/-/ts-command-line-4.10.6.tgz", + "integrity": "sha512-Y3GkUag39sTIlukDg9mUp8MCHrrlJ27POrBNRQGc/uF+VVgX8M7zMzHch5zP6O1QVquWgD7Engdpn2piPYaS/g==", + "dev": true, + "dependencies": { + "@types/argparse": "1.0.38", + "argparse": "~1.0.9", + "colors": "~1.2.1", + "string-argv": "~0.3.1" + } + }, + "node_modules/@rushstack/ts-command-line/node_modules/colors": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.2.5.tgz", + "integrity": "sha512-erNRLao/Y3Fv54qUa0LBB+//Uf3YwMUmdJinN20yMXm9zdKKqH9wt7R9IIVZ+K7ShzfpLV/Zg8+VyrBJYB4lpg==", + "dev": true, + "engines": { + "node": ">=0.1.90" + } + }, "node_modules/@sinonjs/commons": { "version": "1.8.3", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", @@ -927,6 +1208,12 @@ "tsserver": "typescript/bin/tsserver" } }, + "node_modules/@types/argparse": { + "version": "1.0.38", + "resolved": "https://registry.npmjs.org/@types/argparse/-/argparse-1.0.38.tgz", + "integrity": "sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==", + "dev": true + }, "node_modules/@types/body-parser": { "version": "1.19.2", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", @@ -3848,6 +4135,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/import-lazy": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz", + "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -4318,6 +4614,12 @@ "node": ">=8" } }, + "node_modules/jju": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", + "integrity": "sha1-o6vicYryQaKykE+EpiWXDzia4yo=", + "dev": true + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -4467,6 +4769,12 @@ "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", "dev": true }, + "node_modules/lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", + "dev": true + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -6635,6 +6943,12 @@ "node": ">=0.8" } }, + "node_modules/timsort": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", + "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", + "dev": true + }, "node_modules/tmp": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", @@ -7009,6 +7323,15 @@ "spdx-expression-parse": "^3.0.0" } }, + "node_modules/validator": { + "version": "13.7.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.7.0.tgz", + "integrity": "sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -7235,6 +7558,33 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "node_modules/z-schema": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/z-schema/-/z-schema-5.0.2.tgz", + "integrity": "sha512-40TH47ukMHq5HrzkeVE40Ad7eIDKaRV2b+Qpi2prLc9X9eFJFzV7tMe5aH12e6avaSS/u5l653EQOv+J9PirPw==", + "dev": true, + "dependencies": { + "lodash.get": "^4.4.2", + "lodash.isequal": "^4.5.0", + "validator": "^13.7.0" + }, + "bin": { + "z-schema": "bin/z-schema" + }, + "engines": { + "node": ">=8.0.0" + }, + "optionalDependencies": { + "commander": "^2.7.1" + } + }, + "node_modules/z-schema/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "optional": true } }, "dependencies": { @@ -7808,6 +8158,138 @@ "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", "dev": true }, + "@microsoft/api-documenter": { + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@microsoft/api-documenter/-/api-documenter-7.15.3.tgz", + "integrity": "sha512-tehv1f/aKwGBQp0sheQofz5NQfa61mvTdAe4IHQnVavsyyK71r+P+CVXWewznPYkqFzzVXaTdrCuNGPU5Yd3mg==", + "dev": true, + "requires": { + "@microsoft/api-extractor-model": "7.15.3", + "@microsoft/tsdoc": "0.13.2", + "@rushstack/node-core-library": "3.45.0", + "@rushstack/ts-command-line": "4.10.6", + "colors": "~1.2.1", + "js-yaml": "~3.13.1", + "resolve": "~1.17.0" + }, + "dependencies": { + "colors": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.2.5.tgz", + "integrity": "sha512-erNRLao/Y3Fv54qUa0LBB+//Uf3YwMUmdJinN20yMXm9zdKKqH9wt7R9IIVZ+K7ShzfpLV/Zg8+VyrBJYB4lpg==", + "dev": true + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + } + } + }, + "@microsoft/api-extractor": { + "version": "7.19.4", + "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.19.4.tgz", + "integrity": "sha512-iehC6YA3DGJvxTUaK7HUtQmP6hAQU07+Q/OR8TG4dVR6KpqCi9UPEVk8AgCvQkiK+6FbVEFQTx0qLuYk4EeuHg==", + "dev": true, + "requires": { + "@microsoft/api-extractor-model": "7.15.3", + "@microsoft/tsdoc": "0.13.2", + "@microsoft/tsdoc-config": "~0.15.2", + "@rushstack/node-core-library": "3.45.0", + "@rushstack/rig-package": "0.3.7", + "@rushstack/ts-command-line": "4.10.6", + "colors": "~1.2.1", + "lodash": "~4.17.15", + "resolve": "~1.17.0", + "semver": "~7.3.0", + "source-map": "~0.6.1", + "typescript": "~4.5.2" + }, + "dependencies": { + "colors": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.2.5.tgz", + "integrity": "sha512-erNRLao/Y3Fv54qUa0LBB+//Uf3YwMUmdJinN20yMXm9zdKKqH9wt7R9IIVZ+K7ShzfpLV/Zg8+VyrBJYB4lpg==", + "dev": true + }, + "resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "typescript": { + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", + "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", + "dev": true + } + } + }, + "@microsoft/api-extractor-model": { + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@microsoft/api-extractor-model/-/api-extractor-model-7.15.3.tgz", + "integrity": "sha512-NkSjolmSI7NGvbdz0Y7kjQfdpD+j9E5CwXTxEyjDqxd10MI7GXV8DnAsQ57GFJcgHKgTjf2aUnYfMJ9w3aMicw==", + "dev": true, + "requires": { + "@microsoft/tsdoc": "0.13.2", + "@microsoft/tsdoc-config": "~0.15.2", + "@rushstack/node-core-library": "3.45.0" + } + }, + "@microsoft/tsdoc": { + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.13.2.tgz", + "integrity": "sha512-WrHvO8PDL8wd8T2+zBGKrMwVL5IyzR3ryWUsl0PXgEV0QHup4mTLi0QcATefGI6Gx9Anu7vthPyyyLpY0EpiQg==", + "dev": true + }, + "@microsoft/tsdoc-config": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@microsoft/tsdoc-config/-/tsdoc-config-0.15.2.tgz", + "integrity": "sha512-mK19b2wJHSdNf8znXSMYVShAHktVr/ib0Ck2FA3lsVBSEhSI/TfXT7DJQkAYgcztTuwazGcg58ZjYdk0hTCVrA==", + "dev": true, + "requires": { + "@microsoft/tsdoc": "0.13.2", + "ajv": "~6.12.6", + "jju": "~1.4.0", + "resolve": "~1.19.0" + }, + "dependencies": { + "resolve": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", + "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", + "dev": true, + "requires": { + "is-core-module": "^2.1.0", + "path-parse": "^1.0.6" + } + } + } + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -7834,6 +8316,113 @@ "fastq": "^1.6.0" } }, + "@rushstack/node-core-library": { + "version": "3.45.0", + "resolved": "https://registry.npmjs.org/@rushstack/node-core-library/-/node-core-library-3.45.0.tgz", + "integrity": "sha512-YMuIJl19vQT1+g/OU9mLY6T5ZBT9uDlmeXExDQACpGuxTJW+LHNbk/lRX+eCApQI2eLBlaL4U68r3kZlqwbdmw==", + "dev": true, + "requires": { + "@types/node": "12.20.24", + "colors": "~1.2.1", + "fs-extra": "~7.0.1", + "import-lazy": "~4.0.0", + "jju": "~1.4.0", + "resolve": "~1.17.0", + "semver": "~7.3.0", + "timsort": "~0.3.0", + "z-schema": "~5.0.2" + }, + "dependencies": { + "@types/node": { + "version": "12.20.24", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.24.tgz", + "integrity": "sha512-yxDeaQIAJlMav7fH5AQqPH1u8YIuhYJXYBzxaQ4PifsU0GDO38MSdmEDeRlIxrKbC6NbEaaEHDanWb+y30U8SQ==", + "dev": true + }, + "colors": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.2.5.tgz", + "integrity": "sha512-erNRLao/Y3Fv54qUa0LBB+//Uf3YwMUmdJinN20yMXm9zdKKqH9wt7R9IIVZ+K7ShzfpLV/Zg8+VyrBJYB4lpg==", + "dev": true + }, + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true + } + } + }, + "@rushstack/rig-package": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/@rushstack/rig-package/-/rig-package-0.3.7.tgz", + "integrity": "sha512-pzMsTSeTC8IiZ6EJLr53gGMvhT4oLWH+hxD7907cHyWuIUlEXFtu/2pK25vUQT13nKp5DJCWxXyYoGRk/h6rtA==", + "dev": true, + "requires": { + "resolve": "~1.17.0", + "strip-json-comments": "~3.1.1" + }, + "dependencies": { + "resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + } + } + }, + "@rushstack/ts-command-line": { + "version": "4.10.6", + "resolved": "https://registry.npmjs.org/@rushstack/ts-command-line/-/ts-command-line-4.10.6.tgz", + "integrity": "sha512-Y3GkUag39sTIlukDg9mUp8MCHrrlJ27POrBNRQGc/uF+VVgX8M7zMzHch5zP6O1QVquWgD7Engdpn2piPYaS/g==", + "dev": true, + "requires": { + "@types/argparse": "1.0.38", + "argparse": "~1.0.9", + "colors": "~1.2.1", + "string-argv": "~0.3.1" + }, + "dependencies": { + "colors": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.2.5.tgz", + "integrity": "sha512-erNRLao/Y3Fv54qUa0LBB+//Uf3YwMUmdJinN20yMXm9zdKKqH9wt7R9IIVZ+K7ShzfpLV/Zg8+VyrBJYB4lpg==", + "dev": true + } + } + }, "@sinonjs/commons": { "version": "1.8.3", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", @@ -7905,6 +8494,12 @@ "integrity": "sha512-iDlLkdg3sCjUSNdoUCsYM/SXheHrdxHsR6msIkbFDW4pV6gHTMwg/8te/paLtywDjGL4S4ByDdUKA3RbfdBX0g==", "dev": true }, + "@types/argparse": { + "version": "1.0.38", + "resolved": "https://registry.npmjs.org/@types/argparse/-/argparse-1.0.38.tgz", + "integrity": "sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==", + "dev": true + }, "@types/body-parser": { "version": "1.19.2", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", @@ -10158,6 +10753,12 @@ "resolve-from": "^4.0.0" } }, + "import-lazy": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz", + "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==", + "dev": true + }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -10492,6 +11093,12 @@ "istanbul-lib-report": "^3.0.0" } }, + "jju": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", + "integrity": "sha1-o6vicYryQaKykE+EpiWXDzia4yo=", + "dev": true + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -10615,6 +11222,12 @@ "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", "dev": true }, + "lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", + "dev": true + }, "lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -12238,6 +12851,12 @@ "thenify": ">= 3.1.0 < 4" } }, + "timsort": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", + "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", + "dev": true + }, "tmp": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", @@ -12517,6 +13136,12 @@ "spdx-expression-parse": "^3.0.0" } }, + "validator": { + "version": "13.7.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.7.0.tgz", + "integrity": "sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==", + "dev": true + }, "vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -12682,6 +13307,27 @@ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true + }, + "z-schema": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/z-schema/-/z-schema-5.0.2.tgz", + "integrity": "sha512-40TH47ukMHq5HrzkeVE40Ad7eIDKaRV2b+Qpi2prLc9X9eFJFzV7tMe5aH12e6avaSS/u5l653EQOv+J9PirPw==", + "dev": true, + "requires": { + "commander": "^2.7.1", + "lodash.get": "^4.4.2", + "lodash.isequal": "^4.5.0", + "validator": "^13.7.0" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "optional": true + } + } } } } diff --git a/package.json b/package.json index 0835fa860..fcc5df9f4 100644 --- a/package.json +++ b/package.json @@ -220,6 +220,8 @@ "@cucumber/compatibility-kit": "9.1.2", "@cucumber/message-streams": "3.0.0", "@cucumber/query": "11.0.0", + "@microsoft/api-documenter": "^7.15.3", + "@microsoft/api-extractor": "^7.19.4", "@sinonjs/fake-timers": "9.1.0", "@types/chai": "4.3.0", "@types/dirty-chai": "2.0.2", @@ -270,6 +272,8 @@ "typescript": "4.6.2" }, "scripts": { + "docs:extract:api": "api-extractor run --local --verbose", + "docs:generate": "api-documenter markdown --input-folder ./docs/temp --output-folder ./docs/api", "build-local": "genversion --es6 src/version.ts && tsc --build tsconfig.node.json && shx cp src/importer.js lib/ && shx cp src/wrapper.mjs lib/", "cck-test": "mocha 'compatibility/**/*_spec.ts'", "feature-test": "node ./bin/cucumber-js", From 3e3423fad031f25bd70be629281f003af8df7ce8 Mon Sep 17 00:00:00 2001 From: David Goss Date: Tue, 15 Mar 2022 09:20:40 +0000 Subject: [PATCH 04/24] bump cucumber-expressions to fix issue --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 51a158c75..be449c1b0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@cspotcode/source-map-support": "^0.7.0", "@cucumber/ci-environment": "9.0.0", - "@cucumber/cucumber-expressions": "15.0.1", + "@cucumber/cucumber-expressions": "15.0.2", "@cucumber/gherkin": "22.0.0", "@cucumber/gherkin-streams": "4.0.0", "@cucumber/html-formatter": "18.0.0", @@ -541,9 +541,9 @@ "dev": true }, "node_modules/@cucumber/cucumber-expressions": { - "version": "15.0.1", - "resolved": "https://registry.npmjs.org/@cucumber/cucumber-expressions/-/cucumber-expressions-15.0.1.tgz", - "integrity": "sha512-TFUjz20+4OpHXDGXN7fv+JDSYkTvdakz1R/2OEV8gqYAkPUhjx+jeiyDF6C0rPzx9MoD7B3DoPfcfA2nS3Bh4w==", + "version": "15.0.2", + "resolved": "https://registry.npmjs.org/@cucumber/cucumber-expressions/-/cucumber-expressions-15.0.2.tgz", + "integrity": "sha512-ppN9JL1C5lw3InvM7WnoKZV9La5PW5Vr8c/8J0ZGzdlC8Y+PB7kskGzx7/tzl9kGjq7USQ7MZfwFz5el2sB/GA==", "dependencies": { "regexp-match-indices": "1.0.2" } @@ -8008,9 +8008,9 @@ "dev": true }, "@cucumber/cucumber-expressions": { - "version": "15.0.1", - "resolved": "https://registry.npmjs.org/@cucumber/cucumber-expressions/-/cucumber-expressions-15.0.1.tgz", - "integrity": "sha512-TFUjz20+4OpHXDGXN7fv+JDSYkTvdakz1R/2OEV8gqYAkPUhjx+jeiyDF6C0rPzx9MoD7B3DoPfcfA2nS3Bh4w==", + "version": "15.0.2", + "resolved": "https://registry.npmjs.org/@cucumber/cucumber-expressions/-/cucumber-expressions-15.0.2.tgz", + "integrity": "sha512-ppN9JL1C5lw3InvM7WnoKZV9La5PW5Vr8c/8J0ZGzdlC8Y+PB7kskGzx7/tzl9kGjq7USQ7MZfwFz5el2sB/GA==", "requires": { "regexp-match-indices": "1.0.2" } diff --git a/package.json b/package.json index 8aef561bd..f70ef0902 100644 --- a/package.json +++ b/package.json @@ -187,7 +187,7 @@ "dependencies": { "@cspotcode/source-map-support": "^0.7.0", "@cucumber/ci-environment": "9.0.0", - "@cucumber/cucumber-expressions": "15.0.1", + "@cucumber/cucumber-expressions": "15.0.2", "@cucumber/gherkin": "22.0.0", "@cucumber/gherkin-streams": "4.0.0", "@cucumber/html-formatter": "18.0.0", From ea357c695dbd44012d5f88749a2e7b42abf180ec Mon Sep 17 00:00:00 2001 From: David Goss Date: Tue, 15 Mar 2022 09:30:49 +0000 Subject: [PATCH 05/24] combine in a single `docs` script and tell dependency-lint.yml --- dependency-lint.yml | 1 + package.json | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dependency-lint.yml b/dependency-lint.yml index a4a45798d..b1d405739 100644 --- a/dependency-lint.yml +++ b/dependency-lint.yml @@ -5,6 +5,7 @@ executedModules: npmScripts: dev: - build + - docs - lint - publish - test diff --git a/package.json b/package.json index f70ef0902..3c9a7c30b 100644 --- a/package.json +++ b/package.json @@ -277,10 +277,11 @@ "typescript": "4.6.2" }, "scripts": { - "docs:extract:api": "api-extractor run --local --verbose", - "docs:generate": "api-documenter markdown --input-folder ./docs/temp --output-folder ./docs/api", "build-local": "genversion --es6 src/version.ts && tsc --build tsconfig.node.json && shx cp src/importer.js lib/ && shx cp src/wrapper.mjs lib/", "cck-test": "mocha 'compatibility/**/*_spec.ts'", + "docs": "npm run docs:extract && npm run docs:generate", + "docs:extract": "api-extractor run --local --verbose", + "docs:generate": "api-documenter markdown --input-folder ./docs/temp --output-folder ./docs/api", "feature-test": "node ./bin/cucumber-js", "lint-autofix": "eslint --fix \"{compatibility,example,features,scripts,src,test}/**/*.ts\"", "lint-code": "eslint \"{compatibility,example,features,scripts,src,test}/**/*.ts\"", From 19d060bed14cd9796cd0c3356d653153f221ba43 Mon Sep 17 00:00:00 2001 From: David Goss Date: Tue, 15 Mar 2022 09:31:17 +0000 Subject: [PATCH 06/24] regenerate docs --- docs/api/cucumber.iresolvedconfiguration.md | 19 +++++++++++++ ...ucumber.iresolvedconfiguration.original.md | 11 ++++++++ ...ucumber.iresolvedconfiguration.runnable.md | 11 ++++++++ .../api/cucumber.irunconfiguration.formats.md | 11 ++++++++ docs/api/cucumber.irunconfiguration.md | 21 +++++++++++++++ .../api/cucumber.irunconfiguration.runtime.md | 11 ++++++++ .../api/cucumber.irunconfiguration.sources.md | 11 ++++++++ .../api/cucumber.irunconfiguration.support.md | 11 ++++++++ ...cucumber.irunnableconfiguration.formats.md | 11 ++++++++ docs/api/cucumber.irunnableconfiguration.md | 21 +++++++++++++++ ...cucumber.irunnableconfiguration.runtime.md | 11 ++++++++ ...cucumber.irunnableconfiguration.sources.md | 11 ++++++++ ...cucumber.irunnableconfiguration.support.md | 11 ++++++++ docs/api/cucumber.irunoptionsformats.files.md | 11 ++++++++ docs/api/cucumber.irunoptionsformats.md | 21 +++++++++++++++ .../cucumber.irunoptionsformats.options.md | 11 ++++++++ .../cucumber.irunoptionsformats.publish.md | 14 ++++++++++ .../api/cucumber.irunoptionsformats.stdout.md | 11 ++++++++ docs/api/cucumber.irunoptionsruntime.md | 13 +++++++++ ...mber.isourcescoordinates.defaultdialect.md | 11 ++++++++ docs/api/cucumber.isourcescoordinates.md | 22 +++++++++++++++ .../api/cucumber.isourcescoordinates.names.md | 11 ++++++++ .../api/cucumber.isourcescoordinates.order.md | 11 ++++++++ .../api/cucumber.isourcescoordinates.paths.md | 11 ++++++++ ...umber.isourcescoordinates.tagexpression.md | 11 ++++++++ docs/api/cucumber.loadconfiguration.md | 27 +++++++++++++++++++ docs/api/cucumber.loadsupport.md | 4 +-- docs/api/cucumber.md | 14 +++++++++- docs/api/cucumber.runcucumber.md | 2 +- docs/api/index.md | 2 +- 30 files changed, 373 insertions(+), 5 deletions(-) create mode 100644 docs/api/cucumber.iresolvedconfiguration.md create mode 100644 docs/api/cucumber.iresolvedconfiguration.original.md create mode 100644 docs/api/cucumber.iresolvedconfiguration.runnable.md create mode 100644 docs/api/cucumber.irunconfiguration.formats.md create mode 100644 docs/api/cucumber.irunconfiguration.md create mode 100644 docs/api/cucumber.irunconfiguration.runtime.md create mode 100644 docs/api/cucumber.irunconfiguration.sources.md create mode 100644 docs/api/cucumber.irunconfiguration.support.md create mode 100644 docs/api/cucumber.irunnableconfiguration.formats.md create mode 100644 docs/api/cucumber.irunnableconfiguration.md create mode 100644 docs/api/cucumber.irunnableconfiguration.runtime.md create mode 100644 docs/api/cucumber.irunnableconfiguration.sources.md create mode 100644 docs/api/cucumber.irunnableconfiguration.support.md create mode 100644 docs/api/cucumber.irunoptionsformats.files.md create mode 100644 docs/api/cucumber.irunoptionsformats.md create mode 100644 docs/api/cucumber.irunoptionsformats.options.md create mode 100644 docs/api/cucumber.irunoptionsformats.publish.md create mode 100644 docs/api/cucumber.irunoptionsformats.stdout.md create mode 100644 docs/api/cucumber.irunoptionsruntime.md create mode 100644 docs/api/cucumber.isourcescoordinates.defaultdialect.md create mode 100644 docs/api/cucumber.isourcescoordinates.md create mode 100644 docs/api/cucumber.isourcescoordinates.names.md create mode 100644 docs/api/cucumber.isourcescoordinates.order.md create mode 100644 docs/api/cucumber.isourcescoordinates.paths.md create mode 100644 docs/api/cucumber.isourcescoordinates.tagexpression.md create mode 100644 docs/api/cucumber.loadconfiguration.md diff --git a/docs/api/cucumber.iresolvedconfiguration.md b/docs/api/cucumber.iresolvedconfiguration.md new file mode 100644 index 000000000..be5656d9c --- /dev/null +++ b/docs/api/cucumber.iresolvedconfiguration.md @@ -0,0 +1,19 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IResolvedConfiguration](./cucumber.iresolvedconfiguration.md) + +## IResolvedConfiguration interface + +Signature: + +```typescript +export interface IResolvedConfiguration +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [original](./cucumber.iresolvedconfiguration.original.md) | IConfiguration | | +| [runnable](./cucumber.iresolvedconfiguration.runnable.md) | [IRunnableConfiguration](./cucumber.irunnableconfiguration.md) | | + diff --git a/docs/api/cucumber.iresolvedconfiguration.original.md b/docs/api/cucumber.iresolvedconfiguration.original.md new file mode 100644 index 000000000..15fd8af8c --- /dev/null +++ b/docs/api/cucumber.iresolvedconfiguration.original.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IResolvedConfiguration](./cucumber.iresolvedconfiguration.md) > [original](./cucumber.iresolvedconfiguration.original.md) + +## IResolvedConfiguration.original property + +Signature: + +```typescript +original: IConfiguration; +``` diff --git a/docs/api/cucumber.iresolvedconfiguration.runnable.md b/docs/api/cucumber.iresolvedconfiguration.runnable.md new file mode 100644 index 000000000..f3c35c431 --- /dev/null +++ b/docs/api/cucumber.iresolvedconfiguration.runnable.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IResolvedConfiguration](./cucumber.iresolvedconfiguration.md) > [runnable](./cucumber.iresolvedconfiguration.runnable.md) + +## IResolvedConfiguration.runnable property + +Signature: + +```typescript +runnable: IRunnableConfiguration; +``` diff --git a/docs/api/cucumber.irunconfiguration.formats.md b/docs/api/cucumber.irunconfiguration.formats.md new file mode 100644 index 000000000..6a4578565 --- /dev/null +++ b/docs/api/cucumber.irunconfiguration.formats.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunConfiguration](./cucumber.irunconfiguration.md) > [formats](./cucumber.irunconfiguration.formats.md) + +## IRunConfiguration.formats property + +Signature: + +```typescript +formats: IRunOptionsFormats; +``` diff --git a/docs/api/cucumber.irunconfiguration.md b/docs/api/cucumber.irunconfiguration.md new file mode 100644 index 000000000..d4418fe55 --- /dev/null +++ b/docs/api/cucumber.irunconfiguration.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunConfiguration](./cucumber.irunconfiguration.md) + +## IRunConfiguration interface + +Signature: + +```typescript +export interface IRunConfiguration +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [formats](./cucumber.irunconfiguration.formats.md) | [IRunOptionsFormats](./cucumber.irunoptionsformats.md) | | +| [runtime](./cucumber.irunconfiguration.runtime.md) | [IRunOptionsRuntime](./cucumber.irunoptionsruntime.md) | | +| [sources](./cucumber.irunconfiguration.sources.md) | [ISourcesCoordinates](./cucumber.isourcescoordinates.md) | | +| [support](./cucumber.irunconfiguration.support.md) | ISupportCodeCoordinates \| ISupportCodeLibrary | | + diff --git a/docs/api/cucumber.irunconfiguration.runtime.md b/docs/api/cucumber.irunconfiguration.runtime.md new file mode 100644 index 000000000..7c651576d --- /dev/null +++ b/docs/api/cucumber.irunconfiguration.runtime.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunConfiguration](./cucumber.irunconfiguration.md) > [runtime](./cucumber.irunconfiguration.runtime.md) + +## IRunConfiguration.runtime property + +Signature: + +```typescript +runtime: IRunOptionsRuntime; +``` diff --git a/docs/api/cucumber.irunconfiguration.sources.md b/docs/api/cucumber.irunconfiguration.sources.md new file mode 100644 index 000000000..e0a68beda --- /dev/null +++ b/docs/api/cucumber.irunconfiguration.sources.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunConfiguration](./cucumber.irunconfiguration.md) > [sources](./cucumber.irunconfiguration.sources.md) + +## IRunConfiguration.sources property + +Signature: + +```typescript +sources: ISourcesCoordinates; +``` diff --git a/docs/api/cucumber.irunconfiguration.support.md b/docs/api/cucumber.irunconfiguration.support.md new file mode 100644 index 000000000..81b4ee360 --- /dev/null +++ b/docs/api/cucumber.irunconfiguration.support.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunConfiguration](./cucumber.irunconfiguration.md) > [support](./cucumber.irunconfiguration.support.md) + +## IRunConfiguration.support property + +Signature: + +```typescript +support: ISupportCodeCoordinates | ISupportCodeLibrary; +``` diff --git a/docs/api/cucumber.irunnableconfiguration.formats.md b/docs/api/cucumber.irunnableconfiguration.formats.md new file mode 100644 index 000000000..9d6ac12d6 --- /dev/null +++ b/docs/api/cucumber.irunnableconfiguration.formats.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunnableConfiguration](./cucumber.irunnableconfiguration.md) > [formats](./cucumber.irunnableconfiguration.formats.md) + +## IRunnableConfiguration.formats property + +Signature: + +```typescript +formats: IRunOptionsFormats; +``` diff --git a/docs/api/cucumber.irunnableconfiguration.md b/docs/api/cucumber.irunnableconfiguration.md new file mode 100644 index 000000000..733ef14e3 --- /dev/null +++ b/docs/api/cucumber.irunnableconfiguration.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunnableConfiguration](./cucumber.irunnableconfiguration.md) + +## IRunnableConfiguration interface + +Signature: + +```typescript +export interface IRunnableConfiguration +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [formats](./cucumber.irunnableconfiguration.formats.md) | [IRunOptionsFormats](./cucumber.irunoptionsformats.md) | | +| [runtime](./cucumber.irunnableconfiguration.runtime.md) | [IRunOptionsRuntime](./cucumber.irunoptionsruntime.md) | | +| [sources](./cucumber.irunnableconfiguration.sources.md) | [ISourcesCoordinates](./cucumber.isourcescoordinates.md) | | +| [support](./cucumber.irunnableconfiguration.support.md) | ISupportCodeCoordinates | | + diff --git a/docs/api/cucumber.irunnableconfiguration.runtime.md b/docs/api/cucumber.irunnableconfiguration.runtime.md new file mode 100644 index 000000000..7d3f2035a --- /dev/null +++ b/docs/api/cucumber.irunnableconfiguration.runtime.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunnableConfiguration](./cucumber.irunnableconfiguration.md) > [runtime](./cucumber.irunnableconfiguration.runtime.md) + +## IRunnableConfiguration.runtime property + +Signature: + +```typescript +runtime: IRunOptionsRuntime; +``` diff --git a/docs/api/cucumber.irunnableconfiguration.sources.md b/docs/api/cucumber.irunnableconfiguration.sources.md new file mode 100644 index 000000000..0dd4370bc --- /dev/null +++ b/docs/api/cucumber.irunnableconfiguration.sources.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunnableConfiguration](./cucumber.irunnableconfiguration.md) > [sources](./cucumber.irunnableconfiguration.sources.md) + +## IRunnableConfiguration.sources property + +Signature: + +```typescript +sources: ISourcesCoordinates; +``` diff --git a/docs/api/cucumber.irunnableconfiguration.support.md b/docs/api/cucumber.irunnableconfiguration.support.md new file mode 100644 index 000000000..16d1f5777 --- /dev/null +++ b/docs/api/cucumber.irunnableconfiguration.support.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunnableConfiguration](./cucumber.irunnableconfiguration.md) > [support](./cucumber.irunnableconfiguration.support.md) + +## IRunnableConfiguration.support property + +Signature: + +```typescript +support: ISupportCodeCoordinates; +``` diff --git a/docs/api/cucumber.irunoptionsformats.files.md b/docs/api/cucumber.irunoptionsformats.files.md new file mode 100644 index 000000000..c9b701526 --- /dev/null +++ b/docs/api/cucumber.irunoptionsformats.files.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunOptionsFormats](./cucumber.irunoptionsformats.md) > [files](./cucumber.irunoptionsformats.files.md) + +## IRunOptionsFormats.files property + +Signature: + +```typescript +files: Record; +``` diff --git a/docs/api/cucumber.irunoptionsformats.md b/docs/api/cucumber.irunoptionsformats.md new file mode 100644 index 000000000..18a85f1d6 --- /dev/null +++ b/docs/api/cucumber.irunoptionsformats.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunOptionsFormats](./cucumber.irunoptionsformats.md) + +## IRunOptionsFormats interface + +Signature: + +```typescript +export interface IRunOptionsFormats +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [files](./cucumber.irunoptionsformats.files.md) | Record<string, string> | | +| [options](./cucumber.irunoptionsformats.options.md) | FormatOptions | | +| [publish](./cucumber.irunoptionsformats.publish.md) | { url?: string; token?: string; } \| false | | +| [stdout](./cucumber.irunoptionsformats.stdout.md) | string | | + diff --git a/docs/api/cucumber.irunoptionsformats.options.md b/docs/api/cucumber.irunoptionsformats.options.md new file mode 100644 index 000000000..696353b4d --- /dev/null +++ b/docs/api/cucumber.irunoptionsformats.options.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunOptionsFormats](./cucumber.irunoptionsformats.md) > [options](./cucumber.irunoptionsformats.options.md) + +## IRunOptionsFormats.options property + +Signature: + +```typescript +options: FormatOptions; +``` diff --git a/docs/api/cucumber.irunoptionsformats.publish.md b/docs/api/cucumber.irunoptionsformats.publish.md new file mode 100644 index 000000000..d416ed77d --- /dev/null +++ b/docs/api/cucumber.irunoptionsformats.publish.md @@ -0,0 +1,14 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunOptionsFormats](./cucumber.irunoptionsformats.md) > [publish](./cucumber.irunoptionsformats.publish.md) + +## IRunOptionsFormats.publish property + +Signature: + +```typescript +publish: { + url?: string; + token?: string; + } | false; +``` diff --git a/docs/api/cucumber.irunoptionsformats.stdout.md b/docs/api/cucumber.irunoptionsformats.stdout.md new file mode 100644 index 000000000..175c5708e --- /dev/null +++ b/docs/api/cucumber.irunoptionsformats.stdout.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunOptionsFormats](./cucumber.irunoptionsformats.md) > [stdout](./cucumber.irunoptionsformats.stdout.md) + +## IRunOptionsFormats.stdout property + +Signature: + +```typescript +stdout: string; +``` diff --git a/docs/api/cucumber.irunoptionsruntime.md b/docs/api/cucumber.irunoptionsruntime.md new file mode 100644 index 000000000..ac634db8c --- /dev/null +++ b/docs/api/cucumber.irunoptionsruntime.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunOptionsRuntime](./cucumber.irunoptionsruntime.md) + +## IRunOptionsRuntime type + +Signature: + +```typescript +export declare type IRunOptionsRuntime = IRuntimeOptions & { + parallel: number; +}; +``` diff --git a/docs/api/cucumber.isourcescoordinates.defaultdialect.md b/docs/api/cucumber.isourcescoordinates.defaultdialect.md new file mode 100644 index 000000000..8e0e43211 --- /dev/null +++ b/docs/api/cucumber.isourcescoordinates.defaultdialect.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [ISourcesCoordinates](./cucumber.isourcescoordinates.md) > [defaultDialect](./cucumber.isourcescoordinates.defaultdialect.md) + +## ISourcesCoordinates.defaultDialect property + +Signature: + +```typescript +defaultDialect: string; +``` diff --git a/docs/api/cucumber.isourcescoordinates.md b/docs/api/cucumber.isourcescoordinates.md new file mode 100644 index 000000000..e58c19712 --- /dev/null +++ b/docs/api/cucumber.isourcescoordinates.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [ISourcesCoordinates](./cucumber.isourcescoordinates.md) + +## ISourcesCoordinates interface + +Signature: + +```typescript +export interface ISourcesCoordinates +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [defaultDialect](./cucumber.isourcescoordinates.defaultdialect.md) | string | | +| [names](./cucumber.isourcescoordinates.names.md) | string\[\] | | +| [order](./cucumber.isourcescoordinates.order.md) | PickleOrder | | +| [paths](./cucumber.isourcescoordinates.paths.md) | string\[\] | | +| [tagExpression](./cucumber.isourcescoordinates.tagexpression.md) | string | | + diff --git a/docs/api/cucumber.isourcescoordinates.names.md b/docs/api/cucumber.isourcescoordinates.names.md new file mode 100644 index 000000000..756541844 --- /dev/null +++ b/docs/api/cucumber.isourcescoordinates.names.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [ISourcesCoordinates](./cucumber.isourcescoordinates.md) > [names](./cucumber.isourcescoordinates.names.md) + +## ISourcesCoordinates.names property + +Signature: + +```typescript +names: string[]; +``` diff --git a/docs/api/cucumber.isourcescoordinates.order.md b/docs/api/cucumber.isourcescoordinates.order.md new file mode 100644 index 000000000..2c669710a --- /dev/null +++ b/docs/api/cucumber.isourcescoordinates.order.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [ISourcesCoordinates](./cucumber.isourcescoordinates.md) > [order](./cucumber.isourcescoordinates.order.md) + +## ISourcesCoordinates.order property + +Signature: + +```typescript +order: PickleOrder; +``` diff --git a/docs/api/cucumber.isourcescoordinates.paths.md b/docs/api/cucumber.isourcescoordinates.paths.md new file mode 100644 index 000000000..0a2143a5a --- /dev/null +++ b/docs/api/cucumber.isourcescoordinates.paths.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [ISourcesCoordinates](./cucumber.isourcescoordinates.md) > [paths](./cucumber.isourcescoordinates.paths.md) + +## ISourcesCoordinates.paths property + +Signature: + +```typescript +paths: string[]; +``` diff --git a/docs/api/cucumber.isourcescoordinates.tagexpression.md b/docs/api/cucumber.isourcescoordinates.tagexpression.md new file mode 100644 index 000000000..311775818 --- /dev/null +++ b/docs/api/cucumber.isourcescoordinates.tagexpression.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [ISourcesCoordinates](./cucumber.isourcescoordinates.md) > [tagExpression](./cucumber.isourcescoordinates.tagexpression.md) + +## ISourcesCoordinates.tagExpression property + +Signature: + +```typescript +tagExpression: string; +``` diff --git a/docs/api/cucumber.loadconfiguration.md b/docs/api/cucumber.loadconfiguration.md new file mode 100644 index 000000000..50baf1a95 --- /dev/null +++ b/docs/api/cucumber.loadconfiguration.md @@ -0,0 +1,27 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [loadConfiguration](./cucumber.loadconfiguration.md) + +## loadConfiguration() function + +Signature: + +```typescript +export declare function loadConfiguration(options: { + file?: string; + profiles?: string[]; + provided?: Partial; +}, { cwd, env }: Partial): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| options | { file?: string; profiles?: string\[\]; provided?: Partial<IConfiguration>; } | | +| { cwd, env } | Partial<[IRunEnvironment](./cucumber.irunenvironment.md)> | | + +Returns: + +Promise<[IResolvedConfiguration](./cucumber.iresolvedconfiguration.md)> + diff --git a/docs/api/cucumber.loadsupport.md b/docs/api/cucumber.loadsupport.md index 6bdeee51c..008894a2d 100644 --- a/docs/api/cucumber.loadsupport.md +++ b/docs/api/cucumber.loadsupport.md @@ -7,14 +7,14 @@ Signature: ```typescript -export declare function loadSupport(configuration: Pick, { cwd }: Partial): Promise; +export declare function loadSupport(configuration: Pick, { cwd }: Partial): Promise; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| configuration | Pick<IUserConfiguration, 'sources' \| 'support'> | | +| configuration | Pick<[IRunnableConfiguration](./cucumber.irunnableconfiguration.md), 'sources' \| 'support'> | | | { cwd } | Partial<[IRunEnvironment](./cucumber.irunenvironment.md)> | | Returns: diff --git a/docs/api/cucumber.md b/docs/api/cucumber.md index c91e66b7e..263551bc0 100644 --- a/docs/api/cucumber.md +++ b/docs/api/cucumber.md @@ -4,7 +4,7 @@ ## cucumber package -Cucumber for JavaScript. +Cucumber for JavaScript ## Remarks @@ -14,6 +14,7 @@ These docs cover the API used for running Cucumber programmatically. The entry p | Function | Description | | --- | --- | +| [loadConfiguration(options, { cwd, env })](./cucumber.loadconfiguration.md) | | | [loadSupport(configuration, { cwd })](./cucumber.loadsupport.md) | | | [runCucumber(configuration, { cwd, stdout, stderr, env, }, onMessage)](./cucumber.runcucumber.md) | | @@ -21,6 +22,17 @@ These docs cover the API used for running Cucumber programmatically. The entry p | Interface | Description | | --- | --- | +| [IResolvedConfiguration](./cucumber.iresolvedconfiguration.md) | | +| [IRunConfiguration](./cucumber.irunconfiguration.md) | | | [IRunEnvironment](./cucumber.irunenvironment.md) | | +| [IRunnableConfiguration](./cucumber.irunnableconfiguration.md) | | +| [IRunOptionsFormats](./cucumber.irunoptionsformats.md) | | | [IRunResult](./cucumber.irunresult.md) | | +| [ISourcesCoordinates](./cucumber.isourcescoordinates.md) | | + +## Type Aliases + +| Type Alias | Description | +| --- | --- | +| [IRunOptionsRuntime](./cucumber.irunoptionsruntime.md) | | diff --git a/docs/api/cucumber.runcucumber.md b/docs/api/cucumber.runcucumber.md index 29c63d261..61bd663e3 100644 --- a/docs/api/cucumber.runcucumber.md +++ b/docs/api/cucumber.runcucumber.md @@ -14,7 +14,7 @@ export declare function runCucumber(configuration: IRunConfiguration, { cwd, std | Parameter | Type | Description | | --- | --- | --- | -| configuration | IRunConfiguration | | +| configuration | [IRunConfiguration](./cucumber.irunconfiguration.md) | | | { cwd, stdout, stderr, env, } | Partial<[IRunEnvironment](./cucumber.irunenvironment.md)> | | | onMessage | (message: Envelope) => void | | diff --git a/docs/api/index.md b/docs/api/index.md index 47e647035..eddac6dd2 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -8,5 +8,5 @@ | Package | Description | | --- | --- | -| [@cucumber/cucumber](./cucumber.md) | Cucumber for JavaScript. | +| [@cucumber/cucumber](./cucumber.md) | Cucumber for JavaScript | From 8ba535a759546224de84ba9db44099b08225bfd4 Mon Sep 17 00:00:00 2001 From: David Goss Date: Tue, 15 Mar 2022 09:39:45 +0000 Subject: [PATCH 07/24] rework directories --- api-extractor.json | 2 +- docs/.gitignore | 1 - .../cucumber.iresolvedconfiguration.md | 0 ...ucumber.iresolvedconfiguration.original.md | 0 ...ucumber.iresolvedconfiguration.runnable.md | 0 .../cucumber.irunconfiguration.formats.md | 0 .../cucumber.irunconfiguration.md | 0 .../cucumber.irunconfiguration.runtime.md | 0 .../cucumber.irunconfiguration.sources.md | 0 .../cucumber.irunconfiguration.support.md | 0 .../cucumber.irunenvironment.cwd.md | 0 .../cucumber.irunenvironment.env.md | 0 .../cucumber.irunenvironment.md | 0 .../cucumber.irunenvironment.stderr.md | 0 .../cucumber.irunenvironment.stdout.md | 0 ...cucumber.irunnableconfiguration.formats.md | 0 .../cucumber.irunnableconfiguration.md | 0 ...cucumber.irunnableconfiguration.runtime.md | 0 ...cucumber.irunnableconfiguration.sources.md | 0 ...cucumber.irunnableconfiguration.support.md | 0 .../cucumber.irunoptionsformats.files.md | 0 .../cucumber.irunoptionsformats.md | 0 .../cucumber.irunoptionsformats.options.md | 0 .../cucumber.irunoptionsformats.publish.md | 0 .../cucumber.irunoptionsformats.stdout.md | 0 .../cucumber.irunoptionsruntime.md | 0 .../api/{ => markdown}/cucumber.irunresult.md | 0 .../cucumber.irunresult.success.md | 0 .../cucumber.irunresult.support.md | 0 ...mber.isourcescoordinates.defaultdialect.md | 0 .../cucumber.isourcescoordinates.md | 0 .../cucumber.isourcescoordinates.names.md | 0 .../cucumber.isourcescoordinates.order.md | 0 .../cucumber.isourcescoordinates.paths.md | 0 ...umber.isourcescoordinates.tagexpression.md | 0 .../cucumber.loadconfiguration.md | 0 .../{ => markdown}/cucumber.loadsupport.md | 0 docs/api/{ => markdown}/cucumber.md | 0 .../{ => markdown}/cucumber.runcucumber.md | 0 docs/api/{ => markdown}/index.md | 0 docs/api/model/cucumber.api.json | 1312 +++++++++++++++++ package.json | 2 +- 42 files changed, 1314 insertions(+), 3 deletions(-) delete mode 100644 docs/.gitignore rename docs/api/{ => markdown}/cucumber.iresolvedconfiguration.md (100%) rename docs/api/{ => markdown}/cucumber.iresolvedconfiguration.original.md (100%) rename docs/api/{ => markdown}/cucumber.iresolvedconfiguration.runnable.md (100%) rename docs/api/{ => markdown}/cucumber.irunconfiguration.formats.md (100%) rename docs/api/{ => markdown}/cucumber.irunconfiguration.md (100%) rename docs/api/{ => markdown}/cucumber.irunconfiguration.runtime.md (100%) rename docs/api/{ => markdown}/cucumber.irunconfiguration.sources.md (100%) rename docs/api/{ => markdown}/cucumber.irunconfiguration.support.md (100%) rename docs/api/{ => markdown}/cucumber.irunenvironment.cwd.md (100%) rename docs/api/{ => markdown}/cucumber.irunenvironment.env.md (100%) rename docs/api/{ => markdown}/cucumber.irunenvironment.md (100%) rename docs/api/{ => markdown}/cucumber.irunenvironment.stderr.md (100%) rename docs/api/{ => markdown}/cucumber.irunenvironment.stdout.md (100%) rename docs/api/{ => markdown}/cucumber.irunnableconfiguration.formats.md (100%) rename docs/api/{ => markdown}/cucumber.irunnableconfiguration.md (100%) rename docs/api/{ => markdown}/cucumber.irunnableconfiguration.runtime.md (100%) rename docs/api/{ => markdown}/cucumber.irunnableconfiguration.sources.md (100%) rename docs/api/{ => markdown}/cucumber.irunnableconfiguration.support.md (100%) rename docs/api/{ => markdown}/cucumber.irunoptionsformats.files.md (100%) rename docs/api/{ => markdown}/cucumber.irunoptionsformats.md (100%) rename docs/api/{ => markdown}/cucumber.irunoptionsformats.options.md (100%) rename docs/api/{ => markdown}/cucumber.irunoptionsformats.publish.md (100%) rename docs/api/{ => markdown}/cucumber.irunoptionsformats.stdout.md (100%) rename docs/api/{ => markdown}/cucumber.irunoptionsruntime.md (100%) rename docs/api/{ => markdown}/cucumber.irunresult.md (100%) rename docs/api/{ => markdown}/cucumber.irunresult.success.md (100%) rename docs/api/{ => markdown}/cucumber.irunresult.support.md (100%) rename docs/api/{ => markdown}/cucumber.isourcescoordinates.defaultdialect.md (100%) rename docs/api/{ => markdown}/cucumber.isourcescoordinates.md (100%) rename docs/api/{ => markdown}/cucumber.isourcescoordinates.names.md (100%) rename docs/api/{ => markdown}/cucumber.isourcescoordinates.order.md (100%) rename docs/api/{ => markdown}/cucumber.isourcescoordinates.paths.md (100%) rename docs/api/{ => markdown}/cucumber.isourcescoordinates.tagexpression.md (100%) rename docs/api/{ => markdown}/cucumber.loadconfiguration.md (100%) rename docs/api/{ => markdown}/cucumber.loadsupport.md (100%) rename docs/api/{ => markdown}/cucumber.md (100%) rename docs/api/{ => markdown}/cucumber.runcucumber.md (100%) rename docs/api/{ => markdown}/index.md (100%) create mode 100644 docs/api/model/cucumber.api.json diff --git a/api-extractor.json b/api-extractor.json index 8927f0336..3987f4985 100644 --- a/api-extractor.json +++ b/api-extractor.json @@ -8,7 +8,7 @@ }, "docModel": { "enabled": true, - "apiJsonFilePath": "/docs/temp/cucumber.api.json" + "apiJsonFilePath": "/docs/api/model/cucumber.api.json" }, "dtsRollup": { "enabled": false diff --git a/docs/.gitignore b/docs/.gitignore deleted file mode 100644 index 9c595a6fb..000000000 --- a/docs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -temp diff --git a/docs/api/cucumber.iresolvedconfiguration.md b/docs/api/markdown/cucumber.iresolvedconfiguration.md similarity index 100% rename from docs/api/cucumber.iresolvedconfiguration.md rename to docs/api/markdown/cucumber.iresolvedconfiguration.md diff --git a/docs/api/cucumber.iresolvedconfiguration.original.md b/docs/api/markdown/cucumber.iresolvedconfiguration.original.md similarity index 100% rename from docs/api/cucumber.iresolvedconfiguration.original.md rename to docs/api/markdown/cucumber.iresolvedconfiguration.original.md diff --git a/docs/api/cucumber.iresolvedconfiguration.runnable.md b/docs/api/markdown/cucumber.iresolvedconfiguration.runnable.md similarity index 100% rename from docs/api/cucumber.iresolvedconfiguration.runnable.md rename to docs/api/markdown/cucumber.iresolvedconfiguration.runnable.md diff --git a/docs/api/cucumber.irunconfiguration.formats.md b/docs/api/markdown/cucumber.irunconfiguration.formats.md similarity index 100% rename from docs/api/cucumber.irunconfiguration.formats.md rename to docs/api/markdown/cucumber.irunconfiguration.formats.md diff --git a/docs/api/cucumber.irunconfiguration.md b/docs/api/markdown/cucumber.irunconfiguration.md similarity index 100% rename from docs/api/cucumber.irunconfiguration.md rename to docs/api/markdown/cucumber.irunconfiguration.md diff --git a/docs/api/cucumber.irunconfiguration.runtime.md b/docs/api/markdown/cucumber.irunconfiguration.runtime.md similarity index 100% rename from docs/api/cucumber.irunconfiguration.runtime.md rename to docs/api/markdown/cucumber.irunconfiguration.runtime.md diff --git a/docs/api/cucumber.irunconfiguration.sources.md b/docs/api/markdown/cucumber.irunconfiguration.sources.md similarity index 100% rename from docs/api/cucumber.irunconfiguration.sources.md rename to docs/api/markdown/cucumber.irunconfiguration.sources.md diff --git a/docs/api/cucumber.irunconfiguration.support.md b/docs/api/markdown/cucumber.irunconfiguration.support.md similarity index 100% rename from docs/api/cucumber.irunconfiguration.support.md rename to docs/api/markdown/cucumber.irunconfiguration.support.md diff --git a/docs/api/cucumber.irunenvironment.cwd.md b/docs/api/markdown/cucumber.irunenvironment.cwd.md similarity index 100% rename from docs/api/cucumber.irunenvironment.cwd.md rename to docs/api/markdown/cucumber.irunenvironment.cwd.md diff --git a/docs/api/cucumber.irunenvironment.env.md b/docs/api/markdown/cucumber.irunenvironment.env.md similarity index 100% rename from docs/api/cucumber.irunenvironment.env.md rename to docs/api/markdown/cucumber.irunenvironment.env.md diff --git a/docs/api/cucumber.irunenvironment.md b/docs/api/markdown/cucumber.irunenvironment.md similarity index 100% rename from docs/api/cucumber.irunenvironment.md rename to docs/api/markdown/cucumber.irunenvironment.md diff --git a/docs/api/cucumber.irunenvironment.stderr.md b/docs/api/markdown/cucumber.irunenvironment.stderr.md similarity index 100% rename from docs/api/cucumber.irunenvironment.stderr.md rename to docs/api/markdown/cucumber.irunenvironment.stderr.md diff --git a/docs/api/cucumber.irunenvironment.stdout.md b/docs/api/markdown/cucumber.irunenvironment.stdout.md similarity index 100% rename from docs/api/cucumber.irunenvironment.stdout.md rename to docs/api/markdown/cucumber.irunenvironment.stdout.md diff --git a/docs/api/cucumber.irunnableconfiguration.formats.md b/docs/api/markdown/cucumber.irunnableconfiguration.formats.md similarity index 100% rename from docs/api/cucumber.irunnableconfiguration.formats.md rename to docs/api/markdown/cucumber.irunnableconfiguration.formats.md diff --git a/docs/api/cucumber.irunnableconfiguration.md b/docs/api/markdown/cucumber.irunnableconfiguration.md similarity index 100% rename from docs/api/cucumber.irunnableconfiguration.md rename to docs/api/markdown/cucumber.irunnableconfiguration.md diff --git a/docs/api/cucumber.irunnableconfiguration.runtime.md b/docs/api/markdown/cucumber.irunnableconfiguration.runtime.md similarity index 100% rename from docs/api/cucumber.irunnableconfiguration.runtime.md rename to docs/api/markdown/cucumber.irunnableconfiguration.runtime.md diff --git a/docs/api/cucumber.irunnableconfiguration.sources.md b/docs/api/markdown/cucumber.irunnableconfiguration.sources.md similarity index 100% rename from docs/api/cucumber.irunnableconfiguration.sources.md rename to docs/api/markdown/cucumber.irunnableconfiguration.sources.md diff --git a/docs/api/cucumber.irunnableconfiguration.support.md b/docs/api/markdown/cucumber.irunnableconfiguration.support.md similarity index 100% rename from docs/api/cucumber.irunnableconfiguration.support.md rename to docs/api/markdown/cucumber.irunnableconfiguration.support.md diff --git a/docs/api/cucumber.irunoptionsformats.files.md b/docs/api/markdown/cucumber.irunoptionsformats.files.md similarity index 100% rename from docs/api/cucumber.irunoptionsformats.files.md rename to docs/api/markdown/cucumber.irunoptionsformats.files.md diff --git a/docs/api/cucumber.irunoptionsformats.md b/docs/api/markdown/cucumber.irunoptionsformats.md similarity index 100% rename from docs/api/cucumber.irunoptionsformats.md rename to docs/api/markdown/cucumber.irunoptionsformats.md diff --git a/docs/api/cucumber.irunoptionsformats.options.md b/docs/api/markdown/cucumber.irunoptionsformats.options.md similarity index 100% rename from docs/api/cucumber.irunoptionsformats.options.md rename to docs/api/markdown/cucumber.irunoptionsformats.options.md diff --git a/docs/api/cucumber.irunoptionsformats.publish.md b/docs/api/markdown/cucumber.irunoptionsformats.publish.md similarity index 100% rename from docs/api/cucumber.irunoptionsformats.publish.md rename to docs/api/markdown/cucumber.irunoptionsformats.publish.md diff --git a/docs/api/cucumber.irunoptionsformats.stdout.md b/docs/api/markdown/cucumber.irunoptionsformats.stdout.md similarity index 100% rename from docs/api/cucumber.irunoptionsformats.stdout.md rename to docs/api/markdown/cucumber.irunoptionsformats.stdout.md diff --git a/docs/api/cucumber.irunoptionsruntime.md b/docs/api/markdown/cucumber.irunoptionsruntime.md similarity index 100% rename from docs/api/cucumber.irunoptionsruntime.md rename to docs/api/markdown/cucumber.irunoptionsruntime.md diff --git a/docs/api/cucumber.irunresult.md b/docs/api/markdown/cucumber.irunresult.md similarity index 100% rename from docs/api/cucumber.irunresult.md rename to docs/api/markdown/cucumber.irunresult.md diff --git a/docs/api/cucumber.irunresult.success.md b/docs/api/markdown/cucumber.irunresult.success.md similarity index 100% rename from docs/api/cucumber.irunresult.success.md rename to docs/api/markdown/cucumber.irunresult.success.md diff --git a/docs/api/cucumber.irunresult.support.md b/docs/api/markdown/cucumber.irunresult.support.md similarity index 100% rename from docs/api/cucumber.irunresult.support.md rename to docs/api/markdown/cucumber.irunresult.support.md diff --git a/docs/api/cucumber.isourcescoordinates.defaultdialect.md b/docs/api/markdown/cucumber.isourcescoordinates.defaultdialect.md similarity index 100% rename from docs/api/cucumber.isourcescoordinates.defaultdialect.md rename to docs/api/markdown/cucumber.isourcescoordinates.defaultdialect.md diff --git a/docs/api/cucumber.isourcescoordinates.md b/docs/api/markdown/cucumber.isourcescoordinates.md similarity index 100% rename from docs/api/cucumber.isourcescoordinates.md rename to docs/api/markdown/cucumber.isourcescoordinates.md diff --git a/docs/api/cucumber.isourcescoordinates.names.md b/docs/api/markdown/cucumber.isourcescoordinates.names.md similarity index 100% rename from docs/api/cucumber.isourcescoordinates.names.md rename to docs/api/markdown/cucumber.isourcescoordinates.names.md diff --git a/docs/api/cucumber.isourcescoordinates.order.md b/docs/api/markdown/cucumber.isourcescoordinates.order.md similarity index 100% rename from docs/api/cucumber.isourcescoordinates.order.md rename to docs/api/markdown/cucumber.isourcescoordinates.order.md diff --git a/docs/api/cucumber.isourcescoordinates.paths.md b/docs/api/markdown/cucumber.isourcescoordinates.paths.md similarity index 100% rename from docs/api/cucumber.isourcescoordinates.paths.md rename to docs/api/markdown/cucumber.isourcescoordinates.paths.md diff --git a/docs/api/cucumber.isourcescoordinates.tagexpression.md b/docs/api/markdown/cucumber.isourcescoordinates.tagexpression.md similarity index 100% rename from docs/api/cucumber.isourcescoordinates.tagexpression.md rename to docs/api/markdown/cucumber.isourcescoordinates.tagexpression.md diff --git a/docs/api/cucumber.loadconfiguration.md b/docs/api/markdown/cucumber.loadconfiguration.md similarity index 100% rename from docs/api/cucumber.loadconfiguration.md rename to docs/api/markdown/cucumber.loadconfiguration.md diff --git a/docs/api/cucumber.loadsupport.md b/docs/api/markdown/cucumber.loadsupport.md similarity index 100% rename from docs/api/cucumber.loadsupport.md rename to docs/api/markdown/cucumber.loadsupport.md diff --git a/docs/api/cucumber.md b/docs/api/markdown/cucumber.md similarity index 100% rename from docs/api/cucumber.md rename to docs/api/markdown/cucumber.md diff --git a/docs/api/cucumber.runcucumber.md b/docs/api/markdown/cucumber.runcucumber.md similarity index 100% rename from docs/api/cucumber.runcucumber.md rename to docs/api/markdown/cucumber.runcucumber.md diff --git a/docs/api/index.md b/docs/api/markdown/index.md similarity index 100% rename from docs/api/index.md rename to docs/api/markdown/index.md diff --git a/docs/api/model/cucumber.api.json b/docs/api/model/cucumber.api.json new file mode 100644 index 000000000..7a4135b56 --- /dev/null +++ b/docs/api/model/cucumber.api.json @@ -0,0 +1,1312 @@ +{ + "metadata": { + "toolPackage": "@microsoft/api-extractor", + "toolVersion": "7.19.4", + "schemaVersion": 1004, + "oldestForwardsCompatibleVersion": 1001, + "tsdocConfig": { + "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", + "noStandardTags": true, + "tagDefinitions": [ + { + "tagName": "@alpha", + "syntaxKind": "modifier" + }, + { + "tagName": "@beta", + "syntaxKind": "modifier" + }, + { + "tagName": "@defaultValue", + "syntaxKind": "block" + }, + { + "tagName": "@decorator", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@deprecated", + "syntaxKind": "block" + }, + { + "tagName": "@eventProperty", + "syntaxKind": "modifier" + }, + { + "tagName": "@example", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@experimental", + "syntaxKind": "modifier" + }, + { + "tagName": "@inheritDoc", + "syntaxKind": "inline" + }, + { + "tagName": "@internal", + "syntaxKind": "modifier" + }, + { + "tagName": "@label", + "syntaxKind": "inline" + }, + { + "tagName": "@link", + "syntaxKind": "inline", + "allowMultiple": true + }, + { + "tagName": "@override", + "syntaxKind": "modifier" + }, + { + "tagName": "@packageDocumentation", + "syntaxKind": "modifier" + }, + { + "tagName": "@param", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@privateRemarks", + "syntaxKind": "block" + }, + { + "tagName": "@public", + "syntaxKind": "modifier" + }, + { + "tagName": "@readonly", + "syntaxKind": "modifier" + }, + { + "tagName": "@remarks", + "syntaxKind": "block" + }, + { + "tagName": "@returns", + "syntaxKind": "block" + }, + { + "tagName": "@sealed", + "syntaxKind": "modifier" + }, + { + "tagName": "@see", + "syntaxKind": "block" + }, + { + "tagName": "@throws", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@typeParam", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@virtual", + "syntaxKind": "modifier" + }, + { + "tagName": "@betaDocumentation", + "syntaxKind": "modifier" + }, + { + "tagName": "@internalRemarks", + "syntaxKind": "block" + }, + { + "tagName": "@preapproved", + "syntaxKind": "modifier" + } + ], + "supportForTags": { + "@alpha": true, + "@beta": true, + "@defaultValue": true, + "@decorator": true, + "@deprecated": true, + "@eventProperty": true, + "@example": true, + "@experimental": true, + "@inheritDoc": true, + "@internal": true, + "@label": true, + "@link": true, + "@override": true, + "@packageDocumentation": true, + "@param": true, + "@privateRemarks": true, + "@public": true, + "@readonly": true, + "@remarks": true, + "@returns": true, + "@sealed": true, + "@see": true, + "@throws": true, + "@typeParam": true, + "@virtual": true, + "@betaDocumentation": true, + "@internalRemarks": true, + "@preapproved": true + } + } + }, + "kind": "Package", + "canonicalReference": "@cucumber/cucumber!", + "docComment": "/**\n * Cucumber for JavaScript\n *\n * @remarks\n *\n * These docs cover the API used for running Cucumber programmatically. The entry point is `@cucumber/cucumber/api`.\n *\n * @packageDocumentation\n */\n", + "name": "@cucumber/cucumber", + "members": [ + { + "kind": "EntryPoint", + "canonicalReference": "@cucumber/cucumber!", + "name": "", + "members": [ + { + "kind": "Interface", + "canonicalReference": "@cucumber/cucumber!IResolvedConfiguration:interface", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface IResolvedConfiguration " + } + ], + "releaseTag": "Public", + "name": "IResolvedConfiguration", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!IResolvedConfiguration#original:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "original: " + }, + { + "kind": "Reference", + "text": "IConfiguration", + "canonicalReference": "@cucumber/cucumber!IConfiguration:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "original", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!IResolvedConfiguration#runnable:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "runnable: " + }, + { + "kind": "Reference", + "text": "IRunnableConfiguration", + "canonicalReference": "@cucumber/cucumber!IRunnableConfiguration:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "runnable", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@cucumber/cucumber!IRunConfiguration:interface", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface IRunConfiguration " + } + ], + "releaseTag": "Public", + "name": "IRunConfiguration", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!IRunConfiguration#formats:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "formats: " + }, + { + "kind": "Reference", + "text": "IRunOptionsFormats", + "canonicalReference": "@cucumber/cucumber!IRunOptionsFormats:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "formats", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!IRunConfiguration#runtime:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "runtime: " + }, + { + "kind": "Reference", + "text": "IRunOptionsRuntime", + "canonicalReference": "@cucumber/cucumber!IRunOptionsRuntime:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "runtime", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!IRunConfiguration#sources:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "sources: " + }, + { + "kind": "Reference", + "text": "ISourcesCoordinates", + "canonicalReference": "@cucumber/cucumber!ISourcesCoordinates:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "sources", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!IRunConfiguration#support:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "support: " + }, + { + "kind": "Reference", + "text": "ISupportCodeCoordinates", + "canonicalReference": "@cucumber/cucumber!ISupportCodeCoordinates:interface" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "ISupportCodeLibrary", + "canonicalReference": "@cucumber/cucumber!ISupportCodeLibrary:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "support", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@cucumber/cucumber!IRunEnvironment:interface", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface IRunEnvironment " + } + ], + "releaseTag": "Public", + "name": "IRunEnvironment", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!IRunEnvironment#cwd:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "cwd: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "cwd", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!IRunEnvironment#env:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "env: " + }, + { + "kind": "Reference", + "text": "NodeJS.ProcessEnv", + "canonicalReference": "!__global.NodeJS.ProcessEnv:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "env", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!IRunEnvironment#stderr:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "stderr: " + }, + { + "kind": "Reference", + "text": "IFormatterStream", + "canonicalReference": "@cucumber/cucumber!IFormatterStream:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "stderr", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!IRunEnvironment#stdout:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "stdout: " + }, + { + "kind": "Reference", + "text": "IFormatterStream", + "canonicalReference": "@cucumber/cucumber!IFormatterStream:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "stdout", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@cucumber/cucumber!IRunnableConfiguration:interface", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface IRunnableConfiguration " + } + ], + "releaseTag": "Public", + "name": "IRunnableConfiguration", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!IRunnableConfiguration#formats:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "formats: " + }, + { + "kind": "Reference", + "text": "IRunOptionsFormats", + "canonicalReference": "@cucumber/cucumber!IRunOptionsFormats:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "formats", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!IRunnableConfiguration#runtime:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "runtime: " + }, + { + "kind": "Reference", + "text": "IRunOptionsRuntime", + "canonicalReference": "@cucumber/cucumber!IRunOptionsRuntime:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "runtime", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!IRunnableConfiguration#sources:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "sources: " + }, + { + "kind": "Reference", + "text": "ISourcesCoordinates", + "canonicalReference": "@cucumber/cucumber!ISourcesCoordinates:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "sources", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!IRunnableConfiguration#support:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "support: " + }, + { + "kind": "Reference", + "text": "ISupportCodeCoordinates", + "canonicalReference": "@cucumber/cucumber!ISupportCodeCoordinates:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "support", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@cucumber/cucumber!IRunOptionsFormats:interface", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface IRunOptionsFormats " + } + ], + "releaseTag": "Public", + "name": "IRunOptionsFormats", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!IRunOptionsFormats#files:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "files: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "files", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!IRunOptionsFormats#options:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "options: " + }, + { + "kind": "Reference", + "text": "FormatOptions", + "canonicalReference": "@cucumber/cucumber!FormatOptions:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "options", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!IRunOptionsFormats#publish:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "publish: " + }, + { + "kind": "Content", + "text": "{\n url?: string;\n token?: string;\n } | false" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "publish", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!IRunOptionsFormats#stdout:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "stdout: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "stdout", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@cucumber/cucumber!IRunOptionsRuntime:type", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare type IRunOptionsRuntime = " + }, + { + "kind": "Reference", + "text": "IRuntimeOptions", + "canonicalReference": "@cucumber/cucumber!IRuntimeOptions:interface" + }, + { + "kind": "Content", + "text": " & {\n parallel: number;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "IRunOptionsRuntime", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "Interface", + "canonicalReference": "@cucumber/cucumber!IRunResult:interface", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface IRunResult " + } + ], + "releaseTag": "Public", + "name": "IRunResult", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!IRunResult#success:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "success: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "success", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!IRunResult#support:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "support: " + }, + { + "kind": "Reference", + "text": "ISupportCodeLibrary", + "canonicalReference": "@cucumber/cucumber!ISupportCodeLibrary:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "support", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@cucumber/cucumber!ISourcesCoordinates:interface", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface ISourcesCoordinates " + } + ], + "releaseTag": "Public", + "name": "ISourcesCoordinates", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!ISourcesCoordinates#defaultDialect:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "defaultDialect: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "defaultDialect", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!ISourcesCoordinates#names:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "names: " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "names", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!ISourcesCoordinates#order:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "order: " + }, + { + "kind": "Reference", + "text": "PickleOrder", + "canonicalReference": "@cucumber/cucumber!PickleOrder:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "order", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!ISourcesCoordinates#paths:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "paths: " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "paths", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!ISourcesCoordinates#tagExpression:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "tagExpression: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "tagExpression", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "@cucumber/cucumber!loadConfiguration:function(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function loadConfiguration(options: " + }, + { + "kind": "Content", + "text": "{\n file?: string;\n profiles?: string[];\n provided?: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "IConfiguration", + "canonicalReference": "@cucumber/cucumber!IConfiguration:interface" + }, + { + "kind": "Content", + "text": ">;\n}" + }, + { + "kind": "Content", + "text": ", { cwd, env }: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "IRunEnvironment", + "canonicalReference": "@cucumber/cucumber!IRunEnvironment:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "IResolvedConfiguration", + "canonicalReference": "@cucumber/cucumber!IResolvedConfiguration:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "returnTypeTokenRange": { + "startIndex": 12, + "endIndex": 16 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "parameterName": "{ cwd, env }", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 11 + } + } + ], + "name": "loadConfiguration" + }, + { + "kind": "Function", + "canonicalReference": "@cucumber/cucumber!loadSupport:function(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function loadSupport(configuration: " + }, + { + "kind": "Reference", + "text": "Pick", + "canonicalReference": "!Pick:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "IRunnableConfiguration", + "canonicalReference": "@cucumber/cucumber!IRunnableConfiguration:interface" + }, + { + "kind": "Content", + "text": ", 'sources' | 'support'>" + }, + { + "kind": "Content", + "text": ", { cwd }: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "IRunEnvironment", + "canonicalReference": "@cucumber/cucumber!IRunEnvironment:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "returnTypeTokenRange": { + "startIndex": 11, + "endIndex": 15 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "configuration", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "parameterName": "{ cwd }", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 10 + } + } + ], + "name": "loadSupport" + }, + { + "kind": "Function", + "canonicalReference": "@cucumber/cucumber!runCucumber:function(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function runCucumber(configuration: " + }, + { + "kind": "Reference", + "text": "IRunConfiguration", + "canonicalReference": "@cucumber/cucumber!IRunConfiguration:interface" + }, + { + "kind": "Content", + "text": ", { cwd, stdout, stderr, env, }: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "IRunEnvironment", + "canonicalReference": "@cucumber/cucumber!IRunEnvironment:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ", onMessage?: " + }, + { + "kind": "Content", + "text": "(message: " + }, + { + "kind": "Reference", + "text": "Envelope", + "canonicalReference": "@cucumber/messages!Envelope:class" + }, + { + "kind": "Content", + "text": ") => void" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "IRunResult", + "canonicalReference": "@cucumber/cucumber!IRunResult:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "returnTypeTokenRange": { + "startIndex": 12, + "endIndex": 16 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "configuration", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "parameterName": "{ cwd, stdout, stderr, env, }", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 7 + } + }, + { + "parameterName": "onMessage", + "parameterTypeTokenRange": { + "startIndex": 8, + "endIndex": 11 + } + } + ], + "name": "runCucumber" + } + ] + } + ] +} diff --git a/package.json b/package.json index 3c9a7c30b..014570bb8 100644 --- a/package.json +++ b/package.json @@ -281,7 +281,7 @@ "cck-test": "mocha 'compatibility/**/*_spec.ts'", "docs": "npm run docs:extract && npm run docs:generate", "docs:extract": "api-extractor run --local --verbose", - "docs:generate": "api-documenter markdown --input-folder ./docs/temp --output-folder ./docs/api", + "docs:generate": "api-documenter markdown --input-folder ./docs/api/model --output-folder ./docs/api/markdown", "feature-test": "node ./bin/cucumber-js", "lint-autofix": "eslint --fix \"{compatibility,example,features,scripts,src,test}/**/*.ts\"", "lint-code": "eslint \"{compatibility,example,features,scripts,src,test}/**/*.ts\"", From 0edd467abd6b16b87d01c5c8c24f2ad273eb8eaf Mon Sep 17 00:00:00 2001 From: David Goss Date: Tue, 15 Mar 2022 12:05:28 +0000 Subject: [PATCH 08/24] improve docs --- .../markdown/cucumber.irunenvironment.cwd.md | 4 +- .../markdown/cucumber.irunenvironment.env.md | 4 +- docs/api/markdown/cucumber.irunenvironment.md | 8 +- .../cucumber.irunenvironment.stderr.md | 4 +- .../cucumber.irunenvironment.stdout.md | 4 +- .../markdown/cucumber.loadconfiguration.md | 4 +- docs/api/markdown/cucumber.loadsupport.md | 4 +- docs/api/markdown/cucumber.md | 6 +- docs/api/markdown/cucumber.runcucumber.md | 4 +- docs/api/model/cucumber.api.json | 97 ++++++------------- src/api/environment.ts | 16 +++ src/api/load_configuration.ts | 4 +- src/api/load_support.ts | 4 +- src/api/run_cucumber.ts | 9 +- src/api/run_cucumber_spec.ts | 6 +- src/api/types.ts | 20 +++- 16 files changed, 98 insertions(+), 100 deletions(-) create mode 100644 src/api/environment.ts diff --git a/docs/api/markdown/cucumber.irunenvironment.cwd.md b/docs/api/markdown/cucumber.irunenvironment.cwd.md index d89041674..4cfa7789b 100644 --- a/docs/api/markdown/cucumber.irunenvironment.cwd.md +++ b/docs/api/markdown/cucumber.irunenvironment.cwd.md @@ -4,8 +4,10 @@ ## IRunEnvironment.cwd property +Working directory for the project (defaults to `process.cwd()` if omitted) + Signature: ```typescript -cwd: string; +cwd?: string; ``` diff --git a/docs/api/markdown/cucumber.irunenvironment.env.md b/docs/api/markdown/cucumber.irunenvironment.env.md index a2633cd30..1a9b14c6f 100644 --- a/docs/api/markdown/cucumber.irunenvironment.env.md +++ b/docs/api/markdown/cucumber.irunenvironment.env.md @@ -4,8 +4,10 @@ ## IRunEnvironment.env property +Environment variables (defaults to `process.env` if omitted) + Signature: ```typescript -env: NodeJS.ProcessEnv; +env?: NodeJS.ProcessEnv; ``` diff --git a/docs/api/markdown/cucumber.irunenvironment.md b/docs/api/markdown/cucumber.irunenvironment.md index 5631de472..62844b71f 100644 --- a/docs/api/markdown/cucumber.irunenvironment.md +++ b/docs/api/markdown/cucumber.irunenvironment.md @@ -14,8 +14,8 @@ export interface IRunEnvironment | Property | Type | Description | | --- | --- | --- | -| [cwd](./cucumber.irunenvironment.cwd.md) | string | | -| [env](./cucumber.irunenvironment.env.md) | NodeJS.ProcessEnv | | -| [stderr](./cucumber.irunenvironment.stderr.md) | IFormatterStream | | -| [stdout](./cucumber.irunenvironment.stdout.md) | IFormatterStream | | +| [cwd?](./cucumber.irunenvironment.cwd.md) | string | (Optional) Working directory for the project (defaults to process.cwd() if omitted) | +| [env?](./cucumber.irunenvironment.env.md) | NodeJS.ProcessEnv | (Optional) Environment variables (defaults to process.env if omitted) | +| [stderr?](./cucumber.irunenvironment.stderr.md) | IFormatterStream | (Optional) Writable stream where the test run's warning/error output is written (defaults to process.stderr if omitted) | +| [stdout?](./cucumber.irunenvironment.stdout.md) | IFormatterStream | (Optional) Writable stream where the test run's main output is written (defaults to process.stdout if omitted) | diff --git a/docs/api/markdown/cucumber.irunenvironment.stderr.md b/docs/api/markdown/cucumber.irunenvironment.stderr.md index a7c1b13da..10fcc8f11 100644 --- a/docs/api/markdown/cucumber.irunenvironment.stderr.md +++ b/docs/api/markdown/cucumber.irunenvironment.stderr.md @@ -4,8 +4,10 @@ ## IRunEnvironment.stderr property +Writable stream where the test run's warning/error output is written (defaults to `process.stderr` if omitted) + Signature: ```typescript -stderr: IFormatterStream; +stderr?: IFormatterStream; ``` diff --git a/docs/api/markdown/cucumber.irunenvironment.stdout.md b/docs/api/markdown/cucumber.irunenvironment.stdout.md index d546e8799..c479c02eb 100644 --- a/docs/api/markdown/cucumber.irunenvironment.stdout.md +++ b/docs/api/markdown/cucumber.irunenvironment.stdout.md @@ -4,8 +4,10 @@ ## IRunEnvironment.stdout property +Writable stream where the test run's main output is written (defaults to `process.stdout` if omitted) + Signature: ```typescript -stdout: IFormatterStream; +stdout?: IFormatterStream; ``` diff --git a/docs/api/markdown/cucumber.loadconfiguration.md b/docs/api/markdown/cucumber.loadconfiguration.md index 50baf1a95..de32f0e93 100644 --- a/docs/api/markdown/cucumber.loadconfiguration.md +++ b/docs/api/markdown/cucumber.loadconfiguration.md @@ -11,7 +11,7 @@ export declare function loadConfiguration(options: { file?: string; profiles?: string[]; provided?: Partial; -}, { cwd, env }: Partial): Promise; +}, environment: IRunEnvironment): Promise; ``` ## Parameters @@ -19,7 +19,7 @@ export declare function loadConfiguration(options: { | Parameter | Type | Description | | --- | --- | --- | | options | { file?: string; profiles?: string\[\]; provided?: Partial<IConfiguration>; } | | -| { cwd, env } | Partial<[IRunEnvironment](./cucumber.irunenvironment.md)> | | +| environment | [IRunEnvironment](./cucumber.irunenvironment.md) | | Returns: diff --git a/docs/api/markdown/cucumber.loadsupport.md b/docs/api/markdown/cucumber.loadsupport.md index 008894a2d..01b9266c8 100644 --- a/docs/api/markdown/cucumber.loadsupport.md +++ b/docs/api/markdown/cucumber.loadsupport.md @@ -7,7 +7,7 @@ Signature: ```typescript -export declare function loadSupport(configuration: Pick, { cwd }: Partial): Promise; +export declare function loadSupport(configuration: Pick, environment: IRunEnvironment): Promise; ``` ## Parameters @@ -15,7 +15,7 @@ export declare function loadSupport(configuration: Pick, 'sources' \| 'support'> | | -| { cwd } | Partial<[IRunEnvironment](./cucumber.irunenvironment.md)> | | +| environment | [IRunEnvironment](./cucumber.irunenvironment.md) | | Returns: diff --git a/docs/api/markdown/cucumber.md b/docs/api/markdown/cucumber.md index 263551bc0..3be7ecc5c 100644 --- a/docs/api/markdown/cucumber.md +++ b/docs/api/markdown/cucumber.md @@ -14,9 +14,9 @@ These docs cover the API used for running Cucumber programmatically. The entry p | Function | Description | | --- | --- | -| [loadConfiguration(options, { cwd, env })](./cucumber.loadconfiguration.md) | | -| [loadSupport(configuration, { cwd })](./cucumber.loadsupport.md) | | -| [runCucumber(configuration, { cwd, stdout, stderr, env, }, onMessage)](./cucumber.runcucumber.md) | | +| [loadConfiguration(options, environment)](./cucumber.loadconfiguration.md) | | +| [loadSupport(configuration, environment)](./cucumber.loadsupport.md) | | +| [runCucumber(configuration, environment, onMessage)](./cucumber.runcucumber.md) | | ## Interfaces diff --git a/docs/api/markdown/cucumber.runcucumber.md b/docs/api/markdown/cucumber.runcucumber.md index 61bd663e3..ff844181c 100644 --- a/docs/api/markdown/cucumber.runcucumber.md +++ b/docs/api/markdown/cucumber.runcucumber.md @@ -7,7 +7,7 @@ Signature: ```typescript -export declare function runCucumber(configuration: IRunConfiguration, { cwd, stdout, stderr, env, }: Partial, onMessage?: (message: Envelope) => void): Promise; +export declare function runCucumber(configuration: IRunConfiguration, environment: IRunEnvironment, onMessage?: (message: Envelope) => void): Promise; ``` ## Parameters @@ -15,7 +15,7 @@ export declare function runCucumber(configuration: IRunConfiguration, { cwd, std | Parameter | Type | Description | | --- | --- | --- | | configuration | [IRunConfiguration](./cucumber.irunconfiguration.md) | | -| { cwd, stdout, stderr, env, } | Partial<[IRunEnvironment](./cucumber.irunenvironment.md)> | | +| environment | [IRunEnvironment](./cucumber.irunenvironment.md) | | | onMessage | (message: Envelope) => void | | Returns: diff --git a/docs/api/model/cucumber.api.json b/docs/api/model/cucumber.api.json index 7a4135b56..375152733 100644 --- a/docs/api/model/cucumber.api.json +++ b/docs/api/model/cucumber.api.json @@ -388,11 +388,11 @@ { "kind": "PropertySignature", "canonicalReference": "@cucumber/cucumber!IRunEnvironment#cwd:member", - "docComment": "", + "docComment": "/**\n * Working directory for the project (defaults to `process.cwd()` if omitted)\n */\n", "excerptTokens": [ { "kind": "Content", - "text": "cwd: " + "text": "cwd?: " }, { "kind": "Content", @@ -403,7 +403,7 @@ "text": ";" } ], - "isOptional": false, + "isOptional": true, "releaseTag": "Public", "name": "cwd", "propertyTypeTokenRange": { @@ -414,11 +414,11 @@ { "kind": "PropertySignature", "canonicalReference": "@cucumber/cucumber!IRunEnvironment#env:member", - "docComment": "", + "docComment": "/**\n * Environment variables (defaults to `process.env` if omitted)\n */\n", "excerptTokens": [ { "kind": "Content", - "text": "env: " + "text": "env?: " }, { "kind": "Reference", @@ -430,7 +430,7 @@ "text": ";" } ], - "isOptional": false, + "isOptional": true, "releaseTag": "Public", "name": "env", "propertyTypeTokenRange": { @@ -441,11 +441,11 @@ { "kind": "PropertySignature", "canonicalReference": "@cucumber/cucumber!IRunEnvironment#stderr:member", - "docComment": "", + "docComment": "/**\n * Writable stream where the test run's warning/error output is written (defaults to `process.stderr` if omitted)\n */\n", "excerptTokens": [ { "kind": "Content", - "text": "stderr: " + "text": "stderr?: " }, { "kind": "Reference", @@ -457,7 +457,7 @@ "text": ";" } ], - "isOptional": false, + "isOptional": true, "releaseTag": "Public", "name": "stderr", "propertyTypeTokenRange": { @@ -468,11 +468,11 @@ { "kind": "PropertySignature", "canonicalReference": "@cucumber/cucumber!IRunEnvironment#stdout:member", - "docComment": "", + "docComment": "/**\n * Writable stream where the test run's main output is written (defaults to `process.stdout` if omitted)\n */\n", "excerptTokens": [ { "kind": "Content", - "text": "stdout: " + "text": "stdout?: " }, { "kind": "Reference", @@ -484,7 +484,7 @@ "text": ";" } ], - "isOptional": false, + "isOptional": true, "releaseTag": "Public", "name": "stdout", "propertyTypeTokenRange": { @@ -1024,26 +1024,13 @@ }, { "kind": "Content", - "text": ", { cwd, env }: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" + "text": ", environment: " }, { "kind": "Reference", "text": "IRunEnvironment", "canonicalReference": "@cucumber/cucumber!IRunEnvironment:interface" }, - { - "kind": "Content", - "text": ">" - }, { "kind": "Content", "text": "): " @@ -1072,8 +1059,8 @@ } ], "returnTypeTokenRange": { - "startIndex": 12, - "endIndex": 16 + "startIndex": 9, + "endIndex": 13 }, "releaseTag": "Public", "overloadIndex": 1, @@ -1086,10 +1073,10 @@ } }, { - "parameterName": "{ cwd, env }", + "parameterName": "environment", "parameterTypeTokenRange": { "startIndex": 7, - "endIndex": 11 + "endIndex": 8 } } ], @@ -1124,26 +1111,13 @@ }, { "kind": "Content", - "text": ", { cwd }: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" + "text": ", environment: " }, { "kind": "Reference", "text": "IRunEnvironment", "canonicalReference": "@cucumber/cucumber!IRunEnvironment:interface" }, - { - "kind": "Content", - "text": ">" - }, { "kind": "Content", "text": "): " @@ -1172,8 +1146,8 @@ } ], "returnTypeTokenRange": { - "startIndex": 11, - "endIndex": 15 + "startIndex": 8, + "endIndex": 12 }, "releaseTag": "Public", "overloadIndex": 1, @@ -1186,10 +1160,10 @@ } }, { - "parameterName": "{ cwd }", + "parameterName": "environment", "parameterTypeTokenRange": { "startIndex": 6, - "endIndex": 10 + "endIndex": 7 } } ], @@ -1211,26 +1185,13 @@ }, { "kind": "Content", - "text": ", { cwd, stdout, stderr, env, }: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" + "text": ", environment: " }, { "kind": "Reference", "text": "IRunEnvironment", "canonicalReference": "@cucumber/cucumber!IRunEnvironment:interface" }, - { - "kind": "Content", - "text": ">" - }, { "kind": "Content", "text": ", onMessage?: " @@ -1276,8 +1237,8 @@ } ], "returnTypeTokenRange": { - "startIndex": 12, - "endIndex": 16 + "startIndex": 9, + "endIndex": 13 }, "releaseTag": "Public", "overloadIndex": 1, @@ -1290,17 +1251,17 @@ } }, { - "parameterName": "{ cwd, stdout, stderr, env, }", + "parameterName": "environment", "parameterTypeTokenRange": { "startIndex": 3, - "endIndex": 7 + "endIndex": 4 } }, { "parameterName": "onMessage", "parameterTypeTokenRange": { - "startIndex": 8, - "endIndex": 11 + "startIndex": 5, + "endIndex": 8 } } ], diff --git a/src/api/environment.ts b/src/api/environment.ts new file mode 100644 index 000000000..e34ac849a --- /dev/null +++ b/src/api/environment.ts @@ -0,0 +1,16 @@ +import { IRunEnvironment } from './types' + +export function mergeEnvironment( + provided: IRunEnvironment +): Required { + return Object.assign( + {}, + { + cwd: process.cwd(), + stdout: process.stdout, + stderr: process.stderr, + env: process.env, + }, + provided + ) +} diff --git a/src/api/load_configuration.ts b/src/api/load_configuration.ts index bd86d50cf..b8f0a9fb7 100644 --- a/src/api/load_configuration.ts +++ b/src/api/load_configuration.ts @@ -8,6 +8,7 @@ import { } from '../configuration' import { validateConfiguration } from '../configuration/validate_configuration' import { convertConfiguration } from './convert_configuration' +import { mergeEnvironment } from './environment' export async function loadConfiguration( options: { @@ -15,8 +16,9 @@ export async function loadConfiguration( profiles?: string[] provided?: Partial }, - { cwd = process.cwd(), env = process.env }: Partial + environment: IRunEnvironment ): Promise { + const { cwd, env } = mergeEnvironment(environment) const configFile = options.file ?? locateFile(cwd) const profileConfiguration = configFile ? await fromFile(cwd, configFile, options.profiles) diff --git a/src/api/load_support.ts b/src/api/load_support.ts index 30aef8cd2..6d16e5188 100644 --- a/src/api/load_support.ts +++ b/src/api/load_support.ts @@ -2,11 +2,13 @@ import { IdGenerator } from '@cucumber/messages' import { IRunEnvironment, IRunnableConfiguration } from './types' import { resolvePaths } from './paths' import { getSupportCodeLibrary } from './support' +import { mergeEnvironment } from './environment' export async function loadSupport( configuration: Pick, - { cwd = process.cwd() }: Partial + environment: IRunEnvironment ) { + const { cwd } = mergeEnvironment(environment) const newId = IdGenerator.uuid() const { requirePaths, importPaths } = await resolvePaths( cwd, diff --git a/src/api/run_cucumber.ts b/src/api/run_cucumber.ts index 6d05a7d78..467beaf8b 100644 --- a/src/api/run_cucumber.ts +++ b/src/api/run_cucumber.ts @@ -16,17 +16,14 @@ import { getSupportCodeLibrary } from './support' import { Console } from 'console' import * as messages from '@cucumber/messages' import { doesHaveValue } from '../value_checker' +import { mergeEnvironment } from './environment' export async function runCucumber( configuration: IRunConfiguration, - { - cwd = process.cwd(), - stdout = process.stdout, - stderr = process.stderr, - env = process.env, - }: Partial, + environment: IRunEnvironment, onMessage?: (message: Envelope) => void ): Promise { + const { cwd, stdout, stderr, env } = mergeEnvironment(environment) const logger = new Console(stdout, stderr) const newId = IdGenerator.uuid() diff --git a/src/api/run_cucumber_spec.ts b/src/api/run_cucumber_spec.ts index b1880abf1..c1597bc74 100644 --- a/src/api/run_cucumber_spec.ts +++ b/src/api/run_cucumber_spec.ts @@ -35,14 +35,14 @@ async function setupEnvironment(): Promise> { return { cwd, stdout } } -async function teardownEnvironment(environment: Partial) { +async function teardownEnvironment(environment: IRunEnvironment) { await fs.rmdir(environment.cwd, { recursive: true }) environment.stdout.end() } describe('runCucumber', () => { describe('preloading support code', () => { - let environment: Partial + let environment: IRunEnvironment beforeEach(async () => { environment = await setupEnvironment() }) @@ -70,7 +70,7 @@ describe('runCucumber', () => { }) describe('reusing support code across runs', () => { - let environment: Partial + let environment: IRunEnvironment beforeEach(async () => { environment = await setupEnvironment() }) diff --git a/src/api/types.ts b/src/api/types.ts index b58238240..40a2bcd8c 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -44,10 +44,22 @@ export interface IRunConfiguration { } export interface IRunEnvironment { - cwd: string - stdout: IFormatterStream - stderr: IFormatterStream - env: NodeJS.ProcessEnv + /** + * Working directory for the project (defaults to `process.cwd()` if omitted) + */ + cwd?: string + /** + * Writable stream where the test run's main output is written (defaults to `process.stdout` if omitted) + */ + stdout?: IFormatterStream + /** + * Writable stream where the test run's warning/error output is written (defaults to `process.stderr` if omitted) + */ + stderr?: IFormatterStream + /** + * Environment variables (defaults to `process.env` if omitted) + */ + env?: NodeJS.ProcessEnv } export interface IResolvedConfiguration { From d3fc0bc4776214a0dc8dcd70da827b50aee7cda5 Mon Sep 17 00:00:00 2001 From: David Goss Date: Wed, 16 Mar 2022 11:56:39 +0000 Subject: [PATCH 09/24] add entry point at /api --- package.json | 6 +++++- src/api/wrapper.mjs | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 src/api/wrapper.mjs diff --git a/package.json b/package.json index 014570bb8..426cb0b5f 100644 --- a/package.json +++ b/package.json @@ -175,6 +175,10 @@ "import": "./lib/wrapper.mjs", "require": "./lib/index.js" }, + "./api": { + "import": "./lib/api/wrapper.mjs", + "require": "./lib/api/index.js" + }, "./lib/*": { "require": "./lib/*.js" }, @@ -277,7 +281,7 @@ "typescript": "4.6.2" }, "scripts": { - "build-local": "genversion --es6 src/version.ts && tsc --build tsconfig.node.json && shx cp src/importer.js lib/ && shx cp src/wrapper.mjs lib/", + "build-local": "genversion --es6 src/version.ts && tsc --build tsconfig.node.json && shx cp src/importer.js lib/ && shx cp src/wrapper.mjs lib/ && shx cp src/api/wrapper.mjs lib/api/", "cck-test": "mocha 'compatibility/**/*_spec.ts'", "docs": "npm run docs:extract && npm run docs:generate", "docs:extract": "api-extractor run --local --verbose", diff --git a/src/api/wrapper.mjs b/src/api/wrapper.mjs new file mode 100644 index 000000000..f34a7ca7a --- /dev/null +++ b/src/api/wrapper.mjs @@ -0,0 +1,5 @@ +import api from './index.js' + +export const loadConfiguration = api.loadConfiguration +export const loadSupport = api.loadSupport +export const runCucumber = api.runCucumber From 921cc4d041b95edc17f5d1871fd92d8d94cccc67 Mon Sep 17 00:00:00 2001 From: David Goss Date: Wed, 16 Mar 2022 12:14:22 +0000 Subject: [PATCH 10/24] runtime options to extend --- .../markdown/cucumber.irunoptionsruntime.md | 14 +++-- .../cucumber.irunoptionsruntime.parallel.md | 11 ++++ docs/api/markdown/cucumber.md | 7 +-- docs/api/model/cucumber.api.json | 54 ++++++++++++++----- src/api/types.ts | 4 +- 5 files changed, 65 insertions(+), 25 deletions(-) create mode 100644 docs/api/markdown/cucumber.irunoptionsruntime.parallel.md diff --git a/docs/api/markdown/cucumber.irunoptionsruntime.md b/docs/api/markdown/cucumber.irunoptionsruntime.md index ac634db8c..166f1af5c 100644 --- a/docs/api/markdown/cucumber.irunoptionsruntime.md +++ b/docs/api/markdown/cucumber.irunoptionsruntime.md @@ -2,12 +2,18 @@ [Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunOptionsRuntime](./cucumber.irunoptionsruntime.md) -## IRunOptionsRuntime type +## IRunOptionsRuntime interface Signature: ```typescript -export declare type IRunOptionsRuntime = IRuntimeOptions & { - parallel: number; -}; +export interface IRunOptionsRuntime extends IRuntimeOptions ``` +Extends: IRuntimeOptions + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [parallel](./cucumber.irunoptionsruntime.parallel.md) | number | | + diff --git a/docs/api/markdown/cucumber.irunoptionsruntime.parallel.md b/docs/api/markdown/cucumber.irunoptionsruntime.parallel.md new file mode 100644 index 000000000..6deaa4ab7 --- /dev/null +++ b/docs/api/markdown/cucumber.irunoptionsruntime.parallel.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunOptionsRuntime](./cucumber.irunoptionsruntime.md) > [parallel](./cucumber.irunoptionsruntime.parallel.md) + +## IRunOptionsRuntime.parallel property + +Signature: + +```typescript +parallel: number; +``` diff --git a/docs/api/markdown/cucumber.md b/docs/api/markdown/cucumber.md index 3be7ecc5c..9c6ec9dba 100644 --- a/docs/api/markdown/cucumber.md +++ b/docs/api/markdown/cucumber.md @@ -27,12 +27,7 @@ These docs cover the API used for running Cucumber programmatically. The entry p | [IRunEnvironment](./cucumber.irunenvironment.md) | | | [IRunnableConfiguration](./cucumber.irunnableconfiguration.md) | | | [IRunOptionsFormats](./cucumber.irunoptionsformats.md) | | +| [IRunOptionsRuntime](./cucumber.irunoptionsruntime.md) | | | [IRunResult](./cucumber.irunresult.md) | | | [ISourcesCoordinates](./cucumber.isourcescoordinates.md) | | -## Type Aliases - -| Type Alias | Description | -| --- | --- | -| [IRunOptionsRuntime](./cucumber.irunoptionsruntime.md) | | - diff --git a/docs/api/model/cucumber.api.json b/docs/api/model/cucumber.api.json index 375152733..c72ccf729 100644 --- a/docs/api/model/cucumber.api.json +++ b/docs/api/model/cucumber.api.json @@ -291,7 +291,7 @@ { "kind": "Reference", "text": "IRunOptionsRuntime", - "canonicalReference": "@cucumber/cucumber!IRunOptionsRuntime:type" + "canonicalReference": "@cucumber/cucumber!IRunOptionsRuntime:interface" }, { "kind": "Content", @@ -547,7 +547,7 @@ { "kind": "Reference", "text": "IRunOptionsRuntime", - "canonicalReference": "@cucumber/cucumber!IRunOptionsRuntime:type" + "canonicalReference": "@cucumber/cucumber!IRunOptionsRuntime:interface" }, { "kind": "Content", @@ -746,13 +746,13 @@ "extendsTokenRanges": [] }, { - "kind": "TypeAlias", - "canonicalReference": "@cucumber/cucumber!IRunOptionsRuntime:type", + "kind": "Interface", + "canonicalReference": "@cucumber/cucumber!IRunOptionsRuntime:interface", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "export declare type IRunOptionsRuntime = " + "text": "export interface IRunOptionsRuntime extends " }, { "kind": "Reference", @@ -761,19 +761,45 @@ }, { "kind": "Content", - "text": " & {\n parallel: number;\n}" - }, - { - "kind": "Content", - "text": ";" + "text": " " } ], "releaseTag": "Public", "name": "IRunOptionsRuntime", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!IRunOptionsRuntime#parallel:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "parallel: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "parallel", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 3 + } + ] }, { "kind": "Interface", diff --git a/src/api/types.ts b/src/api/types.ts index 40a2bcd8c..e8060030e 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -15,7 +15,9 @@ export interface ISourcesCoordinates { order: PickleOrder } -export type IRunOptionsRuntime = IRuntimeOptions & { parallel: number } +export interface IRunOptionsRuntime extends IRuntimeOptions { + parallel: number +} export interface IRunOptionsFormats { stdout: string From 3bc5df72718fbd4d7898cfede0b1bb8bbd80de02 Mon Sep 17 00:00:00 2001 From: David Goss Date: Wed, 16 Mar 2022 13:03:08 +0000 Subject: [PATCH 11/24] get the docs in reasonable shape; make naming consistent, split out some types/interfaces as needed --- .../cucumber.iresolvedconfiguration.md | 4 +- ...ucumber.iresolvedconfiguration.original.md | 2 + ...ucumber.iresolvedconfiguration.runnable.md | 2 + .../cucumber.irunconfiguration.formats.md | 11 - .../markdown/cucumber.irunconfiguration.md | 21 - .../cucumber.irunconfiguration.runtime.md | 11 - .../cucumber.irunconfiguration.sources.md | 11 - .../cucumber.irunconfiguration.support.md | 11 - .../markdown/cucumber.irunenvironment.cwd.md | 2 +- .../markdown/cucumber.irunenvironment.env.md | 2 +- docs/api/markdown/cucumber.irunenvironment.md | 10 +- .../cucumber.irunenvironment.stderr.md | 2 +- .../cucumber.irunenvironment.stdout.md | 2 +- .../cucumber.irunnableconfiguration.md | 2 +- docs/api/markdown/cucumber.irunresult.md | 6 +- .../markdown/cucumber.irunresult.success.md | 2 + .../markdown/cucumber.irunresult.support.md | 2 + .../markdown/cucumber.loadconfiguration.md | 12 +- docs/api/markdown/cucumber.loadsupport.md | 10 +- docs/api/markdown/cucumber.md | 21 +- docs/api/markdown/cucumber.runcucumber.md | 10 +- docs/api/model/cucumber.api.json | 478 ++++++++++++++---- src/api/load_configuration.ts | 19 +- src/api/load_support.ts | 19 +- src/api/paths.ts | 3 +- src/api/run_cucumber.ts | 11 +- src/api/types.ts | 75 ++- 27 files changed, 525 insertions(+), 236 deletions(-) delete mode 100644 docs/api/markdown/cucumber.irunconfiguration.formats.md delete mode 100644 docs/api/markdown/cucumber.irunconfiguration.md delete mode 100644 docs/api/markdown/cucumber.irunconfiguration.runtime.md delete mode 100644 docs/api/markdown/cucumber.irunconfiguration.sources.md delete mode 100644 docs/api/markdown/cucumber.irunconfiguration.support.md diff --git a/docs/api/markdown/cucumber.iresolvedconfiguration.md b/docs/api/markdown/cucumber.iresolvedconfiguration.md index be5656d9c..89da23278 100644 --- a/docs/api/markdown/cucumber.iresolvedconfiguration.md +++ b/docs/api/markdown/cucumber.iresolvedconfiguration.md @@ -14,6 +14,6 @@ export interface IResolvedConfiguration | Property | Type | Description | | --- | --- | --- | -| [original](./cucumber.iresolvedconfiguration.original.md) | IConfiguration | | -| [runnable](./cucumber.iresolvedconfiguration.runnable.md) | [IRunnableConfiguration](./cucumber.irunnableconfiguration.md) | | +| [original](./cucumber.iresolvedconfiguration.original.md) | IConfiguration | The final flat configuration object resolved from the configuration file/profiles plus any extra provided. | +| [runnable](./cucumber.iresolvedconfiguration.runnable.md) | [IRunnableConfiguration](./cucumber.irunnableconfiguration.md) | The format that can be passed into runCucumber. | diff --git a/docs/api/markdown/cucumber.iresolvedconfiguration.original.md b/docs/api/markdown/cucumber.iresolvedconfiguration.original.md index 15fd8af8c..426f2b3d1 100644 --- a/docs/api/markdown/cucumber.iresolvedconfiguration.original.md +++ b/docs/api/markdown/cucumber.iresolvedconfiguration.original.md @@ -4,6 +4,8 @@ ## IResolvedConfiguration.original property +The final flat configuration object resolved from the configuration file/profiles plus any extra provided. + Signature: ```typescript diff --git a/docs/api/markdown/cucumber.iresolvedconfiguration.runnable.md b/docs/api/markdown/cucumber.iresolvedconfiguration.runnable.md index f3c35c431..7c5ccbb43 100644 --- a/docs/api/markdown/cucumber.iresolvedconfiguration.runnable.md +++ b/docs/api/markdown/cucumber.iresolvedconfiguration.runnable.md @@ -4,6 +4,8 @@ ## IResolvedConfiguration.runnable property +The format that can be passed into `runCucumber`. + Signature: ```typescript diff --git a/docs/api/markdown/cucumber.irunconfiguration.formats.md b/docs/api/markdown/cucumber.irunconfiguration.formats.md deleted file mode 100644 index 6a4578565..000000000 --- a/docs/api/markdown/cucumber.irunconfiguration.formats.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunConfiguration](./cucumber.irunconfiguration.md) > [formats](./cucumber.irunconfiguration.formats.md) - -## IRunConfiguration.formats property - -Signature: - -```typescript -formats: IRunOptionsFormats; -``` diff --git a/docs/api/markdown/cucumber.irunconfiguration.md b/docs/api/markdown/cucumber.irunconfiguration.md deleted file mode 100644 index d4418fe55..000000000 --- a/docs/api/markdown/cucumber.irunconfiguration.md +++ /dev/null @@ -1,21 +0,0 @@ - - -[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunConfiguration](./cucumber.irunconfiguration.md) - -## IRunConfiguration interface - -Signature: - -```typescript -export interface IRunConfiguration -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [formats](./cucumber.irunconfiguration.formats.md) | [IRunOptionsFormats](./cucumber.irunoptionsformats.md) | | -| [runtime](./cucumber.irunconfiguration.runtime.md) | [IRunOptionsRuntime](./cucumber.irunoptionsruntime.md) | | -| [sources](./cucumber.irunconfiguration.sources.md) | [ISourcesCoordinates](./cucumber.isourcescoordinates.md) | | -| [support](./cucumber.irunconfiguration.support.md) | ISupportCodeCoordinates \| ISupportCodeLibrary | | - diff --git a/docs/api/markdown/cucumber.irunconfiguration.runtime.md b/docs/api/markdown/cucumber.irunconfiguration.runtime.md deleted file mode 100644 index 7c651576d..000000000 --- a/docs/api/markdown/cucumber.irunconfiguration.runtime.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunConfiguration](./cucumber.irunconfiguration.md) > [runtime](./cucumber.irunconfiguration.runtime.md) - -## IRunConfiguration.runtime property - -Signature: - -```typescript -runtime: IRunOptionsRuntime; -``` diff --git a/docs/api/markdown/cucumber.irunconfiguration.sources.md b/docs/api/markdown/cucumber.irunconfiguration.sources.md deleted file mode 100644 index e0a68beda..000000000 --- a/docs/api/markdown/cucumber.irunconfiguration.sources.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunConfiguration](./cucumber.irunconfiguration.md) > [sources](./cucumber.irunconfiguration.sources.md) - -## IRunConfiguration.sources property - -Signature: - -```typescript -sources: ISourcesCoordinates; -``` diff --git a/docs/api/markdown/cucumber.irunconfiguration.support.md b/docs/api/markdown/cucumber.irunconfiguration.support.md deleted file mode 100644 index 81b4ee360..000000000 --- a/docs/api/markdown/cucumber.irunconfiguration.support.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunConfiguration](./cucumber.irunconfiguration.md) > [support](./cucumber.irunconfiguration.support.md) - -## IRunConfiguration.support property - -Signature: - -```typescript -support: ISupportCodeCoordinates | ISupportCodeLibrary; -``` diff --git a/docs/api/markdown/cucumber.irunenvironment.cwd.md b/docs/api/markdown/cucumber.irunenvironment.cwd.md index 4cfa7789b..efe7d2aa3 100644 --- a/docs/api/markdown/cucumber.irunenvironment.cwd.md +++ b/docs/api/markdown/cucumber.irunenvironment.cwd.md @@ -4,7 +4,7 @@ ## IRunEnvironment.cwd property -Working directory for the project (defaults to `process.cwd()` if omitted) +Working directory for the project (defaults to `process.cwd()` if omitted). Signature: diff --git a/docs/api/markdown/cucumber.irunenvironment.env.md b/docs/api/markdown/cucumber.irunenvironment.env.md index 1a9b14c6f..cac334c97 100644 --- a/docs/api/markdown/cucumber.irunenvironment.env.md +++ b/docs/api/markdown/cucumber.irunenvironment.env.md @@ -4,7 +4,7 @@ ## IRunEnvironment.env property -Environment variables (defaults to `process.env` if omitted) +Environment variables (defaults to `process.env` if omitted). Signature: diff --git a/docs/api/markdown/cucumber.irunenvironment.md b/docs/api/markdown/cucumber.irunenvironment.md index 62844b71f..a563ff692 100644 --- a/docs/api/markdown/cucumber.irunenvironment.md +++ b/docs/api/markdown/cucumber.irunenvironment.md @@ -4,6 +4,8 @@ ## IRunEnvironment interface +Contextual data about the project environment. + Signature: ```typescript @@ -14,8 +16,8 @@ export interface IRunEnvironment | Property | Type | Description | | --- | --- | --- | -| [cwd?](./cucumber.irunenvironment.cwd.md) | string | (Optional) Working directory for the project (defaults to process.cwd() if omitted) | -| [env?](./cucumber.irunenvironment.env.md) | NodeJS.ProcessEnv | (Optional) Environment variables (defaults to process.env if omitted) | -| [stderr?](./cucumber.irunenvironment.stderr.md) | IFormatterStream | (Optional) Writable stream where the test run's warning/error output is written (defaults to process.stderr if omitted) | -| [stdout?](./cucumber.irunenvironment.stdout.md) | IFormatterStream | (Optional) Writable stream where the test run's main output is written (defaults to process.stdout if omitted) | +| [cwd?](./cucumber.irunenvironment.cwd.md) | string | (Optional) Working directory for the project (defaults to process.cwd() if omitted). | +| [env?](./cucumber.irunenvironment.env.md) | NodeJS.ProcessEnv | (Optional) Environment variables (defaults to process.env if omitted). | +| [stderr?](./cucumber.irunenvironment.stderr.md) | IFormatterStream | (Optional) Writable stream where the test run's warning/error output is written (defaults to process.stderr if omitted). | +| [stdout?](./cucumber.irunenvironment.stdout.md) | IFormatterStream | (Optional) Writable stream where the test run's main output is written (defaults to process.stdout if omitted). | diff --git a/docs/api/markdown/cucumber.irunenvironment.stderr.md b/docs/api/markdown/cucumber.irunenvironment.stderr.md index 10fcc8f11..4a0162c95 100644 --- a/docs/api/markdown/cucumber.irunenvironment.stderr.md +++ b/docs/api/markdown/cucumber.irunenvironment.stderr.md @@ -4,7 +4,7 @@ ## IRunEnvironment.stderr property -Writable stream where the test run's warning/error output is written (defaults to `process.stderr` if omitted) +Writable stream where the test run's warning/error output is written (defaults to `process.stderr` if omitted). Signature: diff --git a/docs/api/markdown/cucumber.irunenvironment.stdout.md b/docs/api/markdown/cucumber.irunenvironment.stdout.md index c479c02eb..f72e61807 100644 --- a/docs/api/markdown/cucumber.irunenvironment.stdout.md +++ b/docs/api/markdown/cucumber.irunenvironment.stdout.md @@ -4,7 +4,7 @@ ## IRunEnvironment.stdout property -Writable stream where the test run's main output is written (defaults to `process.stdout` if omitted) +Writable stream where the test run's main output is written (defaults to `process.stdout` if omitted). Signature: diff --git a/docs/api/markdown/cucumber.irunnableconfiguration.md b/docs/api/markdown/cucumber.irunnableconfiguration.md index 733ef14e3..6080fff5a 100644 --- a/docs/api/markdown/cucumber.irunnableconfiguration.md +++ b/docs/api/markdown/cucumber.irunnableconfiguration.md @@ -17,5 +17,5 @@ export interface IRunnableConfiguration | [formats](./cucumber.irunnableconfiguration.formats.md) | [IRunOptionsFormats](./cucumber.irunoptionsformats.md) | | | [runtime](./cucumber.irunnableconfiguration.runtime.md) | [IRunOptionsRuntime](./cucumber.irunoptionsruntime.md) | | | [sources](./cucumber.irunnableconfiguration.sources.md) | [ISourcesCoordinates](./cucumber.isourcescoordinates.md) | | -| [support](./cucumber.irunnableconfiguration.support.md) | ISupportCodeCoordinates | | +| [support](./cucumber.irunnableconfiguration.support.md) | [ISupportCodeCoordinates](./cucumber.isupportcodecoordinates.md) | | diff --git a/docs/api/markdown/cucumber.irunresult.md b/docs/api/markdown/cucumber.irunresult.md index 2640e53d0..af36dc92b 100644 --- a/docs/api/markdown/cucumber.irunresult.md +++ b/docs/api/markdown/cucumber.irunresult.md @@ -4,6 +4,8 @@ ## IRunResult interface +Result of a Cucumber test run. + Signature: ```typescript @@ -14,6 +16,6 @@ export interface IRunResult | Property | Type | Description | | --- | --- | --- | -| [success](./cucumber.irunresult.success.md) | boolean | | -| [support](./cucumber.irunresult.support.md) | ISupportCodeLibrary | | +| [success](./cucumber.irunresult.success.md) | boolean | Whether the test run was overall successful i.e. no failed scenarios. The exact meaning can vary based on the strict configuration option. | +| [support](./cucumber.irunresult.support.md) | ISupportCodeLibrary | The support code library that was used in the test run; can be reused in subsequent runCucumber calls. | diff --git a/docs/api/markdown/cucumber.irunresult.success.md b/docs/api/markdown/cucumber.irunresult.success.md index 4fff79d6c..cd22c6c17 100644 --- a/docs/api/markdown/cucumber.irunresult.success.md +++ b/docs/api/markdown/cucumber.irunresult.success.md @@ -4,6 +4,8 @@ ## IRunResult.success property +Whether the test run was overall successful i.e. no failed scenarios. The exact meaning can vary based on the `strict` configuration option. + Signature: ```typescript diff --git a/docs/api/markdown/cucumber.irunresult.support.md b/docs/api/markdown/cucumber.irunresult.support.md index 13c84d3fa..df5bb64e1 100644 --- a/docs/api/markdown/cucumber.irunresult.support.md +++ b/docs/api/markdown/cucumber.irunresult.support.md @@ -4,6 +4,8 @@ ## IRunResult.support property +The support code library that was used in the test run; can be reused in subsequent `runCucumber` calls. + Signature: ```typescript diff --git a/docs/api/markdown/cucumber.loadconfiguration.md b/docs/api/markdown/cucumber.loadconfiguration.md index de32f0e93..c4f44337b 100644 --- a/docs/api/markdown/cucumber.loadconfiguration.md +++ b/docs/api/markdown/cucumber.loadconfiguration.md @@ -4,22 +4,20 @@ ## loadConfiguration() function +Load user-authored configuration to be used in a test run. + Signature: ```typescript -export declare function loadConfiguration(options: { - file?: string; - profiles?: string[]; - provided?: Partial; -}, environment: IRunEnvironment): Promise; +export declare function loadConfiguration(options: ILoadConfigurationOptions, environment: IRunEnvironment): Promise; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| options | { file?: string; profiles?: string\[\]; provided?: Partial<IConfiguration>; } | | -| environment | [IRunEnvironment](./cucumber.irunenvironment.md) | | +| options | [ILoadConfigurationOptions](./cucumber.iloadconfigurationoptions.md) | Coordinates required to find configuration. | +| environment | [IRunEnvironment](./cucumber.irunenvironment.md) | Project environment. | Returns: diff --git a/docs/api/markdown/cucumber.loadsupport.md b/docs/api/markdown/cucumber.loadsupport.md index 01b9266c8..ae59fb046 100644 --- a/docs/api/markdown/cucumber.loadsupport.md +++ b/docs/api/markdown/cucumber.loadsupport.md @@ -4,20 +4,22 @@ ## loadSupport() function +Load support code for use in test runs. + Signature: ```typescript -export declare function loadSupport(configuration: Pick, environment: IRunEnvironment): Promise; +export declare function loadSupport(options: ILoadSupportOptions, environment: IRunEnvironment): Promise; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| configuration | Pick<[IRunnableConfiguration](./cucumber.irunnableconfiguration.md), 'sources' \| 'support'> | | -| environment | [IRunEnvironment](./cucumber.irunenvironment.md) | | +| options | [ILoadSupportOptions](./cucumber.iloadsupportoptions.md) | Subset of IRunnableConfiguration required to find the support code. | +| environment | [IRunEnvironment](./cucumber.irunenvironment.md) | Project environment. | Returns: -Promise<import("../support\_code\_library\_builder/types").ISupportCodeLibrary> +Promise<ISupportCodeLibrary> diff --git a/docs/api/markdown/cucumber.md b/docs/api/markdown/cucumber.md index 9c6ec9dba..cd33a6174 100644 --- a/docs/api/markdown/cucumber.md +++ b/docs/api/markdown/cucumber.md @@ -14,20 +14,29 @@ These docs cover the API used for running Cucumber programmatically. The entry p | Function | Description | | --- | --- | -| [loadConfiguration(options, environment)](./cucumber.loadconfiguration.md) | | -| [loadSupport(configuration, environment)](./cucumber.loadsupport.md) | | -| [runCucumber(configuration, environment, onMessage)](./cucumber.runcucumber.md) | | +| [loadConfiguration(options, environment)](./cucumber.loadconfiguration.md) | Load user-authored configuration to be used in a test run. | +| [loadSupport(options, environment)](./cucumber.loadsupport.md) | Load support code for use in test runs. | +| [runCucumber(configuration, environment, onMessage)](./cucumber.runcucumber.md) | Execute a Cucumber test run. | ## Interfaces | Interface | Description | | --- | --- | +| [ILoadConfigurationOptions](./cucumber.iloadconfigurationoptions.md) | | +| [ILoadSupportOptions](./cucumber.iloadsupportoptions.md) | | | [IResolvedConfiguration](./cucumber.iresolvedconfiguration.md) | | -| [IRunConfiguration](./cucumber.irunconfiguration.md) | | -| [IRunEnvironment](./cucumber.irunenvironment.md) | | +| [IRunEnvironment](./cucumber.irunenvironment.md) | Contextual data about the project environment. | | [IRunnableConfiguration](./cucumber.irunnableconfiguration.md) | | +| [IRunOptions](./cucumber.irunoptions.md) | | | [IRunOptionsFormats](./cucumber.irunoptionsformats.md) | | | [IRunOptionsRuntime](./cucumber.irunoptionsruntime.md) | | -| [IRunResult](./cucumber.irunresult.md) | | +| [IRunResult](./cucumber.irunresult.md) | Result of a Cucumber test run. | | [ISourcesCoordinates](./cucumber.isourcescoordinates.md) | | +| [ISupportCodeCoordinates](./cucumber.isupportcodecoordinates.md) | | + +## Type Aliases + +| Type Alias | Description | +| --- | --- | +| [ISupportCodeCoordinatesOrLibrary](./cucumber.isupportcodecoordinatesorlibrary.md) | | diff --git a/docs/api/markdown/cucumber.runcucumber.md b/docs/api/markdown/cucumber.runcucumber.md index ff844181c..b7e40dbb8 100644 --- a/docs/api/markdown/cucumber.runcucumber.md +++ b/docs/api/markdown/cucumber.runcucumber.md @@ -4,19 +4,21 @@ ## runCucumber() function +Execute a Cucumber test run. + Signature: ```typescript -export declare function runCucumber(configuration: IRunConfiguration, environment: IRunEnvironment, onMessage?: (message: Envelope) => void): Promise; +export declare function runCucumber(configuration: IRunOptions, environment: IRunEnvironment, onMessage?: (message: Envelope) => void): Promise; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| configuration | [IRunConfiguration](./cucumber.irunconfiguration.md) | | -| environment | [IRunEnvironment](./cucumber.irunenvironment.md) | | -| onMessage | (message: Envelope) => void | | +| configuration | [IRunOptions](./cucumber.irunoptions.md) | Configuration loaded from loadConfiguration. | +| environment | [IRunEnvironment](./cucumber.irunenvironment.md) | Project environment. | +| onMessage | (message: Envelope) => void | Callback fired each time Cucumber emits a message. | Returns: diff --git a/docs/api/model/cucumber.api.json b/docs/api/model/cucumber.api.json index c72ccf729..e64745ced 100644 --- a/docs/api/model/cucumber.api.json +++ b/docs/api/model/cucumber.api.json @@ -171,39 +171,38 @@ "members": [ { "kind": "Interface", - "canonicalReference": "@cucumber/cucumber!IResolvedConfiguration:interface", + "canonicalReference": "@cucumber/cucumber!ILoadConfigurationOptions:interface", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "export interface IResolvedConfiguration " + "text": "export interface ILoadConfigurationOptions " } ], "releaseTag": "Public", - "name": "IResolvedConfiguration", + "name": "ILoadConfigurationOptions", "members": [ { "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!IResolvedConfiguration#original:member", - "docComment": "", + "canonicalReference": "@cucumber/cucumber!ILoadConfigurationOptions#file:member", + "docComment": "/**\n * Path to load configuration file from (defaults to `cucumber.(js|cjs|mjs|json)` if omitted).\n */\n", "excerptTokens": [ { "kind": "Content", - "text": "original: " + "text": "file?: " }, { - "kind": "Reference", - "text": "IConfiguration", - "canonicalReference": "@cucumber/cucumber!IConfiguration:interface" + "kind": "Content", + "text": "string" }, { "kind": "Content", "text": ";" } ], - "isOptional": false, + "isOptional": true, "releaseTag": "Public", - "name": "original", + "name": "file", "propertyTypeTokenRange": { "startIndex": 1, "endIndex": 2 @@ -211,60 +210,99 @@ }, { "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!IResolvedConfiguration#runnable:member", - "docComment": "", + "canonicalReference": "@cucumber/cucumber!ILoadConfigurationOptions#profiles:member", + "docComment": "/**\n * Zero or more profile names from which to source configuration (if omitted or empty, the `default` profile will be used).\n */\n", "excerptTokens": [ { "kind": "Content", - "text": "runnable: " + "text": "profiles?: " }, { - "kind": "Reference", - "text": "IRunnableConfiguration", - "canonicalReference": "@cucumber/cucumber!IRunnableConfiguration:interface" + "kind": "Content", + "text": "string[]" }, { "kind": "Content", "text": ";" } ], - "isOptional": false, + "isOptional": true, "releaseTag": "Public", - "name": "runnable", + "name": "profiles", "propertyTypeTokenRange": { "startIndex": 1, "endIndex": 2 } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!ILoadConfigurationOptions#provided:member", + "docComment": "/**\n * Ad-hoc configuration options to be applied over the top of whatever is loaded from the configuration file/profiles.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "provided?: " + }, + { + "kind": "Reference", + "text": "Partial", + "canonicalReference": "!Partial:type" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "IConfiguration", + "canonicalReference": "@cucumber/cucumber!IConfiguration:interface" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "provided", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } } ], "extendsTokenRanges": [] }, { "kind": "Interface", - "canonicalReference": "@cucumber/cucumber!IRunConfiguration:interface", + "canonicalReference": "@cucumber/cucumber!ILoadSupportOptions:interface", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "export interface IRunConfiguration " + "text": "export interface ILoadSupportOptions " } ], "releaseTag": "Public", - "name": "IRunConfiguration", + "name": "ILoadSupportOptions", "members": [ { "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!IRunConfiguration#formats:member", + "canonicalReference": "@cucumber/cucumber!ILoadSupportOptions#sources:member", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "formats: " + "text": "sources: " }, { "kind": "Reference", - "text": "IRunOptionsFormats", - "canonicalReference": "@cucumber/cucumber!IRunOptionsFormats:interface" + "text": "ISourcesCoordinates", + "canonicalReference": "@cucumber/cucumber!ISourcesCoordinates:interface" }, { "kind": "Content", @@ -273,7 +311,7 @@ ], "isOptional": false, "releaseTag": "Public", - "name": "formats", + "name": "sources", "propertyTypeTokenRange": { "startIndex": 1, "endIndex": 2 @@ -281,17 +319,17 @@ }, { "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!IRunConfiguration#runtime:member", + "canonicalReference": "@cucumber/cucumber!ILoadSupportOptions#support:member", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "runtime: " + "text": "support: " }, { "kind": "Reference", - "text": "IRunOptionsRuntime", - "canonicalReference": "@cucumber/cucumber!IRunOptionsRuntime:interface" + "text": "ISupportCodeCoordinates", + "canonicalReference": "@cucumber/cucumber!ISupportCodeCoordinates:interface" }, { "kind": "Content", @@ -300,25 +338,41 @@ ], "isOptional": false, "releaseTag": "Public", - "name": "runtime", + "name": "support", "propertyTypeTokenRange": { "startIndex": 1, "endIndex": 2 } - }, + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "@cucumber/cucumber!IResolvedConfiguration:interface", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface IResolvedConfiguration " + } + ], + "releaseTag": "Public", + "name": "IResolvedConfiguration", + "members": [ { "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!IRunConfiguration#sources:member", - "docComment": "", + "canonicalReference": "@cucumber/cucumber!IResolvedConfiguration#original:member", + "docComment": "/**\n * The final flat configuration object resolved from the configuration file/profiles plus any extra provided.\n */\n", "excerptTokens": [ { "kind": "Content", - "text": "sources: " + "text": "original: " }, { "kind": "Reference", - "text": "ISourcesCoordinates", - "canonicalReference": "@cucumber/cucumber!ISourcesCoordinates:interface" + "text": "IConfiguration", + "canonicalReference": "@cucumber/cucumber!IConfiguration:interface" }, { "kind": "Content", @@ -327,7 +381,7 @@ ], "isOptional": false, "releaseTag": "Public", - "name": "sources", + "name": "original", "propertyTypeTokenRange": { "startIndex": 1, "endIndex": 2 @@ -335,26 +389,17 @@ }, { "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!IRunConfiguration#support:member", - "docComment": "", + "canonicalReference": "@cucumber/cucumber!IResolvedConfiguration#runnable:member", + "docComment": "/**\n * The format that can be passed into `runCucumber`.\n */\n", "excerptTokens": [ { "kind": "Content", - "text": "support: " - }, - { - "kind": "Reference", - "text": "ISupportCodeCoordinates", - "canonicalReference": "@cucumber/cucumber!ISupportCodeCoordinates:interface" - }, - { - "kind": "Content", - "text": " | " + "text": "runnable: " }, { "kind": "Reference", - "text": "ISupportCodeLibrary", - "canonicalReference": "@cucumber/cucumber!ISupportCodeLibrary:interface" + "text": "IRunnableConfiguration", + "canonicalReference": "@cucumber/cucumber!IRunnableConfiguration:interface" }, { "kind": "Content", @@ -363,10 +408,10 @@ ], "isOptional": false, "releaseTag": "Public", - "name": "support", + "name": "runnable", "propertyTypeTokenRange": { "startIndex": 1, - "endIndex": 4 + "endIndex": 2 } } ], @@ -375,7 +420,7 @@ { "kind": "Interface", "canonicalReference": "@cucumber/cucumber!IRunEnvironment:interface", - "docComment": "", + "docComment": "/**\n * Contextual data about the project environment.\n */\n", "excerptTokens": [ { "kind": "Content", @@ -388,7 +433,7 @@ { "kind": "PropertySignature", "canonicalReference": "@cucumber/cucumber!IRunEnvironment#cwd:member", - "docComment": "/**\n * Working directory for the project (defaults to `process.cwd()` if omitted)\n */\n", + "docComment": "/**\n * Working directory for the project (defaults to `process.cwd()` if omitted).\n */\n", "excerptTokens": [ { "kind": "Content", @@ -414,7 +459,7 @@ { "kind": "PropertySignature", "canonicalReference": "@cucumber/cucumber!IRunEnvironment#env:member", - "docComment": "/**\n * Environment variables (defaults to `process.env` if omitted)\n */\n", + "docComment": "/**\n * Environment variables (defaults to `process.env` if omitted).\n */\n", "excerptTokens": [ { "kind": "Content", @@ -441,7 +486,7 @@ { "kind": "PropertySignature", "canonicalReference": "@cucumber/cucumber!IRunEnvironment#stderr:member", - "docComment": "/**\n * Writable stream where the test run's warning/error output is written (defaults to `process.stderr` if omitted)\n */\n", + "docComment": "/**\n * Writable stream where the test run's warning/error output is written (defaults to `process.stderr` if omitted).\n */\n", "excerptTokens": [ { "kind": "Content", @@ -468,7 +513,7 @@ { "kind": "PropertySignature", "canonicalReference": "@cucumber/cucumber!IRunEnvironment#stdout:member", - "docComment": "/**\n * Writable stream where the test run's main output is written (defaults to `process.stdout` if omitted)\n */\n", + "docComment": "/**\n * Writable stream where the test run's main output is written (defaults to `process.stdout` if omitted).\n */\n", "excerptTokens": [ { "kind": "Content", @@ -619,6 +664,130 @@ ], "extendsTokenRanges": [] }, + { + "kind": "Interface", + "canonicalReference": "@cucumber/cucumber!IRunOptions:interface", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface IRunOptions " + } + ], + "releaseTag": "Public", + "name": "IRunOptions", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!IRunOptions#formats:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "formats: " + }, + { + "kind": "Reference", + "text": "IRunOptionsFormats", + "canonicalReference": "@cucumber/cucumber!IRunOptionsFormats:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "formats", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!IRunOptions#runtime:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "runtime: " + }, + { + "kind": "Reference", + "text": "IRunOptionsRuntime", + "canonicalReference": "@cucumber/cucumber!IRunOptionsRuntime:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "runtime", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!IRunOptions#sources:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "sources: " + }, + { + "kind": "Reference", + "text": "ISourcesCoordinates", + "canonicalReference": "@cucumber/cucumber!ISourcesCoordinates:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "sources", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!IRunOptions#support:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "support: " + }, + { + "kind": "Reference", + "text": "ISupportCodeCoordinatesOrLibrary", + "canonicalReference": "@cucumber/cucumber!ISupportCodeCoordinatesOrLibrary:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "support", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, { "kind": "Interface", "canonicalReference": "@cucumber/cucumber!IRunOptionsFormats:interface", @@ -804,7 +973,7 @@ { "kind": "Interface", "canonicalReference": "@cucumber/cucumber!IRunResult:interface", - "docComment": "", + "docComment": "/**\n * Result of a Cucumber test run.\n */\n", "excerptTokens": [ { "kind": "Content", @@ -817,7 +986,7 @@ { "kind": "PropertySignature", "canonicalReference": "@cucumber/cucumber!IRunResult#success:member", - "docComment": "", + "docComment": "/**\n * Whether the test run was overall successful i.e. no failed scenarios. The exact meaning can vary based on the `strict` configuration option.\n */\n", "excerptTokens": [ { "kind": "Content", @@ -843,7 +1012,7 @@ { "kind": "PropertySignature", "canonicalReference": "@cucumber/cucumber!IRunResult#support:member", - "docComment": "", + "docComment": "/**\n * The support code library that was used in the test run; can be reused in subsequent `runCucumber` calls.\n */\n", "excerptTokens": [ { "kind": "Content", @@ -1018,35 +1187,147 @@ "extendsTokenRanges": [] }, { - "kind": "Function", - "canonicalReference": "@cucumber/cucumber!loadConfiguration:function(1)", + "kind": "Interface", + "canonicalReference": "@cucumber/cucumber!ISupportCodeCoordinates:interface", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "export declare function loadConfiguration(options: " + "text": "export interface ISupportCodeCoordinates " + } + ], + "releaseTag": "Public", + "name": "ISupportCodeCoordinates", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!ISupportCodeCoordinates#importPaths:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "importPaths: " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "importPaths", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!ISupportCodeCoordinates#requireModules:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "requireModules: " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "requireModules", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } }, + { + "kind": "PropertySignature", + "canonicalReference": "@cucumber/cucumber!ISupportCodeCoordinates#requirePaths:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "requirePaths: " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "requirePaths", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@cucumber/cucumber!ISupportCodeCoordinatesOrLibrary:type", + "docComment": "", + "excerptTokens": [ { "kind": "Content", - "text": "{\n file?: string;\n profiles?: string[];\n provided?: " + "text": "export declare type ISupportCodeCoordinatesOrLibrary = " }, { "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" + "text": "ISupportCodeCoordinates", + "canonicalReference": "@cucumber/cucumber!ISupportCodeCoordinates:interface" }, { "kind": "Content", - "text": "<" + "text": " | " }, { "kind": "Reference", - "text": "IConfiguration", - "canonicalReference": "@cucumber/cucumber!IConfiguration:interface" + "text": "ISupportCodeLibrary", + "canonicalReference": "@cucumber/cucumber!ISupportCodeLibrary:interface" }, { "kind": "Content", - "text": ">;\n}" + "text": ";" + } + ], + "releaseTag": "Public", + "name": "ISupportCodeCoordinatesOrLibrary", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Function", + "canonicalReference": "@cucumber/cucumber!loadConfiguration:function(1)", + "docComment": "/**\n * Load user-authored configuration to be used in a test run.\n *\n * @param options - Coordinates required to find configuration.\n *\n * @param environment - Project environment.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function loadConfiguration(options: " + }, + { + "kind": "Reference", + "text": "ILoadConfigurationOptions", + "canonicalReference": "@cucumber/cucumber!ILoadConfigurationOptions:interface" }, { "kind": "Content", @@ -1085,8 +1366,8 @@ } ], "returnTypeTokenRange": { - "startIndex": 9, - "endIndex": 13 + "startIndex": 5, + "endIndex": 9 }, "releaseTag": "Public", "overloadIndex": 1, @@ -1095,14 +1376,14 @@ "parameterName": "options", "parameterTypeTokenRange": { "startIndex": 1, - "endIndex": 6 + "endIndex": 2 } }, { "parameterName": "environment", "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 + "startIndex": 3, + "endIndex": 4 } } ], @@ -1111,29 +1392,16 @@ { "kind": "Function", "canonicalReference": "@cucumber/cucumber!loadSupport:function(1)", - "docComment": "", + "docComment": "/**\n * Load support code for use in test runs.\n *\n * @param options - Subset of `IRunnableConfiguration` required to find the support code.\n *\n * @param environment - Project environment.\n */\n", "excerptTokens": [ { "kind": "Content", - "text": "export declare function loadSupport(configuration: " - }, - { - "kind": "Reference", - "text": "Pick", - "canonicalReference": "!Pick:type" - }, - { - "kind": "Content", - "text": "<" + "text": "export declare function loadSupport(options: " }, { "kind": "Reference", - "text": "IRunnableConfiguration", - "canonicalReference": "@cucumber/cucumber!IRunnableConfiguration:interface" - }, - { - "kind": "Content", - "text": ", 'sources' | 'support'>" + "text": "ILoadSupportOptions", + "canonicalReference": "@cucumber/cucumber!ILoadSupportOptions:interface" }, { "kind": "Content", @@ -1155,7 +1423,7 @@ }, { "kind": "Content", - "text": " - }, + options: ILoadConfigurationOptions, environment: IRunEnvironment ): Promise { const { cwd, env } = mergeEnvironment(environment) diff --git a/src/api/load_support.ts b/src/api/load_support.ts index 6d16e5188..726afaa7b 100644 --- a/src/api/load_support.ts +++ b/src/api/load_support.ts @@ -1,24 +1,31 @@ import { IdGenerator } from '@cucumber/messages' -import { IRunEnvironment, IRunnableConfiguration } from './types' +import { ILoadSupportOptions, IRunEnvironment } from './types' import { resolvePaths } from './paths' import { getSupportCodeLibrary } from './support' import { mergeEnvironment } from './environment' +import { ISupportCodeLibrary } from '../support_code_library_builder/types' +/** + * Load support code for use in test runs. + * + * @param options - Subset of `IRunnableConfiguration` required to find the support code. + * @param environment - Project environment. + */ export async function loadSupport( - configuration: Pick, + options: ILoadSupportOptions, environment: IRunEnvironment -) { +): Promise { const { cwd } = mergeEnvironment(environment) const newId = IdGenerator.uuid() const { requirePaths, importPaths } = await resolvePaths( cwd, - configuration.sources, - configuration.support + options.sources, + options.support ) return await getSupportCodeLibrary({ cwd, newId, - requireModules: configuration.support.requireModules, + requireModules: options.support.requireModules, requirePaths, importPaths, }) diff --git a/src/api/paths.ts b/src/api/paths.ts index 2516329a8..f6ecba74f 100644 --- a/src/api/paths.ts +++ b/src/api/paths.ts @@ -2,8 +2,7 @@ import { promisify } from 'util' import glob from 'glob' import path from 'path' import fs from 'mz/fs' -import { ISourcesCoordinates } from './types' -import { ISupportCodeCoordinates } from '../support_code_library_builder/types' +import { ISourcesCoordinates, ISupportCodeCoordinates } from './types' export async function resolvePaths( cwd: string, diff --git a/src/api/run_cucumber.ts b/src/api/run_cucumber.ts index 467beaf8b..f4985c01d 100644 --- a/src/api/run_cucumber.ts +++ b/src/api/run_cucumber.ts @@ -8,7 +8,7 @@ import { } from '../cli/helpers' import { GherkinStreams } from '@cucumber/gherkin-streams' import PickleFilter from '../pickle_filter' -import { IRunConfiguration, IRunEnvironment, IRunResult } from './types' +import { IRunOptions, IRunEnvironment, IRunResult } from './types' import { resolvePaths } from './paths' import { makeRuntime } from './runtime' import { initializeFormatters } from './formatters' @@ -18,8 +18,15 @@ import * as messages from '@cucumber/messages' import { doesHaveValue } from '../value_checker' import { mergeEnvironment } from './environment' +/** + * Execute a Cucumber test run. + * + * @param configuration - Configuration loaded from `loadConfiguration`. + * @param environment - Project environment. + * @param onMessage - Callback fired each time Cucumber emits a message. + */ export async function runCucumber( - configuration: IRunConfiguration, + configuration: IRunOptions, environment: IRunEnvironment, onMessage?: (message: Envelope) => void ): Promise { diff --git a/src/api/types.ts b/src/api/types.ts index e8060030e..d5b591adc 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -1,12 +1,35 @@ -import { - ISupportCodeCoordinates, - ISupportCodeLibrary, -} from '../support_code_library_builder/types' +import { ISupportCodeLibrary } from '../support_code_library_builder/types' import { FormatOptions, IFormatterStream } from '../formatter' import { PickleOrder } from '../models/pickle_order' import { IRuntimeOptions } from '../runtime' import { IConfiguration } from '../configuration' +export interface ILoadConfigurationOptions { + /** + * Path to load configuration file from (defaults to `cucumber.(js|cjs|mjs|json)` if omitted). + */ + file?: string + /** + * Zero or more profile names from which to source configuration (if omitted or empty, the `default` profile will be used). + */ + profiles?: string[] + /** + * Ad-hoc configuration options to be applied over the top of whatever is loaded from the configuration file/profiles. + */ + provided?: Partial +} + +export interface IResolvedConfiguration { + /** + * The final flat configuration object resolved from the configuration file/profiles plus any extra provided. + */ + original: IConfiguration + /** + * The format that can be passed into `runCucumber`. + */ + runnable: IRunnableConfiguration +} + export interface ISourcesCoordinates { defaultDialect: string paths: string[] @@ -15,6 +38,17 @@ export interface ISourcesCoordinates { order: PickleOrder } +export interface ISupportCodeCoordinates { + requireModules: string[] + requirePaths: string[] + importPaths: string[] +} + +export interface ILoadSupportOptions { + sources: ISourcesCoordinates + support: ISupportCodeCoordinates +} + export interface IRunOptionsRuntime extends IRuntimeOptions { parallel: number } @@ -38,38 +72,49 @@ export interface IRunnableConfiguration { formats: IRunOptionsFormats } -export interface IRunConfiguration { +export type ISupportCodeCoordinatesOrLibrary = + | ISupportCodeCoordinates + | ISupportCodeLibrary + +export interface IRunOptions { sources: ISourcesCoordinates - support: ISupportCodeCoordinates | ISupportCodeLibrary + support: ISupportCodeCoordinatesOrLibrary runtime: IRunOptionsRuntime formats: IRunOptionsFormats } +/** + * Contextual data about the project environment. + */ export interface IRunEnvironment { /** - * Working directory for the project (defaults to `process.cwd()` if omitted) + * Working directory for the project (defaults to `process.cwd()` if omitted). */ cwd?: string /** - * Writable stream where the test run's main output is written (defaults to `process.stdout` if omitted) + * Writable stream where the test run's main output is written (defaults to `process.stdout` if omitted). */ stdout?: IFormatterStream /** - * Writable stream where the test run's warning/error output is written (defaults to `process.stderr` if omitted) + * Writable stream where the test run's warning/error output is written (defaults to `process.stderr` if omitted). */ stderr?: IFormatterStream /** - * Environment variables (defaults to `process.env` if omitted) + * Environment variables (defaults to `process.env` if omitted). */ env?: NodeJS.ProcessEnv } -export interface IResolvedConfiguration { - original: IConfiguration - runnable: IRunnableConfiguration -} - +/** + * Result of a Cucumber test run. + */ export interface IRunResult { + /** + * Whether the test run was overall successful i.e. no failed scenarios. The exact meaning can vary based on the `strict` configuration option. + */ success: boolean + /** + * The support code library that was used in the test run; can be reused in subsequent `runCucumber` calls. + */ support: ISupportCodeLibrary } From c90de5d3bdbc28aa73d210f2950c3dadabe02a95 Mon Sep 17 00:00:00 2001 From: David Goss Date: Wed, 16 Mar 2022 13:03:15 +0000 Subject: [PATCH 12/24] get the docs in reasonable shape; make naming consistent, split out some types/interfaces as needed --- ...cucumber.iloadconfigurationoptions.file.md | 13 ++++++++++++ .../cucumber.iloadconfigurationoptions.md | 20 ++++++++++++++++++ ...mber.iloadconfigurationoptions.profiles.md | 13 ++++++++++++ ...mber.iloadconfigurationoptions.provided.md | 13 ++++++++++++ .../markdown/cucumber.iloadsupportoptions.md | 19 +++++++++++++++++ .../cucumber.iloadsupportoptions.sources.md | 11 ++++++++++ .../cucumber.iloadsupportoptions.support.md | 11 ++++++++++ .../markdown/cucumber.irunoptions.formats.md | 11 ++++++++++ docs/api/markdown/cucumber.irunoptions.md | 21 +++++++++++++++++++ .../markdown/cucumber.irunoptions.runtime.md | 11 ++++++++++ .../markdown/cucumber.irunoptions.sources.md | 11 ++++++++++ .../markdown/cucumber.irunoptions.support.md | 11 ++++++++++ ...ber.isupportcodecoordinates.importpaths.md | 11 ++++++++++ .../cucumber.isupportcodecoordinates.md | 20 ++++++++++++++++++ ....isupportcodecoordinates.requiremodules.md | 11 ++++++++++ ...er.isupportcodecoordinates.requirepaths.md | 11 ++++++++++ ...cumber.isupportcodecoordinatesorlibrary.md | 13 ++++++++++++ 17 files changed, 231 insertions(+) create mode 100644 docs/api/markdown/cucumber.iloadconfigurationoptions.file.md create mode 100644 docs/api/markdown/cucumber.iloadconfigurationoptions.md create mode 100644 docs/api/markdown/cucumber.iloadconfigurationoptions.profiles.md create mode 100644 docs/api/markdown/cucumber.iloadconfigurationoptions.provided.md create mode 100644 docs/api/markdown/cucumber.iloadsupportoptions.md create mode 100644 docs/api/markdown/cucumber.iloadsupportoptions.sources.md create mode 100644 docs/api/markdown/cucumber.iloadsupportoptions.support.md create mode 100644 docs/api/markdown/cucumber.irunoptions.formats.md create mode 100644 docs/api/markdown/cucumber.irunoptions.md create mode 100644 docs/api/markdown/cucumber.irunoptions.runtime.md create mode 100644 docs/api/markdown/cucumber.irunoptions.sources.md create mode 100644 docs/api/markdown/cucumber.irunoptions.support.md create mode 100644 docs/api/markdown/cucumber.isupportcodecoordinates.importpaths.md create mode 100644 docs/api/markdown/cucumber.isupportcodecoordinates.md create mode 100644 docs/api/markdown/cucumber.isupportcodecoordinates.requiremodules.md create mode 100644 docs/api/markdown/cucumber.isupportcodecoordinates.requirepaths.md create mode 100644 docs/api/markdown/cucumber.isupportcodecoordinatesorlibrary.md diff --git a/docs/api/markdown/cucumber.iloadconfigurationoptions.file.md b/docs/api/markdown/cucumber.iloadconfigurationoptions.file.md new file mode 100644 index 000000000..47961cee0 --- /dev/null +++ b/docs/api/markdown/cucumber.iloadconfigurationoptions.file.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [ILoadConfigurationOptions](./cucumber.iloadconfigurationoptions.md) > [file](./cucumber.iloadconfigurationoptions.file.md) + +## ILoadConfigurationOptions.file property + +Path to load configuration file from (defaults to `cucumber.(js|cjs|mjs|json)` if omitted). + +Signature: + +```typescript +file?: string; +``` diff --git a/docs/api/markdown/cucumber.iloadconfigurationoptions.md b/docs/api/markdown/cucumber.iloadconfigurationoptions.md new file mode 100644 index 000000000..7136dc5f1 --- /dev/null +++ b/docs/api/markdown/cucumber.iloadconfigurationoptions.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [ILoadConfigurationOptions](./cucumber.iloadconfigurationoptions.md) + +## ILoadConfigurationOptions interface + +Signature: + +```typescript +export interface ILoadConfigurationOptions +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [file?](./cucumber.iloadconfigurationoptions.file.md) | string | (Optional) Path to load configuration file from (defaults to cucumber.(js|cjs|mjs|json) if omitted). | +| [profiles?](./cucumber.iloadconfigurationoptions.profiles.md) | string\[\] | (Optional) Zero or more profile names from which to source configuration (if omitted or empty, the default profile will be used). | +| [provided?](./cucumber.iloadconfigurationoptions.provided.md) | Partial<IConfiguration> | (Optional) Ad-hoc configuration options to be applied over the top of whatever is loaded from the configuration file/profiles. | + diff --git a/docs/api/markdown/cucumber.iloadconfigurationoptions.profiles.md b/docs/api/markdown/cucumber.iloadconfigurationoptions.profiles.md new file mode 100644 index 000000000..35c129e88 --- /dev/null +++ b/docs/api/markdown/cucumber.iloadconfigurationoptions.profiles.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [ILoadConfigurationOptions](./cucumber.iloadconfigurationoptions.md) > [profiles](./cucumber.iloadconfigurationoptions.profiles.md) + +## ILoadConfigurationOptions.profiles property + +Zero or more profile names from which to source configuration (if omitted or empty, the `default` profile will be used). + +Signature: + +```typescript +profiles?: string[]; +``` diff --git a/docs/api/markdown/cucumber.iloadconfigurationoptions.provided.md b/docs/api/markdown/cucumber.iloadconfigurationoptions.provided.md new file mode 100644 index 000000000..7078e6962 --- /dev/null +++ b/docs/api/markdown/cucumber.iloadconfigurationoptions.provided.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [ILoadConfigurationOptions](./cucumber.iloadconfigurationoptions.md) > [provided](./cucumber.iloadconfigurationoptions.provided.md) + +## ILoadConfigurationOptions.provided property + +Ad-hoc configuration options to be applied over the top of whatever is loaded from the configuration file/profiles. + +Signature: + +```typescript +provided?: Partial; +``` diff --git a/docs/api/markdown/cucumber.iloadsupportoptions.md b/docs/api/markdown/cucumber.iloadsupportoptions.md new file mode 100644 index 000000000..9ee9f7ce2 --- /dev/null +++ b/docs/api/markdown/cucumber.iloadsupportoptions.md @@ -0,0 +1,19 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [ILoadSupportOptions](./cucumber.iloadsupportoptions.md) + +## ILoadSupportOptions interface + +Signature: + +```typescript +export interface ILoadSupportOptions +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [sources](./cucumber.iloadsupportoptions.sources.md) | [ISourcesCoordinates](./cucumber.isourcescoordinates.md) | | +| [support](./cucumber.iloadsupportoptions.support.md) | [ISupportCodeCoordinates](./cucumber.isupportcodecoordinates.md) | | + diff --git a/docs/api/markdown/cucumber.iloadsupportoptions.sources.md b/docs/api/markdown/cucumber.iloadsupportoptions.sources.md new file mode 100644 index 000000000..7d9ad0b5a --- /dev/null +++ b/docs/api/markdown/cucumber.iloadsupportoptions.sources.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [ILoadSupportOptions](./cucumber.iloadsupportoptions.md) > [sources](./cucumber.iloadsupportoptions.sources.md) + +## ILoadSupportOptions.sources property + +Signature: + +```typescript +sources: ISourcesCoordinates; +``` diff --git a/docs/api/markdown/cucumber.iloadsupportoptions.support.md b/docs/api/markdown/cucumber.iloadsupportoptions.support.md new file mode 100644 index 000000000..222dd6c9a --- /dev/null +++ b/docs/api/markdown/cucumber.iloadsupportoptions.support.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [ILoadSupportOptions](./cucumber.iloadsupportoptions.md) > [support](./cucumber.iloadsupportoptions.support.md) + +## ILoadSupportOptions.support property + +Signature: + +```typescript +support: ISupportCodeCoordinates; +``` diff --git a/docs/api/markdown/cucumber.irunoptions.formats.md b/docs/api/markdown/cucumber.irunoptions.formats.md new file mode 100644 index 000000000..c31e76fb5 --- /dev/null +++ b/docs/api/markdown/cucumber.irunoptions.formats.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunOptions](./cucumber.irunoptions.md) > [formats](./cucumber.irunoptions.formats.md) + +## IRunOptions.formats property + +Signature: + +```typescript +formats: IRunOptionsFormats; +``` diff --git a/docs/api/markdown/cucumber.irunoptions.md b/docs/api/markdown/cucumber.irunoptions.md new file mode 100644 index 000000000..956d04f6c --- /dev/null +++ b/docs/api/markdown/cucumber.irunoptions.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunOptions](./cucumber.irunoptions.md) + +## IRunOptions interface + +Signature: + +```typescript +export interface IRunOptions +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [formats](./cucumber.irunoptions.formats.md) | [IRunOptionsFormats](./cucumber.irunoptionsformats.md) | | +| [runtime](./cucumber.irunoptions.runtime.md) | [IRunOptionsRuntime](./cucumber.irunoptionsruntime.md) | | +| [sources](./cucumber.irunoptions.sources.md) | [ISourcesCoordinates](./cucumber.isourcescoordinates.md) | | +| [support](./cucumber.irunoptions.support.md) | [ISupportCodeCoordinatesOrLibrary](./cucumber.isupportcodecoordinatesorlibrary.md) | | + diff --git a/docs/api/markdown/cucumber.irunoptions.runtime.md b/docs/api/markdown/cucumber.irunoptions.runtime.md new file mode 100644 index 000000000..ec46ae891 --- /dev/null +++ b/docs/api/markdown/cucumber.irunoptions.runtime.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunOptions](./cucumber.irunoptions.md) > [runtime](./cucumber.irunoptions.runtime.md) + +## IRunOptions.runtime property + +Signature: + +```typescript +runtime: IRunOptionsRuntime; +``` diff --git a/docs/api/markdown/cucumber.irunoptions.sources.md b/docs/api/markdown/cucumber.irunoptions.sources.md new file mode 100644 index 000000000..2b5fba724 --- /dev/null +++ b/docs/api/markdown/cucumber.irunoptions.sources.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunOptions](./cucumber.irunoptions.md) > [sources](./cucumber.irunoptions.sources.md) + +## IRunOptions.sources property + +Signature: + +```typescript +sources: ISourcesCoordinates; +``` diff --git a/docs/api/markdown/cucumber.irunoptions.support.md b/docs/api/markdown/cucumber.irunoptions.support.md new file mode 100644 index 000000000..d89dc3652 --- /dev/null +++ b/docs/api/markdown/cucumber.irunoptions.support.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunOptions](./cucumber.irunoptions.md) > [support](./cucumber.irunoptions.support.md) + +## IRunOptions.support property + +Signature: + +```typescript +support: ISupportCodeCoordinatesOrLibrary; +``` diff --git a/docs/api/markdown/cucumber.isupportcodecoordinates.importpaths.md b/docs/api/markdown/cucumber.isupportcodecoordinates.importpaths.md new file mode 100644 index 000000000..34e8034de --- /dev/null +++ b/docs/api/markdown/cucumber.isupportcodecoordinates.importpaths.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [ISupportCodeCoordinates](./cucumber.isupportcodecoordinates.md) > [importPaths](./cucumber.isupportcodecoordinates.importpaths.md) + +## ISupportCodeCoordinates.importPaths property + +Signature: + +```typescript +importPaths: string[]; +``` diff --git a/docs/api/markdown/cucumber.isupportcodecoordinates.md b/docs/api/markdown/cucumber.isupportcodecoordinates.md new file mode 100644 index 000000000..a13bce77c --- /dev/null +++ b/docs/api/markdown/cucumber.isupportcodecoordinates.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [ISupportCodeCoordinates](./cucumber.isupportcodecoordinates.md) + +## ISupportCodeCoordinates interface + +Signature: + +```typescript +export interface ISupportCodeCoordinates +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [importPaths](./cucumber.isupportcodecoordinates.importpaths.md) | string\[\] | | +| [requireModules](./cucumber.isupportcodecoordinates.requiremodules.md) | string\[\] | | +| [requirePaths](./cucumber.isupportcodecoordinates.requirepaths.md) | string\[\] | | + diff --git a/docs/api/markdown/cucumber.isupportcodecoordinates.requiremodules.md b/docs/api/markdown/cucumber.isupportcodecoordinates.requiremodules.md new file mode 100644 index 000000000..f4bac3175 --- /dev/null +++ b/docs/api/markdown/cucumber.isupportcodecoordinates.requiremodules.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [ISupportCodeCoordinates](./cucumber.isupportcodecoordinates.md) > [requireModules](./cucumber.isupportcodecoordinates.requiremodules.md) + +## ISupportCodeCoordinates.requireModules property + +Signature: + +```typescript +requireModules: string[]; +``` diff --git a/docs/api/markdown/cucumber.isupportcodecoordinates.requirepaths.md b/docs/api/markdown/cucumber.isupportcodecoordinates.requirepaths.md new file mode 100644 index 000000000..4ac57b619 --- /dev/null +++ b/docs/api/markdown/cucumber.isupportcodecoordinates.requirepaths.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [ISupportCodeCoordinates](./cucumber.isupportcodecoordinates.md) > [requirePaths](./cucumber.isupportcodecoordinates.requirepaths.md) + +## ISupportCodeCoordinates.requirePaths property + +Signature: + +```typescript +requirePaths: string[]; +``` diff --git a/docs/api/markdown/cucumber.isupportcodecoordinatesorlibrary.md b/docs/api/markdown/cucumber.isupportcodecoordinatesorlibrary.md new file mode 100644 index 000000000..4bc04fdf7 --- /dev/null +++ b/docs/api/markdown/cucumber.isupportcodecoordinatesorlibrary.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [ISupportCodeCoordinatesOrLibrary](./cucumber.isupportcodecoordinatesorlibrary.md) + +## ISupportCodeCoordinatesOrLibrary type + +Signature: + +```typescript +export declare type ISupportCodeCoordinatesOrLibrary = ISupportCodeCoordinates | ISupportCodeLibrary; +``` +References: [ISupportCodeCoordinates](./cucumber.isupportcodecoordinates.md) + From 37ab35a98598aa12f003fd06aa5275260de20988 Mon Sep 17 00:00:00 2001 From: David Goss Date: Wed, 16 Mar 2022 13:08:39 +0000 Subject: [PATCH 13/24] refactor scripts, add a ci one --- dependency-lint.yml | 3 ++- package.json | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dependency-lint.yml b/dependency-lint.yml index b1d405739..17fbca150 100644 --- a/dependency-lint.yml +++ b/dependency-lint.yml @@ -5,7 +5,8 @@ executedModules: npmScripts: dev: - build - - docs + - docs:ci + - docs:local - lint - publish - test diff --git a/package.json b/package.json index 426cb0b5f..7f173bbb9 100644 --- a/package.json +++ b/package.json @@ -283,9 +283,8 @@ "scripts": { "build-local": "genversion --es6 src/version.ts && tsc --build tsconfig.node.json && shx cp src/importer.js lib/ && shx cp src/wrapper.mjs lib/ && shx cp src/api/wrapper.mjs lib/api/", "cck-test": "mocha 'compatibility/**/*_spec.ts'", - "docs": "npm run docs:extract && npm run docs:generate", - "docs:extract": "api-extractor run --local --verbose", - "docs:generate": "api-documenter markdown --input-folder ./docs/api/model --output-folder ./docs/api/markdown", + "docs:ci": "api-extractor run --verbose", + "docs:local": "api-extractor run --verbose --local && api-documenter markdown --input-folder ./docs/api/model --output-folder ./docs/api/markdown", "feature-test": "node ./bin/cucumber-js", "lint-autofix": "eslint --fix \"{compatibility,example,features,scripts,src,test}/**/*.ts\"", "lint-code": "eslint \"{compatibility,example,features,scripts,src,test}/**/*.ts\"", From 236325042ad5cbccff0ebcd901a6c1bab2018e16 Mon Sep 17 00:00:00 2001 From: David Goss Date: Wed, 16 Mar 2022 13:13:17 +0000 Subject: [PATCH 14/24] fix api-extractor warning for now --- api-extractor.json | 7 + ...cucumber.iloadconfigurationoptions.file.md | 3 + .../cucumber.iloadconfigurationoptions.md | 10 +- ...mber.iloadconfigurationoptions.profiles.md | 3 + ...mber.iloadconfigurationoptions.provided.md | 3 + .../markdown/cucumber.iloadsupportoptions.md | 8 +- .../cucumber.iloadsupportoptions.sources.md | 3 + .../cucumber.iloadsupportoptions.support.md | 3 + .../cucumber.iresolvedconfiguration.md | 8 +- ...ucumber.iresolvedconfiguration.original.md | 3 + ...ucumber.iresolvedconfiguration.runnable.md | 3 + .../markdown/cucumber.irunenvironment.cwd.md | 3 + .../markdown/cucumber.irunenvironment.env.md | 3 + docs/api/markdown/cucumber.irunenvironment.md | 11 +- .../cucumber.irunenvironment.stderr.md | 3 + .../cucumber.irunenvironment.stdout.md | 3 + ...cucumber.irunnableconfiguration.formats.md | 3 + .../cucumber.irunnableconfiguration.md | 12 +- ...cucumber.irunnableconfiguration.runtime.md | 3 + ...cucumber.irunnableconfiguration.sources.md | 3 + ...cucumber.irunnableconfiguration.support.md | 3 + .../markdown/cucumber.irunoptions.formats.md | 3 + docs/api/markdown/cucumber.irunoptions.md | 12 +- .../markdown/cucumber.irunoptions.runtime.md | 3 + .../markdown/cucumber.irunoptions.sources.md | 3 + .../markdown/cucumber.irunoptions.support.md | 3 + .../cucumber.irunoptionsformats.files.md | 3 + .../markdown/cucumber.irunoptionsformats.md | 12 +- .../cucumber.irunoptionsformats.options.md | 3 + .../cucumber.irunoptionsformats.publish.md | 3 + .../cucumber.irunoptionsformats.stdout.md | 3 + .../markdown/cucumber.irunoptionsruntime.md | 6 +- .../cucumber.irunoptionsruntime.parallel.md | 3 + docs/api/markdown/cucumber.irunresult.md | 7 +- .../markdown/cucumber.irunresult.success.md | 3 + .../markdown/cucumber.irunresult.support.md | 3 + ...mber.isourcescoordinates.defaultdialect.md | 3 + .../markdown/cucumber.isourcescoordinates.md | 14 +- .../cucumber.isourcescoordinates.names.md | 3 + .../cucumber.isourcescoordinates.order.md | 3 + .../cucumber.isourcescoordinates.paths.md | 3 + ...umber.isourcescoordinates.tagexpression.md | 3 + ...ber.isupportcodecoordinates.importpaths.md | 3 + .../cucumber.isupportcodecoordinates.md | 10 +- ....isupportcodecoordinates.requiremodules.md | 3 + ...er.isupportcodecoordinates.requirepaths.md | 3 + ...cumber.isupportcodecoordinatesorlibrary.md | 4 + .../markdown/cucumber.loadconfiguration.md | 3 + docs/api/markdown/cucumber.loadsupport.md | 3 + docs/api/markdown/cucumber.md | 30 ++-- docs/api/markdown/cucumber.runcucumber.md | 3 + docs/api/model/cucumber.api.json | 128 +++++++++--------- src/api/index.ts | 1 - src/api/load_configuration.ts | 1 + src/api/load_support.ts | 1 + src/api/run_cucumber.ts | 1 + src/api/types.ts | 34 +++++ 57 files changed, 314 insertions(+), 114 deletions(-) diff --git a/api-extractor.json b/api-extractor.json index 3987f4985..052afacf8 100644 --- a/api-extractor.json +++ b/api-extractor.json @@ -12,5 +12,12 @@ }, "dtsRollup": { "enabled": false + }, + "messages": { + "extractorMessageReporting": { + "ae-forgotten-export": { + "logLevel": "none" + } + } } } diff --git a/docs/api/markdown/cucumber.iloadconfigurationoptions.file.md b/docs/api/markdown/cucumber.iloadconfigurationoptions.file.md index 47961cee0..9dee5742a 100644 --- a/docs/api/markdown/cucumber.iloadconfigurationoptions.file.md +++ b/docs/api/markdown/cucumber.iloadconfigurationoptions.file.md @@ -4,6 +4,9 @@ ## ILoadConfigurationOptions.file property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Path to load configuration file from (defaults to `cucumber.(js|cjs|mjs|json)` if omitted). Signature: diff --git a/docs/api/markdown/cucumber.iloadconfigurationoptions.md b/docs/api/markdown/cucumber.iloadconfigurationoptions.md index 7136dc5f1..b5f2db11b 100644 --- a/docs/api/markdown/cucumber.iloadconfigurationoptions.md +++ b/docs/api/markdown/cucumber.iloadconfigurationoptions.md @@ -4,6 +4,10 @@ ## ILoadConfigurationOptions interface +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + + Signature: ```typescript @@ -14,7 +18,7 @@ export interface ILoadConfigurationOptions | Property | Type | Description | | --- | --- | --- | -| [file?](./cucumber.iloadconfigurationoptions.file.md) | string | (Optional) Path to load configuration file from (defaults to cucumber.(js|cjs|mjs|json) if omitted). | -| [profiles?](./cucumber.iloadconfigurationoptions.profiles.md) | string\[\] | (Optional) Zero or more profile names from which to source configuration (if omitted or empty, the default profile will be used). | -| [provided?](./cucumber.iloadconfigurationoptions.provided.md) | Partial<IConfiguration> | (Optional) Ad-hoc configuration options to be applied over the top of whatever is loaded from the configuration file/profiles. | +| [file?](./cucumber.iloadconfigurationoptions.file.md) | string | (BETA) (Optional) Path to load configuration file from (defaults to cucumber.(js|cjs|mjs|json) if omitted). | +| [profiles?](./cucumber.iloadconfigurationoptions.profiles.md) | string\[\] | (BETA) (Optional) Zero or more profile names from which to source configuration (if omitted or empty, the default profile will be used). | +| [provided?](./cucumber.iloadconfigurationoptions.provided.md) | Partial<IConfiguration> | (BETA) (Optional) Ad-hoc configuration options to be applied over the top of whatever is loaded from the configuration file/profiles. | diff --git a/docs/api/markdown/cucumber.iloadconfigurationoptions.profiles.md b/docs/api/markdown/cucumber.iloadconfigurationoptions.profiles.md index 35c129e88..3031747d6 100644 --- a/docs/api/markdown/cucumber.iloadconfigurationoptions.profiles.md +++ b/docs/api/markdown/cucumber.iloadconfigurationoptions.profiles.md @@ -4,6 +4,9 @@ ## ILoadConfigurationOptions.profiles property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Zero or more profile names from which to source configuration (if omitted or empty, the `default` profile will be used). Signature: diff --git a/docs/api/markdown/cucumber.iloadconfigurationoptions.provided.md b/docs/api/markdown/cucumber.iloadconfigurationoptions.provided.md index 7078e6962..fae5500c3 100644 --- a/docs/api/markdown/cucumber.iloadconfigurationoptions.provided.md +++ b/docs/api/markdown/cucumber.iloadconfigurationoptions.provided.md @@ -4,6 +4,9 @@ ## ILoadConfigurationOptions.provided property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Ad-hoc configuration options to be applied over the top of whatever is loaded from the configuration file/profiles. Signature: diff --git a/docs/api/markdown/cucumber.iloadsupportoptions.md b/docs/api/markdown/cucumber.iloadsupportoptions.md index 9ee9f7ce2..95144b6b0 100644 --- a/docs/api/markdown/cucumber.iloadsupportoptions.md +++ b/docs/api/markdown/cucumber.iloadsupportoptions.md @@ -4,6 +4,10 @@ ## ILoadSupportOptions interface +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + + Signature: ```typescript @@ -14,6 +18,6 @@ export interface ILoadSupportOptions | Property | Type | Description | | --- | --- | --- | -| [sources](./cucumber.iloadsupportoptions.sources.md) | [ISourcesCoordinates](./cucumber.isourcescoordinates.md) | | -| [support](./cucumber.iloadsupportoptions.support.md) | [ISupportCodeCoordinates](./cucumber.isupportcodecoordinates.md) | | +| [sources](./cucumber.iloadsupportoptions.sources.md) | [ISourcesCoordinates](./cucumber.isourcescoordinates.md) | (BETA) | +| [support](./cucumber.iloadsupportoptions.support.md) | [ISupportCodeCoordinates](./cucumber.isupportcodecoordinates.md) | (BETA) | diff --git a/docs/api/markdown/cucumber.iloadsupportoptions.sources.md b/docs/api/markdown/cucumber.iloadsupportoptions.sources.md index 7d9ad0b5a..ca2d4d959 100644 --- a/docs/api/markdown/cucumber.iloadsupportoptions.sources.md +++ b/docs/api/markdown/cucumber.iloadsupportoptions.sources.md @@ -4,6 +4,9 @@ ## ILoadSupportOptions.sources property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Signature: ```typescript diff --git a/docs/api/markdown/cucumber.iloadsupportoptions.support.md b/docs/api/markdown/cucumber.iloadsupportoptions.support.md index 222dd6c9a..162e2dcba 100644 --- a/docs/api/markdown/cucumber.iloadsupportoptions.support.md +++ b/docs/api/markdown/cucumber.iloadsupportoptions.support.md @@ -4,6 +4,9 @@ ## ILoadSupportOptions.support property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Signature: ```typescript diff --git a/docs/api/markdown/cucumber.iresolvedconfiguration.md b/docs/api/markdown/cucumber.iresolvedconfiguration.md index 89da23278..f93e64c1a 100644 --- a/docs/api/markdown/cucumber.iresolvedconfiguration.md +++ b/docs/api/markdown/cucumber.iresolvedconfiguration.md @@ -4,6 +4,10 @@ ## IResolvedConfiguration interface +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + + Signature: ```typescript @@ -14,6 +18,6 @@ export interface IResolvedConfiguration | Property | Type | Description | | --- | --- | --- | -| [original](./cucumber.iresolvedconfiguration.original.md) | IConfiguration | The final flat configuration object resolved from the configuration file/profiles plus any extra provided. | -| [runnable](./cucumber.iresolvedconfiguration.runnable.md) | [IRunnableConfiguration](./cucumber.irunnableconfiguration.md) | The format that can be passed into runCucumber. | +| [original](./cucumber.iresolvedconfiguration.original.md) | IConfiguration | (BETA) The final flat configuration object resolved from the configuration file/profiles plus any extra provided. | +| [runnable](./cucumber.iresolvedconfiguration.runnable.md) | [IRunnableConfiguration](./cucumber.irunnableconfiguration.md) | (BETA) The format that can be passed into runCucumber. | diff --git a/docs/api/markdown/cucumber.iresolvedconfiguration.original.md b/docs/api/markdown/cucumber.iresolvedconfiguration.original.md index 426f2b3d1..43e7964b2 100644 --- a/docs/api/markdown/cucumber.iresolvedconfiguration.original.md +++ b/docs/api/markdown/cucumber.iresolvedconfiguration.original.md @@ -4,6 +4,9 @@ ## IResolvedConfiguration.original property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + The final flat configuration object resolved from the configuration file/profiles plus any extra provided. Signature: diff --git a/docs/api/markdown/cucumber.iresolvedconfiguration.runnable.md b/docs/api/markdown/cucumber.iresolvedconfiguration.runnable.md index 7c5ccbb43..ddbec25f8 100644 --- a/docs/api/markdown/cucumber.iresolvedconfiguration.runnable.md +++ b/docs/api/markdown/cucumber.iresolvedconfiguration.runnable.md @@ -4,6 +4,9 @@ ## IResolvedConfiguration.runnable property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + The format that can be passed into `runCucumber`. Signature: diff --git a/docs/api/markdown/cucumber.irunenvironment.cwd.md b/docs/api/markdown/cucumber.irunenvironment.cwd.md index efe7d2aa3..cfb9110a7 100644 --- a/docs/api/markdown/cucumber.irunenvironment.cwd.md +++ b/docs/api/markdown/cucumber.irunenvironment.cwd.md @@ -4,6 +4,9 @@ ## IRunEnvironment.cwd property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Working directory for the project (defaults to `process.cwd()` if omitted). Signature: diff --git a/docs/api/markdown/cucumber.irunenvironment.env.md b/docs/api/markdown/cucumber.irunenvironment.env.md index cac334c97..88f6bcd4a 100644 --- a/docs/api/markdown/cucumber.irunenvironment.env.md +++ b/docs/api/markdown/cucumber.irunenvironment.env.md @@ -4,6 +4,9 @@ ## IRunEnvironment.env property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Environment variables (defaults to `process.env` if omitted). Signature: diff --git a/docs/api/markdown/cucumber.irunenvironment.md b/docs/api/markdown/cucumber.irunenvironment.md index a563ff692..d4238fb98 100644 --- a/docs/api/markdown/cucumber.irunenvironment.md +++ b/docs/api/markdown/cucumber.irunenvironment.md @@ -4,6 +4,9 @@ ## IRunEnvironment interface +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Contextual data about the project environment. Signature: @@ -16,8 +19,8 @@ export interface IRunEnvironment | Property | Type | Description | | --- | --- | --- | -| [cwd?](./cucumber.irunenvironment.cwd.md) | string | (Optional) Working directory for the project (defaults to process.cwd() if omitted). | -| [env?](./cucumber.irunenvironment.env.md) | NodeJS.ProcessEnv | (Optional) Environment variables (defaults to process.env if omitted). | -| [stderr?](./cucumber.irunenvironment.stderr.md) | IFormatterStream | (Optional) Writable stream where the test run's warning/error output is written (defaults to process.stderr if omitted). | -| [stdout?](./cucumber.irunenvironment.stdout.md) | IFormatterStream | (Optional) Writable stream where the test run's main output is written (defaults to process.stdout if omitted). | +| [cwd?](./cucumber.irunenvironment.cwd.md) | string | (BETA) (Optional) Working directory for the project (defaults to process.cwd() if omitted). | +| [env?](./cucumber.irunenvironment.env.md) | NodeJS.ProcessEnv | (BETA) (Optional) Environment variables (defaults to process.env if omitted). | +| [stderr?](./cucumber.irunenvironment.stderr.md) | IFormatterStream | (BETA) (Optional) Writable stream where the test run's warning/error output is written (defaults to process.stderr if omitted). | +| [stdout?](./cucumber.irunenvironment.stdout.md) | IFormatterStream | (BETA) (Optional) Writable stream where the test run's main output is written (defaults to process.stdout if omitted). | diff --git a/docs/api/markdown/cucumber.irunenvironment.stderr.md b/docs/api/markdown/cucumber.irunenvironment.stderr.md index 4a0162c95..4285d7257 100644 --- a/docs/api/markdown/cucumber.irunenvironment.stderr.md +++ b/docs/api/markdown/cucumber.irunenvironment.stderr.md @@ -4,6 +4,9 @@ ## IRunEnvironment.stderr property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Writable stream where the test run's warning/error output is written (defaults to `process.stderr` if omitted). Signature: diff --git a/docs/api/markdown/cucumber.irunenvironment.stdout.md b/docs/api/markdown/cucumber.irunenvironment.stdout.md index f72e61807..268816acd 100644 --- a/docs/api/markdown/cucumber.irunenvironment.stdout.md +++ b/docs/api/markdown/cucumber.irunenvironment.stdout.md @@ -4,6 +4,9 @@ ## IRunEnvironment.stdout property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Writable stream where the test run's main output is written (defaults to `process.stdout` if omitted). Signature: diff --git a/docs/api/markdown/cucumber.irunnableconfiguration.formats.md b/docs/api/markdown/cucumber.irunnableconfiguration.formats.md index 9d6ac12d6..1fef2a477 100644 --- a/docs/api/markdown/cucumber.irunnableconfiguration.formats.md +++ b/docs/api/markdown/cucumber.irunnableconfiguration.formats.md @@ -4,6 +4,9 @@ ## IRunnableConfiguration.formats property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Signature: ```typescript diff --git a/docs/api/markdown/cucumber.irunnableconfiguration.md b/docs/api/markdown/cucumber.irunnableconfiguration.md index 6080fff5a..0fc1267c5 100644 --- a/docs/api/markdown/cucumber.irunnableconfiguration.md +++ b/docs/api/markdown/cucumber.irunnableconfiguration.md @@ -4,6 +4,10 @@ ## IRunnableConfiguration interface +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + + Signature: ```typescript @@ -14,8 +18,8 @@ export interface IRunnableConfiguration | Property | Type | Description | | --- | --- | --- | -| [formats](./cucumber.irunnableconfiguration.formats.md) | [IRunOptionsFormats](./cucumber.irunoptionsformats.md) | | -| [runtime](./cucumber.irunnableconfiguration.runtime.md) | [IRunOptionsRuntime](./cucumber.irunoptionsruntime.md) | | -| [sources](./cucumber.irunnableconfiguration.sources.md) | [ISourcesCoordinates](./cucumber.isourcescoordinates.md) | | -| [support](./cucumber.irunnableconfiguration.support.md) | [ISupportCodeCoordinates](./cucumber.isupportcodecoordinates.md) | | +| [formats](./cucumber.irunnableconfiguration.formats.md) | [IRunOptionsFormats](./cucumber.irunoptionsformats.md) | (BETA) | +| [runtime](./cucumber.irunnableconfiguration.runtime.md) | [IRunOptionsRuntime](./cucumber.irunoptionsruntime.md) | (BETA) | +| [sources](./cucumber.irunnableconfiguration.sources.md) | [ISourcesCoordinates](./cucumber.isourcescoordinates.md) | (BETA) | +| [support](./cucumber.irunnableconfiguration.support.md) | [ISupportCodeCoordinates](./cucumber.isupportcodecoordinates.md) | (BETA) | diff --git a/docs/api/markdown/cucumber.irunnableconfiguration.runtime.md b/docs/api/markdown/cucumber.irunnableconfiguration.runtime.md index 7d3f2035a..73b4f5a9d 100644 --- a/docs/api/markdown/cucumber.irunnableconfiguration.runtime.md +++ b/docs/api/markdown/cucumber.irunnableconfiguration.runtime.md @@ -4,6 +4,9 @@ ## IRunnableConfiguration.runtime property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Signature: ```typescript diff --git a/docs/api/markdown/cucumber.irunnableconfiguration.sources.md b/docs/api/markdown/cucumber.irunnableconfiguration.sources.md index 0dd4370bc..0e9612550 100644 --- a/docs/api/markdown/cucumber.irunnableconfiguration.sources.md +++ b/docs/api/markdown/cucumber.irunnableconfiguration.sources.md @@ -4,6 +4,9 @@ ## IRunnableConfiguration.sources property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Signature: ```typescript diff --git a/docs/api/markdown/cucumber.irunnableconfiguration.support.md b/docs/api/markdown/cucumber.irunnableconfiguration.support.md index 16d1f5777..6d391b45e 100644 --- a/docs/api/markdown/cucumber.irunnableconfiguration.support.md +++ b/docs/api/markdown/cucumber.irunnableconfiguration.support.md @@ -4,6 +4,9 @@ ## IRunnableConfiguration.support property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Signature: ```typescript diff --git a/docs/api/markdown/cucumber.irunoptions.formats.md b/docs/api/markdown/cucumber.irunoptions.formats.md index c31e76fb5..4ef10f91f 100644 --- a/docs/api/markdown/cucumber.irunoptions.formats.md +++ b/docs/api/markdown/cucumber.irunoptions.formats.md @@ -4,6 +4,9 @@ ## IRunOptions.formats property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Signature: ```typescript diff --git a/docs/api/markdown/cucumber.irunoptions.md b/docs/api/markdown/cucumber.irunoptions.md index 956d04f6c..7b16de9fd 100644 --- a/docs/api/markdown/cucumber.irunoptions.md +++ b/docs/api/markdown/cucumber.irunoptions.md @@ -4,6 +4,10 @@ ## IRunOptions interface +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + + Signature: ```typescript @@ -14,8 +18,8 @@ export interface IRunOptions | Property | Type | Description | | --- | --- | --- | -| [formats](./cucumber.irunoptions.formats.md) | [IRunOptionsFormats](./cucumber.irunoptionsformats.md) | | -| [runtime](./cucumber.irunoptions.runtime.md) | [IRunOptionsRuntime](./cucumber.irunoptionsruntime.md) | | -| [sources](./cucumber.irunoptions.sources.md) | [ISourcesCoordinates](./cucumber.isourcescoordinates.md) | | -| [support](./cucumber.irunoptions.support.md) | [ISupportCodeCoordinatesOrLibrary](./cucumber.isupportcodecoordinatesorlibrary.md) | | +| [formats](./cucumber.irunoptions.formats.md) | [IRunOptionsFormats](./cucumber.irunoptionsformats.md) | (BETA) | +| [runtime](./cucumber.irunoptions.runtime.md) | [IRunOptionsRuntime](./cucumber.irunoptionsruntime.md) | (BETA) | +| [sources](./cucumber.irunoptions.sources.md) | [ISourcesCoordinates](./cucumber.isourcescoordinates.md) | (BETA) | +| [support](./cucumber.irunoptions.support.md) | [ISupportCodeCoordinatesOrLibrary](./cucumber.isupportcodecoordinatesorlibrary.md) | (BETA) | diff --git a/docs/api/markdown/cucumber.irunoptions.runtime.md b/docs/api/markdown/cucumber.irunoptions.runtime.md index ec46ae891..aefb80f75 100644 --- a/docs/api/markdown/cucumber.irunoptions.runtime.md +++ b/docs/api/markdown/cucumber.irunoptions.runtime.md @@ -4,6 +4,9 @@ ## IRunOptions.runtime property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Signature: ```typescript diff --git a/docs/api/markdown/cucumber.irunoptions.sources.md b/docs/api/markdown/cucumber.irunoptions.sources.md index 2b5fba724..d64cbbe0e 100644 --- a/docs/api/markdown/cucumber.irunoptions.sources.md +++ b/docs/api/markdown/cucumber.irunoptions.sources.md @@ -4,6 +4,9 @@ ## IRunOptions.sources property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Signature: ```typescript diff --git a/docs/api/markdown/cucumber.irunoptions.support.md b/docs/api/markdown/cucumber.irunoptions.support.md index d89dc3652..2b36fec7a 100644 --- a/docs/api/markdown/cucumber.irunoptions.support.md +++ b/docs/api/markdown/cucumber.irunoptions.support.md @@ -4,6 +4,9 @@ ## IRunOptions.support property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Signature: ```typescript diff --git a/docs/api/markdown/cucumber.irunoptionsformats.files.md b/docs/api/markdown/cucumber.irunoptionsformats.files.md index c9b701526..6dade2ef4 100644 --- a/docs/api/markdown/cucumber.irunoptionsformats.files.md +++ b/docs/api/markdown/cucumber.irunoptionsformats.files.md @@ -4,6 +4,9 @@ ## IRunOptionsFormats.files property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Signature: ```typescript diff --git a/docs/api/markdown/cucumber.irunoptionsformats.md b/docs/api/markdown/cucumber.irunoptionsformats.md index 18a85f1d6..38e73d6b5 100644 --- a/docs/api/markdown/cucumber.irunoptionsformats.md +++ b/docs/api/markdown/cucumber.irunoptionsformats.md @@ -4,6 +4,10 @@ ## IRunOptionsFormats interface +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + + Signature: ```typescript @@ -14,8 +18,8 @@ export interface IRunOptionsFormats | Property | Type | Description | | --- | --- | --- | -| [files](./cucumber.irunoptionsformats.files.md) | Record<string, string> | | -| [options](./cucumber.irunoptionsformats.options.md) | FormatOptions | | -| [publish](./cucumber.irunoptionsformats.publish.md) | { url?: string; token?: string; } \| false | | -| [stdout](./cucumber.irunoptionsformats.stdout.md) | string | | +| [files](./cucumber.irunoptionsformats.files.md) | Record<string, string> | (BETA) | +| [options](./cucumber.irunoptionsformats.options.md) | FormatOptions | (BETA) | +| [publish](./cucumber.irunoptionsformats.publish.md) | { url?: string; token?: string; } \| false | (BETA) | +| [stdout](./cucumber.irunoptionsformats.stdout.md) | string | (BETA) | diff --git a/docs/api/markdown/cucumber.irunoptionsformats.options.md b/docs/api/markdown/cucumber.irunoptionsformats.options.md index 696353b4d..39c717ec8 100644 --- a/docs/api/markdown/cucumber.irunoptionsformats.options.md +++ b/docs/api/markdown/cucumber.irunoptionsformats.options.md @@ -4,6 +4,9 @@ ## IRunOptionsFormats.options property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Signature: ```typescript diff --git a/docs/api/markdown/cucumber.irunoptionsformats.publish.md b/docs/api/markdown/cucumber.irunoptionsformats.publish.md index d416ed77d..5e52e22d1 100644 --- a/docs/api/markdown/cucumber.irunoptionsformats.publish.md +++ b/docs/api/markdown/cucumber.irunoptionsformats.publish.md @@ -4,6 +4,9 @@ ## IRunOptionsFormats.publish property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Signature: ```typescript diff --git a/docs/api/markdown/cucumber.irunoptionsformats.stdout.md b/docs/api/markdown/cucumber.irunoptionsformats.stdout.md index 175c5708e..6eb72ea60 100644 --- a/docs/api/markdown/cucumber.irunoptionsformats.stdout.md +++ b/docs/api/markdown/cucumber.irunoptionsformats.stdout.md @@ -4,6 +4,9 @@ ## IRunOptionsFormats.stdout property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Signature: ```typescript diff --git a/docs/api/markdown/cucumber.irunoptionsruntime.md b/docs/api/markdown/cucumber.irunoptionsruntime.md index 166f1af5c..9f429c08d 100644 --- a/docs/api/markdown/cucumber.irunoptionsruntime.md +++ b/docs/api/markdown/cucumber.irunoptionsruntime.md @@ -4,6 +4,10 @@ ## IRunOptionsRuntime interface +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + + Signature: ```typescript @@ -15,5 +19,5 @@ export interface IRunOptionsRuntime extends IRuntimeOptions | Property | Type | Description | | --- | --- | --- | -| [parallel](./cucumber.irunoptionsruntime.parallel.md) | number | | +| [parallel](./cucumber.irunoptionsruntime.parallel.md) | number | (BETA) | diff --git a/docs/api/markdown/cucumber.irunoptionsruntime.parallel.md b/docs/api/markdown/cucumber.irunoptionsruntime.parallel.md index 6deaa4ab7..11279bae7 100644 --- a/docs/api/markdown/cucumber.irunoptionsruntime.parallel.md +++ b/docs/api/markdown/cucumber.irunoptionsruntime.parallel.md @@ -4,6 +4,9 @@ ## IRunOptionsRuntime.parallel property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Signature: ```typescript diff --git a/docs/api/markdown/cucumber.irunresult.md b/docs/api/markdown/cucumber.irunresult.md index af36dc92b..1feb09bc4 100644 --- a/docs/api/markdown/cucumber.irunresult.md +++ b/docs/api/markdown/cucumber.irunresult.md @@ -4,6 +4,9 @@ ## IRunResult interface +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Result of a Cucumber test run. Signature: @@ -16,6 +19,6 @@ export interface IRunResult | Property | Type | Description | | --- | --- | --- | -| [success](./cucumber.irunresult.success.md) | boolean | Whether the test run was overall successful i.e. no failed scenarios. The exact meaning can vary based on the strict configuration option. | -| [support](./cucumber.irunresult.support.md) | ISupportCodeLibrary | The support code library that was used in the test run; can be reused in subsequent runCucumber calls. | +| [success](./cucumber.irunresult.success.md) | boolean | (BETA) Whether the test run was overall successful i.e. no failed scenarios. The exact meaning can vary based on the strict configuration option. | +| [support](./cucumber.irunresult.support.md) | ISupportCodeLibrary | (BETA) The support code library that was used in the test run; can be reused in subsequent runCucumber calls. | diff --git a/docs/api/markdown/cucumber.irunresult.success.md b/docs/api/markdown/cucumber.irunresult.success.md index cd22c6c17..64406ce9c 100644 --- a/docs/api/markdown/cucumber.irunresult.success.md +++ b/docs/api/markdown/cucumber.irunresult.success.md @@ -4,6 +4,9 @@ ## IRunResult.success property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Whether the test run was overall successful i.e. no failed scenarios. The exact meaning can vary based on the `strict` configuration option. Signature: diff --git a/docs/api/markdown/cucumber.irunresult.support.md b/docs/api/markdown/cucumber.irunresult.support.md index df5bb64e1..f3fe104cb 100644 --- a/docs/api/markdown/cucumber.irunresult.support.md +++ b/docs/api/markdown/cucumber.irunresult.support.md @@ -4,6 +4,9 @@ ## IRunResult.support property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + The support code library that was used in the test run; can be reused in subsequent `runCucumber` calls. Signature: diff --git a/docs/api/markdown/cucumber.isourcescoordinates.defaultdialect.md b/docs/api/markdown/cucumber.isourcescoordinates.defaultdialect.md index 8e0e43211..5d1ad9705 100644 --- a/docs/api/markdown/cucumber.isourcescoordinates.defaultdialect.md +++ b/docs/api/markdown/cucumber.isourcescoordinates.defaultdialect.md @@ -4,6 +4,9 @@ ## ISourcesCoordinates.defaultDialect property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Signature: ```typescript diff --git a/docs/api/markdown/cucumber.isourcescoordinates.md b/docs/api/markdown/cucumber.isourcescoordinates.md index e58c19712..9e595afaf 100644 --- a/docs/api/markdown/cucumber.isourcescoordinates.md +++ b/docs/api/markdown/cucumber.isourcescoordinates.md @@ -4,6 +4,10 @@ ## ISourcesCoordinates interface +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + + Signature: ```typescript @@ -14,9 +18,9 @@ export interface ISourcesCoordinates | Property | Type | Description | | --- | --- | --- | -| [defaultDialect](./cucumber.isourcescoordinates.defaultdialect.md) | string | | -| [names](./cucumber.isourcescoordinates.names.md) | string\[\] | | -| [order](./cucumber.isourcescoordinates.order.md) | PickleOrder | | -| [paths](./cucumber.isourcescoordinates.paths.md) | string\[\] | | -| [tagExpression](./cucumber.isourcescoordinates.tagexpression.md) | string | | +| [defaultDialect](./cucumber.isourcescoordinates.defaultdialect.md) | string | (BETA) | +| [names](./cucumber.isourcescoordinates.names.md) | string\[\] | (BETA) | +| [order](./cucumber.isourcescoordinates.order.md) | PickleOrder | (BETA) | +| [paths](./cucumber.isourcescoordinates.paths.md) | string\[\] | (BETA) | +| [tagExpression](./cucumber.isourcescoordinates.tagexpression.md) | string | (BETA) | diff --git a/docs/api/markdown/cucumber.isourcescoordinates.names.md b/docs/api/markdown/cucumber.isourcescoordinates.names.md index 756541844..fe32013b5 100644 --- a/docs/api/markdown/cucumber.isourcescoordinates.names.md +++ b/docs/api/markdown/cucumber.isourcescoordinates.names.md @@ -4,6 +4,9 @@ ## ISourcesCoordinates.names property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Signature: ```typescript diff --git a/docs/api/markdown/cucumber.isourcescoordinates.order.md b/docs/api/markdown/cucumber.isourcescoordinates.order.md index 2c669710a..3d1a5535b 100644 --- a/docs/api/markdown/cucumber.isourcescoordinates.order.md +++ b/docs/api/markdown/cucumber.isourcescoordinates.order.md @@ -4,6 +4,9 @@ ## ISourcesCoordinates.order property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Signature: ```typescript diff --git a/docs/api/markdown/cucumber.isourcescoordinates.paths.md b/docs/api/markdown/cucumber.isourcescoordinates.paths.md index 0a2143a5a..0b2b21594 100644 --- a/docs/api/markdown/cucumber.isourcescoordinates.paths.md +++ b/docs/api/markdown/cucumber.isourcescoordinates.paths.md @@ -4,6 +4,9 @@ ## ISourcesCoordinates.paths property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Signature: ```typescript diff --git a/docs/api/markdown/cucumber.isourcescoordinates.tagexpression.md b/docs/api/markdown/cucumber.isourcescoordinates.tagexpression.md index 311775818..aa7279785 100644 --- a/docs/api/markdown/cucumber.isourcescoordinates.tagexpression.md +++ b/docs/api/markdown/cucumber.isourcescoordinates.tagexpression.md @@ -4,6 +4,9 @@ ## ISourcesCoordinates.tagExpression property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Signature: ```typescript diff --git a/docs/api/markdown/cucumber.isupportcodecoordinates.importpaths.md b/docs/api/markdown/cucumber.isupportcodecoordinates.importpaths.md index 34e8034de..1a4562308 100644 --- a/docs/api/markdown/cucumber.isupportcodecoordinates.importpaths.md +++ b/docs/api/markdown/cucumber.isupportcodecoordinates.importpaths.md @@ -4,6 +4,9 @@ ## ISupportCodeCoordinates.importPaths property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Signature: ```typescript diff --git a/docs/api/markdown/cucumber.isupportcodecoordinates.md b/docs/api/markdown/cucumber.isupportcodecoordinates.md index a13bce77c..d33c6f058 100644 --- a/docs/api/markdown/cucumber.isupportcodecoordinates.md +++ b/docs/api/markdown/cucumber.isupportcodecoordinates.md @@ -4,6 +4,10 @@ ## ISupportCodeCoordinates interface +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + + Signature: ```typescript @@ -14,7 +18,7 @@ export interface ISupportCodeCoordinates | Property | Type | Description | | --- | --- | --- | -| [importPaths](./cucumber.isupportcodecoordinates.importpaths.md) | string\[\] | | -| [requireModules](./cucumber.isupportcodecoordinates.requiremodules.md) | string\[\] | | -| [requirePaths](./cucumber.isupportcodecoordinates.requirepaths.md) | string\[\] | | +| [importPaths](./cucumber.isupportcodecoordinates.importpaths.md) | string\[\] | (BETA) | +| [requireModules](./cucumber.isupportcodecoordinates.requiremodules.md) | string\[\] | (BETA) | +| [requirePaths](./cucumber.isupportcodecoordinates.requirepaths.md) | string\[\] | (BETA) | diff --git a/docs/api/markdown/cucumber.isupportcodecoordinates.requiremodules.md b/docs/api/markdown/cucumber.isupportcodecoordinates.requiremodules.md index f4bac3175..8e0e920d9 100644 --- a/docs/api/markdown/cucumber.isupportcodecoordinates.requiremodules.md +++ b/docs/api/markdown/cucumber.isupportcodecoordinates.requiremodules.md @@ -4,6 +4,9 @@ ## ISupportCodeCoordinates.requireModules property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Signature: ```typescript diff --git a/docs/api/markdown/cucumber.isupportcodecoordinates.requirepaths.md b/docs/api/markdown/cucumber.isupportcodecoordinates.requirepaths.md index 4ac57b619..6ef57e8e5 100644 --- a/docs/api/markdown/cucumber.isupportcodecoordinates.requirepaths.md +++ b/docs/api/markdown/cucumber.isupportcodecoordinates.requirepaths.md @@ -4,6 +4,9 @@ ## ISupportCodeCoordinates.requirePaths property +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Signature: ```typescript diff --git a/docs/api/markdown/cucumber.isupportcodecoordinatesorlibrary.md b/docs/api/markdown/cucumber.isupportcodecoordinatesorlibrary.md index 4bc04fdf7..801d8b06c 100644 --- a/docs/api/markdown/cucumber.isupportcodecoordinatesorlibrary.md +++ b/docs/api/markdown/cucumber.isupportcodecoordinatesorlibrary.md @@ -4,6 +4,10 @@ ## ISupportCodeCoordinatesOrLibrary type +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + + Signature: ```typescript diff --git a/docs/api/markdown/cucumber.loadconfiguration.md b/docs/api/markdown/cucumber.loadconfiguration.md index c4f44337b..17919f915 100644 --- a/docs/api/markdown/cucumber.loadconfiguration.md +++ b/docs/api/markdown/cucumber.loadconfiguration.md @@ -4,6 +4,9 @@ ## loadConfiguration() function +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Load user-authored configuration to be used in a test run. Signature: diff --git a/docs/api/markdown/cucumber.loadsupport.md b/docs/api/markdown/cucumber.loadsupport.md index ae59fb046..f09074943 100644 --- a/docs/api/markdown/cucumber.loadsupport.md +++ b/docs/api/markdown/cucumber.loadsupport.md @@ -4,6 +4,9 @@ ## loadSupport() function +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Load support code for use in test runs. Signature: diff --git a/docs/api/markdown/cucumber.md b/docs/api/markdown/cucumber.md index cd33a6174..0b2ff6998 100644 --- a/docs/api/markdown/cucumber.md +++ b/docs/api/markdown/cucumber.md @@ -14,29 +14,29 @@ These docs cover the API used for running Cucumber programmatically. The entry p | Function | Description | | --- | --- | -| [loadConfiguration(options, environment)](./cucumber.loadconfiguration.md) | Load user-authored configuration to be used in a test run. | -| [loadSupport(options, environment)](./cucumber.loadsupport.md) | Load support code for use in test runs. | -| [runCucumber(configuration, environment, onMessage)](./cucumber.runcucumber.md) | Execute a Cucumber test run. | +| [loadConfiguration(options, environment)](./cucumber.loadconfiguration.md) | (BETA) Load user-authored configuration to be used in a test run. | +| [loadSupport(options, environment)](./cucumber.loadsupport.md) | (BETA) Load support code for use in test runs. | +| [runCucumber(configuration, environment, onMessage)](./cucumber.runcucumber.md) | (BETA) Execute a Cucumber test run. | ## Interfaces | Interface | Description | | --- | --- | -| [ILoadConfigurationOptions](./cucumber.iloadconfigurationoptions.md) | | -| [ILoadSupportOptions](./cucumber.iloadsupportoptions.md) | | -| [IResolvedConfiguration](./cucumber.iresolvedconfiguration.md) | | -| [IRunEnvironment](./cucumber.irunenvironment.md) | Contextual data about the project environment. | -| [IRunnableConfiguration](./cucumber.irunnableconfiguration.md) | | -| [IRunOptions](./cucumber.irunoptions.md) | | -| [IRunOptionsFormats](./cucumber.irunoptionsformats.md) | | -| [IRunOptionsRuntime](./cucumber.irunoptionsruntime.md) | | -| [IRunResult](./cucumber.irunresult.md) | Result of a Cucumber test run. | -| [ISourcesCoordinates](./cucumber.isourcescoordinates.md) | | -| [ISupportCodeCoordinates](./cucumber.isupportcodecoordinates.md) | | +| [ILoadConfigurationOptions](./cucumber.iloadconfigurationoptions.md) | (BETA) | +| [ILoadSupportOptions](./cucumber.iloadsupportoptions.md) | (BETA) | +| [IResolvedConfiguration](./cucumber.iresolvedconfiguration.md) | (BETA) | +| [IRunEnvironment](./cucumber.irunenvironment.md) | (BETA) Contextual data about the project environment. | +| [IRunnableConfiguration](./cucumber.irunnableconfiguration.md) | (BETA) | +| [IRunOptions](./cucumber.irunoptions.md) | (BETA) | +| [IRunOptionsFormats](./cucumber.irunoptionsformats.md) | (BETA) | +| [IRunOptionsRuntime](./cucumber.irunoptionsruntime.md) | (BETA) | +| [IRunResult](./cucumber.irunresult.md) | (BETA) Result of a Cucumber test run. | +| [ISourcesCoordinates](./cucumber.isourcescoordinates.md) | (BETA) | +| [ISupportCodeCoordinates](./cucumber.isupportcodecoordinates.md) | (BETA) | ## Type Aliases | Type Alias | Description | | --- | --- | -| [ISupportCodeCoordinatesOrLibrary](./cucumber.isupportcodecoordinatesorlibrary.md) | | +| [ISupportCodeCoordinatesOrLibrary](./cucumber.isupportcodecoordinatesorlibrary.md) | (BETA) | diff --git a/docs/api/markdown/cucumber.runcucumber.md b/docs/api/markdown/cucumber.runcucumber.md index b7e40dbb8..66355051c 100644 --- a/docs/api/markdown/cucumber.runcucumber.md +++ b/docs/api/markdown/cucumber.runcucumber.md @@ -4,6 +4,9 @@ ## runCucumber() function +> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. +> + Execute a Cucumber test run. Signature: diff --git a/docs/api/model/cucumber.api.json b/docs/api/model/cucumber.api.json index e64745ced..0036de9bd 100644 --- a/docs/api/model/cucumber.api.json +++ b/docs/api/model/cucumber.api.json @@ -172,14 +172,14 @@ { "kind": "Interface", "canonicalReference": "@cucumber/cucumber!ILoadConfigurationOptions:interface", - "docComment": "", + "docComment": "/**\n * @beta\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export interface ILoadConfigurationOptions " } ], - "releaseTag": "Public", + "releaseTag": "Beta", "name": "ILoadConfigurationOptions", "members": [ { @@ -201,7 +201,7 @@ } ], "isOptional": true, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "file", "propertyTypeTokenRange": { "startIndex": 1, @@ -227,7 +227,7 @@ } ], "isOptional": true, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "profiles", "propertyTypeTokenRange": { "startIndex": 1, @@ -267,7 +267,7 @@ } ], "isOptional": true, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "provided", "propertyTypeTokenRange": { "startIndex": 1, @@ -280,14 +280,14 @@ { "kind": "Interface", "canonicalReference": "@cucumber/cucumber!ILoadSupportOptions:interface", - "docComment": "", + "docComment": "/**\n * @beta\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export interface ILoadSupportOptions " } ], - "releaseTag": "Public", + "releaseTag": "Beta", "name": "ILoadSupportOptions", "members": [ { @@ -310,7 +310,7 @@ } ], "isOptional": false, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "sources", "propertyTypeTokenRange": { "startIndex": 1, @@ -337,7 +337,7 @@ } ], "isOptional": false, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "support", "propertyTypeTokenRange": { "startIndex": 1, @@ -350,14 +350,14 @@ { "kind": "Interface", "canonicalReference": "@cucumber/cucumber!IResolvedConfiguration:interface", - "docComment": "", + "docComment": "/**\n * @beta\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export interface IResolvedConfiguration " } ], - "releaseTag": "Public", + "releaseTag": "Beta", "name": "IResolvedConfiguration", "members": [ { @@ -380,7 +380,7 @@ } ], "isOptional": false, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "original", "propertyTypeTokenRange": { "startIndex": 1, @@ -407,7 +407,7 @@ } ], "isOptional": false, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "runnable", "propertyTypeTokenRange": { "startIndex": 1, @@ -420,14 +420,14 @@ { "kind": "Interface", "canonicalReference": "@cucumber/cucumber!IRunEnvironment:interface", - "docComment": "/**\n * Contextual data about the project environment.\n */\n", + "docComment": "/**\n * Contextual data about the project environment.\n *\n * @beta\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export interface IRunEnvironment " } ], - "releaseTag": "Public", + "releaseTag": "Beta", "name": "IRunEnvironment", "members": [ { @@ -449,7 +449,7 @@ } ], "isOptional": true, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "cwd", "propertyTypeTokenRange": { "startIndex": 1, @@ -476,7 +476,7 @@ } ], "isOptional": true, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "env", "propertyTypeTokenRange": { "startIndex": 1, @@ -503,7 +503,7 @@ } ], "isOptional": true, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "stderr", "propertyTypeTokenRange": { "startIndex": 1, @@ -530,7 +530,7 @@ } ], "isOptional": true, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "stdout", "propertyTypeTokenRange": { "startIndex": 1, @@ -543,14 +543,14 @@ { "kind": "Interface", "canonicalReference": "@cucumber/cucumber!IRunnableConfiguration:interface", - "docComment": "", + "docComment": "/**\n * @beta\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export interface IRunnableConfiguration " } ], - "releaseTag": "Public", + "releaseTag": "Beta", "name": "IRunnableConfiguration", "members": [ { @@ -573,7 +573,7 @@ } ], "isOptional": false, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "formats", "propertyTypeTokenRange": { "startIndex": 1, @@ -600,7 +600,7 @@ } ], "isOptional": false, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "runtime", "propertyTypeTokenRange": { "startIndex": 1, @@ -627,7 +627,7 @@ } ], "isOptional": false, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "sources", "propertyTypeTokenRange": { "startIndex": 1, @@ -654,7 +654,7 @@ } ], "isOptional": false, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "support", "propertyTypeTokenRange": { "startIndex": 1, @@ -667,14 +667,14 @@ { "kind": "Interface", "canonicalReference": "@cucumber/cucumber!IRunOptions:interface", - "docComment": "", + "docComment": "/**\n * @beta\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export interface IRunOptions " } ], - "releaseTag": "Public", + "releaseTag": "Beta", "name": "IRunOptions", "members": [ { @@ -697,7 +697,7 @@ } ], "isOptional": false, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "formats", "propertyTypeTokenRange": { "startIndex": 1, @@ -724,7 +724,7 @@ } ], "isOptional": false, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "runtime", "propertyTypeTokenRange": { "startIndex": 1, @@ -751,7 +751,7 @@ } ], "isOptional": false, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "sources", "propertyTypeTokenRange": { "startIndex": 1, @@ -778,7 +778,7 @@ } ], "isOptional": false, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "support", "propertyTypeTokenRange": { "startIndex": 1, @@ -791,14 +791,14 @@ { "kind": "Interface", "canonicalReference": "@cucumber/cucumber!IRunOptionsFormats:interface", - "docComment": "", + "docComment": "/**\n * @beta\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export interface IRunOptionsFormats " } ], - "releaseTag": "Public", + "releaseTag": "Beta", "name": "IRunOptionsFormats", "members": [ { @@ -825,7 +825,7 @@ } ], "isOptional": false, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "files", "propertyTypeTokenRange": { "startIndex": 1, @@ -852,7 +852,7 @@ } ], "isOptional": false, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "options", "propertyTypeTokenRange": { "startIndex": 1, @@ -878,7 +878,7 @@ } ], "isOptional": false, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "publish", "propertyTypeTokenRange": { "startIndex": 1, @@ -904,7 +904,7 @@ } ], "isOptional": false, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "stdout", "propertyTypeTokenRange": { "startIndex": 1, @@ -917,7 +917,7 @@ { "kind": "Interface", "canonicalReference": "@cucumber/cucumber!IRunOptionsRuntime:interface", - "docComment": "", + "docComment": "/**\n * @beta\n */\n", "excerptTokens": [ { "kind": "Content", @@ -933,7 +933,7 @@ "text": " " } ], - "releaseTag": "Public", + "releaseTag": "Beta", "name": "IRunOptionsRuntime", "members": [ { @@ -955,7 +955,7 @@ } ], "isOptional": false, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "parallel", "propertyTypeTokenRange": { "startIndex": 1, @@ -973,14 +973,14 @@ { "kind": "Interface", "canonicalReference": "@cucumber/cucumber!IRunResult:interface", - "docComment": "/**\n * Result of a Cucumber test run.\n */\n", + "docComment": "/**\n * Result of a Cucumber test run.\n *\n * @beta\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export interface IRunResult " } ], - "releaseTag": "Public", + "releaseTag": "Beta", "name": "IRunResult", "members": [ { @@ -1002,7 +1002,7 @@ } ], "isOptional": false, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "success", "propertyTypeTokenRange": { "startIndex": 1, @@ -1029,7 +1029,7 @@ } ], "isOptional": false, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "support", "propertyTypeTokenRange": { "startIndex": 1, @@ -1042,14 +1042,14 @@ { "kind": "Interface", "canonicalReference": "@cucumber/cucumber!ISourcesCoordinates:interface", - "docComment": "", + "docComment": "/**\n * @beta\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export interface ISourcesCoordinates " } ], - "releaseTag": "Public", + "releaseTag": "Beta", "name": "ISourcesCoordinates", "members": [ { @@ -1071,7 +1071,7 @@ } ], "isOptional": false, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "defaultDialect", "propertyTypeTokenRange": { "startIndex": 1, @@ -1097,7 +1097,7 @@ } ], "isOptional": false, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "names", "propertyTypeTokenRange": { "startIndex": 1, @@ -1124,7 +1124,7 @@ } ], "isOptional": false, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "order", "propertyTypeTokenRange": { "startIndex": 1, @@ -1150,7 +1150,7 @@ } ], "isOptional": false, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "paths", "propertyTypeTokenRange": { "startIndex": 1, @@ -1176,7 +1176,7 @@ } ], "isOptional": false, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "tagExpression", "propertyTypeTokenRange": { "startIndex": 1, @@ -1189,14 +1189,14 @@ { "kind": "Interface", "canonicalReference": "@cucumber/cucumber!ISupportCodeCoordinates:interface", - "docComment": "", + "docComment": "/**\n * @beta\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export interface ISupportCodeCoordinates " } ], - "releaseTag": "Public", + "releaseTag": "Beta", "name": "ISupportCodeCoordinates", "members": [ { @@ -1218,7 +1218,7 @@ } ], "isOptional": false, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "importPaths", "propertyTypeTokenRange": { "startIndex": 1, @@ -1244,7 +1244,7 @@ } ], "isOptional": false, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "requireModules", "propertyTypeTokenRange": { "startIndex": 1, @@ -1270,7 +1270,7 @@ } ], "isOptional": false, - "releaseTag": "Public", + "releaseTag": "Beta", "name": "requirePaths", "propertyTypeTokenRange": { "startIndex": 1, @@ -1283,7 +1283,7 @@ { "kind": "TypeAlias", "canonicalReference": "@cucumber/cucumber!ISupportCodeCoordinatesOrLibrary:type", - "docComment": "", + "docComment": "/**\n * @beta\n */\n", "excerptTokens": [ { "kind": "Content", @@ -1308,7 +1308,7 @@ "text": ";" } ], - "releaseTag": "Public", + "releaseTag": "Beta", "name": "ISupportCodeCoordinatesOrLibrary", "typeTokenRange": { "startIndex": 1, @@ -1318,7 +1318,7 @@ { "kind": "Function", "canonicalReference": "@cucumber/cucumber!loadConfiguration:function(1)", - "docComment": "/**\n * Load user-authored configuration to be used in a test run.\n *\n * @param options - Coordinates required to find configuration.\n *\n * @param environment - Project environment.\n */\n", + "docComment": "/**\n * Load user-authored configuration to be used in a test run.\n *\n * @param options - Coordinates required to find configuration.\n *\n * @param environment - Project environment.\n *\n * @beta\n */\n", "excerptTokens": [ { "kind": "Content", @@ -1369,7 +1369,7 @@ "startIndex": 5, "endIndex": 9 }, - "releaseTag": "Public", + "releaseTag": "Beta", "overloadIndex": 1, "parameters": [ { @@ -1392,7 +1392,7 @@ { "kind": "Function", "canonicalReference": "@cucumber/cucumber!loadSupport:function(1)", - "docComment": "/**\n * Load support code for use in test runs.\n *\n * @param options - Subset of `IRunnableConfiguration` required to find the support code.\n *\n * @param environment - Project environment.\n */\n", + "docComment": "/**\n * Load support code for use in test runs.\n *\n * @param options - Subset of `IRunnableConfiguration` required to find the support code.\n *\n * @param environment - Project environment.\n *\n * @beta\n */\n", "excerptTokens": [ { "kind": "Content", @@ -1443,7 +1443,7 @@ "startIndex": 5, "endIndex": 9 }, - "releaseTag": "Public", + "releaseTag": "Beta", "overloadIndex": 1, "parameters": [ { @@ -1466,7 +1466,7 @@ { "kind": "Function", "canonicalReference": "@cucumber/cucumber!runCucumber:function(1)", - "docComment": "/**\n * Execute a Cucumber test run.\n *\n * @param configuration - Configuration loaded from `loadConfiguration`.\n *\n * @param environment - Project environment.\n *\n * @param onMessage - Callback fired each time Cucumber emits a message.\n */\n", + "docComment": "/**\n * Execute a Cucumber test run.\n *\n * @param configuration - Configuration loaded from `loadConfiguration`.\n *\n * @param environment - Project environment.\n *\n * @param onMessage - Callback fired each time Cucumber emits a message.\n *\n * @beta\n */\n", "excerptTokens": [ { "kind": "Content", @@ -1534,7 +1534,7 @@ "startIndex": 9, "endIndex": 13 }, - "releaseTag": "Public", + "releaseTag": "Beta", "overloadIndex": 1, "parameters": [ { diff --git a/src/api/index.ts b/src/api/index.ts index 0d10a6cdd..51dbcef03 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -2,7 +2,6 @@ * Cucumber for JavaScript * * @remarks These docs cover the API used for running Cucumber programmatically. The entry point is `@cucumber/cucumber/api`. - * * @packageDocumentation */ diff --git a/src/api/load_configuration.ts b/src/api/load_configuration.ts index c4511d85c..a7cd4bb15 100644 --- a/src/api/load_configuration.ts +++ b/src/api/load_configuration.ts @@ -16,6 +16,7 @@ import { mergeEnvironment } from './environment' /** * Load user-authored configuration to be used in a test run. * + * @beta * @param options - Coordinates required to find configuration. * @param environment - Project environment. */ diff --git a/src/api/load_support.ts b/src/api/load_support.ts index 726afaa7b..2049add72 100644 --- a/src/api/load_support.ts +++ b/src/api/load_support.ts @@ -8,6 +8,7 @@ import { ISupportCodeLibrary } from '../support_code_library_builder/types' /** * Load support code for use in test runs. * + * @beta * @param options - Subset of `IRunnableConfiguration` required to find the support code. * @param environment - Project environment. */ diff --git a/src/api/run_cucumber.ts b/src/api/run_cucumber.ts index f4985c01d..469811265 100644 --- a/src/api/run_cucumber.ts +++ b/src/api/run_cucumber.ts @@ -21,6 +21,7 @@ import { mergeEnvironment } from './environment' /** * Execute a Cucumber test run. * + * @beta * @param configuration - Configuration loaded from `loadConfiguration`. * @param environment - Project environment. * @param onMessage - Callback fired each time Cucumber emits a message. diff --git a/src/api/types.ts b/src/api/types.ts index d5b591adc..6815ac978 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -4,6 +4,9 @@ import { PickleOrder } from '../models/pickle_order' import { IRuntimeOptions } from '../runtime' import { IConfiguration } from '../configuration' +/** + * @beta + */ export interface ILoadConfigurationOptions { /** * Path to load configuration file from (defaults to `cucumber.(js|cjs|mjs|json)` if omitted). @@ -19,6 +22,9 @@ export interface ILoadConfigurationOptions { provided?: Partial } +/** + * @beta + */ export interface IResolvedConfiguration { /** * The final flat configuration object resolved from the configuration file/profiles plus any extra provided. @@ -30,6 +36,9 @@ export interface IResolvedConfiguration { runnable: IRunnableConfiguration } +/** + * @beta + */ export interface ISourcesCoordinates { defaultDialect: string paths: string[] @@ -38,21 +47,33 @@ export interface ISourcesCoordinates { order: PickleOrder } +/** + * @beta + */ export interface ISupportCodeCoordinates { requireModules: string[] requirePaths: string[] importPaths: string[] } +/** + * @beta + */ export interface ILoadSupportOptions { sources: ISourcesCoordinates support: ISupportCodeCoordinates } +/** + * @beta + */ export interface IRunOptionsRuntime extends IRuntimeOptions { parallel: number } +/** + * @beta + */ export interface IRunOptionsFormats { stdout: string files: Record @@ -65,6 +86,9 @@ export interface IRunOptionsFormats { options: FormatOptions } +/** + * @beta + */ export interface IRunnableConfiguration { sources: ISourcesCoordinates support: ISupportCodeCoordinates @@ -72,10 +96,16 @@ export interface IRunnableConfiguration { formats: IRunOptionsFormats } +/** + * @beta + */ export type ISupportCodeCoordinatesOrLibrary = | ISupportCodeCoordinates | ISupportCodeLibrary +/** + * @beta + */ export interface IRunOptions { sources: ISourcesCoordinates support: ISupportCodeCoordinatesOrLibrary @@ -85,6 +115,8 @@ export interface IRunOptions { /** * Contextual data about the project environment. + * + * @beta */ export interface IRunEnvironment { /** @@ -107,6 +139,8 @@ export interface IRunEnvironment { /** * Result of a Cucumber test run. + * + * @beta */ export interface IRunResult { /** From 35fbd28f3127689844f59dcb8bf8a7919da426d6 Mon Sep 17 00:00:00 2001 From: David Goss Date: Wed, 16 Mar 2022 13:14:55 +0000 Subject: [PATCH 15/24] use @public --- ...cucumber.iloadconfigurationoptions.file.md | 3 - .../cucumber.iloadconfigurationoptions.md | 9 +- ...mber.iloadconfigurationoptions.profiles.md | 3 - ...mber.iloadconfigurationoptions.provided.md | 3 - .../markdown/cucumber.iloadsupportoptions.md | 7 +- .../cucumber.iloadsupportoptions.sources.md | 3 - .../cucumber.iloadsupportoptions.support.md | 3 - .../cucumber.iresolvedconfiguration.md | 7 +- ...ucumber.iresolvedconfiguration.original.md | 3 - ...ucumber.iresolvedconfiguration.runnable.md | 3 - .../markdown/cucumber.irunenvironment.cwd.md | 3 - .../markdown/cucumber.irunenvironment.env.md | 3 - docs/api/markdown/cucumber.irunenvironment.md | 11 +- .../cucumber.irunenvironment.stderr.md | 3 - .../cucumber.irunenvironment.stdout.md | 3 - ...cucumber.irunnableconfiguration.formats.md | 3 - .../cucumber.irunnableconfiguration.md | 11 +- ...cucumber.irunnableconfiguration.runtime.md | 3 - ...cucumber.irunnableconfiguration.sources.md | 3 - ...cucumber.irunnableconfiguration.support.md | 3 - .../markdown/cucumber.irunoptions.formats.md | 3 - docs/api/markdown/cucumber.irunoptions.md | 11 +- .../markdown/cucumber.irunoptions.runtime.md | 3 - .../markdown/cucumber.irunoptions.sources.md | 3 - .../markdown/cucumber.irunoptions.support.md | 3 - .../cucumber.irunoptionsformats.files.md | 3 - .../markdown/cucumber.irunoptionsformats.md | 11 +- .../cucumber.irunoptionsformats.options.md | 3 - .../cucumber.irunoptionsformats.publish.md | 3 - .../cucumber.irunoptionsformats.stdout.md | 3 - .../markdown/cucumber.irunoptionsruntime.md | 5 +- .../cucumber.irunoptionsruntime.parallel.md | 3 - docs/api/markdown/cucumber.irunresult.md | 7 +- .../markdown/cucumber.irunresult.success.md | 3 - .../markdown/cucumber.irunresult.support.md | 3 - ...mber.isourcescoordinates.defaultdialect.md | 3 - .../markdown/cucumber.isourcescoordinates.md | 13 +- .../cucumber.isourcescoordinates.names.md | 3 - .../cucumber.isourcescoordinates.order.md | 3 - .../cucumber.isourcescoordinates.paths.md | 3 - ...umber.isourcescoordinates.tagexpression.md | 3 - ...ber.isupportcodecoordinates.importpaths.md | 3 - .../cucumber.isupportcodecoordinates.md | 9 +- ....isupportcodecoordinates.requiremodules.md | 3 - ...er.isupportcodecoordinates.requirepaths.md | 3 - ...cumber.isupportcodecoordinatesorlibrary.md | 3 - .../markdown/cucumber.loadconfiguration.md | 3 - docs/api/markdown/cucumber.loadsupport.md | 3 - docs/api/markdown/cucumber.md | 30 ++-- docs/api/markdown/cucumber.runcucumber.md | 3 - docs/api/model/cucumber.api.json | 128 +++++++++--------- src/api/load_configuration.ts | 2 +- src/api/load_support.ts | 2 +- src/api/run_cucumber.ts | 2 +- src/api/types.ts | 24 ++-- 55 files changed, 128 insertions(+), 275 deletions(-) diff --git a/docs/api/markdown/cucumber.iloadconfigurationoptions.file.md b/docs/api/markdown/cucumber.iloadconfigurationoptions.file.md index 9dee5742a..47961cee0 100644 --- a/docs/api/markdown/cucumber.iloadconfigurationoptions.file.md +++ b/docs/api/markdown/cucumber.iloadconfigurationoptions.file.md @@ -4,9 +4,6 @@ ## ILoadConfigurationOptions.file property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Path to load configuration file from (defaults to `cucumber.(js|cjs|mjs|json)` if omitted). Signature: diff --git a/docs/api/markdown/cucumber.iloadconfigurationoptions.md b/docs/api/markdown/cucumber.iloadconfigurationoptions.md index b5f2db11b..14ee2e557 100644 --- a/docs/api/markdown/cucumber.iloadconfigurationoptions.md +++ b/docs/api/markdown/cucumber.iloadconfigurationoptions.md @@ -4,9 +4,6 @@ ## ILoadConfigurationOptions interface -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: @@ -18,7 +15,7 @@ export interface ILoadConfigurationOptions | Property | Type | Description | | --- | --- | --- | -| [file?](./cucumber.iloadconfigurationoptions.file.md) | string | (BETA) (Optional) Path to load configuration file from (defaults to cucumber.(js|cjs|mjs|json) if omitted). | -| [profiles?](./cucumber.iloadconfigurationoptions.profiles.md) | string\[\] | (BETA) (Optional) Zero or more profile names from which to source configuration (if omitted or empty, the default profile will be used). | -| [provided?](./cucumber.iloadconfigurationoptions.provided.md) | Partial<IConfiguration> | (BETA) (Optional) Ad-hoc configuration options to be applied over the top of whatever is loaded from the configuration file/profiles. | +| [file?](./cucumber.iloadconfigurationoptions.file.md) | string | (Optional) Path to load configuration file from (defaults to cucumber.(js|cjs|mjs|json) if omitted). | +| [profiles?](./cucumber.iloadconfigurationoptions.profiles.md) | string\[\] | (Optional) Zero or more profile names from which to source configuration (if omitted or empty, the default profile will be used). | +| [provided?](./cucumber.iloadconfigurationoptions.provided.md) | Partial<IConfiguration> | (Optional) Ad-hoc configuration options to be applied over the top of whatever is loaded from the configuration file/profiles. | diff --git a/docs/api/markdown/cucumber.iloadconfigurationoptions.profiles.md b/docs/api/markdown/cucumber.iloadconfigurationoptions.profiles.md index 3031747d6..35c129e88 100644 --- a/docs/api/markdown/cucumber.iloadconfigurationoptions.profiles.md +++ b/docs/api/markdown/cucumber.iloadconfigurationoptions.profiles.md @@ -4,9 +4,6 @@ ## ILoadConfigurationOptions.profiles property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Zero or more profile names from which to source configuration (if omitted or empty, the `default` profile will be used). Signature: diff --git a/docs/api/markdown/cucumber.iloadconfigurationoptions.provided.md b/docs/api/markdown/cucumber.iloadconfigurationoptions.provided.md index fae5500c3..7078e6962 100644 --- a/docs/api/markdown/cucumber.iloadconfigurationoptions.provided.md +++ b/docs/api/markdown/cucumber.iloadconfigurationoptions.provided.md @@ -4,9 +4,6 @@ ## ILoadConfigurationOptions.provided property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Ad-hoc configuration options to be applied over the top of whatever is loaded from the configuration file/profiles. Signature: diff --git a/docs/api/markdown/cucumber.iloadsupportoptions.md b/docs/api/markdown/cucumber.iloadsupportoptions.md index 95144b6b0..1722a0953 100644 --- a/docs/api/markdown/cucumber.iloadsupportoptions.md +++ b/docs/api/markdown/cucumber.iloadsupportoptions.md @@ -4,9 +4,6 @@ ## ILoadSupportOptions interface -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: @@ -18,6 +15,6 @@ export interface ILoadSupportOptions | Property | Type | Description | | --- | --- | --- | -| [sources](./cucumber.iloadsupportoptions.sources.md) | [ISourcesCoordinates](./cucumber.isourcescoordinates.md) | (BETA) | -| [support](./cucumber.iloadsupportoptions.support.md) | [ISupportCodeCoordinates](./cucumber.isupportcodecoordinates.md) | (BETA) | +| [sources](./cucumber.iloadsupportoptions.sources.md) | [ISourcesCoordinates](./cucumber.isourcescoordinates.md) | | +| [support](./cucumber.iloadsupportoptions.support.md) | [ISupportCodeCoordinates](./cucumber.isupportcodecoordinates.md) | | diff --git a/docs/api/markdown/cucumber.iloadsupportoptions.sources.md b/docs/api/markdown/cucumber.iloadsupportoptions.sources.md index ca2d4d959..7d9ad0b5a 100644 --- a/docs/api/markdown/cucumber.iloadsupportoptions.sources.md +++ b/docs/api/markdown/cucumber.iloadsupportoptions.sources.md @@ -4,9 +4,6 @@ ## ILoadSupportOptions.sources property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: ```typescript diff --git a/docs/api/markdown/cucumber.iloadsupportoptions.support.md b/docs/api/markdown/cucumber.iloadsupportoptions.support.md index 162e2dcba..222dd6c9a 100644 --- a/docs/api/markdown/cucumber.iloadsupportoptions.support.md +++ b/docs/api/markdown/cucumber.iloadsupportoptions.support.md @@ -4,9 +4,6 @@ ## ILoadSupportOptions.support property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: ```typescript diff --git a/docs/api/markdown/cucumber.iresolvedconfiguration.md b/docs/api/markdown/cucumber.iresolvedconfiguration.md index f93e64c1a..b6bb30029 100644 --- a/docs/api/markdown/cucumber.iresolvedconfiguration.md +++ b/docs/api/markdown/cucumber.iresolvedconfiguration.md @@ -4,9 +4,6 @@ ## IResolvedConfiguration interface -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: @@ -18,6 +15,6 @@ export interface IResolvedConfiguration | Property | Type | Description | | --- | --- | --- | -| [original](./cucumber.iresolvedconfiguration.original.md) | IConfiguration | (BETA) The final flat configuration object resolved from the configuration file/profiles plus any extra provided. | -| [runnable](./cucumber.iresolvedconfiguration.runnable.md) | [IRunnableConfiguration](./cucumber.irunnableconfiguration.md) | (BETA) The format that can be passed into runCucumber. | +| [original](./cucumber.iresolvedconfiguration.original.md) | IConfiguration | The final flat configuration object resolved from the configuration file/profiles plus any extra provided. | +| [runnable](./cucumber.iresolvedconfiguration.runnable.md) | [IRunnableConfiguration](./cucumber.irunnableconfiguration.md) | The format that can be passed into runCucumber. | diff --git a/docs/api/markdown/cucumber.iresolvedconfiguration.original.md b/docs/api/markdown/cucumber.iresolvedconfiguration.original.md index 43e7964b2..426f2b3d1 100644 --- a/docs/api/markdown/cucumber.iresolvedconfiguration.original.md +++ b/docs/api/markdown/cucumber.iresolvedconfiguration.original.md @@ -4,9 +4,6 @@ ## IResolvedConfiguration.original property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - The final flat configuration object resolved from the configuration file/profiles plus any extra provided. Signature: diff --git a/docs/api/markdown/cucumber.iresolvedconfiguration.runnable.md b/docs/api/markdown/cucumber.iresolvedconfiguration.runnable.md index ddbec25f8..7c5ccbb43 100644 --- a/docs/api/markdown/cucumber.iresolvedconfiguration.runnable.md +++ b/docs/api/markdown/cucumber.iresolvedconfiguration.runnable.md @@ -4,9 +4,6 @@ ## IResolvedConfiguration.runnable property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - The format that can be passed into `runCucumber`. Signature: diff --git a/docs/api/markdown/cucumber.irunenvironment.cwd.md b/docs/api/markdown/cucumber.irunenvironment.cwd.md index cfb9110a7..efe7d2aa3 100644 --- a/docs/api/markdown/cucumber.irunenvironment.cwd.md +++ b/docs/api/markdown/cucumber.irunenvironment.cwd.md @@ -4,9 +4,6 @@ ## IRunEnvironment.cwd property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Working directory for the project (defaults to `process.cwd()` if omitted). Signature: diff --git a/docs/api/markdown/cucumber.irunenvironment.env.md b/docs/api/markdown/cucumber.irunenvironment.env.md index 88f6bcd4a..cac334c97 100644 --- a/docs/api/markdown/cucumber.irunenvironment.env.md +++ b/docs/api/markdown/cucumber.irunenvironment.env.md @@ -4,9 +4,6 @@ ## IRunEnvironment.env property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Environment variables (defaults to `process.env` if omitted). Signature: diff --git a/docs/api/markdown/cucumber.irunenvironment.md b/docs/api/markdown/cucumber.irunenvironment.md index d4238fb98..a563ff692 100644 --- a/docs/api/markdown/cucumber.irunenvironment.md +++ b/docs/api/markdown/cucumber.irunenvironment.md @@ -4,9 +4,6 @@ ## IRunEnvironment interface -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Contextual data about the project environment. Signature: @@ -19,8 +16,8 @@ export interface IRunEnvironment | Property | Type | Description | | --- | --- | --- | -| [cwd?](./cucumber.irunenvironment.cwd.md) | string | (BETA) (Optional) Working directory for the project (defaults to process.cwd() if omitted). | -| [env?](./cucumber.irunenvironment.env.md) | NodeJS.ProcessEnv | (BETA) (Optional) Environment variables (defaults to process.env if omitted). | -| [stderr?](./cucumber.irunenvironment.stderr.md) | IFormatterStream | (BETA) (Optional) Writable stream where the test run's warning/error output is written (defaults to process.stderr if omitted). | -| [stdout?](./cucumber.irunenvironment.stdout.md) | IFormatterStream | (BETA) (Optional) Writable stream where the test run's main output is written (defaults to process.stdout if omitted). | +| [cwd?](./cucumber.irunenvironment.cwd.md) | string | (Optional) Working directory for the project (defaults to process.cwd() if omitted). | +| [env?](./cucumber.irunenvironment.env.md) | NodeJS.ProcessEnv | (Optional) Environment variables (defaults to process.env if omitted). | +| [stderr?](./cucumber.irunenvironment.stderr.md) | IFormatterStream | (Optional) Writable stream where the test run's warning/error output is written (defaults to process.stderr if omitted). | +| [stdout?](./cucumber.irunenvironment.stdout.md) | IFormatterStream | (Optional) Writable stream where the test run's main output is written (defaults to process.stdout if omitted). | diff --git a/docs/api/markdown/cucumber.irunenvironment.stderr.md b/docs/api/markdown/cucumber.irunenvironment.stderr.md index 4285d7257..4a0162c95 100644 --- a/docs/api/markdown/cucumber.irunenvironment.stderr.md +++ b/docs/api/markdown/cucumber.irunenvironment.stderr.md @@ -4,9 +4,6 @@ ## IRunEnvironment.stderr property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Writable stream where the test run's warning/error output is written (defaults to `process.stderr` if omitted). Signature: diff --git a/docs/api/markdown/cucumber.irunenvironment.stdout.md b/docs/api/markdown/cucumber.irunenvironment.stdout.md index 268816acd..f72e61807 100644 --- a/docs/api/markdown/cucumber.irunenvironment.stdout.md +++ b/docs/api/markdown/cucumber.irunenvironment.stdout.md @@ -4,9 +4,6 @@ ## IRunEnvironment.stdout property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Writable stream where the test run's main output is written (defaults to `process.stdout` if omitted). Signature: diff --git a/docs/api/markdown/cucumber.irunnableconfiguration.formats.md b/docs/api/markdown/cucumber.irunnableconfiguration.formats.md index 1fef2a477..9d6ac12d6 100644 --- a/docs/api/markdown/cucumber.irunnableconfiguration.formats.md +++ b/docs/api/markdown/cucumber.irunnableconfiguration.formats.md @@ -4,9 +4,6 @@ ## IRunnableConfiguration.formats property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: ```typescript diff --git a/docs/api/markdown/cucumber.irunnableconfiguration.md b/docs/api/markdown/cucumber.irunnableconfiguration.md index 0fc1267c5..088296bd9 100644 --- a/docs/api/markdown/cucumber.irunnableconfiguration.md +++ b/docs/api/markdown/cucumber.irunnableconfiguration.md @@ -4,9 +4,6 @@ ## IRunnableConfiguration interface -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: @@ -18,8 +15,8 @@ export interface IRunnableConfiguration | Property | Type | Description | | --- | --- | --- | -| [formats](./cucumber.irunnableconfiguration.formats.md) | [IRunOptionsFormats](./cucumber.irunoptionsformats.md) | (BETA) | -| [runtime](./cucumber.irunnableconfiguration.runtime.md) | [IRunOptionsRuntime](./cucumber.irunoptionsruntime.md) | (BETA) | -| [sources](./cucumber.irunnableconfiguration.sources.md) | [ISourcesCoordinates](./cucumber.isourcescoordinates.md) | (BETA) | -| [support](./cucumber.irunnableconfiguration.support.md) | [ISupportCodeCoordinates](./cucumber.isupportcodecoordinates.md) | (BETA) | +| [formats](./cucumber.irunnableconfiguration.formats.md) | [IRunOptionsFormats](./cucumber.irunoptionsformats.md) | | +| [runtime](./cucumber.irunnableconfiguration.runtime.md) | [IRunOptionsRuntime](./cucumber.irunoptionsruntime.md) | | +| [sources](./cucumber.irunnableconfiguration.sources.md) | [ISourcesCoordinates](./cucumber.isourcescoordinates.md) | | +| [support](./cucumber.irunnableconfiguration.support.md) | [ISupportCodeCoordinates](./cucumber.isupportcodecoordinates.md) | | diff --git a/docs/api/markdown/cucumber.irunnableconfiguration.runtime.md b/docs/api/markdown/cucumber.irunnableconfiguration.runtime.md index 73b4f5a9d..7d3f2035a 100644 --- a/docs/api/markdown/cucumber.irunnableconfiguration.runtime.md +++ b/docs/api/markdown/cucumber.irunnableconfiguration.runtime.md @@ -4,9 +4,6 @@ ## IRunnableConfiguration.runtime property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: ```typescript diff --git a/docs/api/markdown/cucumber.irunnableconfiguration.sources.md b/docs/api/markdown/cucumber.irunnableconfiguration.sources.md index 0e9612550..0dd4370bc 100644 --- a/docs/api/markdown/cucumber.irunnableconfiguration.sources.md +++ b/docs/api/markdown/cucumber.irunnableconfiguration.sources.md @@ -4,9 +4,6 @@ ## IRunnableConfiguration.sources property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: ```typescript diff --git a/docs/api/markdown/cucumber.irunnableconfiguration.support.md b/docs/api/markdown/cucumber.irunnableconfiguration.support.md index 6d391b45e..16d1f5777 100644 --- a/docs/api/markdown/cucumber.irunnableconfiguration.support.md +++ b/docs/api/markdown/cucumber.irunnableconfiguration.support.md @@ -4,9 +4,6 @@ ## IRunnableConfiguration.support property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: ```typescript diff --git a/docs/api/markdown/cucumber.irunoptions.formats.md b/docs/api/markdown/cucumber.irunoptions.formats.md index 4ef10f91f..c31e76fb5 100644 --- a/docs/api/markdown/cucumber.irunoptions.formats.md +++ b/docs/api/markdown/cucumber.irunoptions.formats.md @@ -4,9 +4,6 @@ ## IRunOptions.formats property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: ```typescript diff --git a/docs/api/markdown/cucumber.irunoptions.md b/docs/api/markdown/cucumber.irunoptions.md index 7b16de9fd..836b6d3e2 100644 --- a/docs/api/markdown/cucumber.irunoptions.md +++ b/docs/api/markdown/cucumber.irunoptions.md @@ -4,9 +4,6 @@ ## IRunOptions interface -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: @@ -18,8 +15,8 @@ export interface IRunOptions | Property | Type | Description | | --- | --- | --- | -| [formats](./cucumber.irunoptions.formats.md) | [IRunOptionsFormats](./cucumber.irunoptionsformats.md) | (BETA) | -| [runtime](./cucumber.irunoptions.runtime.md) | [IRunOptionsRuntime](./cucumber.irunoptionsruntime.md) | (BETA) | -| [sources](./cucumber.irunoptions.sources.md) | [ISourcesCoordinates](./cucumber.isourcescoordinates.md) | (BETA) | -| [support](./cucumber.irunoptions.support.md) | [ISupportCodeCoordinatesOrLibrary](./cucumber.isupportcodecoordinatesorlibrary.md) | (BETA) | +| [formats](./cucumber.irunoptions.formats.md) | [IRunOptionsFormats](./cucumber.irunoptionsformats.md) | | +| [runtime](./cucumber.irunoptions.runtime.md) | [IRunOptionsRuntime](./cucumber.irunoptionsruntime.md) | | +| [sources](./cucumber.irunoptions.sources.md) | [ISourcesCoordinates](./cucumber.isourcescoordinates.md) | | +| [support](./cucumber.irunoptions.support.md) | [ISupportCodeCoordinatesOrLibrary](./cucumber.isupportcodecoordinatesorlibrary.md) | | diff --git a/docs/api/markdown/cucumber.irunoptions.runtime.md b/docs/api/markdown/cucumber.irunoptions.runtime.md index aefb80f75..ec46ae891 100644 --- a/docs/api/markdown/cucumber.irunoptions.runtime.md +++ b/docs/api/markdown/cucumber.irunoptions.runtime.md @@ -4,9 +4,6 @@ ## IRunOptions.runtime property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: ```typescript diff --git a/docs/api/markdown/cucumber.irunoptions.sources.md b/docs/api/markdown/cucumber.irunoptions.sources.md index d64cbbe0e..2b5fba724 100644 --- a/docs/api/markdown/cucumber.irunoptions.sources.md +++ b/docs/api/markdown/cucumber.irunoptions.sources.md @@ -4,9 +4,6 @@ ## IRunOptions.sources property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: ```typescript diff --git a/docs/api/markdown/cucumber.irunoptions.support.md b/docs/api/markdown/cucumber.irunoptions.support.md index 2b36fec7a..d89dc3652 100644 --- a/docs/api/markdown/cucumber.irunoptions.support.md +++ b/docs/api/markdown/cucumber.irunoptions.support.md @@ -4,9 +4,6 @@ ## IRunOptions.support property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: ```typescript diff --git a/docs/api/markdown/cucumber.irunoptionsformats.files.md b/docs/api/markdown/cucumber.irunoptionsformats.files.md index 6dade2ef4..c9b701526 100644 --- a/docs/api/markdown/cucumber.irunoptionsformats.files.md +++ b/docs/api/markdown/cucumber.irunoptionsformats.files.md @@ -4,9 +4,6 @@ ## IRunOptionsFormats.files property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: ```typescript diff --git a/docs/api/markdown/cucumber.irunoptionsformats.md b/docs/api/markdown/cucumber.irunoptionsformats.md index 38e73d6b5..f2a9c337b 100644 --- a/docs/api/markdown/cucumber.irunoptionsformats.md +++ b/docs/api/markdown/cucumber.irunoptionsformats.md @@ -4,9 +4,6 @@ ## IRunOptionsFormats interface -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: @@ -18,8 +15,8 @@ export interface IRunOptionsFormats | Property | Type | Description | | --- | --- | --- | -| [files](./cucumber.irunoptionsformats.files.md) | Record<string, string> | (BETA) | -| [options](./cucumber.irunoptionsformats.options.md) | FormatOptions | (BETA) | -| [publish](./cucumber.irunoptionsformats.publish.md) | { url?: string; token?: string; } \| false | (BETA) | -| [stdout](./cucumber.irunoptionsformats.stdout.md) | string | (BETA) | +| [files](./cucumber.irunoptionsformats.files.md) | Record<string, string> | | +| [options](./cucumber.irunoptionsformats.options.md) | FormatOptions | | +| [publish](./cucumber.irunoptionsformats.publish.md) | { url?: string; token?: string; } \| false | | +| [stdout](./cucumber.irunoptionsformats.stdout.md) | string | | diff --git a/docs/api/markdown/cucumber.irunoptionsformats.options.md b/docs/api/markdown/cucumber.irunoptionsformats.options.md index 39c717ec8..696353b4d 100644 --- a/docs/api/markdown/cucumber.irunoptionsformats.options.md +++ b/docs/api/markdown/cucumber.irunoptionsformats.options.md @@ -4,9 +4,6 @@ ## IRunOptionsFormats.options property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: ```typescript diff --git a/docs/api/markdown/cucumber.irunoptionsformats.publish.md b/docs/api/markdown/cucumber.irunoptionsformats.publish.md index 5e52e22d1..d416ed77d 100644 --- a/docs/api/markdown/cucumber.irunoptionsformats.publish.md +++ b/docs/api/markdown/cucumber.irunoptionsformats.publish.md @@ -4,9 +4,6 @@ ## IRunOptionsFormats.publish property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: ```typescript diff --git a/docs/api/markdown/cucumber.irunoptionsformats.stdout.md b/docs/api/markdown/cucumber.irunoptionsformats.stdout.md index 6eb72ea60..175c5708e 100644 --- a/docs/api/markdown/cucumber.irunoptionsformats.stdout.md +++ b/docs/api/markdown/cucumber.irunoptionsformats.stdout.md @@ -4,9 +4,6 @@ ## IRunOptionsFormats.stdout property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: ```typescript diff --git a/docs/api/markdown/cucumber.irunoptionsruntime.md b/docs/api/markdown/cucumber.irunoptionsruntime.md index 9f429c08d..7c87ea4df 100644 --- a/docs/api/markdown/cucumber.irunoptionsruntime.md +++ b/docs/api/markdown/cucumber.irunoptionsruntime.md @@ -4,9 +4,6 @@ ## IRunOptionsRuntime interface -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: @@ -19,5 +16,5 @@ export interface IRunOptionsRuntime extends IRuntimeOptions | Property | Type | Description | | --- | --- | --- | -| [parallel](./cucumber.irunoptionsruntime.parallel.md) | number | (BETA) | +| [parallel](./cucumber.irunoptionsruntime.parallel.md) | number | | diff --git a/docs/api/markdown/cucumber.irunoptionsruntime.parallel.md b/docs/api/markdown/cucumber.irunoptionsruntime.parallel.md index 11279bae7..6deaa4ab7 100644 --- a/docs/api/markdown/cucumber.irunoptionsruntime.parallel.md +++ b/docs/api/markdown/cucumber.irunoptionsruntime.parallel.md @@ -4,9 +4,6 @@ ## IRunOptionsRuntime.parallel property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: ```typescript diff --git a/docs/api/markdown/cucumber.irunresult.md b/docs/api/markdown/cucumber.irunresult.md index 1feb09bc4..af36dc92b 100644 --- a/docs/api/markdown/cucumber.irunresult.md +++ b/docs/api/markdown/cucumber.irunresult.md @@ -4,9 +4,6 @@ ## IRunResult interface -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Result of a Cucumber test run. Signature: @@ -19,6 +16,6 @@ export interface IRunResult | Property | Type | Description | | --- | --- | --- | -| [success](./cucumber.irunresult.success.md) | boolean | (BETA) Whether the test run was overall successful i.e. no failed scenarios. The exact meaning can vary based on the strict configuration option. | -| [support](./cucumber.irunresult.support.md) | ISupportCodeLibrary | (BETA) The support code library that was used in the test run; can be reused in subsequent runCucumber calls. | +| [success](./cucumber.irunresult.success.md) | boolean | Whether the test run was overall successful i.e. no failed scenarios. The exact meaning can vary based on the strict configuration option. | +| [support](./cucumber.irunresult.support.md) | ISupportCodeLibrary | The support code library that was used in the test run; can be reused in subsequent runCucumber calls. | diff --git a/docs/api/markdown/cucumber.irunresult.success.md b/docs/api/markdown/cucumber.irunresult.success.md index 64406ce9c..cd22c6c17 100644 --- a/docs/api/markdown/cucumber.irunresult.success.md +++ b/docs/api/markdown/cucumber.irunresult.success.md @@ -4,9 +4,6 @@ ## IRunResult.success property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Whether the test run was overall successful i.e. no failed scenarios. The exact meaning can vary based on the `strict` configuration option. Signature: diff --git a/docs/api/markdown/cucumber.irunresult.support.md b/docs/api/markdown/cucumber.irunresult.support.md index f3fe104cb..df5bb64e1 100644 --- a/docs/api/markdown/cucumber.irunresult.support.md +++ b/docs/api/markdown/cucumber.irunresult.support.md @@ -4,9 +4,6 @@ ## IRunResult.support property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - The support code library that was used in the test run; can be reused in subsequent `runCucumber` calls. Signature: diff --git a/docs/api/markdown/cucumber.isourcescoordinates.defaultdialect.md b/docs/api/markdown/cucumber.isourcescoordinates.defaultdialect.md index 5d1ad9705..8e0e43211 100644 --- a/docs/api/markdown/cucumber.isourcescoordinates.defaultdialect.md +++ b/docs/api/markdown/cucumber.isourcescoordinates.defaultdialect.md @@ -4,9 +4,6 @@ ## ISourcesCoordinates.defaultDialect property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: ```typescript diff --git a/docs/api/markdown/cucumber.isourcescoordinates.md b/docs/api/markdown/cucumber.isourcescoordinates.md index 9e595afaf..d7bfe8005 100644 --- a/docs/api/markdown/cucumber.isourcescoordinates.md +++ b/docs/api/markdown/cucumber.isourcescoordinates.md @@ -4,9 +4,6 @@ ## ISourcesCoordinates interface -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: @@ -18,9 +15,9 @@ export interface ISourcesCoordinates | Property | Type | Description | | --- | --- | --- | -| [defaultDialect](./cucumber.isourcescoordinates.defaultdialect.md) | string | (BETA) | -| [names](./cucumber.isourcescoordinates.names.md) | string\[\] | (BETA) | -| [order](./cucumber.isourcescoordinates.order.md) | PickleOrder | (BETA) | -| [paths](./cucumber.isourcescoordinates.paths.md) | string\[\] | (BETA) | -| [tagExpression](./cucumber.isourcescoordinates.tagexpression.md) | string | (BETA) | +| [defaultDialect](./cucumber.isourcescoordinates.defaultdialect.md) | string | | +| [names](./cucumber.isourcescoordinates.names.md) | string\[\] | | +| [order](./cucumber.isourcescoordinates.order.md) | PickleOrder | | +| [paths](./cucumber.isourcescoordinates.paths.md) | string\[\] | | +| [tagExpression](./cucumber.isourcescoordinates.tagexpression.md) | string | | diff --git a/docs/api/markdown/cucumber.isourcescoordinates.names.md b/docs/api/markdown/cucumber.isourcescoordinates.names.md index fe32013b5..756541844 100644 --- a/docs/api/markdown/cucumber.isourcescoordinates.names.md +++ b/docs/api/markdown/cucumber.isourcescoordinates.names.md @@ -4,9 +4,6 @@ ## ISourcesCoordinates.names property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: ```typescript diff --git a/docs/api/markdown/cucumber.isourcescoordinates.order.md b/docs/api/markdown/cucumber.isourcescoordinates.order.md index 3d1a5535b..2c669710a 100644 --- a/docs/api/markdown/cucumber.isourcescoordinates.order.md +++ b/docs/api/markdown/cucumber.isourcescoordinates.order.md @@ -4,9 +4,6 @@ ## ISourcesCoordinates.order property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: ```typescript diff --git a/docs/api/markdown/cucumber.isourcescoordinates.paths.md b/docs/api/markdown/cucumber.isourcescoordinates.paths.md index 0b2b21594..0a2143a5a 100644 --- a/docs/api/markdown/cucumber.isourcescoordinates.paths.md +++ b/docs/api/markdown/cucumber.isourcescoordinates.paths.md @@ -4,9 +4,6 @@ ## ISourcesCoordinates.paths property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: ```typescript diff --git a/docs/api/markdown/cucumber.isourcescoordinates.tagexpression.md b/docs/api/markdown/cucumber.isourcescoordinates.tagexpression.md index aa7279785..311775818 100644 --- a/docs/api/markdown/cucumber.isourcescoordinates.tagexpression.md +++ b/docs/api/markdown/cucumber.isourcescoordinates.tagexpression.md @@ -4,9 +4,6 @@ ## ISourcesCoordinates.tagExpression property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: ```typescript diff --git a/docs/api/markdown/cucumber.isupportcodecoordinates.importpaths.md b/docs/api/markdown/cucumber.isupportcodecoordinates.importpaths.md index 1a4562308..34e8034de 100644 --- a/docs/api/markdown/cucumber.isupportcodecoordinates.importpaths.md +++ b/docs/api/markdown/cucumber.isupportcodecoordinates.importpaths.md @@ -4,9 +4,6 @@ ## ISupportCodeCoordinates.importPaths property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: ```typescript diff --git a/docs/api/markdown/cucumber.isupportcodecoordinates.md b/docs/api/markdown/cucumber.isupportcodecoordinates.md index d33c6f058..87ab944c5 100644 --- a/docs/api/markdown/cucumber.isupportcodecoordinates.md +++ b/docs/api/markdown/cucumber.isupportcodecoordinates.md @@ -4,9 +4,6 @@ ## ISupportCodeCoordinates interface -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: @@ -18,7 +15,7 @@ export interface ISupportCodeCoordinates | Property | Type | Description | | --- | --- | --- | -| [importPaths](./cucumber.isupportcodecoordinates.importpaths.md) | string\[\] | (BETA) | -| [requireModules](./cucumber.isupportcodecoordinates.requiremodules.md) | string\[\] | (BETA) | -| [requirePaths](./cucumber.isupportcodecoordinates.requirepaths.md) | string\[\] | (BETA) | +| [importPaths](./cucumber.isupportcodecoordinates.importpaths.md) | string\[\] | | +| [requireModules](./cucumber.isupportcodecoordinates.requiremodules.md) | string\[\] | | +| [requirePaths](./cucumber.isupportcodecoordinates.requirepaths.md) | string\[\] | | diff --git a/docs/api/markdown/cucumber.isupportcodecoordinates.requiremodules.md b/docs/api/markdown/cucumber.isupportcodecoordinates.requiremodules.md index 8e0e920d9..f4bac3175 100644 --- a/docs/api/markdown/cucumber.isupportcodecoordinates.requiremodules.md +++ b/docs/api/markdown/cucumber.isupportcodecoordinates.requiremodules.md @@ -4,9 +4,6 @@ ## ISupportCodeCoordinates.requireModules property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: ```typescript diff --git a/docs/api/markdown/cucumber.isupportcodecoordinates.requirepaths.md b/docs/api/markdown/cucumber.isupportcodecoordinates.requirepaths.md index 6ef57e8e5..4ac57b619 100644 --- a/docs/api/markdown/cucumber.isupportcodecoordinates.requirepaths.md +++ b/docs/api/markdown/cucumber.isupportcodecoordinates.requirepaths.md @@ -4,9 +4,6 @@ ## ISupportCodeCoordinates.requirePaths property -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: ```typescript diff --git a/docs/api/markdown/cucumber.isupportcodecoordinatesorlibrary.md b/docs/api/markdown/cucumber.isupportcodecoordinatesorlibrary.md index 801d8b06c..ba6d1c040 100644 --- a/docs/api/markdown/cucumber.isupportcodecoordinatesorlibrary.md +++ b/docs/api/markdown/cucumber.isupportcodecoordinatesorlibrary.md @@ -4,9 +4,6 @@ ## ISupportCodeCoordinatesOrLibrary type -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Signature: diff --git a/docs/api/markdown/cucumber.loadconfiguration.md b/docs/api/markdown/cucumber.loadconfiguration.md index 17919f915..c4f44337b 100644 --- a/docs/api/markdown/cucumber.loadconfiguration.md +++ b/docs/api/markdown/cucumber.loadconfiguration.md @@ -4,9 +4,6 @@ ## loadConfiguration() function -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Load user-authored configuration to be used in a test run. Signature: diff --git a/docs/api/markdown/cucumber.loadsupport.md b/docs/api/markdown/cucumber.loadsupport.md index f09074943..ae59fb046 100644 --- a/docs/api/markdown/cucumber.loadsupport.md +++ b/docs/api/markdown/cucumber.loadsupport.md @@ -4,9 +4,6 @@ ## loadSupport() function -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Load support code for use in test runs. Signature: diff --git a/docs/api/markdown/cucumber.md b/docs/api/markdown/cucumber.md index 0b2ff6998..cd33a6174 100644 --- a/docs/api/markdown/cucumber.md +++ b/docs/api/markdown/cucumber.md @@ -14,29 +14,29 @@ These docs cover the API used for running Cucumber programmatically. The entry p | Function | Description | | --- | --- | -| [loadConfiguration(options, environment)](./cucumber.loadconfiguration.md) | (BETA) Load user-authored configuration to be used in a test run. | -| [loadSupport(options, environment)](./cucumber.loadsupport.md) | (BETA) Load support code for use in test runs. | -| [runCucumber(configuration, environment, onMessage)](./cucumber.runcucumber.md) | (BETA) Execute a Cucumber test run. | +| [loadConfiguration(options, environment)](./cucumber.loadconfiguration.md) | Load user-authored configuration to be used in a test run. | +| [loadSupport(options, environment)](./cucumber.loadsupport.md) | Load support code for use in test runs. | +| [runCucumber(configuration, environment, onMessage)](./cucumber.runcucumber.md) | Execute a Cucumber test run. | ## Interfaces | Interface | Description | | --- | --- | -| [ILoadConfigurationOptions](./cucumber.iloadconfigurationoptions.md) | (BETA) | -| [ILoadSupportOptions](./cucumber.iloadsupportoptions.md) | (BETA) | -| [IResolvedConfiguration](./cucumber.iresolvedconfiguration.md) | (BETA) | -| [IRunEnvironment](./cucumber.irunenvironment.md) | (BETA) Contextual data about the project environment. | -| [IRunnableConfiguration](./cucumber.irunnableconfiguration.md) | (BETA) | -| [IRunOptions](./cucumber.irunoptions.md) | (BETA) | -| [IRunOptionsFormats](./cucumber.irunoptionsformats.md) | (BETA) | -| [IRunOptionsRuntime](./cucumber.irunoptionsruntime.md) | (BETA) | -| [IRunResult](./cucumber.irunresult.md) | (BETA) Result of a Cucumber test run. | -| [ISourcesCoordinates](./cucumber.isourcescoordinates.md) | (BETA) | -| [ISupportCodeCoordinates](./cucumber.isupportcodecoordinates.md) | (BETA) | +| [ILoadConfigurationOptions](./cucumber.iloadconfigurationoptions.md) | | +| [ILoadSupportOptions](./cucumber.iloadsupportoptions.md) | | +| [IResolvedConfiguration](./cucumber.iresolvedconfiguration.md) | | +| [IRunEnvironment](./cucumber.irunenvironment.md) | Contextual data about the project environment. | +| [IRunnableConfiguration](./cucumber.irunnableconfiguration.md) | | +| [IRunOptions](./cucumber.irunoptions.md) | | +| [IRunOptionsFormats](./cucumber.irunoptionsformats.md) | | +| [IRunOptionsRuntime](./cucumber.irunoptionsruntime.md) | | +| [IRunResult](./cucumber.irunresult.md) | Result of a Cucumber test run. | +| [ISourcesCoordinates](./cucumber.isourcescoordinates.md) | | +| [ISupportCodeCoordinates](./cucumber.isupportcodecoordinates.md) | | ## Type Aliases | Type Alias | Description | | --- | --- | -| [ISupportCodeCoordinatesOrLibrary](./cucumber.isupportcodecoordinatesorlibrary.md) | (BETA) | +| [ISupportCodeCoordinatesOrLibrary](./cucumber.isupportcodecoordinatesorlibrary.md) | | diff --git a/docs/api/markdown/cucumber.runcucumber.md b/docs/api/markdown/cucumber.runcucumber.md index 66355051c..b7e40dbb8 100644 --- a/docs/api/markdown/cucumber.runcucumber.md +++ b/docs/api/markdown/cucumber.runcucumber.md @@ -4,9 +4,6 @@ ## runCucumber() function -> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. -> - Execute a Cucumber test run. Signature: diff --git a/docs/api/model/cucumber.api.json b/docs/api/model/cucumber.api.json index 0036de9bd..630ad62f0 100644 --- a/docs/api/model/cucumber.api.json +++ b/docs/api/model/cucumber.api.json @@ -172,14 +172,14 @@ { "kind": "Interface", "canonicalReference": "@cucumber/cucumber!ILoadConfigurationOptions:interface", - "docComment": "/**\n * @beta\n */\n", + "docComment": "/**\n * @public\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export interface ILoadConfigurationOptions " } ], - "releaseTag": "Beta", + "releaseTag": "Public", "name": "ILoadConfigurationOptions", "members": [ { @@ -201,7 +201,7 @@ } ], "isOptional": true, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "file", "propertyTypeTokenRange": { "startIndex": 1, @@ -227,7 +227,7 @@ } ], "isOptional": true, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "profiles", "propertyTypeTokenRange": { "startIndex": 1, @@ -267,7 +267,7 @@ } ], "isOptional": true, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "provided", "propertyTypeTokenRange": { "startIndex": 1, @@ -280,14 +280,14 @@ { "kind": "Interface", "canonicalReference": "@cucumber/cucumber!ILoadSupportOptions:interface", - "docComment": "/**\n * @beta\n */\n", + "docComment": "/**\n * @public\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export interface ILoadSupportOptions " } ], - "releaseTag": "Beta", + "releaseTag": "Public", "name": "ILoadSupportOptions", "members": [ { @@ -310,7 +310,7 @@ } ], "isOptional": false, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "sources", "propertyTypeTokenRange": { "startIndex": 1, @@ -337,7 +337,7 @@ } ], "isOptional": false, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "support", "propertyTypeTokenRange": { "startIndex": 1, @@ -350,14 +350,14 @@ { "kind": "Interface", "canonicalReference": "@cucumber/cucumber!IResolvedConfiguration:interface", - "docComment": "/**\n * @beta\n */\n", + "docComment": "/**\n * @public\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export interface IResolvedConfiguration " } ], - "releaseTag": "Beta", + "releaseTag": "Public", "name": "IResolvedConfiguration", "members": [ { @@ -380,7 +380,7 @@ } ], "isOptional": false, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "original", "propertyTypeTokenRange": { "startIndex": 1, @@ -407,7 +407,7 @@ } ], "isOptional": false, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "runnable", "propertyTypeTokenRange": { "startIndex": 1, @@ -420,14 +420,14 @@ { "kind": "Interface", "canonicalReference": "@cucumber/cucumber!IRunEnvironment:interface", - "docComment": "/**\n * Contextual data about the project environment.\n *\n * @beta\n */\n", + "docComment": "/**\n * Contextual data about the project environment.\n *\n * @public\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export interface IRunEnvironment " } ], - "releaseTag": "Beta", + "releaseTag": "Public", "name": "IRunEnvironment", "members": [ { @@ -449,7 +449,7 @@ } ], "isOptional": true, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "cwd", "propertyTypeTokenRange": { "startIndex": 1, @@ -476,7 +476,7 @@ } ], "isOptional": true, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "env", "propertyTypeTokenRange": { "startIndex": 1, @@ -503,7 +503,7 @@ } ], "isOptional": true, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "stderr", "propertyTypeTokenRange": { "startIndex": 1, @@ -530,7 +530,7 @@ } ], "isOptional": true, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "stdout", "propertyTypeTokenRange": { "startIndex": 1, @@ -543,14 +543,14 @@ { "kind": "Interface", "canonicalReference": "@cucumber/cucumber!IRunnableConfiguration:interface", - "docComment": "/**\n * @beta\n */\n", + "docComment": "/**\n * @public\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export interface IRunnableConfiguration " } ], - "releaseTag": "Beta", + "releaseTag": "Public", "name": "IRunnableConfiguration", "members": [ { @@ -573,7 +573,7 @@ } ], "isOptional": false, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "formats", "propertyTypeTokenRange": { "startIndex": 1, @@ -600,7 +600,7 @@ } ], "isOptional": false, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "runtime", "propertyTypeTokenRange": { "startIndex": 1, @@ -627,7 +627,7 @@ } ], "isOptional": false, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "sources", "propertyTypeTokenRange": { "startIndex": 1, @@ -654,7 +654,7 @@ } ], "isOptional": false, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "support", "propertyTypeTokenRange": { "startIndex": 1, @@ -667,14 +667,14 @@ { "kind": "Interface", "canonicalReference": "@cucumber/cucumber!IRunOptions:interface", - "docComment": "/**\n * @beta\n */\n", + "docComment": "/**\n * @public\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export interface IRunOptions " } ], - "releaseTag": "Beta", + "releaseTag": "Public", "name": "IRunOptions", "members": [ { @@ -697,7 +697,7 @@ } ], "isOptional": false, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "formats", "propertyTypeTokenRange": { "startIndex": 1, @@ -724,7 +724,7 @@ } ], "isOptional": false, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "runtime", "propertyTypeTokenRange": { "startIndex": 1, @@ -751,7 +751,7 @@ } ], "isOptional": false, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "sources", "propertyTypeTokenRange": { "startIndex": 1, @@ -778,7 +778,7 @@ } ], "isOptional": false, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "support", "propertyTypeTokenRange": { "startIndex": 1, @@ -791,14 +791,14 @@ { "kind": "Interface", "canonicalReference": "@cucumber/cucumber!IRunOptionsFormats:interface", - "docComment": "/**\n * @beta\n */\n", + "docComment": "/**\n * @public\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export interface IRunOptionsFormats " } ], - "releaseTag": "Beta", + "releaseTag": "Public", "name": "IRunOptionsFormats", "members": [ { @@ -825,7 +825,7 @@ } ], "isOptional": false, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "files", "propertyTypeTokenRange": { "startIndex": 1, @@ -852,7 +852,7 @@ } ], "isOptional": false, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "options", "propertyTypeTokenRange": { "startIndex": 1, @@ -878,7 +878,7 @@ } ], "isOptional": false, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "publish", "propertyTypeTokenRange": { "startIndex": 1, @@ -904,7 +904,7 @@ } ], "isOptional": false, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "stdout", "propertyTypeTokenRange": { "startIndex": 1, @@ -917,7 +917,7 @@ { "kind": "Interface", "canonicalReference": "@cucumber/cucumber!IRunOptionsRuntime:interface", - "docComment": "/**\n * @beta\n */\n", + "docComment": "/**\n * @public\n */\n", "excerptTokens": [ { "kind": "Content", @@ -933,7 +933,7 @@ "text": " " } ], - "releaseTag": "Beta", + "releaseTag": "Public", "name": "IRunOptionsRuntime", "members": [ { @@ -955,7 +955,7 @@ } ], "isOptional": false, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "parallel", "propertyTypeTokenRange": { "startIndex": 1, @@ -973,14 +973,14 @@ { "kind": "Interface", "canonicalReference": "@cucumber/cucumber!IRunResult:interface", - "docComment": "/**\n * Result of a Cucumber test run.\n *\n * @beta\n */\n", + "docComment": "/**\n * Result of a Cucumber test run.\n *\n * @public\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export interface IRunResult " } ], - "releaseTag": "Beta", + "releaseTag": "Public", "name": "IRunResult", "members": [ { @@ -1002,7 +1002,7 @@ } ], "isOptional": false, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "success", "propertyTypeTokenRange": { "startIndex": 1, @@ -1029,7 +1029,7 @@ } ], "isOptional": false, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "support", "propertyTypeTokenRange": { "startIndex": 1, @@ -1042,14 +1042,14 @@ { "kind": "Interface", "canonicalReference": "@cucumber/cucumber!ISourcesCoordinates:interface", - "docComment": "/**\n * @beta\n */\n", + "docComment": "/**\n * @public\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export interface ISourcesCoordinates " } ], - "releaseTag": "Beta", + "releaseTag": "Public", "name": "ISourcesCoordinates", "members": [ { @@ -1071,7 +1071,7 @@ } ], "isOptional": false, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "defaultDialect", "propertyTypeTokenRange": { "startIndex": 1, @@ -1097,7 +1097,7 @@ } ], "isOptional": false, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "names", "propertyTypeTokenRange": { "startIndex": 1, @@ -1124,7 +1124,7 @@ } ], "isOptional": false, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "order", "propertyTypeTokenRange": { "startIndex": 1, @@ -1150,7 +1150,7 @@ } ], "isOptional": false, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "paths", "propertyTypeTokenRange": { "startIndex": 1, @@ -1176,7 +1176,7 @@ } ], "isOptional": false, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "tagExpression", "propertyTypeTokenRange": { "startIndex": 1, @@ -1189,14 +1189,14 @@ { "kind": "Interface", "canonicalReference": "@cucumber/cucumber!ISupportCodeCoordinates:interface", - "docComment": "/**\n * @beta\n */\n", + "docComment": "/**\n * @public\n */\n", "excerptTokens": [ { "kind": "Content", "text": "export interface ISupportCodeCoordinates " } ], - "releaseTag": "Beta", + "releaseTag": "Public", "name": "ISupportCodeCoordinates", "members": [ { @@ -1218,7 +1218,7 @@ } ], "isOptional": false, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "importPaths", "propertyTypeTokenRange": { "startIndex": 1, @@ -1244,7 +1244,7 @@ } ], "isOptional": false, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "requireModules", "propertyTypeTokenRange": { "startIndex": 1, @@ -1270,7 +1270,7 @@ } ], "isOptional": false, - "releaseTag": "Beta", + "releaseTag": "Public", "name": "requirePaths", "propertyTypeTokenRange": { "startIndex": 1, @@ -1283,7 +1283,7 @@ { "kind": "TypeAlias", "canonicalReference": "@cucumber/cucumber!ISupportCodeCoordinatesOrLibrary:type", - "docComment": "/**\n * @beta\n */\n", + "docComment": "/**\n * @public\n */\n", "excerptTokens": [ { "kind": "Content", @@ -1308,7 +1308,7 @@ "text": ";" } ], - "releaseTag": "Beta", + "releaseTag": "Public", "name": "ISupportCodeCoordinatesOrLibrary", "typeTokenRange": { "startIndex": 1, @@ -1318,7 +1318,7 @@ { "kind": "Function", "canonicalReference": "@cucumber/cucumber!loadConfiguration:function(1)", - "docComment": "/**\n * Load user-authored configuration to be used in a test run.\n *\n * @param options - Coordinates required to find configuration.\n *\n * @param environment - Project environment.\n *\n * @beta\n */\n", + "docComment": "/**\n * Load user-authored configuration to be used in a test run.\n *\n * @param options - Coordinates required to find configuration.\n *\n * @param environment - Project environment.\n *\n * @public\n */\n", "excerptTokens": [ { "kind": "Content", @@ -1369,7 +1369,7 @@ "startIndex": 5, "endIndex": 9 }, - "releaseTag": "Beta", + "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { @@ -1392,7 +1392,7 @@ { "kind": "Function", "canonicalReference": "@cucumber/cucumber!loadSupport:function(1)", - "docComment": "/**\n * Load support code for use in test runs.\n *\n * @param options - Subset of `IRunnableConfiguration` required to find the support code.\n *\n * @param environment - Project environment.\n *\n * @beta\n */\n", + "docComment": "/**\n * Load support code for use in test runs.\n *\n * @param options - Subset of `IRunnableConfiguration` required to find the support code.\n *\n * @param environment - Project environment.\n *\n * @public\n */\n", "excerptTokens": [ { "kind": "Content", @@ -1443,7 +1443,7 @@ "startIndex": 5, "endIndex": 9 }, - "releaseTag": "Beta", + "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { @@ -1466,7 +1466,7 @@ { "kind": "Function", "canonicalReference": "@cucumber/cucumber!runCucumber:function(1)", - "docComment": "/**\n * Execute a Cucumber test run.\n *\n * @param configuration - Configuration loaded from `loadConfiguration`.\n *\n * @param environment - Project environment.\n *\n * @param onMessage - Callback fired each time Cucumber emits a message.\n *\n * @beta\n */\n", + "docComment": "/**\n * Execute a Cucumber test run.\n *\n * @param configuration - Configuration loaded from `loadConfiguration`.\n *\n * @param environment - Project environment.\n *\n * @param onMessage - Callback fired each time Cucumber emits a message.\n *\n * @public\n */\n", "excerptTokens": [ { "kind": "Content", @@ -1534,7 +1534,7 @@ "startIndex": 9, "endIndex": 13 }, - "releaseTag": "Beta", + "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { diff --git a/src/api/load_configuration.ts b/src/api/load_configuration.ts index a7cd4bb15..f03c06883 100644 --- a/src/api/load_configuration.ts +++ b/src/api/load_configuration.ts @@ -16,7 +16,7 @@ import { mergeEnvironment } from './environment' /** * Load user-authored configuration to be used in a test run. * - * @beta + * @public * @param options - Coordinates required to find configuration. * @param environment - Project environment. */ diff --git a/src/api/load_support.ts b/src/api/load_support.ts index 2049add72..752abf516 100644 --- a/src/api/load_support.ts +++ b/src/api/load_support.ts @@ -8,7 +8,7 @@ import { ISupportCodeLibrary } from '../support_code_library_builder/types' /** * Load support code for use in test runs. * - * @beta + * @public * @param options - Subset of `IRunnableConfiguration` required to find the support code. * @param environment - Project environment. */ diff --git a/src/api/run_cucumber.ts b/src/api/run_cucumber.ts index 469811265..afbfc0294 100644 --- a/src/api/run_cucumber.ts +++ b/src/api/run_cucumber.ts @@ -21,7 +21,7 @@ import { mergeEnvironment } from './environment' /** * Execute a Cucumber test run. * - * @beta + * @public * @param configuration - Configuration loaded from `loadConfiguration`. * @param environment - Project environment. * @param onMessage - Callback fired each time Cucumber emits a message. diff --git a/src/api/types.ts b/src/api/types.ts index 6815ac978..b105d7682 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -5,7 +5,7 @@ import { IRuntimeOptions } from '../runtime' import { IConfiguration } from '../configuration' /** - * @beta + * @public */ export interface ILoadConfigurationOptions { /** @@ -23,7 +23,7 @@ export interface ILoadConfigurationOptions { } /** - * @beta + * @public */ export interface IResolvedConfiguration { /** @@ -37,7 +37,7 @@ export interface IResolvedConfiguration { } /** - * @beta + * @public */ export interface ISourcesCoordinates { defaultDialect: string @@ -48,7 +48,7 @@ export interface ISourcesCoordinates { } /** - * @beta + * @public */ export interface ISupportCodeCoordinates { requireModules: string[] @@ -57,7 +57,7 @@ export interface ISupportCodeCoordinates { } /** - * @beta + * @public */ export interface ILoadSupportOptions { sources: ISourcesCoordinates @@ -65,14 +65,14 @@ export interface ILoadSupportOptions { } /** - * @beta + * @public */ export interface IRunOptionsRuntime extends IRuntimeOptions { parallel: number } /** - * @beta + * @public */ export interface IRunOptionsFormats { stdout: string @@ -87,7 +87,7 @@ export interface IRunOptionsFormats { } /** - * @beta + * @public */ export interface IRunnableConfiguration { sources: ISourcesCoordinates @@ -97,14 +97,14 @@ export interface IRunnableConfiguration { } /** - * @beta + * @public */ export type ISupportCodeCoordinatesOrLibrary = | ISupportCodeCoordinates | ISupportCodeLibrary /** - * @beta + * @public */ export interface IRunOptions { sources: ISourcesCoordinates @@ -116,7 +116,7 @@ export interface IRunOptions { /** * Contextual data about the project environment. * - * @beta + * @public */ export interface IRunEnvironment { /** @@ -140,7 +140,7 @@ export interface IRunEnvironment { /** * Result of a Cucumber test run. * - * @beta + * @public */ export interface IRunResult { /** From 1b4e26fed26db838669ebb03c0a3a728b5d69e70 Mon Sep 17 00:00:00 2001 From: David Goss Date: Wed, 16 Mar 2022 13:15:46 +0000 Subject: [PATCH 16/24] rework tooling, add guidance to CONTRIBUTING.md --- CONTRIBUTING.md | 10 +- api-extractor.json | 6 +- docs/api/cucumber.api.md | 144 +++ docs/api/model/cucumber.api.json | 1567 ------------------------------ package.json | 4 +- 5 files changed, 159 insertions(+), 1572 deletions(-) create mode 100644 docs/api/cucumber.api.md delete mode 100644 docs/api/model/cucumber.api.json diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f96eeac9a..f46d1d95e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -41,6 +41,10 @@ Type `npm run` or see the `package.json` scripts section for how to run each cat * feature tests - `npm run feature-test` * cucumber-js tests itself +## API Documentation + +The functionality exposed under the `@cucumber/cucumber/api` entry point is analysed and has documentation generated by [API Extractor](https://api-extractor.com/). If you make a change that affects the public API surface, you'll need to run `npm run docs:local` to run the analysis and regenerate the docs, and commit the changes. If you forget to do this locally, the CI build will fail and remind you. + ## Internals ### Project Structure @@ -48,7 +52,11 @@ Type `npm run` or see the `package.json` scripts section for how to run each cat ``` └── src │ - ├── cli # argv parsing, reading files + ├── api # main runCucumber function etc + │ + ├── cli # executing from argv + │ + ├── configuration # loading, merging, validating configuration │ ├── formatter # displaying the results │ diff --git a/api-extractor.json b/api-extractor.json index 052afacf8..c8491b220 100644 --- a/api-extractor.json +++ b/api-extractor.json @@ -4,11 +4,13 @@ "compiler": { }, "apiReport": { - "enabled": false + "enabled": true, + "reportFolder": "/docs/api/", + "reportTempFolder": "/tmp/api-extractor/" }, "docModel": { "enabled": true, - "apiJsonFilePath": "/docs/api/model/cucumber.api.json" + "apiJsonFilePath": "/tmp/api-extractor/.api.json" }, "dtsRollup": { "enabled": false diff --git a/docs/api/cucumber.api.md b/docs/api/cucumber.api.md new file mode 100644 index 000000000..f75048681 --- /dev/null +++ b/docs/api/cucumber.api.md @@ -0,0 +1,144 @@ +## API Report File for "@cucumber/cucumber" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +/// + +import { Envelope } from '@cucumber/messages'; +import { Expression } from '@cucumber/cucumber-expressions'; +import http from 'http'; +import * as messages from '@cucumber/messages'; +import { ParameterTypeRegistry } from '@cucumber/cucumber-expressions'; +import { PassThrough } from 'stream'; +import { Transform } from 'stream'; +import { WriteStream } from 'fs'; +import { WriteStream as WriteStream_2 } from 'tty'; + +// @public (undocumented) +export interface ILoadConfigurationOptions { + file?: string; + profiles?: string[]; + // Warning: (ae-forgotten-export) The symbol "IConfiguration" needs to be exported by the entry point index.d.ts + provided?: Partial; +} + +// @public (undocumented) +export interface ILoadSupportOptions { + // (undocumented) + sources: ISourcesCoordinates; + // (undocumented) + support: ISupportCodeCoordinates; +} + +// @public (undocumented) +export interface IResolvedConfiguration { + original: IConfiguration; + runnable: IRunnableConfiguration; +} + +// @public +export interface IRunEnvironment { + cwd?: string; + env?: NodeJS.ProcessEnv; + stderr?: IFormatterStream; + // Warning: (ae-forgotten-export) The symbol "IFormatterStream" needs to be exported by the entry point index.d.ts + stdout?: IFormatterStream; +} + +// @public (undocumented) +export interface IRunnableConfiguration { + // (undocumented) + formats: IRunOptionsFormats; + // (undocumented) + runtime: IRunOptionsRuntime; + // (undocumented) + sources: ISourcesCoordinates; + // (undocumented) + support: ISupportCodeCoordinates; +} + +// @public (undocumented) +export interface IRunOptions { + // (undocumented) + formats: IRunOptionsFormats; + // (undocumented) + runtime: IRunOptionsRuntime; + // (undocumented) + sources: ISourcesCoordinates; + // (undocumented) + support: ISupportCodeCoordinatesOrLibrary; +} + +// @public (undocumented) +export interface IRunOptionsFormats { + // (undocumented) + files: Record; + // Warning: (ae-forgotten-export) The symbol "FormatOptions" needs to be exported by the entry point index.d.ts + // + // (undocumented) + options: FormatOptions; + // (undocumented) + publish: { + url?: string; + token?: string; + } | false; + // (undocumented) + stdout: string; +} + +// Warning: (ae-forgotten-export) The symbol "IRuntimeOptions" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +export interface IRunOptionsRuntime extends IRuntimeOptions { + // (undocumented) + parallel: number; +} + +// @public +export interface IRunResult { + success: boolean; + // Warning: (ae-forgotten-export) The symbol "ISupportCodeLibrary" needs to be exported by the entry point index.d.ts + support: ISupportCodeLibrary; +} + +// @public (undocumented) +export interface ISourcesCoordinates { + // (undocumented) + defaultDialect: string; + // (undocumented) + names: string[]; + // Warning: (ae-forgotten-export) The symbol "PickleOrder" needs to be exported by the entry point index.d.ts + // + // (undocumented) + order: PickleOrder; + // (undocumented) + paths: string[]; + // (undocumented) + tagExpression: string; +} + +// @public (undocumented) +export interface ISupportCodeCoordinates { + // (undocumented) + importPaths: string[]; + // (undocumented) + requireModules: string[]; + // (undocumented) + requirePaths: string[]; +} + +// @public (undocumented) +export type ISupportCodeCoordinatesOrLibrary = ISupportCodeCoordinates | ISupportCodeLibrary; + +// @public +export function loadConfiguration(options: ILoadConfigurationOptions, environment: IRunEnvironment): Promise; + +// @public +export function loadSupport(options: ILoadSupportOptions, environment: IRunEnvironment): Promise; + +// @public +export function runCucumber(configuration: IRunOptions, environment: IRunEnvironment, onMessage?: (message: Envelope) => void): Promise; + +``` diff --git a/docs/api/model/cucumber.api.json b/docs/api/model/cucumber.api.json deleted file mode 100644 index 630ad62f0..000000000 --- a/docs/api/model/cucumber.api.json +++ /dev/null @@ -1,1567 +0,0 @@ -{ - "metadata": { - "toolPackage": "@microsoft/api-extractor", - "toolVersion": "7.19.4", - "schemaVersion": 1004, - "oldestForwardsCompatibleVersion": 1001, - "tsdocConfig": { - "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", - "noStandardTags": true, - "tagDefinitions": [ - { - "tagName": "@alpha", - "syntaxKind": "modifier" - }, - { - "tagName": "@beta", - "syntaxKind": "modifier" - }, - { - "tagName": "@defaultValue", - "syntaxKind": "block" - }, - { - "tagName": "@decorator", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@deprecated", - "syntaxKind": "block" - }, - { - "tagName": "@eventProperty", - "syntaxKind": "modifier" - }, - { - "tagName": "@example", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@experimental", - "syntaxKind": "modifier" - }, - { - "tagName": "@inheritDoc", - "syntaxKind": "inline" - }, - { - "tagName": "@internal", - "syntaxKind": "modifier" - }, - { - "tagName": "@label", - "syntaxKind": "inline" - }, - { - "tagName": "@link", - "syntaxKind": "inline", - "allowMultiple": true - }, - { - "tagName": "@override", - "syntaxKind": "modifier" - }, - { - "tagName": "@packageDocumentation", - "syntaxKind": "modifier" - }, - { - "tagName": "@param", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@privateRemarks", - "syntaxKind": "block" - }, - { - "tagName": "@public", - "syntaxKind": "modifier" - }, - { - "tagName": "@readonly", - "syntaxKind": "modifier" - }, - { - "tagName": "@remarks", - "syntaxKind": "block" - }, - { - "tagName": "@returns", - "syntaxKind": "block" - }, - { - "tagName": "@sealed", - "syntaxKind": "modifier" - }, - { - "tagName": "@see", - "syntaxKind": "block" - }, - { - "tagName": "@throws", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@typeParam", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@virtual", - "syntaxKind": "modifier" - }, - { - "tagName": "@betaDocumentation", - "syntaxKind": "modifier" - }, - { - "tagName": "@internalRemarks", - "syntaxKind": "block" - }, - { - "tagName": "@preapproved", - "syntaxKind": "modifier" - } - ], - "supportForTags": { - "@alpha": true, - "@beta": true, - "@defaultValue": true, - "@decorator": true, - "@deprecated": true, - "@eventProperty": true, - "@example": true, - "@experimental": true, - "@inheritDoc": true, - "@internal": true, - "@label": true, - "@link": true, - "@override": true, - "@packageDocumentation": true, - "@param": true, - "@privateRemarks": true, - "@public": true, - "@readonly": true, - "@remarks": true, - "@returns": true, - "@sealed": true, - "@see": true, - "@throws": true, - "@typeParam": true, - "@virtual": true, - "@betaDocumentation": true, - "@internalRemarks": true, - "@preapproved": true - } - } - }, - "kind": "Package", - "canonicalReference": "@cucumber/cucumber!", - "docComment": "/**\n * Cucumber for JavaScript\n *\n * @remarks\n *\n * These docs cover the API used for running Cucumber programmatically. The entry point is `@cucumber/cucumber/api`.\n *\n * @packageDocumentation\n */\n", - "name": "@cucumber/cucumber", - "members": [ - { - "kind": "EntryPoint", - "canonicalReference": "@cucumber/cucumber!", - "name": "", - "members": [ - { - "kind": "Interface", - "canonicalReference": "@cucumber/cucumber!ILoadConfigurationOptions:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface ILoadConfigurationOptions " - } - ], - "releaseTag": "Public", - "name": "ILoadConfigurationOptions", - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!ILoadConfigurationOptions#file:member", - "docComment": "/**\n * Path to load configuration file from (defaults to `cucumber.(js|cjs|mjs|json)` if omitted).\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "file?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "file", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!ILoadConfigurationOptions#profiles:member", - "docComment": "/**\n * Zero or more profile names from which to source configuration (if omitted or empty, the `default` profile will be used).\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "profiles?: " - }, - { - "kind": "Content", - "text": "string[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "profiles", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!ILoadConfigurationOptions#provided:member", - "docComment": "/**\n * Ad-hoc configuration options to be applied over the top of whatever is loaded from the configuration file/profiles.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "provided?: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "IConfiguration", - "canonicalReference": "@cucumber/cucumber!IConfiguration:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "provided", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@cucumber/cucumber!ILoadSupportOptions:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface ILoadSupportOptions " - } - ], - "releaseTag": "Public", - "name": "ILoadSupportOptions", - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!ILoadSupportOptions#sources:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "sources: " - }, - { - "kind": "Reference", - "text": "ISourcesCoordinates", - "canonicalReference": "@cucumber/cucumber!ISourcesCoordinates:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "sources", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!ILoadSupportOptions#support:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "support: " - }, - { - "kind": "Reference", - "text": "ISupportCodeCoordinates", - "canonicalReference": "@cucumber/cucumber!ISupportCodeCoordinates:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "support", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@cucumber/cucumber!IResolvedConfiguration:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface IResolvedConfiguration " - } - ], - "releaseTag": "Public", - "name": "IResolvedConfiguration", - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!IResolvedConfiguration#original:member", - "docComment": "/**\n * The final flat configuration object resolved from the configuration file/profiles plus any extra provided.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "original: " - }, - { - "kind": "Reference", - "text": "IConfiguration", - "canonicalReference": "@cucumber/cucumber!IConfiguration:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "original", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!IResolvedConfiguration#runnable:member", - "docComment": "/**\n * The format that can be passed into `runCucumber`.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "runnable: " - }, - { - "kind": "Reference", - "text": "IRunnableConfiguration", - "canonicalReference": "@cucumber/cucumber!IRunnableConfiguration:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "runnable", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@cucumber/cucumber!IRunEnvironment:interface", - "docComment": "/**\n * Contextual data about the project environment.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface IRunEnvironment " - } - ], - "releaseTag": "Public", - "name": "IRunEnvironment", - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!IRunEnvironment#cwd:member", - "docComment": "/**\n * Working directory for the project (defaults to `process.cwd()` if omitted).\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "cwd?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "cwd", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!IRunEnvironment#env:member", - "docComment": "/**\n * Environment variables (defaults to `process.env` if omitted).\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "env?: " - }, - { - "kind": "Reference", - "text": "NodeJS.ProcessEnv", - "canonicalReference": "!__global.NodeJS.ProcessEnv:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "env", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!IRunEnvironment#stderr:member", - "docComment": "/**\n * Writable stream where the test run's warning/error output is written (defaults to `process.stderr` if omitted).\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "stderr?: " - }, - { - "kind": "Reference", - "text": "IFormatterStream", - "canonicalReference": "@cucumber/cucumber!IFormatterStream:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "stderr", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!IRunEnvironment#stdout:member", - "docComment": "/**\n * Writable stream where the test run's main output is written (defaults to `process.stdout` if omitted).\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "stdout?: " - }, - { - "kind": "Reference", - "text": "IFormatterStream", - "canonicalReference": "@cucumber/cucumber!IFormatterStream:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "stdout", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@cucumber/cucumber!IRunnableConfiguration:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface IRunnableConfiguration " - } - ], - "releaseTag": "Public", - "name": "IRunnableConfiguration", - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!IRunnableConfiguration#formats:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "formats: " - }, - { - "kind": "Reference", - "text": "IRunOptionsFormats", - "canonicalReference": "@cucumber/cucumber!IRunOptionsFormats:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "formats", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!IRunnableConfiguration#runtime:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "runtime: " - }, - { - "kind": "Reference", - "text": "IRunOptionsRuntime", - "canonicalReference": "@cucumber/cucumber!IRunOptionsRuntime:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "runtime", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!IRunnableConfiguration#sources:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "sources: " - }, - { - "kind": "Reference", - "text": "ISourcesCoordinates", - "canonicalReference": "@cucumber/cucumber!ISourcesCoordinates:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "sources", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!IRunnableConfiguration#support:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "support: " - }, - { - "kind": "Reference", - "text": "ISupportCodeCoordinates", - "canonicalReference": "@cucumber/cucumber!ISupportCodeCoordinates:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "support", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@cucumber/cucumber!IRunOptions:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface IRunOptions " - } - ], - "releaseTag": "Public", - "name": "IRunOptions", - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!IRunOptions#formats:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "formats: " - }, - { - "kind": "Reference", - "text": "IRunOptionsFormats", - "canonicalReference": "@cucumber/cucumber!IRunOptionsFormats:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "formats", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!IRunOptions#runtime:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "runtime: " - }, - { - "kind": "Reference", - "text": "IRunOptionsRuntime", - "canonicalReference": "@cucumber/cucumber!IRunOptionsRuntime:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "runtime", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!IRunOptions#sources:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "sources: " - }, - { - "kind": "Reference", - "text": "ISourcesCoordinates", - "canonicalReference": "@cucumber/cucumber!ISourcesCoordinates:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "sources", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!IRunOptions#support:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "support: " - }, - { - "kind": "Reference", - "text": "ISupportCodeCoordinatesOrLibrary", - "canonicalReference": "@cucumber/cucumber!ISupportCodeCoordinatesOrLibrary:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "support", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@cucumber/cucumber!IRunOptionsFormats:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface IRunOptionsFormats " - } - ], - "releaseTag": "Public", - "name": "IRunOptionsFormats", - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!IRunOptionsFormats#files:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "files: " - }, - { - "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "files", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!IRunOptionsFormats#options:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "options: " - }, - { - "kind": "Reference", - "text": "FormatOptions", - "canonicalReference": "@cucumber/cucumber!FormatOptions:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "options", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!IRunOptionsFormats#publish:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "publish: " - }, - { - "kind": "Content", - "text": "{\n url?: string;\n token?: string;\n } | false" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "publish", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!IRunOptionsFormats#stdout:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "stdout: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "stdout", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@cucumber/cucumber!IRunOptionsRuntime:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface IRunOptionsRuntime extends " - }, - { - "kind": "Reference", - "text": "IRuntimeOptions", - "canonicalReference": "@cucumber/cucumber!IRuntimeOptions:interface" - }, - { - "kind": "Content", - "text": " " - } - ], - "releaseTag": "Public", - "name": "IRunOptionsRuntime", - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!IRunOptionsRuntime#parallel:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "parallel: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "parallel", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [ - { - "startIndex": 1, - "endIndex": 3 - } - ] - }, - { - "kind": "Interface", - "canonicalReference": "@cucumber/cucumber!IRunResult:interface", - "docComment": "/**\n * Result of a Cucumber test run.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface IRunResult " - } - ], - "releaseTag": "Public", - "name": "IRunResult", - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!IRunResult#success:member", - "docComment": "/**\n * Whether the test run was overall successful i.e. no failed scenarios. The exact meaning can vary based on the `strict` configuration option.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "success: " - }, - { - "kind": "Content", - "text": "boolean" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "success", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!IRunResult#support:member", - "docComment": "/**\n * The support code library that was used in the test run; can be reused in subsequent `runCucumber` calls.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "support: " - }, - { - "kind": "Reference", - "text": "ISupportCodeLibrary", - "canonicalReference": "@cucumber/cucumber!ISupportCodeLibrary:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "support", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@cucumber/cucumber!ISourcesCoordinates:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface ISourcesCoordinates " - } - ], - "releaseTag": "Public", - "name": "ISourcesCoordinates", - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!ISourcesCoordinates#defaultDialect:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "defaultDialect: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "defaultDialect", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!ISourcesCoordinates#names:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "names: " - }, - { - "kind": "Content", - "text": "string[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "names", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!ISourcesCoordinates#order:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "order: " - }, - { - "kind": "Reference", - "text": "PickleOrder", - "canonicalReference": "@cucumber/cucumber!PickleOrder:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "order", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!ISourcesCoordinates#paths:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "paths: " - }, - { - "kind": "Content", - "text": "string[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "paths", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!ISourcesCoordinates#tagExpression:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "tagExpression: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "tagExpression", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Interface", - "canonicalReference": "@cucumber/cucumber!ISupportCodeCoordinates:interface", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface ISupportCodeCoordinates " - } - ], - "releaseTag": "Public", - "name": "ISupportCodeCoordinates", - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!ISupportCodeCoordinates#importPaths:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "importPaths: " - }, - { - "kind": "Content", - "text": "string[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "importPaths", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!ISupportCodeCoordinates#requireModules:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "requireModules: " - }, - { - "kind": "Content", - "text": "string[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "requireModules", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "PropertySignature", - "canonicalReference": "@cucumber/cucumber!ISupportCodeCoordinates#requirePaths:member", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "requirePaths: " - }, - { - "kind": "Content", - "text": "string[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "requirePaths", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "@cucumber/cucumber!ISupportCodeCoordinatesOrLibrary:type", - "docComment": "/**\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type ISupportCodeCoordinatesOrLibrary = " - }, - { - "kind": "Reference", - "text": "ISupportCodeCoordinates", - "canonicalReference": "@cucumber/cucumber!ISupportCodeCoordinates:interface" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "ISupportCodeLibrary", - "canonicalReference": "@cucumber/cucumber!ISupportCodeLibrary:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "releaseTag": "Public", - "name": "ISupportCodeCoordinatesOrLibrary", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Function", - "canonicalReference": "@cucumber/cucumber!loadConfiguration:function(1)", - "docComment": "/**\n * Load user-authored configuration to be used in a test run.\n *\n * @param options - Coordinates required to find configuration.\n *\n * @param environment - Project environment.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function loadConfiguration(options: " - }, - { - "kind": "Reference", - "text": "ILoadConfigurationOptions", - "canonicalReference": "@cucumber/cucumber!ILoadConfigurationOptions:interface" - }, - { - "kind": "Content", - "text": ", environment: " - }, - { - "kind": "Reference", - "text": "IRunEnvironment", - "canonicalReference": "@cucumber/cucumber!IRunEnvironment:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "IResolvedConfiguration", - "canonicalReference": "@cucumber/cucumber!IResolvedConfiguration:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 9 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "parameterName": "environment", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - } - ], - "name": "loadConfiguration" - }, - { - "kind": "Function", - "canonicalReference": "@cucumber/cucumber!loadSupport:function(1)", - "docComment": "/**\n * Load support code for use in test runs.\n *\n * @param options - Subset of `IRunnableConfiguration` required to find the support code.\n *\n * @param environment - Project environment.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function loadSupport(options: " - }, - { - "kind": "Reference", - "text": "ILoadSupportOptions", - "canonicalReference": "@cucumber/cucumber!ILoadSupportOptions:interface" - }, - { - "kind": "Content", - "text": ", environment: " - }, - { - "kind": "Reference", - "text": "IRunEnvironment", - "canonicalReference": "@cucumber/cucumber!IRunEnvironment:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "ISupportCodeLibrary", - "canonicalReference": "@cucumber/cucumber!ISupportCodeLibrary:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 9 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "options", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "parameterName": "environment", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - } - ], - "name": "loadSupport" - }, - { - "kind": "Function", - "canonicalReference": "@cucumber/cucumber!runCucumber:function(1)", - "docComment": "/**\n * Execute a Cucumber test run.\n *\n * @param configuration - Configuration loaded from `loadConfiguration`.\n *\n * @param environment - Project environment.\n *\n * @param onMessage - Callback fired each time Cucumber emits a message.\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function runCucumber(configuration: " - }, - { - "kind": "Reference", - "text": "IRunOptions", - "canonicalReference": "@cucumber/cucumber!IRunOptions:interface" - }, - { - "kind": "Content", - "text": ", environment: " - }, - { - "kind": "Reference", - "text": "IRunEnvironment", - "canonicalReference": "@cucumber/cucumber!IRunEnvironment:interface" - }, - { - "kind": "Content", - "text": ", onMessage?: " - }, - { - "kind": "Content", - "text": "(message: " - }, - { - "kind": "Reference", - "text": "Envelope", - "canonicalReference": "@cucumber/messages!Envelope:class" - }, - { - "kind": "Content", - "text": ") => void" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "IRunResult", - "canonicalReference": "@cucumber/cucumber!IRunResult:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "returnTypeTokenRange": { - "startIndex": 9, - "endIndex": 13 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "configuration", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "parameterName": "environment", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - }, - { - "parameterName": "onMessage", - "parameterTypeTokenRange": { - "startIndex": 5, - "endIndex": 8 - } - } - ], - "name": "runCucumber" - } - ] - } - ] -} diff --git a/package.json b/package.json index 7f173bbb9..4e1616ff2 100644 --- a/package.json +++ b/package.json @@ -284,7 +284,7 @@ "build-local": "genversion --es6 src/version.ts && tsc --build tsconfig.node.json && shx cp src/importer.js lib/ && shx cp src/wrapper.mjs lib/ && shx cp src/api/wrapper.mjs lib/api/", "cck-test": "mocha 'compatibility/**/*_spec.ts'", "docs:ci": "api-extractor run --verbose", - "docs:local": "api-extractor run --verbose --local && api-documenter markdown --input-folder ./docs/api/model --output-folder ./docs/api/markdown", + "docs:local": "api-extractor run --verbose --local && api-documenter markdown --input-folder ./tmp/api-extractor --output-folder ./docs/api/markdown", "feature-test": "node ./bin/cucumber-js", "lint-autofix": "eslint --fix \"{compatibility,example,features,scripts,src,test}/**/*.ts\"", "lint-code": "eslint \"{compatibility,example,features,scripts,src,test}/**/*.ts\"", @@ -298,7 +298,7 @@ "pretest-coverage": "npm run build-local", "pretypes-test": "npm run build-local", "test-coverage": "nyc --silent mocha 'src/**/*_spec.ts' 'compatibility/**/*_spec.ts' && nyc --silent --no-clean node ./bin/cucumber-js && nyc report --reporter=lcov", - "test": "npm run lint && npm run types-test && npm run unit-test && npm run cck-test && npm run feature-test", + "test": "npm run lint && npm run docs:ci && npm run types-test && npm run unit-test && npm run cck-test && npm run feature-test", "types-test": "tsd", "unit-test": "mocha 'src/**/*_spec.ts'", "update-dependencies": "npx npm-check-updates --upgrade" From 316ea0e7d22b47c843018fd059fa67daf252061e Mon Sep 17 00:00:00 2001 From: David Goss Date: Wed, 16 Mar 2022 14:53:04 +0000 Subject: [PATCH 17/24] write some docs, make some stuff optional where possible --- docs/api/cucumber.api.md | 6 +-- .../markdown/cucumber.loadconfiguration.md | 2 +- docs/api/markdown/cucumber.loadsupport.md | 2 +- docs/api/markdown/cucumber.runcucumber.md | 2 +- docs/javascript_api.md | 37 +++++++++++++++++++ src/api/load_configuration.ts | 4 +- src/api/load_support.ts | 2 +- src/api/run_cucumber.ts | 2 +- 8 files changed, 47 insertions(+), 10 deletions(-) create mode 100644 docs/javascript_api.md diff --git a/docs/api/cucumber.api.md b/docs/api/cucumber.api.md index f75048681..3eba09415 100644 --- a/docs/api/cucumber.api.md +++ b/docs/api/cucumber.api.md @@ -133,12 +133,12 @@ export interface ISupportCodeCoordinates { export type ISupportCodeCoordinatesOrLibrary = ISupportCodeCoordinates | ISupportCodeLibrary; // @public -export function loadConfiguration(options: ILoadConfigurationOptions, environment: IRunEnvironment): Promise; +export function loadConfiguration(options?: ILoadConfigurationOptions, environment?: IRunEnvironment): Promise; // @public -export function loadSupport(options: ILoadSupportOptions, environment: IRunEnvironment): Promise; +export function loadSupport(options: ILoadSupportOptions, environment?: IRunEnvironment): Promise; // @public -export function runCucumber(configuration: IRunOptions, environment: IRunEnvironment, onMessage?: (message: Envelope) => void): Promise; +export function runCucumber(configuration: IRunOptions, environment?: IRunEnvironment, onMessage?: (message: Envelope) => void): Promise; ``` diff --git a/docs/api/markdown/cucumber.loadconfiguration.md b/docs/api/markdown/cucumber.loadconfiguration.md index c4f44337b..eaaeec41c 100644 --- a/docs/api/markdown/cucumber.loadconfiguration.md +++ b/docs/api/markdown/cucumber.loadconfiguration.md @@ -9,7 +9,7 @@ Load user-authored configuration to be used in a test run. Signature: ```typescript -export declare function loadConfiguration(options: ILoadConfigurationOptions, environment: IRunEnvironment): Promise; +export declare function loadConfiguration(options?: ILoadConfigurationOptions, environment?: IRunEnvironment): Promise; ``` ## Parameters diff --git a/docs/api/markdown/cucumber.loadsupport.md b/docs/api/markdown/cucumber.loadsupport.md index ae59fb046..95dd95025 100644 --- a/docs/api/markdown/cucumber.loadsupport.md +++ b/docs/api/markdown/cucumber.loadsupport.md @@ -9,7 +9,7 @@ Load support code for use in test runs. Signature: ```typescript -export declare function loadSupport(options: ILoadSupportOptions, environment: IRunEnvironment): Promise; +export declare function loadSupport(options: ILoadSupportOptions, environment?: IRunEnvironment): Promise; ``` ## Parameters diff --git a/docs/api/markdown/cucumber.runcucumber.md b/docs/api/markdown/cucumber.runcucumber.md index b7e40dbb8..dc444056e 100644 --- a/docs/api/markdown/cucumber.runcucumber.md +++ b/docs/api/markdown/cucumber.runcucumber.md @@ -9,7 +9,7 @@ Execute a Cucumber test run. Signature: ```typescript -export declare function runCucumber(configuration: IRunOptions, environment: IRunEnvironment, onMessage?: (message: Envelope) => void): Promise; +export declare function runCucumber(configuration: IRunOptions, environment?: IRunEnvironment, onMessage?: (message: Envelope) => void): Promise; ``` ## Parameters diff --git a/docs/javascript_api.md b/docs/javascript_api.md new file mode 100644 index 000000000..169d5b621 --- /dev/null +++ b/docs/javascript_api.md @@ -0,0 +1,37 @@ +# JavaScript API + +You can run Cucumber programmatically via its JavaScript API. This isn't something most users would need to do, but if you have a niche use case or need to work Cucumber into a bigger framework, it might be what you need. The API allows you to load configuration, sources and support code and execute test runs with async functions and within the current process. + +The API is available on its own entry point `@cucumber/cucumber/api`. + +There are some examples below, and [reference documentation](./api/markdown/index.md) for everything available. + +## Simple example + +```javascript +import { loadConfiguration, runCucumber } from '@cucumber/cucumber/api' + +export async function runTests() { + const { runnable } = await loadConfiguration() + const { success } = await runCucumber(runnable) + return success +} +``` + +## Complex example + +```javascript +import { loadConfiguration, loadSupport, runCucumber } from '@cucumber/cucumber/api' + +export async function runTests(directory, configFile, failFast) { + // things we need to specify about the environment + const environment = { cwd: directory } + // load configuration from a particular file, and override a specific option + const { runnable } = await loadConfiguration({ file: configFile, provided: { failFast } }, environment) + // load the support code upfront + const support = await loadSupport(runnable, environment) + // run cucumber, using the support code we loaded already + const { success } = await runCucumber({ ...runnable, support }, environment) + return success +} +``` diff --git a/src/api/load_configuration.ts b/src/api/load_configuration.ts index f03c06883..67d17f48b 100644 --- a/src/api/load_configuration.ts +++ b/src/api/load_configuration.ts @@ -21,8 +21,8 @@ import { mergeEnvironment } from './environment' * @param environment - Project environment. */ export async function loadConfiguration( - options: ILoadConfigurationOptions, - environment: IRunEnvironment + options: ILoadConfigurationOptions = {}, + environment: IRunEnvironment = {} ): Promise { const { cwd, env } = mergeEnvironment(environment) const configFile = options.file ?? locateFile(cwd) diff --git a/src/api/load_support.ts b/src/api/load_support.ts index 752abf516..3a1adfe49 100644 --- a/src/api/load_support.ts +++ b/src/api/load_support.ts @@ -14,7 +14,7 @@ import { ISupportCodeLibrary } from '../support_code_library_builder/types' */ export async function loadSupport( options: ILoadSupportOptions, - environment: IRunEnvironment + environment: IRunEnvironment = {} ): Promise { const { cwd } = mergeEnvironment(environment) const newId = IdGenerator.uuid() diff --git a/src/api/run_cucumber.ts b/src/api/run_cucumber.ts index afbfc0294..f279c41c5 100644 --- a/src/api/run_cucumber.ts +++ b/src/api/run_cucumber.ts @@ -28,7 +28,7 @@ import { mergeEnvironment } from './environment' */ export async function runCucumber( configuration: IRunOptions, - environment: IRunEnvironment, + environment: IRunEnvironment = {}, onMessage?: (message: Envelope) => void ): Promise { const { cwd, stdout, stderr, env } = mergeEnvironment(environment) From 7102237b5fd3d4a75be2a0ab82f2f48fcd882797 Mon Sep 17 00:00:00 2001 From: David Goss Date: Wed, 16 Mar 2022 14:57:29 +0000 Subject: [PATCH 18/24] simplify dir structure --- api-extractor.json | 2 +- .../{markdown => }/cucumber.iloadconfigurationoptions.file.md | 0 docs/api/{markdown => }/cucumber.iloadconfigurationoptions.md | 0 .../cucumber.iloadconfigurationoptions.profiles.md | 0 .../cucumber.iloadconfigurationoptions.provided.md | 0 docs/api/{markdown => }/cucumber.iloadsupportoptions.md | 0 docs/api/{markdown => }/cucumber.iloadsupportoptions.sources.md | 0 docs/api/{markdown => }/cucumber.iloadsupportoptions.support.md | 0 docs/api/{markdown => }/cucumber.iresolvedconfiguration.md | 0 .../{markdown => }/cucumber.iresolvedconfiguration.original.md | 0 .../{markdown => }/cucumber.iresolvedconfiguration.runnable.md | 0 docs/api/{markdown => }/cucumber.irunenvironment.cwd.md | 0 docs/api/{markdown => }/cucumber.irunenvironment.env.md | 0 docs/api/{markdown => }/cucumber.irunenvironment.md | 0 docs/api/{markdown => }/cucumber.irunenvironment.stderr.md | 0 docs/api/{markdown => }/cucumber.irunenvironment.stdout.md | 0 .../{markdown => }/cucumber.irunnableconfiguration.formats.md | 0 docs/api/{markdown => }/cucumber.irunnableconfiguration.md | 0 .../{markdown => }/cucumber.irunnableconfiguration.runtime.md | 0 .../{markdown => }/cucumber.irunnableconfiguration.sources.md | 0 .../{markdown => }/cucumber.irunnableconfiguration.support.md | 0 docs/api/{markdown => }/cucumber.irunoptions.formats.md | 0 docs/api/{markdown => }/cucumber.irunoptions.md | 0 docs/api/{markdown => }/cucumber.irunoptions.runtime.md | 0 docs/api/{markdown => }/cucumber.irunoptions.sources.md | 0 docs/api/{markdown => }/cucumber.irunoptions.support.md | 0 docs/api/{markdown => }/cucumber.irunoptionsformats.files.md | 0 docs/api/{markdown => }/cucumber.irunoptionsformats.md | 0 docs/api/{markdown => }/cucumber.irunoptionsformats.options.md | 0 docs/api/{markdown => }/cucumber.irunoptionsformats.publish.md | 0 docs/api/{markdown => }/cucumber.irunoptionsformats.stdout.md | 0 docs/api/{markdown => }/cucumber.irunoptionsruntime.md | 0 docs/api/{markdown => }/cucumber.irunoptionsruntime.parallel.md | 0 docs/api/{markdown => }/cucumber.irunresult.md | 0 docs/api/{markdown => }/cucumber.irunresult.success.md | 0 docs/api/{markdown => }/cucumber.irunresult.support.md | 0 .../cucumber.isourcescoordinates.defaultdialect.md | 0 docs/api/{markdown => }/cucumber.isourcescoordinates.md | 0 docs/api/{markdown => }/cucumber.isourcescoordinates.names.md | 0 docs/api/{markdown => }/cucumber.isourcescoordinates.order.md | 0 docs/api/{markdown => }/cucumber.isourcescoordinates.paths.md | 0 .../cucumber.isourcescoordinates.tagexpression.md | 0 .../cucumber.isupportcodecoordinates.importpaths.md | 0 docs/api/{markdown => }/cucumber.isupportcodecoordinates.md | 0 .../cucumber.isupportcodecoordinates.requiremodules.md | 0 .../cucumber.isupportcodecoordinates.requirepaths.md | 0 .../{markdown => }/cucumber.isupportcodecoordinatesorlibrary.md | 0 docs/api/{markdown => }/cucumber.loadconfiguration.md | 0 docs/api/{markdown => }/cucumber.loadsupport.md | 0 docs/api/{markdown => }/cucumber.md | 0 docs/api/{markdown => }/cucumber.runcucumber.md | 0 docs/api/{markdown => }/index.md | 0 docs/javascript_api.md | 2 +- package.json | 2 +- {docs/api => reports}/cucumber.api.md | 0 55 files changed, 3 insertions(+), 3 deletions(-) rename docs/api/{markdown => }/cucumber.iloadconfigurationoptions.file.md (100%) rename docs/api/{markdown => }/cucumber.iloadconfigurationoptions.md (100%) rename docs/api/{markdown => }/cucumber.iloadconfigurationoptions.profiles.md (100%) rename docs/api/{markdown => }/cucumber.iloadconfigurationoptions.provided.md (100%) rename docs/api/{markdown => }/cucumber.iloadsupportoptions.md (100%) rename docs/api/{markdown => }/cucumber.iloadsupportoptions.sources.md (100%) rename docs/api/{markdown => }/cucumber.iloadsupportoptions.support.md (100%) rename docs/api/{markdown => }/cucumber.iresolvedconfiguration.md (100%) rename docs/api/{markdown => }/cucumber.iresolvedconfiguration.original.md (100%) rename docs/api/{markdown => }/cucumber.iresolvedconfiguration.runnable.md (100%) rename docs/api/{markdown => }/cucumber.irunenvironment.cwd.md (100%) rename docs/api/{markdown => }/cucumber.irunenvironment.env.md (100%) rename docs/api/{markdown => }/cucumber.irunenvironment.md (100%) rename docs/api/{markdown => }/cucumber.irunenvironment.stderr.md (100%) rename docs/api/{markdown => }/cucumber.irunenvironment.stdout.md (100%) rename docs/api/{markdown => }/cucumber.irunnableconfiguration.formats.md (100%) rename docs/api/{markdown => }/cucumber.irunnableconfiguration.md (100%) rename docs/api/{markdown => }/cucumber.irunnableconfiguration.runtime.md (100%) rename docs/api/{markdown => }/cucumber.irunnableconfiguration.sources.md (100%) rename docs/api/{markdown => }/cucumber.irunnableconfiguration.support.md (100%) rename docs/api/{markdown => }/cucumber.irunoptions.formats.md (100%) rename docs/api/{markdown => }/cucumber.irunoptions.md (100%) rename docs/api/{markdown => }/cucumber.irunoptions.runtime.md (100%) rename docs/api/{markdown => }/cucumber.irunoptions.sources.md (100%) rename docs/api/{markdown => }/cucumber.irunoptions.support.md (100%) rename docs/api/{markdown => }/cucumber.irunoptionsformats.files.md (100%) rename docs/api/{markdown => }/cucumber.irunoptionsformats.md (100%) rename docs/api/{markdown => }/cucumber.irunoptionsformats.options.md (100%) rename docs/api/{markdown => }/cucumber.irunoptionsformats.publish.md (100%) rename docs/api/{markdown => }/cucumber.irunoptionsformats.stdout.md (100%) rename docs/api/{markdown => }/cucumber.irunoptionsruntime.md (100%) rename docs/api/{markdown => }/cucumber.irunoptionsruntime.parallel.md (100%) rename docs/api/{markdown => }/cucumber.irunresult.md (100%) rename docs/api/{markdown => }/cucumber.irunresult.success.md (100%) rename docs/api/{markdown => }/cucumber.irunresult.support.md (100%) rename docs/api/{markdown => }/cucumber.isourcescoordinates.defaultdialect.md (100%) rename docs/api/{markdown => }/cucumber.isourcescoordinates.md (100%) rename docs/api/{markdown => }/cucumber.isourcescoordinates.names.md (100%) rename docs/api/{markdown => }/cucumber.isourcescoordinates.order.md (100%) rename docs/api/{markdown => }/cucumber.isourcescoordinates.paths.md (100%) rename docs/api/{markdown => }/cucumber.isourcescoordinates.tagexpression.md (100%) rename docs/api/{markdown => }/cucumber.isupportcodecoordinates.importpaths.md (100%) rename docs/api/{markdown => }/cucumber.isupportcodecoordinates.md (100%) rename docs/api/{markdown => }/cucumber.isupportcodecoordinates.requiremodules.md (100%) rename docs/api/{markdown => }/cucumber.isupportcodecoordinates.requirepaths.md (100%) rename docs/api/{markdown => }/cucumber.isupportcodecoordinatesorlibrary.md (100%) rename docs/api/{markdown => }/cucumber.loadconfiguration.md (100%) rename docs/api/{markdown => }/cucumber.loadsupport.md (100%) rename docs/api/{markdown => }/cucumber.md (100%) rename docs/api/{markdown => }/cucumber.runcucumber.md (100%) rename docs/api/{markdown => }/index.md (100%) rename {docs/api => reports}/cucumber.api.md (100%) diff --git a/api-extractor.json b/api-extractor.json index c8491b220..41da06aaa 100644 --- a/api-extractor.json +++ b/api-extractor.json @@ -5,7 +5,7 @@ }, "apiReport": { "enabled": true, - "reportFolder": "/docs/api/", + "reportFolder": "/reports/", "reportTempFolder": "/tmp/api-extractor/" }, "docModel": { diff --git a/docs/api/markdown/cucumber.iloadconfigurationoptions.file.md b/docs/api/cucumber.iloadconfigurationoptions.file.md similarity index 100% rename from docs/api/markdown/cucumber.iloadconfigurationoptions.file.md rename to docs/api/cucumber.iloadconfigurationoptions.file.md diff --git a/docs/api/markdown/cucumber.iloadconfigurationoptions.md b/docs/api/cucumber.iloadconfigurationoptions.md similarity index 100% rename from docs/api/markdown/cucumber.iloadconfigurationoptions.md rename to docs/api/cucumber.iloadconfigurationoptions.md diff --git a/docs/api/markdown/cucumber.iloadconfigurationoptions.profiles.md b/docs/api/cucumber.iloadconfigurationoptions.profiles.md similarity index 100% rename from docs/api/markdown/cucumber.iloadconfigurationoptions.profiles.md rename to docs/api/cucumber.iloadconfigurationoptions.profiles.md diff --git a/docs/api/markdown/cucumber.iloadconfigurationoptions.provided.md b/docs/api/cucumber.iloadconfigurationoptions.provided.md similarity index 100% rename from docs/api/markdown/cucumber.iloadconfigurationoptions.provided.md rename to docs/api/cucumber.iloadconfigurationoptions.provided.md diff --git a/docs/api/markdown/cucumber.iloadsupportoptions.md b/docs/api/cucumber.iloadsupportoptions.md similarity index 100% rename from docs/api/markdown/cucumber.iloadsupportoptions.md rename to docs/api/cucumber.iloadsupportoptions.md diff --git a/docs/api/markdown/cucumber.iloadsupportoptions.sources.md b/docs/api/cucumber.iloadsupportoptions.sources.md similarity index 100% rename from docs/api/markdown/cucumber.iloadsupportoptions.sources.md rename to docs/api/cucumber.iloadsupportoptions.sources.md diff --git a/docs/api/markdown/cucumber.iloadsupportoptions.support.md b/docs/api/cucumber.iloadsupportoptions.support.md similarity index 100% rename from docs/api/markdown/cucumber.iloadsupportoptions.support.md rename to docs/api/cucumber.iloadsupportoptions.support.md diff --git a/docs/api/markdown/cucumber.iresolvedconfiguration.md b/docs/api/cucumber.iresolvedconfiguration.md similarity index 100% rename from docs/api/markdown/cucumber.iresolvedconfiguration.md rename to docs/api/cucumber.iresolvedconfiguration.md diff --git a/docs/api/markdown/cucumber.iresolvedconfiguration.original.md b/docs/api/cucumber.iresolvedconfiguration.original.md similarity index 100% rename from docs/api/markdown/cucumber.iresolvedconfiguration.original.md rename to docs/api/cucumber.iresolvedconfiguration.original.md diff --git a/docs/api/markdown/cucumber.iresolvedconfiguration.runnable.md b/docs/api/cucumber.iresolvedconfiguration.runnable.md similarity index 100% rename from docs/api/markdown/cucumber.iresolvedconfiguration.runnable.md rename to docs/api/cucumber.iresolvedconfiguration.runnable.md diff --git a/docs/api/markdown/cucumber.irunenvironment.cwd.md b/docs/api/cucumber.irunenvironment.cwd.md similarity index 100% rename from docs/api/markdown/cucumber.irunenvironment.cwd.md rename to docs/api/cucumber.irunenvironment.cwd.md diff --git a/docs/api/markdown/cucumber.irunenvironment.env.md b/docs/api/cucumber.irunenvironment.env.md similarity index 100% rename from docs/api/markdown/cucumber.irunenvironment.env.md rename to docs/api/cucumber.irunenvironment.env.md diff --git a/docs/api/markdown/cucumber.irunenvironment.md b/docs/api/cucumber.irunenvironment.md similarity index 100% rename from docs/api/markdown/cucumber.irunenvironment.md rename to docs/api/cucumber.irunenvironment.md diff --git a/docs/api/markdown/cucumber.irunenvironment.stderr.md b/docs/api/cucumber.irunenvironment.stderr.md similarity index 100% rename from docs/api/markdown/cucumber.irunenvironment.stderr.md rename to docs/api/cucumber.irunenvironment.stderr.md diff --git a/docs/api/markdown/cucumber.irunenvironment.stdout.md b/docs/api/cucumber.irunenvironment.stdout.md similarity index 100% rename from docs/api/markdown/cucumber.irunenvironment.stdout.md rename to docs/api/cucumber.irunenvironment.stdout.md diff --git a/docs/api/markdown/cucumber.irunnableconfiguration.formats.md b/docs/api/cucumber.irunnableconfiguration.formats.md similarity index 100% rename from docs/api/markdown/cucumber.irunnableconfiguration.formats.md rename to docs/api/cucumber.irunnableconfiguration.formats.md diff --git a/docs/api/markdown/cucumber.irunnableconfiguration.md b/docs/api/cucumber.irunnableconfiguration.md similarity index 100% rename from docs/api/markdown/cucumber.irunnableconfiguration.md rename to docs/api/cucumber.irunnableconfiguration.md diff --git a/docs/api/markdown/cucumber.irunnableconfiguration.runtime.md b/docs/api/cucumber.irunnableconfiguration.runtime.md similarity index 100% rename from docs/api/markdown/cucumber.irunnableconfiguration.runtime.md rename to docs/api/cucumber.irunnableconfiguration.runtime.md diff --git a/docs/api/markdown/cucumber.irunnableconfiguration.sources.md b/docs/api/cucumber.irunnableconfiguration.sources.md similarity index 100% rename from docs/api/markdown/cucumber.irunnableconfiguration.sources.md rename to docs/api/cucumber.irunnableconfiguration.sources.md diff --git a/docs/api/markdown/cucumber.irunnableconfiguration.support.md b/docs/api/cucumber.irunnableconfiguration.support.md similarity index 100% rename from docs/api/markdown/cucumber.irunnableconfiguration.support.md rename to docs/api/cucumber.irunnableconfiguration.support.md diff --git a/docs/api/markdown/cucumber.irunoptions.formats.md b/docs/api/cucumber.irunoptions.formats.md similarity index 100% rename from docs/api/markdown/cucumber.irunoptions.formats.md rename to docs/api/cucumber.irunoptions.formats.md diff --git a/docs/api/markdown/cucumber.irunoptions.md b/docs/api/cucumber.irunoptions.md similarity index 100% rename from docs/api/markdown/cucumber.irunoptions.md rename to docs/api/cucumber.irunoptions.md diff --git a/docs/api/markdown/cucumber.irunoptions.runtime.md b/docs/api/cucumber.irunoptions.runtime.md similarity index 100% rename from docs/api/markdown/cucumber.irunoptions.runtime.md rename to docs/api/cucumber.irunoptions.runtime.md diff --git a/docs/api/markdown/cucumber.irunoptions.sources.md b/docs/api/cucumber.irunoptions.sources.md similarity index 100% rename from docs/api/markdown/cucumber.irunoptions.sources.md rename to docs/api/cucumber.irunoptions.sources.md diff --git a/docs/api/markdown/cucumber.irunoptions.support.md b/docs/api/cucumber.irunoptions.support.md similarity index 100% rename from docs/api/markdown/cucumber.irunoptions.support.md rename to docs/api/cucumber.irunoptions.support.md diff --git a/docs/api/markdown/cucumber.irunoptionsformats.files.md b/docs/api/cucumber.irunoptionsformats.files.md similarity index 100% rename from docs/api/markdown/cucumber.irunoptionsformats.files.md rename to docs/api/cucumber.irunoptionsformats.files.md diff --git a/docs/api/markdown/cucumber.irunoptionsformats.md b/docs/api/cucumber.irunoptionsformats.md similarity index 100% rename from docs/api/markdown/cucumber.irunoptionsformats.md rename to docs/api/cucumber.irunoptionsformats.md diff --git a/docs/api/markdown/cucumber.irunoptionsformats.options.md b/docs/api/cucumber.irunoptionsformats.options.md similarity index 100% rename from docs/api/markdown/cucumber.irunoptionsformats.options.md rename to docs/api/cucumber.irunoptionsformats.options.md diff --git a/docs/api/markdown/cucumber.irunoptionsformats.publish.md b/docs/api/cucumber.irunoptionsformats.publish.md similarity index 100% rename from docs/api/markdown/cucumber.irunoptionsformats.publish.md rename to docs/api/cucumber.irunoptionsformats.publish.md diff --git a/docs/api/markdown/cucumber.irunoptionsformats.stdout.md b/docs/api/cucumber.irunoptionsformats.stdout.md similarity index 100% rename from docs/api/markdown/cucumber.irunoptionsformats.stdout.md rename to docs/api/cucumber.irunoptionsformats.stdout.md diff --git a/docs/api/markdown/cucumber.irunoptionsruntime.md b/docs/api/cucumber.irunoptionsruntime.md similarity index 100% rename from docs/api/markdown/cucumber.irunoptionsruntime.md rename to docs/api/cucumber.irunoptionsruntime.md diff --git a/docs/api/markdown/cucumber.irunoptionsruntime.parallel.md b/docs/api/cucumber.irunoptionsruntime.parallel.md similarity index 100% rename from docs/api/markdown/cucumber.irunoptionsruntime.parallel.md rename to docs/api/cucumber.irunoptionsruntime.parallel.md diff --git a/docs/api/markdown/cucumber.irunresult.md b/docs/api/cucumber.irunresult.md similarity index 100% rename from docs/api/markdown/cucumber.irunresult.md rename to docs/api/cucumber.irunresult.md diff --git a/docs/api/markdown/cucumber.irunresult.success.md b/docs/api/cucumber.irunresult.success.md similarity index 100% rename from docs/api/markdown/cucumber.irunresult.success.md rename to docs/api/cucumber.irunresult.success.md diff --git a/docs/api/markdown/cucumber.irunresult.support.md b/docs/api/cucumber.irunresult.support.md similarity index 100% rename from docs/api/markdown/cucumber.irunresult.support.md rename to docs/api/cucumber.irunresult.support.md diff --git a/docs/api/markdown/cucumber.isourcescoordinates.defaultdialect.md b/docs/api/cucumber.isourcescoordinates.defaultdialect.md similarity index 100% rename from docs/api/markdown/cucumber.isourcescoordinates.defaultdialect.md rename to docs/api/cucumber.isourcescoordinates.defaultdialect.md diff --git a/docs/api/markdown/cucumber.isourcescoordinates.md b/docs/api/cucumber.isourcescoordinates.md similarity index 100% rename from docs/api/markdown/cucumber.isourcescoordinates.md rename to docs/api/cucumber.isourcescoordinates.md diff --git a/docs/api/markdown/cucumber.isourcescoordinates.names.md b/docs/api/cucumber.isourcescoordinates.names.md similarity index 100% rename from docs/api/markdown/cucumber.isourcescoordinates.names.md rename to docs/api/cucumber.isourcescoordinates.names.md diff --git a/docs/api/markdown/cucumber.isourcescoordinates.order.md b/docs/api/cucumber.isourcescoordinates.order.md similarity index 100% rename from docs/api/markdown/cucumber.isourcescoordinates.order.md rename to docs/api/cucumber.isourcescoordinates.order.md diff --git a/docs/api/markdown/cucumber.isourcescoordinates.paths.md b/docs/api/cucumber.isourcescoordinates.paths.md similarity index 100% rename from docs/api/markdown/cucumber.isourcescoordinates.paths.md rename to docs/api/cucumber.isourcescoordinates.paths.md diff --git a/docs/api/markdown/cucumber.isourcescoordinates.tagexpression.md b/docs/api/cucumber.isourcescoordinates.tagexpression.md similarity index 100% rename from docs/api/markdown/cucumber.isourcescoordinates.tagexpression.md rename to docs/api/cucumber.isourcescoordinates.tagexpression.md diff --git a/docs/api/markdown/cucumber.isupportcodecoordinates.importpaths.md b/docs/api/cucumber.isupportcodecoordinates.importpaths.md similarity index 100% rename from docs/api/markdown/cucumber.isupportcodecoordinates.importpaths.md rename to docs/api/cucumber.isupportcodecoordinates.importpaths.md diff --git a/docs/api/markdown/cucumber.isupportcodecoordinates.md b/docs/api/cucumber.isupportcodecoordinates.md similarity index 100% rename from docs/api/markdown/cucumber.isupportcodecoordinates.md rename to docs/api/cucumber.isupportcodecoordinates.md diff --git a/docs/api/markdown/cucumber.isupportcodecoordinates.requiremodules.md b/docs/api/cucumber.isupportcodecoordinates.requiremodules.md similarity index 100% rename from docs/api/markdown/cucumber.isupportcodecoordinates.requiremodules.md rename to docs/api/cucumber.isupportcodecoordinates.requiremodules.md diff --git a/docs/api/markdown/cucumber.isupportcodecoordinates.requirepaths.md b/docs/api/cucumber.isupportcodecoordinates.requirepaths.md similarity index 100% rename from docs/api/markdown/cucumber.isupportcodecoordinates.requirepaths.md rename to docs/api/cucumber.isupportcodecoordinates.requirepaths.md diff --git a/docs/api/markdown/cucumber.isupportcodecoordinatesorlibrary.md b/docs/api/cucumber.isupportcodecoordinatesorlibrary.md similarity index 100% rename from docs/api/markdown/cucumber.isupportcodecoordinatesorlibrary.md rename to docs/api/cucumber.isupportcodecoordinatesorlibrary.md diff --git a/docs/api/markdown/cucumber.loadconfiguration.md b/docs/api/cucumber.loadconfiguration.md similarity index 100% rename from docs/api/markdown/cucumber.loadconfiguration.md rename to docs/api/cucumber.loadconfiguration.md diff --git a/docs/api/markdown/cucumber.loadsupport.md b/docs/api/cucumber.loadsupport.md similarity index 100% rename from docs/api/markdown/cucumber.loadsupport.md rename to docs/api/cucumber.loadsupport.md diff --git a/docs/api/markdown/cucumber.md b/docs/api/cucumber.md similarity index 100% rename from docs/api/markdown/cucumber.md rename to docs/api/cucumber.md diff --git a/docs/api/markdown/cucumber.runcucumber.md b/docs/api/cucumber.runcucumber.md similarity index 100% rename from docs/api/markdown/cucumber.runcucumber.md rename to docs/api/cucumber.runcucumber.md diff --git a/docs/api/markdown/index.md b/docs/api/index.md similarity index 100% rename from docs/api/markdown/index.md rename to docs/api/index.md diff --git a/docs/javascript_api.md b/docs/javascript_api.md index 169d5b621..4e4883646 100644 --- a/docs/javascript_api.md +++ b/docs/javascript_api.md @@ -4,7 +4,7 @@ You can run Cucumber programmatically via its JavaScript API. This isn't somethi The API is available on its own entry point `@cucumber/cucumber/api`. -There are some examples below, and [reference documentation](./api/markdown/index.md) for everything available. +There are some examples below, and [reference documentation](./api/index.md) for everything available. ## Simple example diff --git a/package.json b/package.json index 4e1616ff2..815be3ec1 100644 --- a/package.json +++ b/package.json @@ -284,7 +284,7 @@ "build-local": "genversion --es6 src/version.ts && tsc --build tsconfig.node.json && shx cp src/importer.js lib/ && shx cp src/wrapper.mjs lib/ && shx cp src/api/wrapper.mjs lib/api/", "cck-test": "mocha 'compatibility/**/*_spec.ts'", "docs:ci": "api-extractor run --verbose", - "docs:local": "api-extractor run --verbose --local && api-documenter markdown --input-folder ./tmp/api-extractor --output-folder ./docs/api/markdown", + "docs:local": "api-extractor run --verbose --local && api-documenter markdown --input-folder ./tmp/api-extractor --output-folder ./docs/api", "feature-test": "node ./bin/cucumber-js", "lint-autofix": "eslint --fix \"{compatibility,example,features,scripts,src,test}/**/*.ts\"", "lint-code": "eslint \"{compatibility,example,features,scripts,src,test}/**/*.ts\"", diff --git a/docs/api/cucumber.api.md b/reports/cucumber.api.md similarity index 100% rename from docs/api/cucumber.api.md rename to reports/cucumber.api.md From 5ca8c5ef8051410eaf46ccc6c6a7d644234fadd6 Mon Sep 17 00:00:00 2001 From: David Goss Date: Wed, 16 Mar 2022 15:05:01 +0000 Subject: [PATCH 19/24] add changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 76ad28808..dc3dd1fe9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ Please see [CONTRIBUTING.md](https://github.com/cucumber/cucumber/blob/master/CO ([#1136](https://github.com/cucumber/cucumber-js/issues/1136) [#1721](https://github.com/cucumber/cucumber-js/pull/1721)) - Support for configuration to be objects instead of argv strings, and for configuration files in ESM and JSON formats ([#1952](https://github.com/cucumber/cucumber-js/pull/1952)) +- New API for running Cucumber programmatically ([#1955](https://github.com/cucumber/cucumber-js/pull/1955)) ### Fixed - Warn users who are on an unsupported node version ([#1922](https://github.com/cucumber/cucumber-js/pull/1922)) From 265f2ec0fe019c91464c4f26e0c3e7f8cc3042cc Mon Sep 17 00:00:00 2001 From: David Goss Date: Thu, 17 Mar 2022 09:10:20 +0000 Subject: [PATCH 20/24] link to new doc in changelog entry --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc3dd1fe9..07af2286a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ Please see [CONTRIBUTING.md](https://github.com/cucumber/cucumber/blob/master/CO ([#1136](https://github.com/cucumber/cucumber-js/issues/1136) [#1721](https://github.com/cucumber/cucumber-js/pull/1721)) - Support for configuration to be objects instead of argv strings, and for configuration files in ESM and JSON formats ([#1952](https://github.com/cucumber/cucumber-js/pull/1952)) -- New API for running Cucumber programmatically ([#1955](https://github.com/cucumber/cucumber-js/pull/1955)) +- New API for running Cucumber programmatically (see [documentation](./docs/javascript_api.md)) ([#1955](https://github.com/cucumber/cucumber-js/pull/1955)) ### Fixed - Warn users who are on an unsupported node version ([#1922](https://github.com/cucumber/cucumber-js/pull/1922)) From f0dbb5f8f8d2c7afcc320c1815f70f38ee7f3f98 Mon Sep 17 00:00:00 2001 From: David Goss Date: Thu, 17 Mar 2022 12:03:58 +0000 Subject: [PATCH 21/24] rename interfaces and properties per review feedback --- compatibility/cck_spec.ts | 4 ++-- docs/api/cucumber.iresolvedconfiguration.md | 4 ++-- ...resolvedconfiguration.runconfiguration.md} | 6 ++--- ...resolvedconfiguration.useconfiguration.md} | 6 ++--- ... => cucumber.irunconfiguration.formats.md} | 4 ++-- docs/api/cucumber.irunconfiguration.md | 22 +++++++++++++++++ ... => cucumber.irunconfiguration.runtime.md} | 4 ++-- ... => cucumber.irunconfiguration.sources.md} | 4 ++-- ... => cucumber.irunconfiguration.support.md} | 4 ++-- docs/api/cucumber.irunnableconfiguration.md | 22 ----------------- docs/api/cucumber.md | 2 +- reports/cucumber.api.md | 24 +++++++++---------- src/api/convert_configuration.ts | 4 ++-- src/api/load_configuration.ts | 4 ++-- src/api/run_cucumber_spec.ts | 24 ++++++++++++------- src/api/types.ts | 6 ++--- src/cli/index.ts | 21 ++++++++-------- 17 files changed, 86 insertions(+), 79 deletions(-) rename docs/api/{cucumber.iresolvedconfiguration.runnable.md => cucumber.iresolvedconfiguration.runconfiguration.md} (64%) rename docs/api/{cucumber.iresolvedconfiguration.original.md => cucumber.iresolvedconfiguration.useconfiguration.md} (68%) rename docs/api/{cucumber.irunnableconfiguration.formats.md => cucumber.irunconfiguration.formats.md} (56%) create mode 100644 docs/api/cucumber.irunconfiguration.md rename docs/api/{cucumber.irunnableconfiguration.runtime.md => cucumber.irunconfiguration.runtime.md} (56%) rename docs/api/{cucumber.irunnableconfiguration.sources.md => cucumber.irunconfiguration.sources.md} (56%) rename docs/api/{cucumber.irunnableconfiguration.support.md => cucumber.irunconfiguration.support.md} (56%) delete mode 100644 docs/api/cucumber.irunnableconfiguration.md diff --git a/compatibility/cck_spec.ts b/compatibility/cck_spec.ts index 1bed551cd..104e7e24c 100644 --- a/compatibility/cck_spec.ts +++ b/compatibility/cck_spec.ts @@ -9,7 +9,7 @@ import { ignorableKeys } from '../features/support/formatter_output_helpers' import * as messages from '@cucumber/messages' import * as messageStreams from '@cucumber/message-streams' import util from 'util' -import { runCucumber, IRunnableConfiguration } from '../src/api' +import { runCucumber, IRunConfiguration } from '../src/api' import { Envelope } from '@cucumber/messages' const asyncPipeline = util.promisify(pipeline) @@ -29,7 +29,7 @@ describe('Cucumber Compatibility Kit', () => { const actualMessages: Envelope[] = [] const stdout = new PassThrough() const stderr = new PassThrough() - const runConfiguration: IRunnableConfiguration = { + const runConfiguration: IRunConfiguration = { sources: { defaultDialect: 'en', paths: [`${CCK_FEATURES_PATH}/${suiteName}/${suiteName}${extension}`], diff --git a/docs/api/cucumber.iresolvedconfiguration.md b/docs/api/cucumber.iresolvedconfiguration.md index b6bb30029..d99bb7c30 100644 --- a/docs/api/cucumber.iresolvedconfiguration.md +++ b/docs/api/cucumber.iresolvedconfiguration.md @@ -15,6 +15,6 @@ export interface IResolvedConfiguration | Property | Type | Description | | --- | --- | --- | -| [original](./cucumber.iresolvedconfiguration.original.md) | IConfiguration | The final flat configuration object resolved from the configuration file/profiles plus any extra provided. | -| [runnable](./cucumber.iresolvedconfiguration.runnable.md) | [IRunnableConfiguration](./cucumber.irunnableconfiguration.md) | The format that can be passed into runCucumber. | +| [runConfiguration](./cucumber.iresolvedconfiguration.runconfiguration.md) | [IRunConfiguration](./cucumber.irunconfiguration.md) | The format that can be passed into runCucumber. | +| [useConfiguration](./cucumber.iresolvedconfiguration.useconfiguration.md) | IConfiguration | The final flat configuration object resolved from the configuration file/profiles plus any extra provided. | diff --git a/docs/api/cucumber.iresolvedconfiguration.runnable.md b/docs/api/cucumber.iresolvedconfiguration.runconfiguration.md similarity index 64% rename from docs/api/cucumber.iresolvedconfiguration.runnable.md rename to docs/api/cucumber.iresolvedconfiguration.runconfiguration.md index 7c5ccbb43..2e9264b0f 100644 --- a/docs/api/cucumber.iresolvedconfiguration.runnable.md +++ b/docs/api/cucumber.iresolvedconfiguration.runconfiguration.md @@ -1,13 +1,13 @@ -[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IResolvedConfiguration](./cucumber.iresolvedconfiguration.md) > [runnable](./cucumber.iresolvedconfiguration.runnable.md) +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IResolvedConfiguration](./cucumber.iresolvedconfiguration.md) > [runConfiguration](./cucumber.iresolvedconfiguration.runconfiguration.md) -## IResolvedConfiguration.runnable property +## IResolvedConfiguration.runConfiguration property The format that can be passed into `runCucumber`. Signature: ```typescript -runnable: IRunnableConfiguration; +runConfiguration: IRunConfiguration; ``` diff --git a/docs/api/cucumber.iresolvedconfiguration.original.md b/docs/api/cucumber.iresolvedconfiguration.useconfiguration.md similarity index 68% rename from docs/api/cucumber.iresolvedconfiguration.original.md rename to docs/api/cucumber.iresolvedconfiguration.useconfiguration.md index 426f2b3d1..ae5aef140 100644 --- a/docs/api/cucumber.iresolvedconfiguration.original.md +++ b/docs/api/cucumber.iresolvedconfiguration.useconfiguration.md @@ -1,13 +1,13 @@ -[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IResolvedConfiguration](./cucumber.iresolvedconfiguration.md) > [original](./cucumber.iresolvedconfiguration.original.md) +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IResolvedConfiguration](./cucumber.iresolvedconfiguration.md) > [useConfiguration](./cucumber.iresolvedconfiguration.useconfiguration.md) -## IResolvedConfiguration.original property +## IResolvedConfiguration.useConfiguration property The final flat configuration object resolved from the configuration file/profiles plus any extra provided. Signature: ```typescript -original: IConfiguration; +useConfiguration: IConfiguration; ``` diff --git a/docs/api/cucumber.irunnableconfiguration.formats.md b/docs/api/cucumber.irunconfiguration.formats.md similarity index 56% rename from docs/api/cucumber.irunnableconfiguration.formats.md rename to docs/api/cucumber.irunconfiguration.formats.md index 9d6ac12d6..6a4578565 100644 --- a/docs/api/cucumber.irunnableconfiguration.formats.md +++ b/docs/api/cucumber.irunconfiguration.formats.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunnableConfiguration](./cucumber.irunnableconfiguration.md) > [formats](./cucumber.irunnableconfiguration.formats.md) +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunConfiguration](./cucumber.irunconfiguration.md) > [formats](./cucumber.irunconfiguration.formats.md) -## IRunnableConfiguration.formats property +## IRunConfiguration.formats property Signature: diff --git a/docs/api/cucumber.irunconfiguration.md b/docs/api/cucumber.irunconfiguration.md new file mode 100644 index 000000000..2e42f2ec6 --- /dev/null +++ b/docs/api/cucumber.irunconfiguration.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunConfiguration](./cucumber.irunconfiguration.md) + +## IRunConfiguration interface + + +Signature: + +```typescript +export interface IRunConfiguration +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [formats](./cucumber.irunconfiguration.formats.md) | [IRunOptionsFormats](./cucumber.irunoptionsformats.md) | | +| [runtime](./cucumber.irunconfiguration.runtime.md) | [IRunOptionsRuntime](./cucumber.irunoptionsruntime.md) | | +| [sources](./cucumber.irunconfiguration.sources.md) | [ISourcesCoordinates](./cucumber.isourcescoordinates.md) | | +| [support](./cucumber.irunconfiguration.support.md) | [ISupportCodeCoordinates](./cucumber.isupportcodecoordinates.md) | | + diff --git a/docs/api/cucumber.irunnableconfiguration.runtime.md b/docs/api/cucumber.irunconfiguration.runtime.md similarity index 56% rename from docs/api/cucumber.irunnableconfiguration.runtime.md rename to docs/api/cucumber.irunconfiguration.runtime.md index 7d3f2035a..7c651576d 100644 --- a/docs/api/cucumber.irunnableconfiguration.runtime.md +++ b/docs/api/cucumber.irunconfiguration.runtime.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunnableConfiguration](./cucumber.irunnableconfiguration.md) > [runtime](./cucumber.irunnableconfiguration.runtime.md) +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunConfiguration](./cucumber.irunconfiguration.md) > [runtime](./cucumber.irunconfiguration.runtime.md) -## IRunnableConfiguration.runtime property +## IRunConfiguration.runtime property Signature: diff --git a/docs/api/cucumber.irunnableconfiguration.sources.md b/docs/api/cucumber.irunconfiguration.sources.md similarity index 56% rename from docs/api/cucumber.irunnableconfiguration.sources.md rename to docs/api/cucumber.irunconfiguration.sources.md index 0dd4370bc..e0a68beda 100644 --- a/docs/api/cucumber.irunnableconfiguration.sources.md +++ b/docs/api/cucumber.irunconfiguration.sources.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunnableConfiguration](./cucumber.irunnableconfiguration.md) > [sources](./cucumber.irunnableconfiguration.sources.md) +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunConfiguration](./cucumber.irunconfiguration.md) > [sources](./cucumber.irunconfiguration.sources.md) -## IRunnableConfiguration.sources property +## IRunConfiguration.sources property Signature: diff --git a/docs/api/cucumber.irunnableconfiguration.support.md b/docs/api/cucumber.irunconfiguration.support.md similarity index 56% rename from docs/api/cucumber.irunnableconfiguration.support.md rename to docs/api/cucumber.irunconfiguration.support.md index 16d1f5777..07036bc2c 100644 --- a/docs/api/cucumber.irunnableconfiguration.support.md +++ b/docs/api/cucumber.irunconfiguration.support.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunnableConfiguration](./cucumber.irunnableconfiguration.md) > [support](./cucumber.irunnableconfiguration.support.md) +[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunConfiguration](./cucumber.irunconfiguration.md) > [support](./cucumber.irunconfiguration.support.md) -## IRunnableConfiguration.support property +## IRunConfiguration.support property Signature: diff --git a/docs/api/cucumber.irunnableconfiguration.md b/docs/api/cucumber.irunnableconfiguration.md deleted file mode 100644 index 088296bd9..000000000 --- a/docs/api/cucumber.irunnableconfiguration.md +++ /dev/null @@ -1,22 +0,0 @@ - - -[Home](./index.md) > [@cucumber/cucumber](./cucumber.md) > [IRunnableConfiguration](./cucumber.irunnableconfiguration.md) - -## IRunnableConfiguration interface - - -Signature: - -```typescript -export interface IRunnableConfiguration -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [formats](./cucumber.irunnableconfiguration.formats.md) | [IRunOptionsFormats](./cucumber.irunoptionsformats.md) | | -| [runtime](./cucumber.irunnableconfiguration.runtime.md) | [IRunOptionsRuntime](./cucumber.irunoptionsruntime.md) | | -| [sources](./cucumber.irunnableconfiguration.sources.md) | [ISourcesCoordinates](./cucumber.isourcescoordinates.md) | | -| [support](./cucumber.irunnableconfiguration.support.md) | [ISupportCodeCoordinates](./cucumber.isupportcodecoordinates.md) | | - diff --git a/docs/api/cucumber.md b/docs/api/cucumber.md index cd33a6174..915718081 100644 --- a/docs/api/cucumber.md +++ b/docs/api/cucumber.md @@ -25,8 +25,8 @@ These docs cover the API used for running Cucumber programmatically. The entry p | [ILoadConfigurationOptions](./cucumber.iloadconfigurationoptions.md) | | | [ILoadSupportOptions](./cucumber.iloadsupportoptions.md) | | | [IResolvedConfiguration](./cucumber.iresolvedconfiguration.md) | | +| [IRunConfiguration](./cucumber.irunconfiguration.md) | | | [IRunEnvironment](./cucumber.irunenvironment.md) | Contextual data about the project environment. | -| [IRunnableConfiguration](./cucumber.irunnableconfiguration.md) | | | [IRunOptions](./cucumber.irunoptions.md) | | | [IRunOptionsFormats](./cucumber.irunoptionsformats.md) | | | [IRunOptionsRuntime](./cucumber.irunoptionsruntime.md) | | diff --git a/reports/cucumber.api.md b/reports/cucumber.api.md index 3eba09415..852bec264 100644 --- a/reports/cucumber.api.md +++ b/reports/cucumber.api.md @@ -34,21 +34,12 @@ export interface ILoadSupportOptions { // @public (undocumented) export interface IResolvedConfiguration { - original: IConfiguration; - runnable: IRunnableConfiguration; -} - -// @public -export interface IRunEnvironment { - cwd?: string; - env?: NodeJS.ProcessEnv; - stderr?: IFormatterStream; - // Warning: (ae-forgotten-export) The symbol "IFormatterStream" needs to be exported by the entry point index.d.ts - stdout?: IFormatterStream; + runConfiguration: IRunConfiguration; + useConfiguration: IConfiguration; } // @public (undocumented) -export interface IRunnableConfiguration { +export interface IRunConfiguration { // (undocumented) formats: IRunOptionsFormats; // (undocumented) @@ -59,6 +50,15 @@ export interface IRunnableConfiguration { support: ISupportCodeCoordinates; } +// @public +export interface IRunEnvironment { + cwd?: string; + env?: NodeJS.ProcessEnv; + stderr?: IFormatterStream; + // Warning: (ae-forgotten-export) The symbol "IFormatterStream" needs to be exported by the entry point index.d.ts + stdout?: IFormatterStream; +} + // @public (undocumented) export interface IRunOptions { // (undocumented) diff --git a/src/api/convert_configuration.ts b/src/api/convert_configuration.ts index 595f68669..63735cf22 100644 --- a/src/api/convert_configuration.ts +++ b/src/api/convert_configuration.ts @@ -3,12 +3,12 @@ import { isTruthyString, OptionSplitter, } from '../configuration' -import { IRunnableConfiguration } from './types' +import { IRunConfiguration } from './types' export async function convertConfiguration( flatConfiguration: IConfiguration, env: NodeJS.ProcessEnv -): Promise { +): Promise { return { sources: { paths: flatConfiguration.paths, diff --git a/src/api/load_configuration.ts b/src/api/load_configuration.ts index 67d17f48b..8e4780462 100644 --- a/src/api/load_configuration.ts +++ b/src/api/load_configuration.ts @@ -37,7 +37,7 @@ export async function loadConfiguration( validateConfiguration(original) const runnable = await convertConfiguration(original, env) return { - original, - runnable, + useConfiguration: original, + runConfiguration: runnable, } } diff --git a/src/api/run_cucumber_spec.ts b/src/api/run_cucumber_spec.ts index c1597bc74..6215277b0 100644 --- a/src/api/run_cucumber_spec.ts +++ b/src/api/run_cucumber_spec.ts @@ -50,10 +50,12 @@ describe('runCucumber', () => { it('should be able to load support code upfront and supply it to runCucumber', async () => { const messages: Envelope[] = [] - const { runnable } = await loadConfiguration({}, environment) - const support = await loadSupport(runnable, environment) - await runCucumber({ ...runnable, support }, environment, (envelope) => - messages.push(envelope) + const { runConfiguration } = await loadConfiguration({}, environment) + const support = await loadSupport(runConfiguration, environment) + await runCucumber( + { ...runConfiguration, support }, + environment, + (envelope) => messages.push(envelope) ) const testStepFinishedEnvelopes = messages.filter( (envelope) => envelope.testStepFinished @@ -78,12 +80,16 @@ describe('runCucumber', () => { it('successfully executes 2 test runs', async () => { const messages: Envelope[] = [] - const { runnable } = await loadConfiguration({}, environment) - const { support } = await runCucumber(runnable, environment, (envelope) => - messages.push(envelope) + const { runConfiguration } = await loadConfiguration({}, environment) + const { support } = await runCucumber( + runConfiguration, + environment, + (envelope) => messages.push(envelope) ) - await runCucumber({ ...runnable, support }, environment, (envelope) => - messages.push(envelope) + await runCucumber( + { ...runConfiguration, support }, + environment, + (envelope) => messages.push(envelope) ) const testStepFinishedEnvelopes = messages.filter( diff --git a/src/api/types.ts b/src/api/types.ts index b105d7682..576428a32 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -29,11 +29,11 @@ export interface IResolvedConfiguration { /** * The final flat configuration object resolved from the configuration file/profiles plus any extra provided. */ - original: IConfiguration + useConfiguration: IConfiguration /** * The format that can be passed into `runCucumber`. */ - runnable: IRunnableConfiguration + runConfiguration: IRunConfiguration } /** @@ -89,7 +89,7 @@ export interface IRunOptionsFormats { /** * @public */ -export interface IRunnableConfiguration { +export interface IRunConfiguration { sources: ISourcesCoordinates support: ISupportCodeCoordinates runtime: IRunOptionsRuntime diff --git a/src/cli/index.ts b/src/cli/index.ts index 459ebe92e..614a08222 100644 --- a/src/cli/index.ts +++ b/src/cli/index.ts @@ -64,18 +64,19 @@ export default class Cli { stderr: this.stderr, env: this.env, } - const { original: configuration, runnable } = await loadConfiguration( - { - file: options.config, - profiles: options.profile, - provided: argvConfiguration, - }, - environment - ) - const { success } = await runCucumber(runnable, environment) + const { useConfiguration: configuration, runConfiguration } = + await loadConfiguration( + { + file: options.config, + profiles: options.profile, + provided: argvConfiguration, + }, + environment + ) + const { success } = await runCucumber(runConfiguration, environment) return { shouldAdvertisePublish: - !runnable.formats.publish && + !runConfiguration.formats.publish && !configuration.publishQuiet && !isTruthyString(this.env.CUCUMBER_PUBLISH_QUIET), shouldExitImmediately: configuration.forceExit, From 42598e282ac50b674e234fe654f6a4f49d09bf02 Mon Sep 17 00:00:00 2001 From: David Goss Date: Thu, 17 Mar 2022 13:51:51 +0000 Subject: [PATCH 22/24] fix hand-written doc --- docs/javascript_api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/javascript_api.md b/docs/javascript_api.md index 4e4883646..e8fe2141f 100644 --- a/docs/javascript_api.md +++ b/docs/javascript_api.md @@ -12,7 +12,7 @@ There are some examples below, and [reference documentation](./api/index.md) for import { loadConfiguration, runCucumber } from '@cucumber/cucumber/api' export async function runTests() { - const { runnable } = await loadConfiguration() + const { runConfiguration } = await loadConfiguration() const { success } = await runCucumber(runnable) return success } @@ -27,7 +27,7 @@ export async function runTests(directory, configFile, failFast) { // things we need to specify about the environment const environment = { cwd: directory } // load configuration from a particular file, and override a specific option - const { runnable } = await loadConfiguration({ file: configFile, provided: { failFast } }, environment) + const { runConfiguration } = await loadConfiguration({ file: configFile, provided: { failFast } }, environment) // load the support code upfront const support = await loadSupport(runnable, environment) // run cucumber, using the support code we loaded already From 052f5e8c6f62920797d0f77145ba7767be359c52 Mon Sep 17 00:00:00 2001 From: David Goss Date: Thu, 17 Mar 2022 13:55:49 +0000 Subject: [PATCH 23/24] Update docs/javascript_api.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: AurĂ©lien Reeves --- docs/javascript_api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/javascript_api.md b/docs/javascript_api.md index e8fe2141f..7018ba0e5 100644 --- a/docs/javascript_api.md +++ b/docs/javascript_api.md @@ -31,7 +31,7 @@ export async function runTests(directory, configFile, failFast) { // load the support code upfront const support = await loadSupport(runnable, environment) // run cucumber, using the support code we loaded already - const { success } = await runCucumber({ ...runnable, support }, environment) + const { success } = await runCucumber({ ...runConfiguration, support }, environment) return success } ``` From 24b420dac0d07deb05f29a2f4bc37d88fdcb8eec Mon Sep 17 00:00:00 2001 From: David Goss Date: Thu, 17 Mar 2022 13:56:39 +0000 Subject: [PATCH 24/24] Update javascript_api.md --- docs/javascript_api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/javascript_api.md b/docs/javascript_api.md index 7018ba0e5..a533096d2 100644 --- a/docs/javascript_api.md +++ b/docs/javascript_api.md @@ -13,7 +13,7 @@ import { loadConfiguration, runCucumber } from '@cucumber/cucumber/api' export async function runTests() { const { runConfiguration } = await loadConfiguration() - const { success } = await runCucumber(runnable) + const { success } = await runCucumber(runConfiguration) return success } ```