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 ofcucumber
- TypeScript
- Replace
TableDefinition
withDataTable
npm uninstall @types/cucumber
- Replace
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 fromcucumber
to@cucumber/cucumber
- TypeScript users must rename
TableDefinition
toDataTable
- โฌ๏ธ 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 withmessage
- Custom formatters will need to migrate
json
formatter is deprecated and will be removed in next major release. Custom formatters should migrate to use themessage
formatter, or the standalone JSON formatter as a stopgap.
- โ Remove long-deprecated
typeName
from options object fordefineParameterType
in favour ofname
- 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