Skip to content

Commit 19247fe

Browse files
davidjgosscharlierudolph
authored andcommitted
build: scoped package name (cucumber#1411)
Co-authored-by: Charles Rudolph <[email protected]>
1 parent b53043c commit 19247fe

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+212
-190
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Everyone interacting in this codebase and issue tracker is expected to follow th
4040
Cucumber.js is available as an npm module.
4141

4242
``` shell
43-
$ npm install cucumber
43+
$ npm install @cucumber/cucumber
4444
```
4545

4646
### Browser

features/ambiguous_step.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Feature: Ambiguous Steps
99
"""
1010
Given a file named "features/step_definitions/cucumber_steps.js" with:
1111
"""
12-
const {When} = require('cucumber')
12+
const {When} = require('@cucumber/cucumber')
1313
1414
When(/^a ambiguous step$/, function() {});
1515
When(/^a (.*) step$/, function(status) {});

features/attachments.feature

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ Feature: Attachments
99
"""
1010
And a file named "features/step_definitions/cucumber_steps.js" with:
1111
"""
12-
const {Given} = require('cucumber')
12+
const {Given} = require('@cucumber/cucumber')
1313
1414
Given(/^a step$/, function() {})
1515
"""
1616

1717
Scenario: Attach a buffer
1818
Given a file named "features/support/hooks.js" with:
1919
"""
20-
const {Before} = require('cucumber')
20+
const {Before} = require('@cucumber/cucumber')
2121
2222
Before(function() {
2323
this.attach(Buffer.from([137, 80, 78, 71]), 'image/png')
@@ -31,7 +31,7 @@ Feature: Attachments
3131
Scenario: Attach a stream (callback)
3232
Given a file named "features/support/hooks.js" with:
3333
"""
34-
const {Before} = require('cucumber')
34+
const {Before} = require('@cucumber/cucumber')
3535
const stream = require('stream')
3636
3737
Before(function(testCase, callback) {
@@ -50,7 +50,7 @@ Feature: Attachments
5050
Scenario: Attach a stream (promise)
5151
Given a file named "features/support/hooks.js" with:
5252
"""
53-
const {Before} = require('cucumber')
53+
const {Before} = require('@cucumber/cucumber')
5454
const stream = require('stream')
5555
5656
Before(function() {
@@ -70,7 +70,7 @@ Feature: Attachments
7070
Scenario: Attach from a before hook
7171
Given a file named "features/support/hooks.js" with:
7272
"""
73-
const {Before} = require('cucumber')
73+
const {Before} = require('@cucumber/cucumber')
7474
7575
Before(function() {
7676
this.attach("text")
@@ -84,7 +84,7 @@ Feature: Attachments
8484
Scenario: Attach from an after hook
8585
Given a file named "features/support/hooks.js" with:
8686
"""
87-
const {After} = require('cucumber')
87+
const {After} = require('@cucumber/cucumber')
8888
8989
After(function() {
9090
this.attach("text")
@@ -98,7 +98,7 @@ Feature: Attachments
9898
Scenario: Attach from a step definition
9999
Given a file named "features/step_definitions/cucumber_steps.js" with:
100100
"""
101-
const {Given} = require('cucumber')
101+
const {Given} = require('@cucumber/cucumber')
102102
103103
Given(/^a step$/, function() {
104104
this.attach("text")
@@ -113,7 +113,7 @@ Feature: Attachments
113113
Scenario: Attaching after hook/step finishes
114114
Given a file named "features/support/hooks.js" with:
115115
"""
116-
const {After} = require('cucumber')
116+
const {After} = require('@cucumber/cucumber')
117117
const Promise = require('bluebird')
118118
119119
After(function() {

features/before_after_all_hook_interfaces.feature

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Feature: before / after all hook interfaces
1515
"""
1616
And a file named "features/step_definitions/my_steps.js" with:
1717
"""
18-
const {Given} = require('cucumber')
18+
const {Given} = require('@cucumber/cucumber')
1919
2020
Given('first step', function() {})
2121
Given('second step', function() {})
@@ -24,7 +24,7 @@ Feature: before / after all hook interfaces
2424
Scenario Outline: synchronous
2525
Given a file named "features/support/hooks.js" with:
2626
"""
27-
const {<TYPE>} = require('cucumber')
27+
const {<TYPE>} = require('@cucumber/cucumber')
2828
2929
<TYPE>(function() {})
3030
"""
@@ -39,7 +39,7 @@ Feature: before / after all hook interfaces
3939
Scenario Outline: synchronously throws
4040
Given a file named "features/support/hooks.js" with:
4141
"""
42-
const {<TYPE>} = require('cucumber')
42+
const {<TYPE>} = require('@cucumber/cucumber')
4343
4444
<TYPE>(function() {
4545
throw new Error('my error')
@@ -56,7 +56,7 @@ Feature: before / after all hook interfaces
5656
Scenario Outline: callback without error
5757
Given a file named "features/support/hooks.js" with:
5858
"""
59-
const {<TYPE>} = require('cucumber')
59+
const {<TYPE>} = require('@cucumber/cucumber')
6060
6161
<TYPE>(function(callback) {
6262
setTimeout(callback)
@@ -73,7 +73,7 @@ Feature: before / after all hook interfaces
7373
Scenario Outline: callback with error
7474
Given a file named "features/support/hooks.js" with:
7575
"""
76-
const {<TYPE>} = require('cucumber')
76+
const {<TYPE>} = require('@cucumber/cucumber')
7777
7878
<TYPE>(function(callback) {
7979
setTimeout(() => {
@@ -97,7 +97,7 @@ Feature: before / after all hook interfaces
9797
Scenario Outline: callback asynchronously throws
9898
Given a file named "features/support/hooks.js" with:
9999
"""
100-
const {<TYPE>} = require('cucumber')
100+
const {<TYPE>} = require('@cucumber/cucumber')
101101
102102
<TYPE>(function(callback) {
103103
setTimeout(() => {
@@ -120,7 +120,7 @@ Feature: before / after all hook interfaces
120120
Scenario Outline: callback - returning a promise
121121
Given a file named "features/step_definitions/failing_steps.js" with:
122122
"""
123-
const {<TYPE>} = require('cucumber')
123+
const {<TYPE>} = require('@cucumber/cucumber')
124124
const Promise = require('bluebird')
125125
126126
<TYPE>(function(callback) {
@@ -144,7 +144,7 @@ Feature: before / after all hook interfaces
144144
Scenario Outline: promise resolves
145145
Given a file named "features/support/hooks.js" with:
146146
"""
147-
const {<TYPE>} = require('cucumber')
147+
const {<TYPE>} = require('@cucumber/cucumber')
148148
const Promise = require('bluebird')
149149
150150
<TYPE>(function() {
@@ -162,7 +162,7 @@ Feature: before / after all hook interfaces
162162
Scenario Outline: promise rejects with error
163163
Given a file named "features/support/hooks.js" with:
164164
"""
165-
const {<TYPE>} = require('cucumber')
165+
const {<TYPE>} = require('@cucumber/cucumber')
166166
const Promise = require('bluebird')
167167
168168
<TYPE>(function() {
@@ -184,7 +184,7 @@ Feature: before / after all hook interfaces
184184
Scenario Outline: promise rejects without error
185185
Given a file named "features/support/hooks.js" with:
186186
"""
187-
const {<TYPE>} = require('cucumber')
187+
const {<TYPE>} = require('@cucumber/cucumber')
188188
const Promise = require('bluebird')
189189
190190
<TYPE>(function() {
@@ -207,7 +207,7 @@ Feature: before / after all hook interfaces
207207
Scenario Outline: promise asynchronously throws
208208
Given a file named "features/support/hooks.js" with:
209209
"""
210-
const {<TYPE>} = require('cucumber')
210+
const {<TYPE>} = require('@cucumber/cucumber')
211211
const Promise = require('bluebird')
212212
213213
<TYPE>(function() {

features/before_after_all_hook_timeouts.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ Feature: before / after all hook timeouts
99
"""
1010
And a file named "features/step_definitions/steps.js" with:
1111
"""
12-
const {Given} = require('cucumber')
12+
const {Given} = require('@cucumber/cucumber')
1313
1414
Given(/^a passing step$/, function() {});
1515
"""
1616

1717
Scenario Outline: slow handler timeout
1818
Given a file named "features/support/handlers.js" with:
1919
"""
20-
const {<TYPE>, setDefaultTimeout} = require('cucumber')
20+
const {<TYPE>, setDefaultTimeout} = require('@cucumber/cucumber')
2121
2222
setDefaultTimeout(500)
2323
@@ -40,7 +40,7 @@ Feature: before / after all hook timeouts
4040
Scenario Outline: slow handlers can increase their timeout
4141
Given a file named "features/supports/handlers.js" with:
4242
"""
43-
const {<TYPE>, setDefaultTimeout} = require('cucumber')
43+
const {<TYPE>, setDefaultTimeout} = require('@cucumber/cucumber')
4444
4545
setDefaultTimeout(500)
4646

features/before_after_all_hooks.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Feature: Environment Hooks
1717
Scenario: before all / after all hooks
1818
Given a file named "features/support/hooks.js" with:
1919
"""
20-
const {AfterAll, BeforeAll, Given} = require('cucumber')
20+
const {AfterAll, BeforeAll, Given} = require('@cucumber/cucumber')
2121
const {expect} = require('chai')
2222
2323
let counter = 1
@@ -48,7 +48,7 @@ Feature: Environment Hooks
4848
Scenario: Failing before all hook kills the suite
4949
Given a file named "features/support/hooks.js" with:
5050
"""
51-
const {BeforeAll} = require('cucumber')
51+
const {BeforeAll} = require('@cucumber/cucumber')
5252
5353
BeforeAll(function(callback) {
5454
callback(new Error('my error'))
@@ -64,7 +64,7 @@ Feature: Environment Hooks
6464
Scenario: Failing after all hook kills the suite
6565
Given a file named "features/support/hooks.js" with:
6666
"""
67-
const {AfterAll} = require('cucumber')
67+
const {AfterAll} = require('@cucumber/cucumber')
6868
6969
AfterAll(function(callback) {
7070
callback(new Error('my error'))

features/cli.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Feature: Command line interface
1212
"""
1313
And a file named "step_definitions/cucumber_steps.js" with:
1414
"""
15-
const {When} = require('cucumber')
15+
const {When} = require('@cucumber/cucumber')
1616
1717
When(/^a step is passing$/, function() {})
1818
"""
@@ -27,7 +27,7 @@ Feature: Command line interface
2727
"""
2828
And a file named "step_definitions/cucumber_steps.js" with:
2929
"""
30-
const {When} = require('cucumber')
30+
const {When} = require('@cucumber/cucumber')
3131
3232
When(/^a step is passing$/, function() {});
3333
"""

features/core.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Feature: Core feature elements execution
1414
"""
1515
And a file named "features/step_definitions/cucumber_steps.js" with:
1616
"""
17-
const {Given} = require('cucumber')
17+
const {Given} = require('@cucumber/cucumber')
1818
1919
Given(/^a step passes$/, function() {});
2020
"""
@@ -43,7 +43,7 @@ Feature: Core feature elements execution
4343
"""
4444
And a file named "features/step_definitions/cucumber_steps.js" with:
4545
"""
46-
const {Given, Then, When} = require('cucumber')
46+
const {Given, Then, When} = require('@cucumber/cucumber')
4747
4848
Given(/^a "Given" step passes$/, function() {})
4949
When(/^a "When" step passes$/, function() {})
@@ -68,7 +68,7 @@ Feature: Core feature elements execution
6868
"""
6969
And a file named "features/step_definitions/cucumber_steps.js" with:
7070
"""
71-
const {setWorldConstructor, Then, When} = require('cucumber')
71+
const {setWorldConstructor, Then, When} = require('@cucumber/cucumber')
7272
const assert = require('assert')
7373
7474
setWorldConstructor(function () {
@@ -102,7 +102,7 @@ Feature: Core feature elements execution
102102
"""
103103
And a file named "features/step_definitions/cucumber_steps.js" with:
104104
"""
105-
const {setWorldConstructor, Then, When} = require('cucumber')
105+
const {setWorldConstructor, Then, When} = require('@cucumber/cucumber')
106106
const assert = require('assert')
107107
108108
setWorldConstructor(function () {

features/custom_formatter.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Feature: custom formatter
1010
Scenario: extending Formatter
1111
Given a file named "simple_formatter.js" with:
1212
"""
13-
const { Formatter, formatterHelpers, Status } = require('cucumber')
13+
const { Formatter, formatterHelpers, Status } = require('@cucumber/cucumber')
1414
1515
class SimpleFormatter extends Formatter {
1616
constructor(options) {
@@ -65,7 +65,7 @@ Feature: custom formatter
6565
"""
6666
And a file named "simple_formatter.js" with:
6767
"""
68-
const { SummaryFormatter, formatterHelpers, Status } = require('cucumber')
68+
const { SummaryFormatter, formatterHelpers, Status } = require('@cucumber/cucumber')
6969
7070
class SimpleFormatter extends SummaryFormatter {
7171
constructor(options) {

features/custom_stack_trace.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Feature: Custom stack trace
1010
"""
1111
Given a file named "features/step_definitions/cucumber_steps.js" with:
1212
"""
13-
const {When} = require('cucumber')
13+
const {When} = require('@cucumber/cucumber')
1414
1515
const _prepareStackTrace = Error.prepareStackTrace;
1616
Error.prepareStackTrace = () => { return 'Custom message' }

features/data_tables.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Feature: Data Tables
1111
"""
1212
Given a file named "features/step_definitions/passing_steps.js" with:
1313
"""
14-
const {Given} = require('cucumber')
14+
const {Given} = require('@cucumber/cucumber')
1515
const assert = require('assert')
1616
1717
Given(/^a table step$/, function(table) {
@@ -38,7 +38,7 @@ Feature: Data Tables
3838
"""
3939
Given a file named "features/step_definitions/passing_steps.js" with:
4040
"""
41-
const {Given} = require('cucumber')
41+
const {Given} = require('@cucumber/cucumber')
4242
const assert = require('assert')
4343
4444
Given(/^a table step$/, function(table) {
@@ -64,7 +64,7 @@ Feature: Data Tables
6464
"""
6565
Given a file named "features/step_definitions/passing_steps.js" with:
6666
"""
67-
const {Given} = require('cucumber')
67+
const {Given} = require('@cucumber/cucumber')
6868
const assert = require('assert')
6969
7070
Given(/^a table step$/, function(table) {
@@ -91,7 +91,7 @@ Feature: Data Tables
9191
"""
9292
Given a file named "features/step_definitions/passing_steps.js" with:
9393
"""
94-
const {Given} = require('cucumber')
94+
const {Given} = require('@cucumber/cucumber')
9595
const assert = require('assert')
9696
9797
Given(/^a table step$/, function(table) {

features/direct_imports.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Feature: Core feature elements execution using direct imports
1212
"""
1313
And a file named "features/step_definitions/cucumber_steps.js" with:
1414
"""
15-
const {Given} = require('cucumber')
15+
const {Given} = require('@cucumber/cucumber')
1616
1717
Given(/^a step passes$/, function() {});
1818
"""
@@ -28,7 +28,7 @@ Feature: Core feature elements execution using direct imports
2828
"""
2929
And a file named "features/step_definitions/cucumber_steps.js" with:
3030
"""
31-
const {Given} = require('cucumber')
31+
const {Given} = require('@cucumber/cucumber')
3232
3333
Given(/^a step fails$/, function(callback) {
3434
callback(new Error('my error'))

features/doc_string.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Feature: doc string
1212
"""
1313
And a file named "features/step_definitions/cucumber_steps.js" with:
1414
"""
15-
const {Given} = require('cucumber')
15+
const {Given} = require('@cucumber/cucumber')
1616
const assert = require('assert')
1717
1818
Given(/^a doc string step$/, function(docString) {
@@ -35,7 +35,7 @@ Feature: doc string
3535
"""
3636
And a file named "features/step_definitions/cucumber_steps.js" with:
3737
"""
38-
const {Given} = require('cucumber')
38+
const {Given} = require('@cucumber/cucumber')
3939
const assert = require('assert')
4040
4141
Given(/^a "([^"]*)" step$/, function(type, docString) {

0 commit comments

Comments
 (0)