Skip to content

build: scoped package name #1411

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

Merged
merged 10 commits into from
Sep 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Everyone interacting in this codebase and issue tracker is expected to follow th
Cucumber.js is available as an npm module.

``` shell
$ npm install cucumber
$ npm install @cucumber/cucumber
```

### Browser
Expand Down
2 changes: 1 addition & 1 deletion features/ambiguous_step.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Feature: Ambiguous Steps
"""
Given a file named "features/step_definitions/cucumber_steps.js" with:
"""
const {When} = require('cucumber')
const {When} = require('@cucumber/cucumber')

When(/^a ambiguous step$/, function() {});
When(/^a (.*) step$/, function(status) {});
Expand Down
16 changes: 8 additions & 8 deletions features/attachments.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ Feature: Attachments
"""
And a file named "features/step_definitions/cucumber_steps.js" with:
"""
const {Given} = require('cucumber')
const {Given} = require('@cucumber/cucumber')

Given(/^a step$/, function() {})
"""

Scenario: Attach a buffer
Given a file named "features/support/hooks.js" with:
"""
const {Before} = require('cucumber')
const {Before} = require('@cucumber/cucumber')

Before(function() {
this.attach(Buffer.from([137, 80, 78, 71]), 'image/png')
Expand All @@ -31,7 +31,7 @@ Feature: Attachments
Scenario: Attach a stream (callback)
Given a file named "features/support/hooks.js" with:
"""
const {Before} = require('cucumber')
const {Before} = require('@cucumber/cucumber')
const stream = require('stream')

Before(function(testCase, callback) {
Expand All @@ -50,7 +50,7 @@ Feature: Attachments
Scenario: Attach a stream (promise)
Given a file named "features/support/hooks.js" with:
"""
const {Before} = require('cucumber')
const {Before} = require('@cucumber/cucumber')
const stream = require('stream')

Before(function() {
Expand All @@ -70,7 +70,7 @@ Feature: Attachments
Scenario: Attach from a before hook
Given a file named "features/support/hooks.js" with:
"""
const {Before} = require('cucumber')
const {Before} = require('@cucumber/cucumber')

Before(function() {
this.attach("text")
Expand All @@ -84,7 +84,7 @@ Feature: Attachments
Scenario: Attach from an after hook
Given a file named "features/support/hooks.js" with:
"""
const {After} = require('cucumber')
const {After} = require('@cucumber/cucumber')

After(function() {
this.attach("text")
Expand All @@ -98,7 +98,7 @@ Feature: Attachments
Scenario: Attach from a step definition
Given a file named "features/step_definitions/cucumber_steps.js" with:
"""
const {Given} = require('cucumber')
const {Given} = require('@cucumber/cucumber')

Given(/^a step$/, function() {
this.attach("text")
Expand All @@ -113,7 +113,7 @@ Feature: Attachments
Scenario: Attaching after hook/step finishes
Given a file named "features/support/hooks.js" with:
"""
const {After} = require('cucumber')
const {After} = require('@cucumber/cucumber')
const Promise = require('bluebird')

After(function() {
Expand Down
22 changes: 11 additions & 11 deletions features/before_after_all_hook_interfaces.feature
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Feature: before / after all hook interfaces
"""
And a file named "features/step_definitions/my_steps.js" with:
"""
const {Given} = require('cucumber')
const {Given} = require('@cucumber/cucumber')

Given('first step', function() {})
Given('second step', function() {})
Expand All @@ -24,7 +24,7 @@ Feature: before / after all hook interfaces
Scenario Outline: synchronous
Given a file named "features/support/hooks.js" with:
"""
const {<TYPE>} = require('cucumber')
const {<TYPE>} = require('@cucumber/cucumber')

<TYPE>(function() {})
"""
Expand All @@ -39,7 +39,7 @@ Feature: before / after all hook interfaces
Scenario Outline: synchronously throws
Given a file named "features/support/hooks.js" with:
"""
const {<TYPE>} = require('cucumber')
const {<TYPE>} = require('@cucumber/cucumber')

<TYPE>(function() {
throw new Error('my error')
Expand All @@ -56,7 +56,7 @@ Feature: before / after all hook interfaces
Scenario Outline: callback without error
Given a file named "features/support/hooks.js" with:
"""
const {<TYPE>} = require('cucumber')
const {<TYPE>} = require('@cucumber/cucumber')

<TYPE>(function(callback) {
setTimeout(callback)
Expand All @@ -73,7 +73,7 @@ Feature: before / after all hook interfaces
Scenario Outline: callback with error
Given a file named "features/support/hooks.js" with:
"""
const {<TYPE>} = require('cucumber')
const {<TYPE>} = require('@cucumber/cucumber')

<TYPE>(function(callback) {
setTimeout(() => {
Expand All @@ -97,7 +97,7 @@ Feature: before / after all hook interfaces
Scenario Outline: callback asynchronously throws
Given a file named "features/support/hooks.js" with:
"""
const {<TYPE>} = require('cucumber')
const {<TYPE>} = require('@cucumber/cucumber')

<TYPE>(function(callback) {
setTimeout(() => {
Expand All @@ -120,7 +120,7 @@ Feature: before / after all hook interfaces
Scenario Outline: callback - returning a promise
Given a file named "features/step_definitions/failing_steps.js" with:
"""
const {<TYPE>} = require('cucumber')
const {<TYPE>} = require('@cucumber/cucumber')
const Promise = require('bluebird')

<TYPE>(function(callback) {
Expand All @@ -144,7 +144,7 @@ Feature: before / after all hook interfaces
Scenario Outline: promise resolves
Given a file named "features/support/hooks.js" with:
"""
const {<TYPE>} = require('cucumber')
const {<TYPE>} = require('@cucumber/cucumber')
const Promise = require('bluebird')

<TYPE>(function() {
Expand All @@ -162,7 +162,7 @@ Feature: before / after all hook interfaces
Scenario Outline: promise rejects with error
Given a file named "features/support/hooks.js" with:
"""
const {<TYPE>} = require('cucumber')
const {<TYPE>} = require('@cucumber/cucumber')
const Promise = require('bluebird')

<TYPE>(function() {
Expand All @@ -184,7 +184,7 @@ Feature: before / after all hook interfaces
Scenario Outline: promise rejects without error
Given a file named "features/support/hooks.js" with:
"""
const {<TYPE>} = require('cucumber')
const {<TYPE>} = require('@cucumber/cucumber')
const Promise = require('bluebird')

<TYPE>(function() {
Expand All @@ -207,7 +207,7 @@ Feature: before / after all hook interfaces
Scenario Outline: promise asynchronously throws
Given a file named "features/support/hooks.js" with:
"""
const {<TYPE>} = require('cucumber')
const {<TYPE>} = require('@cucumber/cucumber')
const Promise = require('bluebird')

<TYPE>(function() {
Expand Down
6 changes: 3 additions & 3 deletions features/before_after_all_hook_timeouts.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ Feature: before / after all hook timeouts
"""
And a file named "features/step_definitions/steps.js" with:
"""
const {Given} = require('cucumber')
const {Given} = require('@cucumber/cucumber')

Given(/^a passing step$/, function() {});
"""

Scenario Outline: slow handler timeout
Given a file named "features/support/handlers.js" with:
"""
const {<TYPE>, setDefaultTimeout} = require('cucumber')
const {<TYPE>, setDefaultTimeout} = require('@cucumber/cucumber')

setDefaultTimeout(500)

Expand All @@ -40,7 +40,7 @@ Feature: before / after all hook timeouts
Scenario Outline: slow handlers can increase their timeout
Given a file named "features/supports/handlers.js" with:
"""
const {<TYPE>, setDefaultTimeout} = require('cucumber')
const {<TYPE>, setDefaultTimeout} = require('@cucumber/cucumber')

setDefaultTimeout(500)

Expand Down
6 changes: 3 additions & 3 deletions features/before_after_all_hooks.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Feature: Environment Hooks
Scenario: before all / after all hooks
Given a file named "features/support/hooks.js" with:
"""
const {AfterAll, BeforeAll, Given} = require('cucumber')
const {AfterAll, BeforeAll, Given} = require('@cucumber/cucumber')
const {expect} = require('chai')

let counter = 1
Expand Down Expand Up @@ -48,7 +48,7 @@ Feature: Environment Hooks
Scenario: Failing before all hook kills the suite
Given a file named "features/support/hooks.js" with:
"""
const {BeforeAll} = require('cucumber')
const {BeforeAll} = require('@cucumber/cucumber')

BeforeAll(function(callback) {
callback(new Error('my error'))
Expand All @@ -64,7 +64,7 @@ Feature: Environment Hooks
Scenario: Failing after all hook kills the suite
Given a file named "features/support/hooks.js" with:
"""
const {AfterAll} = require('cucumber')
const {AfterAll} = require('@cucumber/cucumber')

AfterAll(function(callback) {
callback(new Error('my error'))
Expand Down
4 changes: 2 additions & 2 deletions features/cli.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Feature: Command line interface
"""
And a file named "step_definitions/cucumber_steps.js" with:
"""
const {When} = require('cucumber')
const {When} = require('@cucumber/cucumber')

When(/^a step is passing$/, function() {})
"""
Expand All @@ -27,7 +27,7 @@ Feature: Command line interface
"""
And a file named "step_definitions/cucumber_steps.js" with:
"""
const {When} = require('cucumber')
const {When} = require('@cucumber/cucumber')

When(/^a step is passing$/, function() {});
"""
Expand Down
8 changes: 4 additions & 4 deletions features/core.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Feature: Core feature elements execution
"""
And a file named "features/step_definitions/cucumber_steps.js" with:
"""
const {Given} = require('cucumber')
const {Given} = require('@cucumber/cucumber')

Given(/^a step passes$/, function() {});
"""
Expand Down Expand Up @@ -43,7 +43,7 @@ Feature: Core feature elements execution
"""
And a file named "features/step_definitions/cucumber_steps.js" with:
"""
const {Given, Then, When} = require('cucumber')
const {Given, Then, When} = require('@cucumber/cucumber')

Given(/^a "Given" step passes$/, function() {})
When(/^a "When" step passes$/, function() {})
Expand All @@ -68,7 +68,7 @@ Feature: Core feature elements execution
"""
And a file named "features/step_definitions/cucumber_steps.js" with:
"""
const {setWorldConstructor, Then, When} = require('cucumber')
const {setWorldConstructor, Then, When} = require('@cucumber/cucumber')
const assert = require('assert')

setWorldConstructor(function () {
Expand Down Expand Up @@ -102,7 +102,7 @@ Feature: Core feature elements execution
"""
And a file named "features/step_definitions/cucumber_steps.js" with:
"""
const {setWorldConstructor, Then, When} = require('cucumber')
const {setWorldConstructor, Then, When} = require('@cucumber/cucumber')
const assert = require('assert')

setWorldConstructor(function () {
Expand Down
4 changes: 2 additions & 2 deletions features/custom_formatter.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Feature: custom formatter
Scenario: extending Formatter
Given a file named "simple_formatter.js" with:
"""
const { Formatter, formatterHelpers, Status } = require('cucumber')
const { Formatter, formatterHelpers, Status } = require('@cucumber/cucumber')

class SimpleFormatter extends Formatter {
constructor(options) {
Expand Down Expand Up @@ -65,7 +65,7 @@ Feature: custom formatter
"""
And a file named "simple_formatter.js" with:
"""
const { SummaryFormatter, formatterHelpers, Status } = require('cucumber')
const { SummaryFormatter, formatterHelpers, Status } = require('@cucumber/cucumber')

class SimpleFormatter extends SummaryFormatter {
constructor(options) {
Expand Down
2 changes: 1 addition & 1 deletion features/custom_stack_trace.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Feature: Custom stack trace
"""
Given a file named "features/step_definitions/cucumber_steps.js" with:
"""
const {When} = require('cucumber')
const {When} = require('@cucumber/cucumber')

const _prepareStackTrace = Error.prepareStackTrace;
Error.prepareStackTrace = () => { return 'Custom message' }
Expand Down
8 changes: 4 additions & 4 deletions features/data_tables.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Feature: Data Tables
"""
Given a file named "features/step_definitions/passing_steps.js" with:
"""
const {Given} = require('cucumber')
const {Given} = require('@cucumber/cucumber')
const assert = require('assert')

Given(/^a table step$/, function(table) {
Expand All @@ -38,7 +38,7 @@ Feature: Data Tables
"""
Given a file named "features/step_definitions/passing_steps.js" with:
"""
const {Given} = require('cucumber')
const {Given} = require('@cucumber/cucumber')
const assert = require('assert')

Given(/^a table step$/, function(table) {
Expand All @@ -64,7 +64,7 @@ Feature: Data Tables
"""
Given a file named "features/step_definitions/passing_steps.js" with:
"""
const {Given} = require('cucumber')
const {Given} = require('@cucumber/cucumber')
const assert = require('assert')

Given(/^a table step$/, function(table) {
Expand All @@ -91,7 +91,7 @@ Feature: Data Tables
"""
Given a file named "features/step_definitions/passing_steps.js" with:
"""
const {Given} = require('cucumber')
const {Given} = require('@cucumber/cucumber')
const assert = require('assert')

Given(/^a table step$/, function(table) {
Expand Down
4 changes: 2 additions & 2 deletions features/direct_imports.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Feature: Core feature elements execution using direct imports
"""
And a file named "features/step_definitions/cucumber_steps.js" with:
"""
const {Given} = require('cucumber')
const {Given} = require('@cucumber/cucumber')

Given(/^a step passes$/, function() {});
"""
Expand All @@ -28,7 +28,7 @@ Feature: Core feature elements execution using direct imports
"""
And a file named "features/step_definitions/cucumber_steps.js" with:
"""
const {Given} = require('cucumber')
const {Given} = require('@cucumber/cucumber')

Given(/^a step fails$/, function(callback) {
callback(new Error('my error'))
Expand Down
4 changes: 2 additions & 2 deletions features/doc_string.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Feature: doc string
"""
And a file named "features/step_definitions/cucumber_steps.js" with:
"""
const {Given} = require('cucumber')
const {Given} = require('@cucumber/cucumber')
const assert = require('assert')

Given(/^a doc string step$/, function(docString) {
Expand All @@ -35,7 +35,7 @@ Feature: doc string
"""
And a file named "features/step_definitions/cucumber_steps.js" with:
"""
const {Given} = require('cucumber')
const {Given} = require('@cucumber/cucumber')
const assert = require('assert')

Given(/^a "([^"]*)" step$/, function(type, docString) {
Expand Down
Loading