You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+14-2Lines changed: 14 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ Please see [CONTRIBUTING.md](https://github.com/cucumber/cucumber/blob/master/CO
11
11
12
12
### Added
13
13
14
-
- Support attachments that are already base64-encoded via a prefix on the MIME type e.g. `this.attach(base64String, 'base64:image/png')` ([#1552](https://github.com/cucumber/cucumber-js/pull/1552))
14
+
* Experimental support for native ES modules via the [`--esm` flag](./docs/cli.md#es-modules-experimental-nodejs-12) ([#1589](https://github.com/cucumber/cucumber-js/pull/1589))
15
15
16
16
### Changed
17
17
@@ -21,8 +21,19 @@ Please see [CONTRIBUTING.md](https://github.com/cucumber/cucumber/blob/master/CO
21
21
22
22
### Fixed
23
23
24
+
## [7.1.0] (2021-04-06)
25
+
26
+
### Added
27
+
28
+
- Support attachments that are already base64-encoded via a prefix on the MIME type e.g. `this.attach(base64String, 'base64:image/png')` ([#1552](https://github.com/cucumber/cucumber-js/pull/1552))
29
+
- Support tagged rules ([cucumber#1123](https://github.com/cucumber/cucumber/issues/1123))
30
+
31
+
### Fixed
32
+
24
33
* Fix types for hook functions so they can return e.g. `'skipped'` ([#1542](https://github.com/cucumber/cucumber-js/pull/1542))
25
34
* Display the response of the reports server when an error is returned before failing. ([#1608](https://github.com/cucumber/cucumber-js/pull/1608))
35
+
* Remove unnecessary implicit dependency on `long` package ([cucumber#1313](https://github.com/cucumber/cucumber/pull/1313))
36
+
* Remove unnecessary transitive dependencies on `react` etc ([cucumber#1308](https://github.com/cucumber/cucumber/pull/1308))
26
37
27
38
## [7.0.0] (2020-12-21)
28
39
@@ -1804,7 +1815,8 @@ be used to get the name / tags of the running scenario. ([#947](https://github.c
Copy file name to clipboardExpand all lines: docs/cli.md
+36-8Lines changed: 36 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,6 +81,22 @@ You can pass in format options with `--format-options <JSON>`. The JSON string m
81
81
82
82
* Suggested use: add with profiles so you can define an object and use `JSON.stringify` instead of writing `JSON` manually.
83
83
84
+
## ES Modules (experimental) (Node.js 12+)
85
+
86
+
You can optionally write your support code (steps, hooks, etc) with native ES modules syntax - i.e. using `import` and `export` statements without transpiling.
87
+
88
+
To enable this, run with the `--esm` flag.
89
+
90
+
This will also expand the default glob for support files to include the `.mjs` file extension.
91
+
92
+
As well as support code, these things can also be in ES modules syntax:
93
+
94
+
- Custom formatters
95
+
- Custom snippets
96
+
- Your `cucumber.js` config file
97
+
98
+
You can use ES modules selectively/incrementally - the module loading strategy that the `--esm` flag activates supports both ES modules and CommonJS.
99
+
84
100
## Colors
85
101
86
102
Colors can be disabled with `--format-options '{"colorsEnabled": false}'`
@@ -174,31 +190,43 @@ For instance, for ES6 support with [Babel](https://babeljs.io/) 7 add:
174
190
175
191
This will effectively call `require('@babel/register')` prior to requiring any support files.
176
192
177
-
### Non JS files
193
+
If your files end with an extension other than `js`, make sure to also include the `--require` option to state the required support files. For example, if using [CoffeeScript](https://www.npmjs.com/package/coffeescript):
178
194
179
-
If your files end in an extension other than `js`, make sure to also include the `--require` option to state the support files to require.
Sometimes the required module (say `@ts-node/register`) needs extra configuration (e.g. you might want to configure it such that it prevents the compiled JS being written out to files, and pass some compiler options). In such cases, create a script (say, `tests.setup.js`):
223
+
Sometimes the required module (say `@ts-node/register`) needs extra configuration. For example, you might want to configure it such that it prevents the compiled JS being written out to files, and pass some compiler options. In such cases, create a script (say, `tests.setup.js`):
0 commit comments