Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ESM support (take 2) #1649

Merged
merged 33 commits into from Sep 18, 2021
Merged

add ESM support (take 2) #1649

merged 33 commits into from Sep 18, 2021

Conversation

davidjgoss
Copy link
Contributor

@davidjgoss davidjgoss commented Apr 22, 2021

Support ESM usage with minimal additional flags/configuration. Re-adds the changes originally done in #1589, which were reverted due to the issues described in #1646 (which is now addressed). Fixes #1304.

To allow importing cucumber functions from ESM support code, provide a "wrapper" mjs entry point for ESM projects as described in https://nodejs.org/api/packages.html#packages_approach_1_use_an_es_module_wrapper.

Usage:

cucumber-js --esm

The --esm flag causes us to use import() instead of require() for loading support code - the former works for both ESM and commonjs, where the latter only works for commonjs.

I think we need to consider usage of this in conjunction with on-the-fly transpilers as out of scope for now. For example ts-node is at a very experimental phase with ESM per TypeStrong/ts-node#1007.

Test project: https://github.com/davidjgoss/cucumber-esm-example

TODO:

@davidjgoss
Copy link
Contributor Author

davidjgoss commented Apr 22, 2021

Added a scenario to prove the issue, where user or third-party code (steps, formatters etc) does e.g.:

const TestCaseHookDefinition = require('@cucumber/cucumber/lib/models/test_case_hook_definition')

And we get an error like:

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/models/test_case_hook_definition' is not defined by "exports" in /Users/davidgoss/Projects/cucumber-js/package.json imported from /Users/davidgoss/Projects/cucumber-js/tmp/direct_imports.feature_49/features/step_definitions/cucumber_steps.js
           at throwExportsNotFound (internal/modules/esm/resolve.js:285:9)
           at packageExportsResolve (internal/modules/esm/resolve.js:508:3)
           at trySelf (internal/modules/cjs/loader.js:400:34)
           at Function.Module._resolveFilename (internal/modules/cjs/loader.js:793:24)
           at Function.Module._load (internal/modules/cjs/loader.js:667:27)
           at Module.require (internal/modules/cjs/loader.js:887:19)
           at require (internal/modules/cjs/helpers.js:74:18)
           at Object.<anonymous> (/Users/davidgoss/Projects/cucumber-js/tmp/direct_imports.feature_49/features/step_definitions/cucumber_steps.js:2:32)
           at Module._compile (internal/modules/cjs/loader.js:999:30)
           at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
           at Module.load (internal/modules/cjs/loader.js:863:32)
           at Function.Module._load (internal/modules/cjs/loader.js:708:14)
           at Module.require (internal/modules/cjs/loader.js:887:19)
           at require (internal/modules/cjs/helpers.js:74:18)
           at World.<anonymous> (/Users/davidgoss/Projects/cucumber-js/features/support/hooks.ts:119:11)

This happens whether or not you're using ESM, and is because of the new block added to our package.json:

"exports": {
  "import": "./lib/wrapper.mjs",
  "require": "./lib/index.js"
},

We need this in order for ESM to work (and for CommonJS to still work), but it does have the effect of enforcing that requires can only be done at the entry point, meaning "deep" ones to individual files will fail.

Node has the concept of subpath patterns for this kind of thing, but this can't be mix-and-matched with the usage of exports for ESM vs CommonJS entry points like we have, so that's off the table.


My current thinking: the public API for cucumber-js is what we expose on the main entry point. Once you require other things via their file path, you're into the weeds; package authors understand this. So in principle running with this as it is wouldn't be a breaking change...but it would be disruptive to end users and it's not their fault.

