Cucumber.js v7.0.0-rc.0 Release Notes

Release Date: 2020-09-14 // over 3 years ago
  • Starting with version 7, the npm module has been changed from cucumber to @cucumber/cucumber

    Migration guide

    • npm uninstall cucumber
    • npm install --save-dev @cucumber/cucumber
    • require/import @cucumber/cucumber instead of cucumber
    • TypeScript
      • Replace TableDefinition with DataTable
      • npm uninstall @types/cucumber

    If anything is missing from the migration guide, please submit an issue.

    ๐Ÿ†• New Features

    • โž• Add --publish option to publish reports to reports.cucumber.io #1423, #1424
    • โž• Add support for Gherkin's Rule/Example syntax
    • Add transpose method to [data table interface](docs/support_files/data_table_interface.md)
    • โž• Add log function to world, providing a shorthand to log plain text as [attachment(s)](docs/support_files/attachments.md)
    • ๐Ÿ—„ Now includes TypeScript type definitions, deprecating the need for @types/cucumber in TypeScript projects
    • Yarn PnP can now be used with this project with custom formatters #1413

    ๐Ÿ’ฅ Breaking changes

    • The npm module has changed name from cucumber to @cucumber/cucumber
    • Your require / import statements must be changed from cucumber to @cucumber/cucumber
    • TypeScript users must rename TableDefinition to DataTable
    • โฌ‡๏ธ Drop support for Node.js 8, add support for Node.js 14
    • Formatters
      • Events are now based on cucumber-messages
      • event-protocol formatter has been removed and replaced with message
      • Custom formatters will need to migrate
      • json formatter is deprecated and will be removed in next major release. Custom formatters should migrate to use the message formatter, or the standalone JSON formatter as a stopgap.
    • โœ‚ Remove long-deprecated typeName from options object for defineParameterType in favour of name
    • Custom formatters are now loaded via the regular require paths relative to the current directory, unless it begins with a dot (e.g. --format=./relpath/to/formatter). Previously this was always loaded as a file relative to the current directory.

    ๐Ÿ› Bug fixes

    • don't execute BeforeAll and AfterAll hooks when in dry-run
    • ๐Ÿ‘Œ support correct case for --retry-tag-filter CLI argument