We could instead:

  1. Add things to our main entry point to address the needs of package authors (see list in Changes in 7.2.0 break external reporters #1646)
  2. Submit PRs to those projects to update their imports
  3. Release this change again as semver minor (and be responsive to a possible long tail of small issues)

WDYT @charlierudolph @aurelien-reeves ?

@aurelien-reeves aurelien-reeves added the ⚡ enhancement Request for new functionality label Apr 26, 2021
@jan-molak
Copy link
Member

@davidjgoss to avoid "polluting" the main entry point with functions and classes only package authors need to know about you might want to consider exporting them under some object like internal.

So a regular Cucumber user would only see one additional thing exported by the module, for example:

import { Given, When, Then, internal } from '@cucumber/cucumber'

const definition = new internal.TestCaseHookDefinition(...)

This way you could keep attaching "internal" functions useful for package maintainers without making it disruptive.

Could this work?

@davidjgoss
Copy link
Contributor Author

@jan-molak I think that's a good point yeah. It's still part of the API but at least grouped where it's less commonly used. I think there is some prior art here with formatterHelpers

@TheLudd
Copy link

TheLudd commented May 9, 2021

Have you looked into subpath exports? https://nodejs.org/api/packages.html#packages_subpath_exports
Not sure if it is possible to combine with the import/require statements here https://github.com/cucumber/cucumber-js/pull/1649/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R167 but I think that is the way to expose other exported paths than the main one going forward.

@davidjgoss davidjgoss added this to the 8.0.0 milestone Jun 28, 2021
@coveralls
Copy link

coveralls commented Jul 1, 2021

Coverage Status

Coverage increased (+0.02%) to 98.266% when pulling 8037766 on esm-take-2 into 6e958f1 on main.

@davidjgoss
Copy link
Contributor Author

Thanks for the pointer @TheLudd - a combination of subpath exports and export patterns gets it done:

{
  "exports": {
    ".": {
      "import": "./lib/wrapper.mjs",
      "require": "./lib/index.js"
    },
    "./lib/*": {
      "require": "./lib/*.js"
    }
  },
}

@davidjgoss davidjgoss marked this pull request as ready for review July 1, 2021 16:28
@davidjgoss
Copy link
Contributor Author

@charlierudolph @aurelien-reeves with the fix for deep imports in commonjs this is good to go now.

Copy link
Contributor

@aurelien-reeves aurelien-reeves left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really great, well done! 👍

We may have to add an entry in the changelog for bringing back esm support

And, the esm.md is a good idea 👍
Could we add some code examples in it?

src/importers.js Outdated Show resolved Hide resolved
@davidjgoss davidjgoss changed the title cli: ESM take 2 cli: add ESM support with --esm (take 2) Jul 2, 2021
@davidjgoss
Copy link
Contributor Author

And, the esm.md is a good idea 👍 Could we add some code examples in it

Good point, I've added example code now.

@davidjgoss davidjgoss marked this pull request as ready for review September 16, 2021 14:01
@aurelien-reeves
Copy link
Contributor

aurelien-reeves commented Sep 17, 2021

The failures with the Windows builds seems legit :(

I'll take a look as soon as I have access to a Windows computer

@davidjgoss
Copy link
Contributor Author

@aurelien-reeves yeah I think adding allowJs might have done this. I'll probably just back that out and we'll live with doing an ugly require for now

@aurelien-reeves
Copy link
Contributor

🎉

@nemanja-tosic
Copy link

nemanja-tosic commented Oct 16, 2021

What is the ETA for this feature? I see it's part of 8.0.0 but I can't find any specific dates.

@petermorlion
Copy link

@nemanja-tosic I don't think there is a specific date. There is one more issue that needs to be resolved as part of the 8.0.0 milestone. Disclaimer: I'm not a contributor to cucumber-js.

@davidjgoss
Copy link
Contributor Author

@nemanja-tosic @petermorlion we're aiming to get a release candidate out in the next couple of days, please subscribe to releases to hear about it straight away.

eman2673 added a commit to eman2673/cucumber-js that referenced this pull request Jan 28, 2022
* Cleaning up feature file

* Cleaning up feature file

* Use new messages without protobuf dependencies, and Markdown support. (cucumber#1645)

* Start refactoring the code to use the new messages from the json-schema branch.

To use those messages, first `npm link` every @cucumber/* module we depend on in the monorepo.
Then, `npm link [all the modules]` from this repo.

* Everything compiles

* Fix import of messages module

* Fix import of messages in coordinator

* Update predictableTimestamp to work with new messages

* Fix tests related to capture groups

* Fix some more tests

* Fix another spec

* All unit tests passing

* cck fixes

* Make more scenarios pass

* Fix import

* Export Status

* All features passing

* npm test is now passing

* Update @cucumber dependencies

* Add support for Markdown

* update yarn lockfile

* Fix npm dependencies

* Use .feature.md extension. Update dependencies.

Co-authored-by: aurelien-reeves <aurelien.reeves@smartbear.com>
Co-authored-by: davidgoss <david@davidgoss.co>

* Update @cucumber/* dependencies (cucumber#1671)

* Bump @cucumber/html-formatter

* cli: have gherkin emit uris relative to the cwd (cucumber#1672)

* pass relativeTo to gherkin-streams

* fix json formatter

* remove more usages of relative

* another one

* another one

* last one

* lint

* fix this test

* fix this test

* add changelog

Co-authored-by: Aslak Hellesøy <1000+aslakhellesoy@users.noreply.github.com>

* Revert "cli: have gherkin emit uris relative to the cwd (cucumber#1672)"

This reverts commit 5a21c22.

* cli: relative path fix again, now with windows (cucumber#1673)

* generate html report on runs

* reinstate original change

This reverts commit 8a54a1b.

* update test

* fix pickle filter for windows

* debt: add retry for publish tests (cucumber#1674)

* add tag to feature

* retry config for feature-test run

* chore(deps): update dependency @types/bluebird to v3.5.35 (cucumber#1676)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/lodash to v4.14.170 (cucumber#1678)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* format: report total steps correctly in progress bar (cucumber#1669)

* make cck fail: remove reordering of testCase messages

* add new function to deal with testCase

* dont emit testCase from PickleRunner

* include in result

* fix up some tests

* move tests to right places

* emit test cases from serial runtime

* scrappy impl to get serial working

* remove unused field

* refactor structures, fix tests

* make coordinator api more promisey

* start to hook up parallel

* assemble test cases without ITestStep

* remove unused function

* TestCase is source of truth

* TestCaseRunner is more accurate than PickleRunner?

* make parallel runtime work with this

* add explanatory comment

* fix progress bar formatter counts

* changelog

* remove temp tag

Co-authored-by: Aurélien Reeves <aurelien.reeves@smartbear.com>

* clarify changelog entry audience

* cleanup

Co-authored-by: Aurélien Reeves <aurelien.reeves@smartbear.com>

* chore(deps): update dependency @types/node to v14.17.1 (cucumber#1680)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/express to v4.17.12 (cucumber#1677)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/semver to v7.3.6 (cucumber#1679)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update unit test packages (cucumber#1684)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency typescript to v4.3.2 (cucumber#1682)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency sinon to v11 (cucumber#1686)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* Publish reports to https://reports.cucumber.io

* Revert "Publish reports to https://reports.cucumber.io"

This reverts commit 85b0f1a.

* docs: more clarification on setDefaultTimeout

* docs: mention that coord process.env copies to workers (cucumber#1693)

Co-authored-by: Aurélien Reeves <aurelien.reeves@smartbear.com>

* docs: call out change of after hook result in migration guide (cucumber#1692)

* document change of after hook result

* better wording

* whoops

* Update docs/migration.md

Co-authored-by: Aurélien Reeves <aurelien.reeves@smartbear.com>

Co-authored-by: Aurélien Reeves <aurelien.reeves@smartbear.com>

* Empty rerun file exits running no scenarios (cucumber#1302) (cucumber#1568)

Co-authored-by: Aslak Hellesøy <1000+aslakhellesoy@users.noreply.github.com>
Co-authored-by: Aurélien Reeves <aurelien.reeves@smartbear.com>
Co-authored-by: David Goss <david@davidgoss.co>

* chore(deps): update eslint packages (cucumber#1683)

* chore(deps): update eslint packages

* autofix prettier

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Charles Rudolph <charles.w.rudolph@gmail.com>

* Update migration guide links (cucumber#1694)

* typescript: type this as IWorld in user functions (cucumber#1690)

* type this as any in user fns, add test

* update changelog

* setWorldConstructor for completeness

* use generics to do it right

* Update CHANGELOG.md

* use a clearer generic type name

* Pass --tags correctly, remove duplication

* Revert "Pass --tags correctly, remove duplication"

This reverts commit dbcb177.

* debt: add things to main entry point that people need (cucumber#1697)

* ensure hook parameters are exported

* dont need to mark this arg as possibly undefined

* export runtime options

* expose formatter options

* build: only audit production dependencies

* chore: remove redundant profile config

* Release 7.3.0

* 7.3.0

* refactor documentation (part 1) (cucumber#1699)

* add export of cli --help

* dont need note about sync

* update world docs

* document retry

* document profiles

* start to trim stuff from cli

* more on profiles

* document parallel

* add linsk to readmr

* Fixed reports banner to point to https://cucumber.io/docs/cucumber/environment-variables/ (cucumber#1703)

* Add more arrow function warnings (cucumber#1705)

* Add more arrow function warnings

* Update links

* fix(cli): allow targetting same file multiple times (cucumber#1708)

* fix(cli): allow targetting same file multiple times

* Add example to "run multiple scenarios" scenario outline

* Update CHANGELOG.md

* Deduplicate deduplicate message

Co-authored-by: David Goss <david@davidgoss.co>

* update supported node versions (cucumber#1704)

* update supported node versions

* fix changelog

* update package json

Co-authored-by: David Goss <david@davidgoss.co>

* chore(deps): update dependency ts-node to v10 (cucumber#1687)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency fs-extra to v10 (cucumber#1685)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency tsd to v0.17.0 (cucumber#1681)

* chore(deps): update dependency tsd to v0.17.0

* Add @tsd/typescript to dependency-lint ignore list

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: aurelien-reeves <aurelien.reeves@smartbear.com>

* cli: remove deprecated retryTagFilter option (cucumber#1713)

* remove retryTagFilter camelCased option

* add changelog entry

* [WIP] remove lodash (cucumber#1709)

* remove lodash wip

* compiles

* most unit tests + lint

* passing unit tests

* fix features

* fix feature tests

Co-authored-by: David Goss <david@davidgoss.co>
Co-authored-by: Aurélien Reeves <aurelien.reeves@smartbear.com>

* fix(deps): update dependency commander to v8 (cucumber#1720)

* fix(deps): update dependency commander to v8

* Fix commander upgrade issue

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: aurelien-reeves <aurelien.reeves@smartbear.com>

* chore(deps): update dependency @types/node to v14.17.4 (cucumber#1715)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency typescript to v4.3.5 (cucumber#1716)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency mocha to v9 (cucumber#1719)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/chai to v4.2.19 (cucumber#1714)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update eslint packages (cucumber#1718)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update cucumber packages (cucumber#1717)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* docs: fix node version mentioned in example

* Fix import in docs

* expose promise timeout helper (cucumber#1566)

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* IParameterTypeDefinition fix (cucumber#1733)

Co-authored-by: Ludek Novy <ludeknovy@fastmail.com>

* bringing back v6/5 props (cucumber#1732)

* bringing back v6/5 props

* changelog update

* Update CHANGELOG.md

Co-authored-by: David Goss <david@davidgoss.co>

Co-authored-by: Ludek Novy <ludeknovy@fastmail.com>
Co-authored-by: David Goss <david@davidgoss.co>

* remove support for generators (cucumber#1725)

* Explain how to use yarn to list commands (cucumber#1730)

Co-authored-by: Matt Wynne <matt@mattwynne.net>

* Add a 'reindent' test helper (cucumber#1722)

* Upgrade dependencies (cucumber#1736)

* (deps) update dependency lint (cucumber#1726)

* chore: update changelog on main

* add release step to edit+publish gh release

* Bump reindent-template-literals to 1.1.0 (cucumber#1742)

* chore(deps): update dependency @types/express to v4.17.13 (cucumber#1744)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): pin dependency reindent-template-literals to 1.1.0 (cucumber#1743)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/glob to v7.1.4 (cucumber#1746)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/mustache to v4.1.2 (cucumber#1747)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/fs-extra to v9.0.12 (cucumber#1745)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/node to v14.17.6 (cucumber#1749)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/mz to v2.7.4 (cucumber#1748)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/progress to v2.0.4 (cucumber#1750)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/resolve to v1.20.1 (cucumber#1751)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/node to v14.17.7 (cucumber#1757)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/semver to v7.3.8 (cucumber#1752)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/stream-buffers to v3.0.4 (cucumber#1753)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/tmp to v0.2.1 (cucumber#1754)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update eslint packages (cucumber#1756)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/verror to v1.10.5 (cucumber#1755)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update unit test packages (cucumber#1758)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency ts-node to v10.1.0 (cucumber#1760)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/mocha to v9 (cucumber#1761)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* Make parameter type generic for value checker (cucumber#1764)

* Add retro notes from new contributors ensemble (cucumber#1765)

* Add retro folder and notes from last Friday

* Add retro doc from the previous new-contributors session

* Add some more actions from previous retro

* Add pointer to retro-tools

* Use youtube link for stream which is permanent

* Move retro stuff into docs folder

* Fix link to issue

* Tweak CONTRIBUTING guide to be more beginner-friendly (cucumber#1767)

As mentioned in the new contributors ensemble retro[1]

[1]: https://github.com/cucumber/cucumber-js/blob/main/docs/retro/2021/07/17.md#what-should-we-decide--change-for-next-time

* docs: minor fixes for the styling consistency (cucumber#1769)

* Yarn to npm (cucumber#1774)

* Change yarn to npm

Co-authored-by: Matt Wynne <matt@cucumber.io>

* Changed the contributing guide use to npm

Co-authored-by: Matt Wynne <matt@cucumber.io>

* fixed the autoformat from vscode

* updated the build.yml to now work npm commands

* fixed the update-dependencies

* try using npm 7 with all node versions

Co-authored-by: Matt Wynne <matt@cucumber.io>
Co-authored-by: David Goss <david@davidgoss.co>

* Use typescript incremental build to speed up compilation (cucumber#1766)

Co-authored-by: David Goss <david@davidgoss.co>

* chore(deps): update dependency @types/node to v14.17.12 (cucumber#1778)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/progress to v2.0.5 (cucumber#1779)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency mocha to v9.1.1 (cucumber#1780)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency ts-node to v10.2.1 (cucumber#1781)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency typescript to v4.4.2 (cucumber#1782)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/node to v14.17.14 (cucumber#1785)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update eslint packages (cucumber#1787)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update eslint packages (cucumber#1786)

* chore(deps): update eslint packages

* Fix linting errors

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: aurelien-reeves <aurelien.reeves@smartbear.com>

* Deactivate renovate dependency dashboard

As discussed at our last community meeting, we do not want those dashboards.

* chore: update @cucumber/* dependencies, fix willBeRetried usage (cucumber#1776)

* latest dependencies

* make it just about compile

* fix test case runner

* fix summary helper

* fix formatters (ish)

* fix last bit in formatters

* update fixtures for feature tests

* fix attachments cck

* hook up retry cck

* lint

* update doc

* update lockfile

* Add configuration cli option (cucumber#1794)

* Config file Option update

* Add --config option in the argv parser

* Add a scenario in profiles.feature

* Add unit tests and refactorize profile_loader

* Consider the new --config option when loading profiles

* Add some documentation

* Add an entry in the changelog

Co-authored-by: deepziem <54252717+deepziem@users.noreply.github.com>

* feat: add pickleStep to step hook function arg (cucumber#1775)

* add to interface

* implement

* update api ref

* update changelgo

* add test

* Increase precision of test case duration measurements. (cucumber#1793)

* fix(formatter): Enable calling parseTestCaseAttempt on test cases that haven't completed (cucumber#1531)

* fix(formatter): Enable calling parseTestCaseAttempt on test cases that haven't completed yet

* Instanciate a proper TestStepResult when parsing TestCaseAttempt

* Add unit tests

* Refactor testCaseAttemptParser unit tests

Co-authored-by: Aurélien Reeves <aurelien.reeves@smartbear.com>
Co-authored-by: Aslak Hellesøy <1000+aslakhellesoy@users.noreply.github.com>

* add ESM support (take 2) (cucumber#1649)

* Revert "temporarily revert ESM change (cucumber#1647)"

This reverts commit 084c1f2.

* add failing scenario for deep imports

* define entry point with dot

* make deep imports work via export patterns

* move doc to own file

* link to doc from readme

* add changelog entry

* add example to doc

* remove confusing comment

* remove cli option, use import by default

* update documentation

* remove redundant describe

* fix ordering

* Update features/esm.feature

Co-authored-by: Aurélien Reeves <aurelien.reeves@smartbear.com>

* Update features/esm.feature

Co-authored-by: Aurélien Reeves <aurelien.reeves@smartbear.com>

* simplify tagging

* use import only if a javascript file

* add note about no transpilers

* inline to avoid confusing reassignment

* whoops, re-add try/catch

* use require with transpilers; import otherwise

* remove pointless return

* support .cjs config file

* type and import the importer

* actually dont import - causes issues

Co-authored-by: Aurélien Reeves <aurelien.reeves@smartbear.com>

* docs: add rule to keywords for i18n command (cucumber#1800)

* add rule to keywords for i18n command

* Fix i18n example

Co-authored-by: aurelien-reeves <aurelien.reeves@smartbear.com>

* set correct version

* debt: remove --predictable-ids option (cucumber#1801)

* WIP

* fix up testing

* add changelog entry

* chore(deps): update dependency @types/fs-extra to v9.0.13 (cucumber#1803)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/node to v14.17.20 (cucumber#1804)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency typescript to v4.4.3 (cucumber#1805)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @sinonjs/fake-timers to v8 (cucumber#1810)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update eslint packages (cucumber#1809)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency coffeescript to v2.6.0 (cucumber#1808)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* fix(deps): update cucumber packages (cucumber#1807)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update unit test packages (cucumber#1806)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update cucumber packages (major) (cucumber#1791)

* chore(deps): update cucumber packages

* Implement new CCK tests from CCK 8.0.0

* Bump compatibility-kit to v9.0.0

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: aurelien-reeves <aurelien.reeves@smartbear.com>

* fix(deps): update cucumber packages (major) (cucumber#1811)

* chore(deps): update cucumber packages

* Implement new CCK tests from CCK 8.0.0

* Bump compatibility-kit to v9.0.0

* fix(deps): update cucumber packages

* Fix requires of cucumber-expressions GeneratedExpression class

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: aurelien-reeves <aurelien.reeves@smartbear.com>

* Fix link to 7.3.1

* support: re-add setDefinitionFunctionWrapper (minus generator step logic) (cucumber#1795)

* Revert "remove support for generators (cucumber#1725)"

This reverts commit a2dcce6.

* Remove bluebird and related dependencies

* Remove support for generator functions

* Update mocha config

* Add forbid-pending to mocharc too

* Update migration and api_reference documents

* Update changelog

* Update CHANGELOG entry

* Fix dependency audit issue

* List formatters in help command (cucumber#1798)

* feature/list-formatters-in-help-command adding documentation field to Formatter class

* feature/list-formatters-in-help-command refactoring getConstructorByType method to hold a Record<string, typeof Formatter>

* feature/list-formatters-in-help-command improving return statement to deal with cases where the default formatter should be returned

* feature/list-formatters-in-help-command after running lint fix

* feature/list-formatters-in-help-command fixing ternary so logic does not invoke load customFormatter

* feature/list-formatters-in-help-command creating class that will hold the description of the formatters

* feature/list-formatters-in-help-command adding logic to extract the correct documentation for each formatter and altering the IFormatter type to have this field

* feature/list-formatters-in-help-command reverting changes made by adding the documentation field to the formatter object

* feature/list-formatters-in-help-command adding documentation field to html formatter

* feature/list-formatters-in-help-command adding documentation member to json/message/progress/rerun/summary/usage formatters

* feature/list-formatters-in-help-command removing formatterDocumentationHelper class as it is no longer needed

* feature/list-formatters-in-help-command adding documentation field to rerun formatter

* feature/list-formatters-in-help-command fixing return type of getConstructorByType method and running linter

* feature/list-formatters-in-help-command removing unnecessary await

* feature/list-formatters-in-help-command creating Formatters class to hold different formatters and extracting them from the builder class

* feature/list-formatters-in-help-command adding documentation field to progress-bar/snippets/usage-json formatters

* feature/list-formatters-in-help-command added method in formatters class to help build the documentation string

* feature/list-formatters-in-help-command used recently added method to list all available formatters

* feature/list-formatters-in-help-command adding documentation to snippets/progress-bar/usage-json formatters

* feature/list-formatters-in-help-command adding new line to format option so that formatters will appear on new line

* feature/list/formatters-in-help-command converting documentation field inside formatter to be public and static. Refactoring buildFormatterDocumentationString

* feature/list/formatters-in-help-command indenting formatters and removing extra space

* feature/list-formatters-in-help-command refactoring building the documentation string

* feature/list-formatters-in-help-command adding feature to changelog

* (docs,snippets): redo formatter docs, new loading strategy for snippet syntaxes (cucumber#1812)

* start the formatters doc

* document summary formatter

* document progress formatter

* progress bar

* regenerate gifs

* clutching at straws here

* optimise gifs

* edit out the summary failure one for mpw

* describe unhappy path for summary

* html formatter doco

* usage and usage-json doco

* replace html formatter screenshot

* try again?

* update git attrs

* wip snippets doco

* readd png

* better version of html screenshot

* better again

* document message and json formatters

* fix messages link

* more info on snippets

* finish up snippets

* rerun docs

* finish up

* load snippet syntax in same way as formatters

* clarify what the options are

* tweak rerun docs

* differentiate retry vs rerun in docs

* simplify readme

* add changelog

* make promise interface return a promise

* add example output for snippet interfaces

* runtime: don't fail the test run for undefined/ambiguous when in dry run (cucumber#1814)

* update scenario (failing)

* clarify

* change logic

* refactor to share logic across serial+parallel

* add changelog

* add doco for dry run

* add link to changelog entry

* Fix github diff link to use main instead of master

* Delete .whitesource

We have renovate.json

* Upgrade dependencies 20211018 (cucumber#1820)

* Update @cucumber dependencies

* Update mocha,ts-node,typescript

* fall back to require where file doesnt have a native js extension (cucumber#1819)

Co-authored-by: Aslak Hellesøy <1000+aslakhellesoy@users.noreply.github.com>

* Add Release workflow - see https://github.com/cucumber/.github/blob/main/RELEASING.md

* Add missing changelog and contributor entries

* Add missing comma

* Format changelog (cucumber#1821)

* Format changelog

* Fix links

* Fix release workflow

* Update release process, use .yaml extension for workflows

* Release 8.0.0-rc.1

* Refactor build helpers (cucumber#1826)

* Extract functions into their own files

* Allow injection of exclusion filter to make easier to test

* Make sure we always exclude ourselves

* chore(deps): pin dependencies (cucumber#1827)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): pin dependencies (cucumber#1828)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): pin dependency mocha to 9.1.3 (cucumber#1829)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/node to v14.17.32 (cucumber#1830)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/semver to v7.3.9 (cucumber#1831)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/tmp to v0.2.2 (cucumber#1832)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency coffeescript to v2.6.1 (cucumber#1833)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @cucumber/compatibility-kit to v9.1.2 (cucumber#1834)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency ts-node to v10.4.0 (cucumber#1836)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/glob to v7.2.0 (cucumber#1835)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency tsd to v0.18.0 (cucumber#1837)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update eslint packages (cucumber#1838)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* Ignore OS X files

* chore(deps): update dependency @types/node to v16 (cucumber#1839)

* Factor out instructions about dependency upgrades into central file

* Update RELEASING.md

* Fix-1735 Parentheses in developers' paths break cucumber's own tests WIP (cucumber#1824)

* Extract functions into their own files

* Allow injection of exclusion filter to make easier to test

* Make sure we always exclude ourselves

* Add unit test for getDefinitionLineAndUri

* -adds regex pattern for stack traces
-removes dependencies for StackFram library

* - adds "source-map-support" dependency
- progress towards fixing bug for paths with parentheses Cucumber's own features fail when parent directory contains parentheses cucumber#1735
- gets accurate line numbers for Error stacks in typescript

Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Matt Wynne <matt@mattwynne.net>

* update cspotcode/source-map-support

* remove .DS_Store

* updates unit test to support paths on windows

Co-authored-by: Matt Wynne <matt@cucumber.io>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Dane Parchment <dparchmentjr@gmail.com>

* Removes assertion for a failing test that's no longer needed

Co-authored-by: Matt Wynne <matt@cucumber.io>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Dane Parchment <dparchmentjr@gmail.com>

* Removes exception for the custom stack trace feature

Co-authored-by: Matt Wynne <matt@cucumber.io>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Dane Parchment <dparchmentjr@gmail.com>

* Updates changelog

Co-authored-by: Matt Wynne <matt@cucumber.io>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Dane Parchment <dparchmentjr@gmail.com>

* fixed linting for previous commit

Co-authored-by: Matt Wynne <matt@cucumber.io>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Dane Parchment <dparchmentjr@gmail.com>

Co-authored-by: Matt Wynne <matt@cucumber.io>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Matt Wynne <matt@mattwynne.net>
Co-authored-by: Dane Parchment <dparchmentjr@gmail.com>

* chore(deps): update dependency @types/node to v16.11.11 (cucumber#1854)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* fix(deps): update dependency @cucumber/create-meta to v6.0.4 (cucumber#1856)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update eslint packages (cucumber#1855)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency tsd to v0.19.0 (cucumber#1857)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency eslint-plugin-promise to v5.2.0 (cucumber#1861)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update unit test packages (cucumber#1860)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update unit test packages (cucumber#1859)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency typescript to v4.5.2 (cucumber#1858)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* Update esm.md (cucumber#1862)

Move the chapter about configuration file at the top of the doc to give it more visibility

* Smoother onboarding for Windows developers (cucumber#1863)

* Add a warning for Windows developers

The tests won't work if you don't have "Developer Mode" enabled. See cucumber#1852

Co-authored-by: Aurelien Reeves <aurelien.reeves@smartbear.com>

* Explain about Developer Mode in contributing guide

* Use cross-platform command for copying files

* Update changelog

* No need to npx in a node script

Co-authored-by: Aurelien Reeves <aurelien.reeves@smartbear.com>

* api: add runCucumber function internally (cucumber#1849)

* Export version number of cucumber-js (cucumber#1866)

* Export version number of cucumber-js

* Update CHANGELOG.md

* Add package.json to node module exports (cucumber#1870)

* Add package.json to node module exports

* Update changelog

* Add a scenario to validate we can export package.json and version numbers

* Use template literal rather than string concatenation in direct_imports.feature

* Change entry in the changelog

* handle spaces in the absolute path (cucumber#1845) (cucumber#1847)

* put quotes around the absolute path (cucumber#1845)

added quotes to wrap the path to summary.txt
to ensure that paths containing spaces are read properly

Co-authored-by: Matt Wynne <matt@cucumber.io>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Dane Parchment <dparchmentjr@gmail.com>

* fix indentations in feature file

* fixed the bug but needs unit testing

* fixed linting

* adds unit testing for handling paths with quotes

* adds the fix to option splitter files

* updated changelog and removed wip tag

Co-authored-by: Matt Wynne <matt@cucumber.io>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Dane Parchment <dparchmentjr@gmail.com>
Co-authored-by: Aslak Hellesøy <1000+aslakhellesoy@users.noreply.github.com>

* Update contributing guide

* chore: use new ci-environment package instead of create-meta (cucumber#1868)

* install lib

* WIP

* bump other cucumber deps

* finish impl

* add changelog

* redundant comment

* update library, simplify mapping

* simplify again

* update changelog

* build: add build artifact for reports

* Replace 1 instance of regex with cucumber expression (cucumber#1872)

* Replace regex with cucumber expression.

We decided to split the step definition into two. So that the patterns used be simpler.

Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Matt Wynne <matt@cucumber.io>
Co-authored-by: Dane Parchment Jr <dparchmentjr@gmail.com>

* Fix linting issues

Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Matt Wynne <matt@cucumber.io>
Co-authored-by: Dane Parchment Jr <dparchmentjr@gmail.com>
Co-authored-by: aurelien-reeves <aurelien.reeves@smartbear.com>

* Replace 2 instances of regex with cucumber expression (cucumber#1873)

* Replace 2 instance of regex with cucumber expression

* Fixing linting issues

* Optimizing const string

* Making Prettier: from " to '

* chore(deps): pin dependencies (cucumber#1874)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/tmp to v0.2.3 (cucumber#1876)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency express to v4.17.2 (cucumber#1877)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/node to v16.11.17 (cucumber#1875)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency tsd to v0.19.1 (cucumber#1879)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency prettier to v2.5.1 (cucumber#1878)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency typescript to v4.5.4 (cucumber#1880)

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: David Goss <david@davidgoss.co>

* fix(deps): update dependency @cucumber/ci-environment to v8.0.1 (cucumber#1881)

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: David Goss <david@davidgoss.co>

* chore(deps): update unit test packages (cucumber#1882)

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: David Goss <david@davidgoss.co>

* chore(deps): update eslint packages (major) (cucumber#1840)

* chore(deps): update eslint packages

* Update eslint configuration

- remove plugins which prevent upgrading eslint
- update the configuration based on the one from cucumber-expression
- update a piece of code to make linting happy

Note: some rules have been deactivated to make the update of eslint
possible without breaking our build. Those rules may be deactivated
later as part of dedicated pull requests.

* Activate eslint-plugin-simple-import-sort

* Add simple-import-sort to dependency-lint ignore list

* Revert "Add simple-import-sort to dependency-lint ignore list"

This reverts commit 1bd2f32.

* Revert "Activate eslint-plugin-simple-import-sort"

This reverts commit a0075e7.

* Remove eslint-plugin-simple-import-sort

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: aurelien-reeves <aurelien.reeves@smartbear.com>

* chore: remove defunct npm script

* fix: update colors@1.4.0 cli-table2@0.6.1  (cucumber#1886)

* Update package.json

A Security Vuln was identified in the Colors package for >1.4.0, offending packages being `1.4.1`, `1.4.44-liberty`
- [source1](https://twitter.com/snyksec/status/1480286811482206216?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Etweet)
- [source2](https://twitter.com/snyksec/status/1480286811482206216?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Etweet)
- [source3](https://security.snyk.io/vuln/SNYK-JS-COLORS-2331906)

This PR pins the color package to `1.4.0` as advised on the [snyk page](https://snyk.io/blog/open-source-maintainer-pulls-the-plug-on-npm-packages-colors-and-faker-now-what/)

* chore: update changelog

* fix: update and pin cli-table3@0.6.1

* chore: update CHANGELOG

* chore: update lockfile with new pinned versions

* Release 8.0.0-rc.2

* Add a retro

Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Kate Dames <kate.funficient@gmail.com>

* Extract prettier config from eslintrc (cucumber#1893)

This is a more conventional place to store prettier config, and it means
that VSCode's prettier plugin can automatically find it.

* chore: bump dependency with vulnerability

* build: only build on main and for PRs

* chore: switch from colors to chalk (cucumber#1895)

* swap out dependencies

* reimpl

* add changelog entry

* remove unused import

* Replace some uses of `any` type (cucumber#1892)

* Replace use of `any` type with `messages.Envelope`

Part of cucumber#1648

Co-authored-by: Kate Dames <kate.funficient@gmail.com>
Co-authored-by: Emmanuel Ola <54866720+eoola@users.noreply.github.com>

* Replace use of `any` with a custom World in CCK example

Part of cucumber#1648

Co-authored-by: Emmanuel Ola <54866720+eoola@users.noreply.github.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Kate Dames <kate.funficient@gmail.com>

* Replace another use of `any` with a custom type

Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Kate Dames <kate.funficient@gmail.com>

* Replace another use of `any` type

Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Kate Dames <kate.funficient@gmail.com>

Co-authored-by: Kate Dames <kate.funficient@gmail.com>
Co-authored-by: Emmanuel Ola <54866720+eoola@users.noreply.github.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>

* docs: improve profiles documentation (cucumber#1897)

* Update profiles.md

* Update docs/profiles.md

Co-authored-by: Aurélien Reeves <aurelien.reeves@smartbear.com>

Co-authored-by: Aurélien Reeves <aurelien.reeves@smartbear.com>

* Add new-contributors retro

Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Kate Dames <kate.funficient@gmail.com>

* Consolidate retro files

* Removing usage of lodash

Co-authored-by: Aslak Hellesøy <1000+aslakhellesoy@users.noreply.github.com>
Co-authored-by: aurelien-reeves <aurelien.reeves@smartbear.com>
Co-authored-by: davidgoss <david@davidgoss.co>
Co-authored-by: Aslak Hellesøy <aslak.hellesoy@gmail.com>
Co-authored-by: David Goss <dgoss@whiteclarkegroup.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: jshifflet <jason.shifflet@gmail.com>
Co-authored-by: Charles Rudolph <charles.w.rudolph@gmail.com>
Co-authored-by: Nico Jansen <jansennico@gmail.com>
Co-authored-by: Matt Wynne <matt@cucumber.io>
Co-authored-by: Ludek <13610612+ludeknovy@users.noreply.github.com>
Co-authored-by: Ludek Novy <ludeknovy@fastmail.com>
Co-authored-by: Cucumber Ensemble <87445349+cucumber-ensemble@users.noreply.github.com>
Co-authored-by: Matt Wynne <matt@mattwynne.net>
Co-authored-by: 16sheep <marjutubli@gmail.com>
Co-authored-by: Dmytro Shpakovskyi <Marketionist@users.noreply.github.com>
Co-authored-by: abelalmeida <abelalmeida@u.boisestate.edu>
Co-authored-by: deepziem <54252717+deepziem@users.noreply.github.com>
Co-authored-by: Joaquín Sorianello <joac@users.noreply.github.com>
Co-authored-by: Jan Molak <1089173+jan-molak@users.noreply.github.com>
Co-authored-by: David Goss <david.goss@matillion.com>
Co-authored-by: Tomer Ben-Rachel <tomerpacific@gmail.com>
Co-authored-by: Emmanuel Ola <54866720+eoola@users.noreply.github.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Dane Parchment <dparchmentjr@gmail.com>
Co-authored-by: Karla Aparecida Justen <justen.karla@gmail.com>
Co-authored-by: Manny <mannyis@typingona.computer>
Co-authored-by: Kate Dames <kate.funficient@gmail.com>
Co-authored-by: Michael Morris <35374244+michaelm-rsi@users.noreply.github.com>
davidjgoss added a commit that referenced this pull request Feb 20, 2022
* [#1044] allow assignment of work using api hook

* [#1044] Using array instead of iterable
adding id to IWorker for easy lookup of in progress pickles

* [#1044] Adding type for parallelCanAssign
Simplifying tests

* [#1044] Using variable for workers instead of repeating _.values.
No need for oneWokeWorker check. inProgressPickles is adequate for starters

* [#1044] Mansplaining the custom worker assignment process

* [#1044] Making casing consistent

* Instead of killing the job, make sure at least 1 worker is assigned

* Detailing example a bit more.
Slight adjustments for fallback to serial processing

* Put close worker back. No longer reused

* Utilizing ParallelAssignmentValidator type for ISupportCodeLibrary.parallelCanAssign
1 member in IWorker to cover all states

* Moving idle state to worker ready message
Defaulting state to new

* [#1044] Emitting warning for all workers idle
Correct contradiction in README.md
Simplifying example in README.md

* Resolving some minor README issues

* [#1044] Refactoring out nextPickleIndex + README example as test

* Omitting complex 3 cause cannot guaranty the worker as both will be ready for work

* Dropping use of _.values to iterate for waking workers

* copy the pickleIds to leave the passed argument intact

* Parsing test cases to verify order and parallelism

* Using spawn tag to get errorOutput for warning validation
Explicit step definitions for parallel test verification

* Simplify tests (#4)

Cleaning up feature file

* Resolve conflicts (#5)

* Cleaning up feature file

* Cleaning up feature file

* Use new messages without protobuf dependencies, and Markdown support. (#1645)

* Start refactoring the code to use the new messages from the json-schema branch.

To use those messages, first `npm link` every @cucumber/* module we depend on in the monorepo.
Then, `npm link [all the modules]` from this repo.

* Everything compiles

* Fix import of messages module

* Fix import of messages in coordinator

* Update predictableTimestamp to work with new messages

* Fix tests related to capture groups

* Fix some more tests

* Fix another spec

* All unit tests passing

* cck fixes

* Make more scenarios pass

* Fix import

* Export Status

* All features passing

* npm test is now passing

* Update @cucumber dependencies

* Add support for Markdown

* update yarn lockfile

* Fix npm dependencies

* Use .feature.md extension. Update dependencies.

Co-authored-by: aurelien-reeves <aurelien.reeves@smartbear.com>
Co-authored-by: davidgoss <david@davidgoss.co>

* Update @cucumber/* dependencies (#1671)

* Bump @cucumber/html-formatter

* cli: have gherkin emit uris relative to the cwd (#1672)

* pass relativeTo to gherkin-streams

* fix json formatter

* remove more usages of relative

* another one

* another one

* last one

* lint

* fix this test

* fix this test

* add changelog

Co-authored-by: Aslak Hellesøy <1000+aslakhellesoy@users.noreply.github.com>

* Revert "cli: have gherkin emit uris relative to the cwd (#1672)"

This reverts commit 5a21c22.

* cli: relative path fix again, now with windows (#1673)

* generate html report on runs

* reinstate original change

This reverts commit 8a54a1b.

* update test

* fix pickle filter for windows

* debt: add retry for publish tests (#1674)

* add tag to feature

* retry config for feature-test run

* chore(deps): update dependency @types/bluebird to v3.5.35 (#1676)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/lodash to v4.14.170 (#1678)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* format: report total steps correctly in progress bar (#1669)

* make cck fail: remove reordering of testCase messages

* add new function to deal with testCase

* dont emit testCase from PickleRunner

* include in result

* fix up some tests

* move tests to right places

* emit test cases from serial runtime

* scrappy impl to get serial working

* remove unused field

* refactor structures, fix tests

* make coordinator api more promisey

* start to hook up parallel

* assemble test cases without ITestStep

* remove unused function

* TestCase is source of truth

* TestCaseRunner is more accurate than PickleRunner?

* make parallel runtime work with this

* add explanatory comment

* fix progress bar formatter counts

* changelog

* remove temp tag

Co-authored-by: Aurélien Reeves <aurelien.reeves@smartbear.com>

* clarify changelog entry audience

* cleanup

Co-authored-by: Aurélien Reeves <aurelien.reeves@smartbear.com>

* chore(deps): update dependency @types/node to v14.17.1 (#1680)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/express to v4.17.12 (#1677)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/semver to v7.3.6 (#1679)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update unit test packages (#1684)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency typescript to v4.3.2 (#1682)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency sinon to v11 (#1686)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* Publish reports to https://reports.cucumber.io

* Revert "Publish reports to https://reports.cucumber.io"

This reverts commit 85b0f1a.

* docs: more clarification on setDefaultTimeout

* docs: mention that coord process.env copies to workers (#1693)

Co-authored-by: Aurélien Reeves <aurelien.reeves@smartbear.com>

* docs: call out change of after hook result in migration guide (#1692)

* document change of after hook result

* better wording

* whoops

* Update docs/migration.md

Co-authored-by: Aurélien Reeves <aurelien.reeves@smartbear.com>

Co-authored-by: Aurélien Reeves <aurelien.reeves@smartbear.com>

* Empty rerun file exits running no scenarios (#1302) (#1568)

Co-authored-by: Aslak Hellesøy <1000+aslakhellesoy@users.noreply.github.com>
Co-authored-by: Aurélien Reeves <aurelien.reeves@smartbear.com>
Co-authored-by: David Goss <david@davidgoss.co>

* chore(deps): update eslint packages (#1683)

* chore(deps): update eslint packages

* autofix prettier

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Charles Rudolph <charles.w.rudolph@gmail.com>

* Update migration guide links (#1694)

* typescript: type this as IWorld in user functions (#1690)

* type this as any in user fns, add test

* update changelog

* setWorldConstructor for completeness

* use generics to do it right

* Update CHANGELOG.md

* use a clearer generic type name

* Pass --tags correctly, remove duplication

* Revert "Pass --tags correctly, remove duplication"

This reverts commit dbcb177.

* debt: add things to main entry point that people need (#1697)

* ensure hook parameters are exported

* dont need to mark this arg as possibly undefined

* export runtime options

* expose formatter options

* build: only audit production dependencies

* chore: remove redundant profile config

* Release 7.3.0

* 7.3.0

* refactor documentation (part 1) (#1699)

* add export of cli --help

* dont need note about sync

* update world docs

* document retry

* document profiles

* start to trim stuff from cli

* more on profiles

* document parallel

* add linsk to readmr

* Fixed reports banner to point to https://cucumber.io/docs/cucumber/environment-variables/ (#1703)

* Add more arrow function warnings (#1705)

* Add more arrow function warnings

* Update links

* fix(cli): allow targetting same file multiple times (#1708)

* fix(cli): allow targetting same file multiple times

* Add example to "run multiple scenarios" scenario outline

* Update CHANGELOG.md

* Deduplicate deduplicate message

Co-authored-by: David Goss <david@davidgoss.co>

* update supported node versions (#1704)

* update supported node versions

* fix changelog

* update package json

Co-authored-by: David Goss <david@davidgoss.co>

* chore(deps): update dependency ts-node to v10 (#1687)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency fs-extra to v10 (#1685)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency tsd to v0.17.0 (#1681)

* chore(deps): update dependency tsd to v0.17.0

* Add @tsd/typescript to dependency-lint ignore list

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: aurelien-reeves <aurelien.reeves@smartbear.com>

* cli: remove deprecated retryTagFilter option (#1713)

* remove retryTagFilter camelCased option

* add changelog entry

* [WIP] remove lodash (#1709)

* remove lodash wip

* compiles

* most unit tests + lint

* passing unit tests

* fix features

* fix feature tests

Co-authored-by: David Goss <david@davidgoss.co>
Co-authored-by: Aurélien Reeves <aurelien.reeves@smartbear.com>

* fix(deps): update dependency commander to v8 (#1720)

* fix(deps): update dependency commander to v8

* Fix commander upgrade issue

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: aurelien-reeves <aurelien.reeves@smartbear.com>

* chore(deps): update dependency @types/node to v14.17.4 (#1715)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency typescript to v4.3.5 (#1716)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency mocha to v9 (#1719)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/chai to v4.2.19 (#1714)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update eslint packages (#1718)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update cucumber packages (#1717)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* docs: fix node version mentioned in example

* Fix import in docs

* expose promise timeout helper (#1566)

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* IParameterTypeDefinition fix (#1733)

Co-authored-by: Ludek Novy <ludeknovy@fastmail.com>

* bringing back v6/5 props (#1732)

* bringing back v6/5 props

* changelog update

* Update CHANGELOG.md

Co-authored-by: David Goss <david@davidgoss.co>

Co-authored-by: Ludek Novy <ludeknovy@fastmail.com>
Co-authored-by: David Goss <david@davidgoss.co>

* remove support for generators (#1725)

* Explain how to use yarn to list commands (#1730)

Co-authored-by: Matt Wynne <matt@mattwynne.net>

* Add a 'reindent' test helper (#1722)

* Upgrade dependencies (#1736)

* (deps) update dependency lint (#1726)

* chore: update changelog on main

* add release step to edit+publish gh release

* Bump reindent-template-literals to 1.1.0 (#1742)

* chore(deps): update dependency @types/express to v4.17.13 (#1744)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): pin dependency reindent-template-literals to 1.1.0 (#1743)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/glob to v7.1.4 (#1746)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/mustache to v4.1.2 (#1747)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/fs-extra to v9.0.12 (#1745)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/node to v14.17.6 (#1749)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/mz to v2.7.4 (#1748)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/progress to v2.0.4 (#1750)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/resolve to v1.20.1 (#1751)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/node to v14.17.7 (#1757)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/semver to v7.3.8 (#1752)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/stream-buffers to v3.0.4 (#1753)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/tmp to v0.2.1 (#1754)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update eslint packages (#1756)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/verror to v1.10.5 (#1755)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update unit test packages (#1758)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency ts-node to v10.1.0 (#1760)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/mocha to v9 (#1761)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* Make parameter type generic for value checker (#1764)

* Add retro notes from new contributors ensemble (#1765)

* Add retro folder and notes from last Friday

* Add retro doc from the previous new-contributors session

* Add some more actions from previous retro

* Add pointer to retro-tools

* Use youtube link for stream which is permanent

* Move retro stuff into docs folder

* Fix link to issue

* Tweak CONTRIBUTING guide to be more beginner-friendly (#1767)

As mentioned in the new contributors ensemble retro[1]

[1]: https://github.com/cucumber/cucumber-js/blob/main/docs/retro/2021/07/17.md#what-should-we-decide--change-for-next-time

* docs: minor fixes for the styling consistency (#1769)

* Yarn to npm (#1774)

* Change yarn to npm

Co-authored-by: Matt Wynne <matt@cucumber.io>

* Changed the contributing guide use to npm

Co-authored-by: Matt Wynne <matt@cucumber.io>

* fixed the autoformat from vscode

* updated the build.yml to now work npm commands

* fixed the update-dependencies

* try using npm 7 with all node versions

Co-authored-by: Matt Wynne <matt@cucumber.io>
Co-authored-by: David Goss <david@davidgoss.co>

* Use typescript incremental build to speed up compilation (#1766)

Co-authored-by: David Goss <david@davidgoss.co>

* chore(deps): update dependency @types/node to v14.17.12 (#1778)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/progress to v2.0.5 (#1779)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency mocha to v9.1.1 (#1780)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency ts-node to v10.2.1 (#1781)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency typescript to v4.4.2 (#1782)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/node to v14.17.14 (#1785)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update eslint packages (#1787)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update eslint packages (#1786)

* chore(deps): update eslint packages

* Fix linting errors

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: aurelien-reeves <aurelien.reeves@smartbear.com>

* Deactivate renovate dependency dashboard

As discussed at our last community meeting, we do not want those dashboards.

* chore: update @cucumber/* dependencies, fix willBeRetried usage (#1776)

* latest dependencies

* make it just about compile

* fix test case runner

* fix summary helper

* fix formatters (ish)

* fix last bit in formatters

* update fixtures for feature tests

* fix attachments cck

* hook up retry cck

* lint

* update doc

* update lockfile

* Add configuration cli option (#1794)

* Config file Option update

* Add --config option in the argv parser

* Add a scenario in profiles.feature

* Add unit tests and refactorize profile_loader

* Consider the new --config option when loading profiles

* Add some documentation

* Add an entry in the changelog

Co-authored-by: deepziem <54252717+deepziem@users.noreply.github.com>

* feat: add pickleStep to step hook function arg (#1775)

* add to interface

* implement

* update api ref

* update changelgo

* add test

* Increase precision of test case duration measurements. (#1793)

* fix(formatter): Enable calling parseTestCaseAttempt on test cases that haven't completed (#1531)

* fix(formatter): Enable calling parseTestCaseAttempt on test cases that haven't completed yet

* Instanciate a proper TestStepResult when parsing TestCaseAttempt

* Add unit tests

* Refactor testCaseAttemptParser unit tests

Co-authored-by: Aurélien Reeves <aurelien.reeves@smartbear.com>
Co-authored-by: Aslak Hellesøy <1000+aslakhellesoy@users.noreply.github.com>

* add ESM support (take 2) (#1649)

* Revert "temporarily revert ESM change (#1647)"

This reverts commit 084c1f2.

* add failing scenario for deep imports

* define entry point with dot

* make deep imports work via export patterns

* move doc to own file

* link to doc from readme

* add changelog entry

* add example to doc

* remove confusing comment

* remove cli option, use import by default

* update documentation

* remove redundant describe

* fix ordering

* Update features/esm.feature

Co-authored-by: Aurélien Reeves <aurelien.reeves@smartbear.com>

* Update features/esm.feature

Co-authored-by: Aurélien Reeves <aurelien.reeves@smartbear.com>

* simplify tagging

* use import only if a javascript file

* add note about no transpilers

* inline to avoid confusing reassignment

* whoops, re-add try/catch

* use require with transpilers; import otherwise

* remove pointless return

* support .cjs config file

* type and import the importer

* actually dont import - causes issues

Co-authored-by: Aurélien Reeves <aurelien.reeves@smartbear.com>

* docs: add rule to keywords for i18n command (#1800)

* add rule to keywords for i18n command

* Fix i18n example

Co-authored-by: aurelien-reeves <aurelien.reeves@smartbear.com>

* set correct version

* debt: remove --predictable-ids option (#1801)

* WIP

* fix up testing

* add changelog entry

* chore(deps): update dependency @types/fs-extra to v9.0.13 (#1803)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/node to v14.17.20 (#1804)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency typescript to v4.4.3 (#1805)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @sinonjs/fake-timers to v8 (#1810)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update eslint packages (#1809)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency coffeescript to v2.6.0 (#1808)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* fix(deps): update cucumber packages (#1807)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update unit test packages (#1806)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update cucumber packages (major) (#1791)

* chore(deps): update cucumber packages

* Implement new CCK tests from CCK 8.0.0

* Bump compatibility-kit to v9.0.0

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: aurelien-reeves <aurelien.reeves@smartbear.com>

* fix(deps): update cucumber packages (major) (#1811)

* chore(deps): update cucumber packages

* Implement new CCK tests from CCK 8.0.0

* Bump compatibility-kit to v9.0.0

* fix(deps): update cucumber packages

* Fix requires of cucumber-expressions GeneratedExpression class

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: aurelien-reeves <aurelien.reeves@smartbear.com>

* Fix link to 7.3.1

* support: re-add setDefinitionFunctionWrapper (minus generator step logic) (#1795)

* Revert "remove support for generators (#1725)"

This reverts commit a2dcce6.

* Remove bluebird and related dependencies

* Remove support for generator functions

* Update mocha config

* Add forbid-pending to mocharc too

* Update migration and api_reference documents

* Update changelog

* Update CHANGELOG entry

* Fix dependency audit issue

* List formatters in help command (#1798)

* feature/list-formatters-in-help-command adding documentation field to Formatter class

* feature/list-formatters-in-help-command refactoring getConstructorByType method to hold a Record<string, typeof Formatter>

* feature/list-formatters-in-help-command improving return statement to deal with cases where the default formatter should be returned

* feature/list-formatters-in-help-command after running lint fix

* feature/list-formatters-in-help-command fixing ternary so logic does not invoke load customFormatter

* feature/list-formatters-in-help-command creating class that will hold the description of the formatters

* feature/list-formatters-in-help-command adding logic to extract the correct documentation for each formatter and altering the IFormatter type to have this field

* feature/list-formatters-in-help-command reverting changes made by adding the documentation field to the formatter object

* feature/list-formatters-in-help-command adding documentation field to html formatter

* feature/list-formatters-in-help-command adding documentation member to json/message/progress/rerun/summary/usage formatters

* feature/list-formatters-in-help-command removing formatterDocumentationHelper class as it is no longer needed

* feature/list-formatters-in-help-command adding documentation field to rerun formatter

* feature/list-formatters-in-help-command fixing return type of getConstructorByType method and running linter

* feature/list-formatters-in-help-command removing unnecessary await

* feature/list-formatters-in-help-command creating Formatters class to hold different formatters and extracting them from the builder class

* feature/list-formatters-in-help-command adding documentation field to progress-bar/snippets/usage-json formatters

* feature/list-formatters-in-help-command added method in formatters class to help build the documentation string

* feature/list-formatters-in-help-command used recently added method to list all available formatters

* feature/list-formatters-in-help-command adding documentation to snippets/progress-bar/usage-json formatters

* feature/list-formatters-in-help-command adding new line to format option so that formatters will appear on new line

* feature/list/formatters-in-help-command converting documentation field inside formatter to be public and static. Refactoring buildFormatterDocumentationString

* feature/list/formatters-in-help-command indenting formatters and removing extra space

* feature/list-formatters-in-help-command refactoring building the documentation string

* feature/list-formatters-in-help-command adding feature to changelog

* (docs,snippets): redo formatter docs, new loading strategy for snippet syntaxes (#1812)

* start the formatters doc

* document summary formatter

* document progress formatter

* progress bar

* regenerate gifs

* clutching at straws here

* optimise gifs

* edit out the summary failure one for mpw

* describe unhappy path for summary

* html formatter doco

* usage and usage-json doco

* replace html formatter screenshot

* try again?

* update git attrs

* wip snippets doco

* readd png

* better version of html screenshot

* better again

* document message and json formatters

* fix messages link

* more info on snippets

* finish up snippets

* rerun docs

* finish up

* load snippet syntax in same way as formatters

* clarify what the options are

* tweak rerun docs

* differentiate retry vs rerun in docs

* simplify readme

* add changelog

* make promise interface return a promise

* add example output for snippet interfaces

* runtime: don't fail the test run for undefined/ambiguous when in dry run (#1814)

* update scenario (failing)

* clarify

* change logic

* refactor to share logic across serial+parallel

* add changelog

* add doco for dry run

* add link to changelog entry

* Fix github diff link to use main instead of master

* Delete .whitesource

We have renovate.json

* Upgrade dependencies 20211018 (#1820)

* Update @cucumber dependencies

* Update mocha,ts-node,typescript

* fall back to require where file doesnt have a native js extension (#1819)

Co-authored-by: Aslak Hellesøy <1000+aslakhellesoy@users.noreply.github.com>

* Add Release workflow - see https://github.com/cucumber/.github/blob/main/RELEASING.md

* Add missing changelog and contributor entries

* Add missing comma

* Format changelog (#1821)

* Format changelog

* Fix links

* Fix release workflow

* Update release process, use .yaml extension for workflows

* Release 8.0.0-rc.1

* Refactor build helpers (#1826)

* Extract functions into their own files

* Allow injection of exclusion filter to make easier to test

* Make sure we always exclude ourselves

* chore(deps): pin dependencies (#1827)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): pin dependencies (#1828)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): pin dependency mocha to 9.1.3 (#1829)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/node to v14.17.32 (#1830)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/semver to v7.3.9 (#1831)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/tmp to v0.2.2 (#1832)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency coffeescript to v2.6.1 (#1833)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @cucumber/compatibility-kit to v9.1.2 (#1834)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency ts-node to v10.4.0 (#1836)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/glob to v7.2.0 (#1835)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency tsd to v0.18.0 (#1837)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update eslint packages (#1838)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* Ignore OS X files

* chore(deps): update dependency @types/node to v16 (#1839)

* Factor out instructions about dependency upgrades into central file

* Update RELEASING.md

* Fix-1735 Parentheses in developers' paths break cucumber's own tests WIP (#1824)

* Extract functions into their own files

* Allow injection of exclusion filter to make easier to test

* Make sure we always exclude ourselves

* Add unit test for getDefinitionLineAndUri

* -adds regex pattern for stack traces
-removes dependencies for StackFram library

* - adds "source-map-support" dependency
- progress towards fixing bug for paths with parentheses Cucumber's own features fail when parent directory contains parentheses #1735
- gets accurate line numbers for Error stacks in typescript

Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Matt Wynne <matt@mattwynne.net>

* update cspotcode/source-map-support

* remove .DS_Store

* updates unit test to support paths on windows

Co-authored-by: Matt Wynne <matt@cucumber.io>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Dane Parchment <dparchmentjr@gmail.com>

* Removes assertion for a failing test that's no longer needed

Co-authored-by: Matt Wynne <matt@cucumber.io>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Dane Parchment <dparchmentjr@gmail.com>

* Removes exception for the custom stack trace feature

Co-authored-by: Matt Wynne <matt@cucumber.io>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Dane Parchment <dparchmentjr@gmail.com>

* Updates changelog

Co-authored-by: Matt Wynne <matt@cucumber.io>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Dane Parchment <dparchmentjr@gmail.com>

* fixed linting for previous commit

Co-authored-by: Matt Wynne <matt@cucumber.io>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Dane Parchment <dparchmentjr@gmail.com>

Co-authored-by: Matt Wynne <matt@cucumber.io>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Matt Wynne <matt@mattwynne.net>
Co-authored-by: Dane Parchment <dparchmentjr@gmail.com>

* chore(deps): update dependency @types/node to v16.11.11 (#1854)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* fix(deps): update dependency @cucumber/create-meta to v6.0.4 (#1856)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update eslint packages (#1855)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency tsd to v0.19.0 (#1857)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency eslint-plugin-promise to v5.2.0 (#1861)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update unit test packages (#1860)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update unit test packages (#1859)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency typescript to v4.5.2 (#1858)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* Update esm.md (#1862)

Move the chapter about configuration file at the top of the doc to give it more visibility

* Smoother onboarding for Windows developers (#1863)

* Add a warning for Windows developers

The tests won't work if you don't have "Developer Mode" enabled. See #1852

Co-authored-by: Aurelien Reeves <aurelien.reeves@smartbear.com>

* Explain about Developer Mode in contributing guide

* Use cross-platform command for copying files

* Update changelog

* No need to npx in a node script

Co-authored-by: Aurelien Reeves <aurelien.reeves@smartbear.com>

* api: add runCucumber function internally (#1849)

* Export version number of cucumber-js (#1866)

* Export version number of cucumber-js

* Update CHANGELOG.md

* Add package.json to node module exports (#1870)

* Add package.json to node module exports

* Update changelog

* Add a scenario to validate we can export package.json and version numbers

* Use template literal rather than string concatenation in direct_imports.feature

* Change entry in the changelog

* handle spaces in the absolute path (#1845) (#1847)

* put quotes around the absolute path (#1845)

added quotes to wrap the path to summary.txt
to ensure that paths containing spaces are read properly

Co-authored-by: Matt Wynne <matt@cucumber.io>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Dane Parchment <dparchmentjr@gmail.com>

* fix indentations in feature file

* fixed the bug but needs unit testing

* fixed linting

* adds unit testing for handling paths with quotes

* adds the fix to option splitter files

* updated changelog and removed wip tag

Co-authored-by: Matt Wynne <matt@cucumber.io>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Dane Parchment <dparchmentjr@gmail.com>
Co-authored-by: Aslak Hellesøy <1000+aslakhellesoy@users.noreply.github.com>

* Update contributing guide

* chore: use new ci-environment package instead of create-meta (#1868)

* install lib

* WIP

* bump other cucumber deps

* finish impl

* add changelog

* redundant comment

* update library, simplify mapping

* simplify again

* update changelog

* build: add build artifact for reports

* Replace 1 instance of regex with cucumber expression (#1872)

* Replace regex with cucumber expression.

We decided to split the step definition into two. So that the patterns used be simpler.

Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Matt Wynne <matt@cucumber.io>
Co-authored-by: Dane Parchment Jr <dparchmentjr@gmail.com>

* Fix linting issues

Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Matt Wynne <matt@cucumber.io>
Co-authored-by: Dane Parchment Jr <dparchmentjr@gmail.com>
Co-authored-by: aurelien-reeves <aurelien.reeves@smartbear.com>

* Replace 2 instances of regex with cucumber expression (#1873)

* Replace 2 instance of regex with cucumber expression

* Fixing linting issues

* Optimizing const string

* Making Prettier: from " to '

* chore(deps): pin dependencies (#1874)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/tmp to v0.2.3 (#1876)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency express to v4.17.2 (#1877)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency @types/node to v16.11.17 (#1875)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency tsd to v0.19.1 (#1879)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency prettier to v2.5.1 (#1878)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* chore(deps): update dependency typescript to v4.5.4 (#1880)

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: David Goss <david@davidgoss.co>

* fix(deps): update dependency @cucumber/ci-environment to v8.0.1 (#1881)

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: David Goss <david@davidgoss.co>

* chore(deps): update unit test packages (#1882)

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: David Goss <david@davidgoss.co>

* chore(deps): update eslint packages (major) (#1840)

* chore(deps): update eslint packages

* Update eslint configuration

- remove plugins which prevent upgrading eslint
- update the configuration based on the one from cucumber-expression
- update a piece of code to make linting happy

Note: some rules have been deactivated to make the update of eslint
possible without breaking our build. Those rules may be deactivated
later as part of dedicated pull requests.

* Activate eslint-plugin-simple-import-sort

* Add simple-import-sort to dependency-lint ignore list

* Revert "Add simple-import-sort to dependency-lint ignore list"

This reverts commit 1bd2f32.

* Revert "Activate eslint-plugin-simple-import-sort"

This reverts commit a0075e7.

* Remove eslint-plugin-simple-import-sort

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: aurelien-reeves <aurelien.reeves@smartbear.com>

* chore: remove defunct npm script

* fix: update colors@1.4.0 cli-table2@0.6.1  (#1886)

* Update package.json

A Security Vuln was identified in the Colors package for >1.4.0, offending packages being `1.4.1`, `1.4.44-liberty`
- [source1](https://twitter.com/snyksec/status/1480286811482206216?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Etweet)
- [source2](https://twitter.com/snyksec/status/1480286811482206216?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Etweet)
- [source3](https://security.snyk.io/vuln/SNYK-JS-COLORS-2331906)

This PR pins the color package to `1.4.0` as advised on the [snyk page](https://snyk.io/blog/open-source-maintainer-pulls-the-plug-on-npm-packages-colors-and-faker-now-what/)

* chore: update changelog

* fix: update and pin cli-table3@0.6.1

* chore: update CHANGELOG

* chore: update lockfile with new pinned versions

* Release 8.0.0-rc.2

* Add a retro

Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Kate Dames <kate.funficient@gmail.com>

* Extract prettier config from eslintrc (#1893)

This is a more conventional place to store prettier config, and it means
that VSCode's prettier plugin can automatically find it.

* chore: bump dependency with vulnerability

* build: only build on main and for PRs

* chore: switch from colors to chalk (#1895)

* swap out dependencies

* reimpl

* add changelog entry

* remove unused import

* Replace some uses of `any` type (#1892)

* Replace use of `any` type with `messages.Envelope`

Part of #1648

Co-authored-by: Kate Dames <kate.funficient@gmail.com>
Co-authored-by: Emmanuel Ola <54866720+eoola@users.noreply.github.com>

* Replace use of `any` with a custom World in CCK example

Part of #1648

Co-authored-by: Emmanuel Ola <54866720+eoola@users.noreply.github.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Kate Dames <kate.funficient@gmail.com>

* Replace another use of `any` with a custom type

Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Kate Dames <kate.funficient@gmail.com>

* Replace another use of `any` type

Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Kate Dames <kate.funficient@gmail.com>

Co-authored-by: Kate Dames <kate.funficient@gmail.com>
Co-authored-by: Emmanuel Ola <54866720+eoola@users.noreply.github.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>

* docs: improve profiles documentation (#1897)

* Update profiles.md

* Update docs/profiles.md

Co-authored-by: Aurélien Reeves <aurelien.reeves@smartbear.com>

Co-authored-by: Aurélien Reeves <aurelien.reeves@smartbear.com>

* Add new-contributors retro

Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Kate Dames <kate.funficient@gmail.com>

* Consolidate retro files

* Removing usage of lodash

Co-authored-by: Aslak Hellesøy <1000+aslakhellesoy@users.noreply.github.com>
Co-authored-by: aurelien-reeves <aurelien.reeves@smartbear.com>
Co-authored-by: davidgoss <david@davidgoss.co>
Co-authored-by: Aslak Hellesøy <aslak.hellesoy@gmail.com>
Co-authored-by: David Goss <dgoss@whiteclarkegroup.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: jshifflet <jason.shifflet@gmail.com>
Co-authored-by: Charles Rudolph <charles.w.rudolph@gmail.com>
Co-authored-by: Nico Jansen <jansennico@gmail.com>
Co-authored-by: Matt Wynne <matt@cucumber.io>
Co-authored-by: Ludek <13610612+ludeknovy@users.noreply.github.com>
Co-authored-by: Ludek Novy <ludeknovy@fastmail.com>
Co-authored-by: Cucumber Ensemble <87445349+cucumber-ensemble@users.noreply.github.com>
Co-authored-by: Matt Wynne <matt@mattwynne.net>
Co-authored-by: 16sheep <marjutubli@gmail.com>
Co-authored-by: Dmytro Shpakovskyi <Marketionist@users.noreply.github.com>
Co-authored-by: abelalmeida <abelalmeida@u.boisestate.edu>
Co-authored-by: deepziem <54252717+deepziem@users.noreply.github.com>
Co-authored-by: Joaquín Sorianello <joac@users.noreply.github.com>
Co-authored-by: Jan Molak <1089173+jan-molak@users.noreply.github.com>
Co-authored-by: David Goss <david.goss@matillion.com>
Co-authored-by: Tomer Ben-Rachel <tomerpacific@gmail.com>
Co-authored-by: Emmanuel Ola <54866720+eoola@users.noreply.github.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Dane Parchment <dparchmentjr@gmail.com>
Co-authored-by: Karla Aparecida Justen <justen.karla@gmail.com>
Co-authored-by: Manny <mannyis@typingona.computer>
Co-authored-by: Kate Dames <kate.funficient@gmail.com>
Co-authored-by: Michael Morris <35374244+michaelm-rsi@users.noreply.github.com>

* update feature helper

* change table structure

* reduce timeout, attempt to make more reliable on windows

* fix timing issue, larger time window to reduce flakes

* Update CHANGELOG.md

* update docs

* increase time to decrease chance of flakes

Co-authored-by: Aslak Hellesøy <1000+aslakhellesoy@users.noreply.github.com>
Co-authored-by: aurelien-reeves <aurelien.reeves@smartbear.com>
Co-authored-by: davidgoss <david@davidgoss.co>
Co-authored-by: Aslak Hellesøy <aslak.hellesoy@gmail.com>
Co-authored-by: David Goss <dgoss@whiteclarkegroup.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: jshifflet <jason.shifflet@gmail.com>
Co-authored-by: Charles Rudolph <charles.w.rudolph@gmail.com>
Co-authored-by: Nico Jansen <jansennico@gmail.com>
Co-authored-by: Matt Wynne <matt@cucumber.io>
Co-authored-by: Ludek <13610612+ludeknovy@users.noreply.github.com>
Co-authored-by: Ludek Novy <ludeknovy@fastmail.com>
Co-authored-by: Cucumber Ensemble <87445349+cucumber-ensemble@users.noreply.github.com>
Co-authored-by: Matt Wynne <matt@mattwynne.net>
Co-authored-by: 16sheep <marjutubli@gmail.com>
Co-authored-by: Dmytro Shpakovskyi <Marketionist@users.noreply.github.com>
Co-authored-by: abelalmeida <abelalmeida@u.boisestate.edu>
Co-authored-by: deepziem <54252717+deepziem@users.noreply.github.com>
Co-authored-by: Joaquín Sorianello <joac@users.noreply.github.com>
Co-authored-by: Jan Molak <1089173+jan-molak@users.noreply.github.com>
Co-authored-by: David Goss <david.goss@matillion.com>
Co-authored-by: Tomer Ben-Rachel <tomerpacific@gmail.com>
Co-authored-by: Emmanuel Ola <54866720+eoola@users.noreply.github.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Dane Parchment <dparchmentjr@gmail.com>
Co-authored-by: Karla Aparecida Justen <justen.karla@gmail.com>
Co-authored-by: Manny <mannyis@typingona.computer>
Co-authored-by: Kate Dames <kate.funficient@gmail.com>
Co-authored-by: Michael Morris <35374244+michaelm-rsi@users.noreply.github.com>
@Ploppz
Copy link

Ploppz commented Aug 17, 2022

Did this feature really go through in version 8? Or what am I doing wrong here?

$ ./node_modules/.bin/cucumber-js -v
8.5.1
$ ./node_modules/.bin/cucumber-js --esm
error: unknown option '--esm'

@aurelien-reeves
Copy link
Contributor

You don't need the --esm flag anymore

https://github.com/cucumber/cucumber-js/blob/main/docs/esm.md

@Ploppz
Copy link

Ploppz commented Aug 17, 2022

Hmm.. but if I add this package.json file to my support files and steps files directories:

{
  "name": "test1",
  "version": "0.0.1",
  "type": "module"
}

Then I get this error:

Error [ERR_REQUIRE_ESM]: require() of ES Module /home/node/tests/features/step_definitions/overview_steps.js from /home/node/node_modules/.pnpm/@cucumber+cucumber@8.5.1/node_modules/@cucumber/cucumber/lib/api/support.js not supported.
Instead change the require of overview_steps.js in /home/node/node_modules/.pnpm/@cucumber+cucumber@8.5.1/node_modules/@cucumber/cucumber/lib/api/support.js to a dynamic import() which is available in all CommonJS modules.
    at /home/node/node_modules/.pnpm/@cucumber+cucumber@8.5.1/node_modules/@cucumber/cucumber/lib/api/support.js:14:32
    at Array.map (<anonymous>)
    at getSupportCodeLibrary (/home/node/node_modules/.pnpm/@cucumber+cucumber@8.5.1/node_modules/@cucumber/cucumber/lib/api/support.js:14:18)
    at runCucumber (/home/node/node_modules/.pnpm/@cucumber+cucumber@8.5.1/node_modules/@cucumber/cucumber/lib/api/run_cucumber.js:33:53)
    at async Cli.run (/home/node/node_modules/.pnpm/@cucumber+cucumber@8.5.1/node_modules/@cucumber/cucumber/lib/cli/index.js:45:29)
    at async Object.run [as default] (/home/node/node_modules/.pnpm/@cucumber+cucumber@8.5.1/node_modules/@cucumber/cucumber/lib/cli/run.js:34:18)

@davidjgoss
Copy link
Contributor Author

The default behaviour and the require option both use the legacy CommonJS modules API to load your files. If your files are native ES modules, you'll need to use the import option instead in the same way, and they'll be loaded with the new ES modules API. See ES Modules for more on using Cucumber in an ESM project.

@Ploppz
Copy link

Ploppz commented Aug 17, 2022

Is that quoted from some source? Sorry if I misunderstand but I do already use import when importing anything cucumber-related; does that quote suggest anything else?
My error seems to indicate that cucumber tries to require my js files instead of importing them, if I understand correctly.

@aurelien-reeves
Copy link
Contributor

aurelien-reeves commented Aug 17, 2022

I guess the quotation marks from David is a typo.
However the documentation here should help: https://github.com/cucumber/cucumber-js/blob/main/docs/esm.md

Did you read it? Is there something with that documentation that you do not understand (legit question! We may need to improve it!)?

You should not use a dedicated package.json file inside your support code directory.

What are you trying to achieve exactly? Your project is using ESM or not?

If it does, you do not need a package.json beside your support code.

The require and import things are used when you explicitly require or import your support code using configuration file or command-line arguments.

Would you have a repo where we could take a look?

@Ploppz
Copy link

Ploppz commented Aug 17, 2022

I was initially confused about you'll need to use the import configuration option to specify your files, rather than the require option especially since the below example does not even use said import configuration option, but looking at the documentation for the config cleared that up. I tried the config:

const common = {
  import: ['features/support/**/*.js']
}

export default {
  ...common,
}

export const ci = {
  ...common,
}

but I get

export default {
^^^^^^

SyntaxError: Unexpected token 'export'

anyway I guess I shouldn't need such a config file?
My project is generally ESM I guess yes, but I say that solely because it consistently uses import instead of require, I don't know in what else determines whether it's an ESM project.

Well, if I remove the package.json files, I get errors:

import { When, Then, Given } from '@cucumber/cucumber';
^^^^^^

SyntaxError: Cannot use import statement outside a module

So I left them in the attached zip file. it's only the contents of the tests/ folder in my project. I start tests with ./node_modules/.bin/cucumber-js tests. Do you need anything else?
tests.zip

Edit: It's a React project btw, created with CRA

@aurelien-reeves
Copy link
Contributor

What is your version of @cucumber/cucumber?
Which version of node-js?

Do you have "type": "module" in your root package.json?

Here's the documentation for the configuration: https://github.com/cucumber/cucumber-js/blob/main/docs/configuration.md

The error related to the config file as shown below seems to show that your project is not a module. If you still want to use ESM with cucumber, try renaming your configuration file into cucumber.mjs

export default {
^^^^^^

SyntaxError: Unexpected token 'export'

Please not also that per default, your cucumber configuration file should be at the root level of your project, not in your "tests" folder.

what is your cucumber command and arguments to run your tests? Are you using a npm script?

@davidjgoss
Copy link
Contributor Author

Yeah further to what @aurelien-reeves said, a CRA project's files may use import and export syntax but they aren't really ES modules, since they're compiled down to CommonJS and then bundled for the browser. As such you probably shouldn't add type: module to your package.json. Having your Cucumber config and support code files as .mjs is probably the way to go here - you're marking those files as ESM without trying to reclassify the whole project.

@Ploppz
Copy link

Ploppz commented Aug 18, 2022

Thank you both so much! Alright I changed everything cucumber-related to .mjs.

What is your version of @cucumber/cucumber?
what is your cucumber command and arguments to run your tests? Are you using a npm script?
Which version of node-js?

// ...
    "@cucumber/cucumber": "8.5.1",
// ...
  "scripts": {
    "test": "./node_modules/.bin/cucumber-js tests",
// ...

  "engines": {
    "node": "17.x"
  }

Now I'm getting a new error that seems to stem from inside node, with no information about code location in my own code in any case:

SyntaxError: Unexpected token ')'
    at ESMLoader.moduleStrategy (node:internal/modules/esm/translators:117:18)
    at ESMLoader.moduleProvider (node:internal/modules/esm/loader:361:14)
    at async link (node:internal/modules/esm/module_job:70:21)

idk if there's still some mismatch with like, node version (since JS seems to be very finicky about all its moving parts)?

@Ploppz
Copy link

Ploppz commented Aug 18, 2022

Sorry, the extra ')' was in my own code! I just thought it wouldn't be because it didn't point to any of my files

@devexpert7
Copy link

Is this fix available in latest release? Please share working code if available.
I get same error
npx cucumber-js
Error: Cucumber expected a CommonJS module at '/Users/dev/features/support/support.js' but found an ES module.
Either change the file to CommonJS syntax or use the --import directive instead of --require.

  Original error message: require() of ES Module /Users/dev/features/support/support.js from /Users/develop/node_modules/@cucumber/cucumber/lib/try_require.js not supported.

Instead change the require of support.js in /Users/dev/gitlab1/node_modules/@cucumber/cucumber/lib/try_require.js to a dynamic import() which is available in all CommonJS modules.
at tryRequire (/Users/dev/gitlab1/node_modules/@cucumber/cucumber/lib/try_require.js:15:19)

@unional
Copy link

unional commented Aug 9, 2023

Hi, @devexpert7,

Probably need more information about your project. Do you have type: module in your package json?

@devexpert7
Copy link

Hi, @devexpert7,

Probably need more information about your project. Do you have type: module in your package json?

Yes @unional , I have type: module in your package json.
I tried to fix this by adding configuration file cucumber.cjs >
const common = {
requireModule: [
...(
process.env.CI ? [] : ["chromedriver"]
)
],
import: [
"src/steps/*.ts",
"src/steps",
]
}

module.exports = common
....

getting below error now:

my-dev@1.0.0 test-e2e-scenario
npm run cucumber -- features --name sayHello

my-dev@1.0.0 cucumber
ts-node node-modules/@cucumber/cucumber/bin/cucumber.js -p default features --name sayHello

node:internal/modules/cjs/loader:1080
throw err;
^

Error: Cannot find module './cucumber.js'
Require stack:

  • /Users/project1/node-modules/@cucumber/cucumber/bin/imaginaryUncacheableRequireResolveScript
    at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
    at Function.resolve (node:internal/modules/cjs/helpers:127:19)
    at requireResolveNonCached (/Users/project1/node_modules/ts-node/dist/bin.js:549:16)
    at getProjectSearchDir (/Users/project1/node_modules/ts-node/dist/bin.js:519:40)
    at phase3 (/Users/project1/node_modules/ts-node/dist/bin.js:267:27)
    at bootstrap (/Users/project1/node_modules/ts-node/dist/bin.js:47:30)
    at main (/Users/project1/node_modules/ts-node/dist/bin.js:33:12)
    at Object. (/Users/project1/node_modules/ts-node/dist/bin.js:579:5)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/Users/project1/node-modules/@cucumber/cucumber/bin/imaginaryUncacheableRequireResolveScript'
    ]
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚡ enhancement Request for new functionality
Projects
None yet